Libraryless. Click here for Pure Java version (5362L/30K).
static LS getJavaLineCommentsWithoutNestedBlocks(LS tok) { int curlyLevel = 0; new LS comments; for i over tok: { if (curlyLevel == 0 && even(i)) addAll(comments, getJavaLineComments(tok.get(i)); else curlyLevel += curlyLevel(tok.get(i)); } ret comments; }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034733 |
Snippet name: | getJavaLineCommentsWithoutNestedBlocks |
Eternal ID of this version: | #1034733/2 |
Text MD5: | ab798191c9df4d8de5681438c81823af |
Transpilation MD5: | 94cfb1b7710b0aefe8d0de4acd44ea00 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-07 22:00:50 |
Source code size: | 296 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 134 / 199 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |