private dynamic ResolveOpExpression(ProfaneParser.OpExpressionContext plusContext) { var leftTerm = plusContext.term().First(); var rightTerm = plusContext.term().Last(); var left = ResolveTerm(leftTerm); var right = ResolveTerm(rightTerm); return(left + plusContext.op().GetText() + right); }
/// <summary> /// Exit a parse tree produced by <see cref="ProfaneParser.opExpression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitOpExpression([NotNull] ProfaneParser.OpExpressionContext context) { }