Libraryless. Click here for Pure Java version (1640L/11K).
// returns index of "{" or ";" static int tok_findEndOfMethodHeader(LS tok, int i) { i |= 1; int level = 0; while (i < l(tok)) { S t = tok.get(i); if (eq(t, "(")) ++level; else if (eq(t, ")")) --level; else if (level == 0 && eqOneOf(t, "{", ";")) ret i; i += 2; } ret i; }
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: | 252 / 344 |
Referenced in: | [show references] |