1 | static bool tok_tokenBeforeLonelyReturnValue(LS tok, int i) { |
2 | S t = get(tok, i); |
3 | if (l(t) == 1 && "{};".contains(t) || eq(t, "else")) true; |
4 | if (!eq(t, ")")) false; |
5 | int level = 0; |
6 | while (i > 0) { |
7 | if (eq(tok.get(i), ")")) ++level; |
8 | if (eq(tok.get(i), "(")) --level; |
9 | if (level == 0) ret eq(get(tok, i-2), "if"); |
10 | i -= 2; |
11 | } |
12 | false; |
13 | } |
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: | #1008964 |
Snippet name: | tok_tokenBeforeLonelyReturnValue |
Eternal ID of this version: | #1008964/4 |
Text MD5: | 15643c7809a2cc3325ef3720dab622c1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-06 04:10:11 |
Source code size: | 368 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 543 / 600 |
Version history: | 3 change(s) |
Referenced in: | [show references] |