예제 #1
0
 public override void yyerror(string s, params object[] a)
 {
     if (handler != null)
     {
         handler.AddError(s, tokLin, tokCol, tokLin, tokECol);
     }
 }
예제 #2
0
 public void StartScope(string name = null)
 {
     if (ScopesStack.Count > 1000)
     {
         _errorHandler.AddError(new RuntimeError("Stack overflow"));
     }
     else
     {
         ScopesStack.Push(new Scope
         {
             Name = name ?? Guid.NewGuid().ToString()
         });
     }
 }