Libraryless. Click here for Pure Java version (1640L/11K).
1 | // returns index of "{" or ";" |
2 | static int tok_findEndOfMethodHeader(LS tok, int i) { |
3 | i |= 1; |
4 | int level = 0; |
5 | while (i < l(tok)) { |
6 | S t = tok.get(i); |
7 | if (eq(t, "(")) ++level; |
8 | else if (eq(t, ")")) --level; |
9 | else if (level == 0 && eqOneOf(t, "{", ";")) ret i; |
10 | i += 2; |
11 | } |
12 | ret i; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024401 |
Snippet name: | tok_findEndOfMethodHeader |
Eternal ID of this version: | #1024401/1 |
Text MD5: | 2a5eb5e2e6a3a281ff6645913ab1c3e4 |
Transpilation MD5: | 4c50c1e4deb3db01b84846a23ec16f8b |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-10 14:26:48 |
Source code size: | 314 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 254 / 347 |
Referenced in: | [show references] |