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

22
LINES

< > BotCompany Repo | #1021887 // gazelle_addMatch

JavaX fragment (include)

1  
sbool gazelle_addMatch(RuleEngine2_MatchedRule mr, SS map, LS tokC, LS tokI, O... _) {
2  
  bool debug = boolPar debug(_);
3  
  /*if (containsAny(map, mr.rule.dontChangeWords)) {
4  
    if (debug) print("Found dontChangeWord: " + map + " / " + mr.rule.dontChangeWords);
5  
    false;
6  
  }*/
7  
  
8  
  for (O massager : unnull(mr.rule.mapMassagers)) {
9  
    bool wasNull = map == null;
10  
    map = (SS) callF(massager, map, tokC, tokI, mr);
11  
    if (debug && map == null && !wasNull)
12  
      print("mapMassager returned null: " + massager);
13  
  }
14  
15  
  if (map == null) false;
16  
  if (!addMapToMapWithoutOverwritingIC(mr.map, map)) {
17  
    if (debug) print("Adding map failed");
18  
    false;
19  
  }
20  
  mr.flush();
21  
  true;
22  
}

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: 261 / 311
Version history: 4 change(s)
Referenced in: [show references]