internal NumberRange
        (
            NumberRangesParser.ItemContext itemContext
        )
        {
            NumberRangesParser.OneContext oneContext = itemContext.one();
            if (!ReferenceEquals(oneContext, null))
            {
                string number = oneContext.NUMBER().GetText();
                Start = number;
                Stop  = number;
            }

            NumberRangesParser.RangeContext rangeContext = itemContext.range();
            if (!ReferenceEquals(rangeContext, null))
            {
                Start = rangeContext.start.Text;
                Stop  = rangeContext.stop.Text;
            }
        }
Exemple #2
0
 /// <summary>
 /// Enter a parse tree produced by <see cref="NumberRangesParser.item"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void EnterItem([NotNull] NumberRangesParser.ItemContext context)
 {
 }