public override void EnterIndexOperand([NotNull] TxMarkParser.IndexOperandContext context)
 {
     if (context.OPEN_PARENTHESIS() != null)
     {
         _compileContext.Push(CodeContextTypes.ParenthesizedExpression);
     }
     else
     {
         _compileContext.Push(CodeContextTypes.Expression);
         if (context.OPERATOR_LAST() != null)
         {
             if (context.number() == null)
             {
                 _compileContext.Number("1");
             }
         }
     }
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="TxMarkParser.indexOperand"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitIndexOperand([NotNull] TxMarkParser.IndexOperandContext context)
 {
 }
Exemple #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="TxMarkParser.indexOperand"/>.
 /// <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 VisitIndexOperand([NotNull] TxMarkParser.IndexOperandContext context)
 {
     return(VisitChildren(context));
 }
 public override void ExitIndexOperand([NotNull] TxMarkParser.IndexOperandContext context)
 {
     _compileContext.Pop();
 }