Libraryless. Click here for Pure Java version (3132L/19K).
1 | scope tok_parseForStatement. |
2 | |
3 | srecord #For(S condition, S body) {} |
4 | |
5 | static For tok_parseForStatement(TokScanner ts) { |
6 | if (!(eq(ts.get(), "for") && eq(ts.get(1), "("))) null; |
7 | ts.consume(); |
8 | S cond = deRoundBracket(ts.consumeBracketPart()); |
9 | int idx = ts.idx; |
10 | ts.skipTo(tok_findEndOfStatement(ts.tok, ts.idx)); |
11 | ret new For(cond, joinSubList(ts.tok, idx-1, ts.idx+1)); |
12 | } |
13 | |
14 | end scope |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030991 |
Snippet name: | tok_parseForStatement |
Eternal ID of this version: | #1030991/7 |
Text MD5: | aab197c013fa571473a4a87b75ba6af6 |
Transpilation MD5: | 39150485bc3c072c485c5e95950f638f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-18 18:18:08 |
Source code size: | 401 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 158 / 257 |
Version history: | 6 change(s) |
Referenced in: | [show references] |