Libraryless. Click here for Pure Java version (288L/3K/8K).
1 | !747 |
2 | !pcall { |
3 | |
4 | m { |
5 | p { |
6 | L<S> tok = javaTok(loadMainJava()); |
7 | for (int c = 0; c < 100; c++) { |
8 | int i = findCodeTokens(tok, "getCurrentCodeLine", "(", ")"); |
9 | if (i < 0) break; |
10 | S line = null; |
11 | pcall { |
12 | int lineNr = tokenLineNr(tok, i); |
13 | line = toLines(join(tok)).get(lineNr-1); |
14 | } |
15 | clearAllTokens(tok.subList(i, i+5)); |
16 | tok.set(i, line == null ? "null" : quote(line)); |
17 | } |
18 | |
19 | saveMainJava(join(tok)); |
20 | } |
21 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001487 |
Snippet name: | Get current code line translator |
Eternal ID of this version: | #1001487/1 |
Text MD5: | d32ce81f138569000756afdc1bf1c644 |
Transpilation MD5: | 8195aec10bb640d2addf3accb4e62cbf |
Author: | stefan |
Category: | javax |
Type: | JavaX translator |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-10-19 17:25:51 |
Source code size: | 489 bytes / 21 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 686 / 699 |
Referenced in: | [show references] |