1 | static int tok_forall(L<S> tok, Matches m) { |
2 | if (!(eqGet(tok, 1, "forall") && eqGet(tok, 3, "("))) ret -1; |
3 | int argsFrom = 5; |
4 | int iClosing = indexOf(tok, argsFrom, ")"); |
5 | assertTrue(iClosing >= 0); |
6 | assertEquals(get(tok, iClosing+2), "{"); |
7 | int iEnd = findEndOfBlock(tok, iClosing+2)-1; |
8 | setMatches(m, joinSubList(tok, argsFrom, iClosing-1), |
9 | joinSubList(tok, iClosing+4, iEnd-1)); |
10 | ret iEnd+2; |
11 | } |
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: | #1014433 |
Snippet name: | tok_forall - parse "forall ($1) { $2 }" - returns index of next code token |
Eternal ID of this version: | #1014433/8 |
Text MD5: | aadef4503ab3a7de57dc27535297b31f |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-21 18:24:21 |
Source code size: | 419 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 362 / 399 |
Version history: | 7 change(s) |
Referenced in: | [show references] |