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

11
LINES

< > BotCompany Repo | #1017735 // NLStringMatcher_singleDollarVar

JavaX fragment (include)

sclass NLStringMatcher_singleDollarVar extends StringMatcher {
  // change matches only if returning true
  bool match(S pat, S input, SS matches) {
    if (!isDollarVar(pat)) ret match3(pat, input);
    ret addMapToMapWithoutOverwritingIC(matches, litmap(pat, input));
  }
  
  S apply(S input, SS matches) {
    ret replaceVars(input, matches);
  }
}

Author comment

Began life as a copy of #1017592

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017735
Snippet name: NLStringMatcher_singleDollarVar
Eternal ID of this version: #1017735/4
Text MD5: bdac21d9944dff1cb12c05f472a5fd26
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-08-15 15:58:49
Source code size: 362 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 317 / 848
Version history: 3 change(s)
Referenced in: [show references]