public object VisitArithmeticOperand([NotNull] KpExperimentParser.ArithmeticOperandContext context) { var objectMultiplicityContext = context.objectMultiplicity(); var numericLiteralTerminal = context.NumericLiteral(); var arithmeticExpressionContext = context.arithmeticExpression(); var result = default(IArithmeticOperand); if (objectMultiplicityContext != null) { result = VisitObjectMultiplicity(objectMultiplicityContext) as IArithmeticOperand; } else if (numericLiteralTerminal != null) { result = GetNumericLiteral(numericLiteralTerminal); } else if (arithmeticExpressionContext != null) { result = VisitArithmeticExpression(arithmeticExpressionContext) as IArithmeticOperand; } return(result); }
/// <summary> /// Visit a parse tree produced by <see cref="KpExperimentParser.arithmeticOperand"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitArithmeticOperand([NotNull] KpExperimentParser.ArithmeticOperandContext context) { return(VisitChildren(context)); }