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

22
LINES

< > BotCompany Repo | #1021887 // gazelle_addMatch

JavaX fragment (include)

sbool gazelle_addMatch(RuleEngine2_MatchedRule mr, SS map, LS tokC, LS tokI, O... _) {
  bool debug = boolPar debug(_);
  /*if (containsAny(map, mr.rule.dontChangeWords)) {
    if (debug) print("Found dontChangeWord: " + map + " / " + mr.rule.dontChangeWords);
    false;
  }*/
  
  for (O massager : unnull(mr.rule.mapMassagers)) {
    bool wasNull = map == null;
    map = (SS) callF(massager, map, tokC, tokI, mr);
    if (debug && map == null && !wasNull)
      print("mapMassager returned null: " + massager);
  }

  if (map == null) false;
  if (!addMapToMapWithoutOverwritingIC(mr.map, map)) {
    if (debug) print("Adding map failed");
    false;
  }
  mr.flush();
  true;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1021887
Snippet name: gazelle_addMatch
Eternal ID of this version: #1021887/5
Text MD5: 9df4acecc8a70b78cceea60a4dc7f402
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-11 17:48:38
Source code size: 703 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 181 / 232
Version history: 4 change(s)
Referenced in: [show references]