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

Editing Snippet ID: #1022416
Snippet name:
Category, Type:
Content:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
static L<GazelleTree> gazelle_getChildren_withContinuations
(GazelleTree tree, O... _) {
  L<GazelleTree> l = gazelle_getChildren(tree, _);
  bool debug = boolPar debug(_) || boolPar debugContinuations(_);
  
  new Matches m;
  bool changes = false;
  for i over l: {
    GazelleTree t = l.get(i);
    continue unless eq(t.lineType, 'instruction)
      && match("continue with line * of rule * without variables", 
t.line, m);
      
    if (debug) print("Processing continuation: " + sfu(m));
    S ruleID = $2;
    RuleEngine2.Rule rule = t.ctx.engine.getRule(ruleID);
    if (rule == null) {
      print("Follow-up rule not found: " + ruleID);
      continue with l.remove(i--);
    }
    
    set changes;
    t.mr.rule = rule;
    t.mr.iCond = parseInt($1)-1;
    t.mr.map = ciMap();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Comment:
Public (visible to everyone):
Created: 2019-03-16 23:37:32

This page without fancy editor.