Libraryless. Click here for Pure Java version (3549L/21K).
svoid tok_runnableClasses(LS tok) { jreplace(tok, "runnable static record", "static runnable record"); int i; while ((i = jfind(tok, "runnable <id> <id>", (_tok, nIdx) -> eqOneOf(tok.get(nIdx+3), "record", "class"))) >= 0) { int iOpening = indexOf(tok, i, "{"); int iClosing = tok_findEndOfBlock(tok, iOpening)-1; tokSet_reTok(tok, iClosing, "}}"); tokSet_reTok(tok, iOpening, "implements Runnable { run {"); clearTokens_reTok(tok, i, i+2); } /*replaceKeywordBlock(tok, "runnable class <id>", "class $3 implements Runnable { run {", "}}");*/ }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027547 |
Snippet name: | tok_runnableClasses (and records) |
Eternal ID of this version: | #1027547/5 |
Text MD5: | 3225fc128e6886d8936fda5ce879b794 |
Transpilation MD5: | 635ae99b3ae2062ba2487636767e6a2a |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-05 13:28:45 |
Source code size: | 607 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 211 / 324 |
Version history: | 4 change(s) |
Referenced in: | [show references] |