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

12
LINES

< > BotCompany Repo | #1026122 // rewriteWithDollarVars_withBrackets_iterator

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

Libraryless. Click here for Pure Java version (4242L/27K).

static ItIt<L> rewriteWithDollarVars_withBrackets_iterator(S input, S inputPattern, S... outPatterns) {
  ret mapI(flexMatchDollarVarsIC_withBrackets_iterator(inputPattern, input), map -> getEmits(r {
    // group it
    S grouped = replaceVars_optRound(inputPattern, map);
    if (neq(grouped, input))
      emit(ext grouped(input));
    
    // rewrite it
    for (S pat : outPatterns)
      emit(replaceVars_optRound(pat, map));
  }));
}

Author comment

Began life as a copy of #1026114

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: #1026122
Snippet name: rewriteWithDollarVars_withBrackets_iterator
Eternal ID of this version: #1026122/4
Text MD5: 3b6155860643b8b6aad6ad7bc4332c4e
Transpilation MD5: 5be8da42b229c520a019f7e2ab5c2049
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-25 20:23:47
Source code size: 451 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 193 / 319
Version history: 3 change(s)
Referenced in: [show references]