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

9
LINES

< > BotCompany Repo | #1025379 // tok_collectTransformers

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

Libraryless. Click here for Pure Java version (5044L/29K).

svoid tok_collectTransformers(LS tok, LS out, S keyword default "meta-transform") {
  int i = -1;
  while ((i = jfind(tok, i+1, keyword + " {")) >= 0) {
    int iOpening = indexOf(tok, i, "{");
    int iClosing = findEndOfBracketPart(tok, iOpening)-1;
    add(out, joinSubList(tok, iOpening+2, iClosing-1));
    clearTokens_reTok(tok, i, iClosing+1);
  }
}

Author comment

Began life as a copy of #1020932

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: #1025379
Snippet name: tok_collectTransformers
Eternal ID of this version: #1025379/2
Text MD5: 881d1be0c10fb96d6eed401b6be5e167
Transpilation MD5: aa0c2a8fe95b131abd68a57704372701
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:35:49
Source code size: 364 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 242 / 320
Version history: 1 change(s)
Referenced in: [show references]