示例#1
0
 /// <summary>
 /// Adds a new identifier text span
 /// </summary>
 public void AddIdentifier(ITerminalNode node)
 {
     if (IdentifierSpans == null)
     {
         IdentifierSpans = new List <TextSpan>();
     }
     IdentifierSpans.Add(new TextSpan(node.Symbol.StartIndex, node.Symbol.StopIndex + 1));
 }
示例#2
0
 /// <summary>
 /// Adds a new identifier text span
 /// </summary>
 public void AddIdentifier(ParserRuleContext context)
 {
     if (IdentifierSpans == null)
     {
         IdentifierSpans = new List <TextSpan>();
     }
     IdentifierSpans.Add(new TextSpan(context.Start.StartIndex, context.Stop.StopIndex + 1));
 }