// boolOp: [boolOp ("&&" | "||")] equals AstNode BoolOp() { var a = Equals(); for (;;) { Pos p = pos; if (Consume(TT.And)) { a = new AstNode.And(p, a, Equals()); } else if (Consume(TT.Or)) { a = new AstNode.Or(p, a, Equals()); } else { return(a); } } }
public EvalObject Visit(AstNode.And v) { var a = Eval(v.a); return(a.BoolValue ? Eval(v.b) : a); }