public bool visitLeave(If iff) { return true; }
bool visitEnter(If ifSymbol) { Expression expression = ifSymbol.expression; Block block = ifSymbol.block; Block elseBlock = ifSymbol.elseBlock; Value.Value result = expressionEvaluator.resolve(scopes.First(), expression); Console.WriteLine("if(" + result.getBoolean() + ")"); if (result.getBoolean()) { block.accept(this); } else { elseBlock?.accept(this); } return false; }
public bool visitEnter(If iff) { return true; }