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

11
LINES

< > BotCompany Repo | #1025382 // tok_metaTransformNow - collect & run meta-transformNow { ... } blocks

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

Libraryless. Click here for Pure Java version (7838L/46K).

1  
// transformNow's are only run once
2  
svoid tok_metaTransformNow(LS tok) {
3  
  int i = -1;
4  
  while ((i = jfind(tok, i+1, "meta-transformNow {")) >= 0) {
5  
    int iOpening = indexOf(tok, i, "{");
6  
    int iClosing = findEndOfBracketPart(tok, iOpening)-1;
7  
    S code = joinSubList(tok, iOpening+2, iClosing-1);
8  
    clearTokens_reTok(tok, i, iClosing+1);
9  
    tok_runMetaTransformer(tok, code);
10  
  }
11  
}

Author comment

Began life as a copy of #1025379

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025382
Snippet name: tok_metaTransformNow - collect & run meta-transformNow { ... } blocks
Eternal ID of this version: #1025382/8
Text MD5: 3b9383dcbf1cebec9d4235c4f8e22f32
Transpilation MD5: 5ffd5a63881450205deac5b064ce90f8
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-06 21:39:14
Source code size: 400 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 244 / 342
Version history: 7 change(s)
Referenced in: [show references]