static Set<S> mapLike tok_allGroups_recursive(O tokenizer, S s) {
new Set<S> set;
tok_allGroups_recursive_collect(tokenizer, s, set);
ret set;
}
svoid tok_allGroups_recursive_collect(O tokenizer, S s, Set<S> set) {
if (empty(s)) ret;
LS tok = cast callF(tokenizer, s);
for ping (int i = 1; i < l(tok); i += 2) {
S t = tok.get(i);
if (isCurlyBraced(t)) {
t = unCurly(t);
set.add(t);
tok_allGroups_recursive_collect(tokenizer, t, set);
}
}
}Began life as a copy of #1021295
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1022313 |
| Snippet name: | tok_allGroups_recursive - TODO: could be done easier with bracketMap |
| Eternal ID of this version: | #1022313/5 |
| Text MD5: | 09b8060e44d66bb257368f859ae41c43 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-13 12:21:56 |
| Source code size: | 501 bytes / 18 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 761 / 790 |
| Version history: | 4 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1022315 - tok_allGroups_recursive_uncurly - drop curly brackets within the returned phrases |