public override Expression VisitConstant_expression([NotNull] calculatorParser.Constant_expressionContext context) { if (context.children != null) { foreach (IParseTree c in context.children) { Visit(c); } } if (_completeness.Results[context]) { Expression lhs = Results[context.GetChild(0)]; Results[context] = lhs; return(lhs); } Results[context] = null; return(null); }
public override bool VisitConstant_expression([NotNull] calculatorParser.Constant_expressionContext context) { if (context.children != null) { foreach (var c in context.children) { if (!Visit(c)) { Results[context] = false; return(false); } } } if (context.ChildCount == 1) { bool lhs = Results[context.GetChild(0)]; Results[context] = lhs; return(lhs); } { Results[context] = false; return(false); } }