Libraryless. Click here for Pure Java version (2943L/17K).
1 | // returns actual CNC |
2 | static L<IntRange> tok_findImports_returnRanges(LS tok) {
|
3 | new L<IntRange> imports; |
4 | int n = l(tok); |
5 | for (int i : indicesOf(tok, "import")) {
|
6 | int j = indexOf(tok, ";", i+2); |
7 | if (j < 0) break; |
8 | imports.add(intRange(i-1, j+2)); |
9 | i = j; |
10 | } |
11 | ret imports; |
12 | } |
Began life as a copy of #1031305
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031309 |
| Snippet name: | tok_findImports_returnRanges |
| Eternal ID of this version: | #1031309/3 |
| Text MD5: | a343740607b2a0c88ef75ea08105828d |
| Transpilation MD5: | 32b234a3c99b1f87fb3e1cc8814e8493 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-04 21:31:22 |
| Source code size: | 305 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 353 / 456 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |