Example #1
0
 /// <summary>
 /// Creates a clause with the span defined by the passed context
 /// </summary>
 /// <param name="context">Parser rule context</param>
 public TestBlockNode(Z80TestParser.TestBlockContext context) : base(context)
 {
     TestKeywordSpan = new TextSpan(context.TEST());
     TestIdSpan      = new TextSpan(context.IDENTIFIER()?[0]);
     TestId          = context.IDENTIFIER()?[0].GetText();
     if (context.CATEGORY() != null)
     {
         CategoryKeywordSpan = new TextSpan(context.CATEGORY());
         if (context.IDENTIFIER().Length > 1)
         {
             CategoryIdSpan = new TextSpan(context.IDENTIFIER()?[1]);
             Category       = context.IDENTIFIER()?[1].GetText();
         }
     }
     Cases = new List <TestCaseNode>();
 }