1 | static L<S> tok_combineUpperCasePhrases_curly(L<S> tok) { |
2 | new L<S> l; |
3 | for i over tok: { |
4 | S t = tok.get(i); |
5 | if (odd(i) && onlyLettersAndAllUpperCase(t)) { |
6 | int j = i; |
7 | while (j+2 < l(tok) && onlyLettersAndAllUpperCase(tok.get(j+2))) |
8 | j += 2; |
9 | if (j > i) |
10 | l.add(curly(joinSubList(tok, i, j+1))); |
11 | i = j; |
12 | } else |
13 | l.add(t); |
14 | } |
15 | ret l; |
16 | } |
Began life as a copy of #1017561
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017562 |
Snippet name: | tok_combineUpperCasePhrases_curly |
Eternal ID of this version: | #1017562/1 |
Text MD5: | 329bdd4f03854dd88f58629952806720 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-27 13:25:14 |
Source code size: | 403 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 409 / 435 |
Referenced in: | [show references] |