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

15
LINES

< > BotCompany Repo | #1017566 // Test tok_parseIfStatement (OK except for the tricky case)

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

Download Jar. Libraryless. Click here for Pure Java version (6700L/48K).

!7

p-exp {
  for (S s : tlft([[
    if (bla) blabla(); more;
    if (bla) { block! } more;
    if (bla) for (a; b; c) { block! } more; // will fail
    if something else
  ]])) {
    L<S> tok = javaTok(s);
    T3<LS, LS, Int> t = tok_parseIfStatement(tok);
    printStruct(t);
    if (t != null) printStruct(subList(tok, t.c));
  }
}

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: #1017566
Snippet name: Test tok_parseIfStatement (OK except for the tricky case)
Eternal ID of this version: #1017566/6
Text MD5: 92684ccdd09fa4b122403878532414a6
Transpilation MD5: 9a889f6aebde381330198b471646872a
Author: stefan
Category: javax / parsing
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-27 14:28:46
Source code size: 348 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 527 / 1268
Version history: 5 change(s)
Referenced in: