// returns index of trailing N token static int scanToEndOfInitializer2(L<S> tok, int i) { int level = 0; while (i < l(tok)) { S t = tok.get(i); if (eqOneOf(t, "(", "{")) ++level; else if (level > 0 && eqOneOf(t, ")", "}")) --level; else if (level == 0 && eqOneOf(tok.get(i), ";", ",", ")", "}")) ret i-1; i++; } ret i; }
Began life as a copy of #1002126
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021798 |
Snippet name: | scanToEndOfInitializer2 |
Eternal ID of this version: | #1021798/2 |
Text MD5: | 9ffebee10b2c272949a45bc9f4b65d27 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-27 13:37:18 |
Source code size: | 367 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 344 / 376 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |