1 | // returns: (condition, goto, closing line number) |
2 | // or null |
3 | static Triple<S, S, Int> ctxCaseGoto(L<S> lines, int i) { |
4 | new Matches m; |
5 | while (i <= l(lines) && emptyAfterTrim(get(lines, i))) ++i; |
6 | if (!flexMatch("CASE (*) ACTION", get(lines, i), m, false)) null; |
7 | S condition = $1; |
8 | if (!flexMatch("[GOTO] = *", get(lines, i+1), m, false)) null; |
9 | S target = $1; |
10 | int closing = indexOfClosingCurlyBracket(lines, i+2); |
11 | ret triple(condition, target, closing); |
12 | } |
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: | #1008883 |
Snippet name: | ctxCaseGoto |
Eternal ID of this version: | #1008883/4 |
Text MD5: | 6194b9958990e89569fe2d9d62935183 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-15 18:38:47 |
Source code size: | 480 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 592 / 600 |
Version history: | 3 change(s) |
Referenced in: | [show references] |