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

25
LINES

< > BotCompany Repo | #1008175 // applyAlwaysRules_step

JavaX fragment (include)

1  
static new Map<S, O> applyAlwaysRules_handlers;
2  
sbool applyAlwaysRules_step_debug;
3  
4  
// for handlers
5  
static new ThreadLocal<S> applyAlwaysRules_ruleID;
6  
7  
static void applyAlwaysRules_step() {
8  
  L<LispStatement> statements = lispStatements_cloned();
9  
  if (applyAlwaysRules_step_debug)
10  
    print("applyAlwaysRules_step: " + struct(statements));
11  
  for (LispStatement s : statements) {
12  
    Lisp l = s.term;
13  
    O handler = applyAlwaysRules_handlers.get(l.head);
14  
    if (handler != null) {
15  
      applyAlwaysRules_ruleID.set(s.globalID);
16  
      if (applyAlwaysRules_step_debug)
17  
        print("Calling handler for " + l.head);
18  
      try {
19  
        callF(handler, /*lispSingleChildOrFull*/(l));
20  
      } finally {
21  
        applyAlwaysRules_ruleID.set(null);
22  
      }
23  
    }
24  
  }
25  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008175
Snippet name: applyAlwaysRules_step
Eternal ID of this version: #1008175/7
Text MD5: 887537be706e07f6b9e080e912d086f3
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-07 00:27:51
Source code size: 789 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 511 / 514
Version history: 6 change(s)
Referenced in: [show references]