Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1012024 // Test reTok_multi (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (3900L/25K).

!7

set flag reTok_multi_debug.

p {
  LS tok = javaTok("class main { bla bla; and blubb blubb; }");
  printStruct(tok);
  new L<IntRange> l;
  for i over tok: {
    if (eq(tok.get(i), "bla")) {
      tok.set(i, "bla.");
      l.add(intRange(i, i+1));
    } else if (eq(tok.get(i), "blubb") && eq(tok.get(i+2), "blubb")) {
      tok.set(i, "blubb.");
      tok.set(i+1, "");
      tok.set(i+2, "");
      l.add(intRange(i, i+3));
    }
  }
  printStruct(tok);
  check_reTok_multi(tok, l);
}

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: 502 / 1255
Version history: 7 change(s)
Referenced in: [show references]