private static void ThrowIfAnyRecognitionExceptionFound(ExpressionParser.ExpContext tree) { var recognitionExceptions = RecognitionErrors .FindAll(tree); if (recognitionExceptions.Any()) { throw new AntlrException( $"Following problems were found while parsing the expression: {tree}", recognitionExceptions); } }
public override object VisitExp(ExpressionParser.ExpContext context) => BinaryOp(context.op.Text, Visit(context.val1), Visit(context.val2));
public override object VisitExp(ExpressionParser.ExpContext context) { return(base.Visit(context.expression())); }