Exemple #1
0
        public void ExitMultiplication(QueryParser.MultiplicationContext context)
        {
            CompileLeftAssociativeOperator(context.MULT_DIV(), _expressions,
                                           (opNode, left, right) =>
            {
                var op = opNode.Symbol;
                BinaryOperatorExpression value = null;
                switch (op.Text)
                {
                case "*":
                    value = new MultiplicationExpression(op.Line, op.Column, left, right);
                    break;

                case "/":
                    value = new DivisionExpression(op.Line, op.Column, left, right);
                    break;
                }

                Trace.Assert(value != null, "Invalid multiplication operator " + op.Text);

                return(value);
            });
        }
Exemple #2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="QueryParser.multiplication"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitMultiplication([NotNull] QueryParser.MultiplicationContext context)
 {
 }
Exemple #3
0
 public void EnterMultiplication(QueryParser.MultiplicationContext context)
 {
 }