Exemple #1
0
        public void ExitPrintitem(BASICParser.PrintitemContext context)
        {
            if (currentStringExpression == null)
            {
                currentPrintItem = new PrintItem(currentNumericExpression.Pop());
            }
            else
            {
                currentPrintItem = new PrintItem(currentStringExpression.Pop());
            }

            if (currentPrintSeparator == PrintList.printseparator.NULL)
            {
                currentPrintList.add(currentPrintItem);
            }
            else
            {
                currentPrintList.add(currentPrintItem, currentPrintSeparator);
                currentPrintSeparator = PrintList.printseparator.NULL;
            }
        }
Exemple #2
0
 public void EnterPrintitem(BASICParser.PrintitemContext context)
 {
     currentStringExpression  = null;
     currentNumericExpression = new Stack <NumericExpression>();
 }
Exemple #3
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="BASICParser.printitem"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitPrintitem([NotNull] BASICParser.PrintitemContext context)
 {
 }