Libraryless. Click here for Pure Java version (5328L/30K).
1 | // TODO: line comments inside of /* */ comments (super-special case) |
2 | static LS getJavaLineComments(S s) { |
3 | ret getJavaLineComments(javaTok(s)); |
4 | } |
5 | |
6 | static LS getJavaLineComments(LS tok) { |
7 | new LS out; |
8 | for (int i = 0; i < l(tok); i += 2) |
9 | addAll(out, regexpAllFirstGroups("//([^\r\n]*)", tok.get(i))); |
10 | ret out; |
11 | } |
Began life as a copy of #1003572
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030956 |
Snippet name: | getJavaLineComments |
Eternal ID of this version: | #1030956/7 |
Text MD5: | 89f167666d5d8dad1ec0c894c0453520 |
Transpilation MD5: | e58f6940c77cc8c8edca8661a11e9ce3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-07 21:54:00 |
Source code size: | 329 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 173 / 264 |
Version history: | 6 change(s) |
Referenced in: | [show references] |