示例#1
0
 static void DeclarationCheck(Token t)
 {
     if (t.Type == TokenType.Identifier && currentVisibility.Find(t.Value) == null)
         throw new ErrorException("Использование ранее необъявленной переменной", t, ErrorType.SyntaxError);
 }
示例#2
0
 public ErrorException(string message, Token token, ErrorType type)
     : base(message)
 {
     Type = type;
     Position = token.Position;
     Line = token.Line;
     Length = token.Length;
 }