Libraryless. Click here for Pure Java version (4638L/27K).
svoid tok_beginPeriod(LS tok) { for (i : jfind_all_reversed(tok, "begin.", (_tok, nIdx) -> startsWithSpaceEtc(_get(tok, nIdx+4)))) { int iClosing = tok_findEndOfBlock(tok, i)-1; tokPrepend_reTok(tok, iClosing, "}\n"); tokReplace_reTok(tok, i, i+3, "public void run aka get() {"); } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1032863 |
Snippet name: | tok_beginPeriod - translates "begin." to "run aka get { ... }" |
Eternal ID of this version: | #1032863/6 |
Text MD5: | 18dc77fe418b2af15e262830864ff563 |
Transpilation MD5: | c91ecf76fda16dd9c0be618872bf52cc |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-07 00:33:37 |
Source code size: | 310 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 172 / 263 |
Version history: | 5 change(s) |
Referenced in: | [show references] |