Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1025433 - tok_statementToBlock

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2435L/16K).

// 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   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1025433
Snippet name: tok_statementToBlock
Eternal ID of this version: #1025433/2
Text MD5: 3f5ba57eedb392c4da69441a6fafb04f
Transpilation MD5: b87e39120f22f2e1a8a7c330ba71d19a
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 00:11:19
Source code size: 247 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 15 / 37
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1025433 & http://1025433.tinybrain.de