Example #1
0
        public void ExitPrimary(BASICParser.PrimaryContext context)
        {
            switch (primaryOp)
            {
            case PrimaryOptions.EXP:
                currentPrimary.Push(currentNumericExpression.Pop());
                break;

            case PrimaryOptions.FN:
                currentPrimary.Push(currentNumericFunctionRef);
                break;

            case PrimaryOptions.CONST:
                currentPrimary.Push(currentNumericConstant);
                break;

            case PrimaryOptions.VAR:
                currentPrimary.Push(currentNumericVariable);
                break;
            }
            currentFactor.Peek().add(currentPrimary.Pop());
        }
Example #2
0
 public void EnterPrimary(BASICParser.PrimaryContext context)
 {
 }
Example #3
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="BASICParser.primary"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitPrimary([NotNull] BASICParser.PrimaryContext context)
 {
 }