Libraryless. Click here for Pure Java version (2558L/16K).
// add {} to a statement if it isn't a block already // i = beginning of statement or block svoid tok_statementToBlock(LS tok, int i) { if (neqGet(tok, i, "{")) { int iEnd = tok_findEndOfStatement(tok, i)-1; tokAppend_reTok(tok, iEnd, " }"); tokPrepend_reTok(tok, i, "{ "); } }
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: | #1025433 |
Snippet name: | tok_statementToBlock |
Eternal ID of this version: | #1025433/3 |
Text MD5: | 2eab0a8134f8d54805d185f2652cfb37 |
Transpilation MD5: | 26b5cb8d2b4a76801a1f25e1cf649e84 |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-29 19:57:19 |
Source code size: | 301 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 273 / 415 |
Version history: | 2 change(s) |
Referenced in: | [show references] |