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

15
LINES

< > BotCompany Repo | #1023770 // WordTokReplacerWithSecondIn

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

Libraryless. Click here for Pure Java version (4192L/26K).

sclass WordTokReplacerWithSecondIn > WordTokReplacer {
  S secondIn;
  
  *(S sentence, Collection<S> vars, S *secondIn, LS replaced_multi) {
    super(sentence, vars, replaced_multi);
  }
  
  S rewrite(S s, SS map) {
    ret join(replaceCodeTokensUsingMap_curly(wordTok_noBrackets(s), map);
  }
  
  run {
    emit(WordTokReplacer(rewrite(secondIn, map), vars, map(tokReplaced, t -> rewrite(join(t), map))));
  }
}

Author comment

Began life as a copy of #1023530

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: #1023770
Snippet name: WordTokReplacerWithSecondIn
Eternal ID of this version: #1023770/9
Text MD5: 177d00af6808117955066f10d69844a8
Transpilation MD5: 349ac1b3d882f80ca82ecdf318dcb854
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-08 23:29:02
Source code size: 430 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 216 / 648
Version history: 8 change(s)
Referenced in: [show references]