Download Jar. Libraryless. Click here for Pure Java version (3900L/25K).
1 | !7 |
2 | |
3 | set flag reTok_multi_debug. |
4 | |
5 | p { |
6 | LS tok = javaTok("class main { bla bla; and blubb blubb; }"); |
7 | printStruct(tok); |
8 | new L<IntRange> l; |
9 | for i over tok: { |
10 | if (eq(tok.get(i), "bla")) { |
11 | tok.set(i, "bla."); |
12 | l.add(intRange(i, i+1)); |
13 | } else if (eq(tok.get(i), "blubb") && eq(tok.get(i+2), "blubb")) { |
14 | tok.set(i, "blubb."); |
15 | tok.set(i+1, ""); |
16 | tok.set(i+2, ""); |
17 | l.add(intRange(i, i+3)); |
18 | } |
19 | } |
20 | printStruct(tok); |
21 | check_reTok_multi(tok, l); |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012024 |
Snippet name: | Test reTok_multi (OK) |
Eternal ID of this version: | #1012024/8 |
Text MD5: | ad975d8470d9fb9d7ebfc5f01635809b |
Transpilation MD5: | 3a06bb4703b4f2a023020db26dc86268 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-11-08 00:07:44 |
Source code size: | 511 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 503 / 1256 |
Version history: | 7 change(s) |
Referenced in: | [show references] |