Exemplo n.º 1
0
 public TexToken(string text, TokenType type, TokenIndex index)
 {
     Text      = text;
     Type      = type;
     Index     = index.Index;
     Line      = index.Line;
     LineIndex = index.LineIndex;
 }
Exemplo n.º 2
0
 public UnexpectedTokenException(TokenIndex index, string code, string message) : base(code, message)
 {
     TokenIndex = index;
 }
Exemplo n.º 3
0
 public UnexpectedTokenException(TokenIndex index, string value)
     : base("UNEXPECTED_TOKEN_ERROR", $"Unexpected token \"{value}\" at line ({index.Line}, {index.LineIndex}).")
 {
     Value      = value;
     TokenIndex = index;
 }
Exemplo n.º 4
0
 public UnexpectedTokenException(TokenIndex index)
     : base("UNEXPECTED_TOKEN_ERROR", $"Unexpected token at line ({index.Line}, {index.LineIndex}).")
 {
     TokenIndex = index;
 }
Exemplo n.º 5
0
 public UnexpectedTokenException(TokenIndex index, char?character)
     : base("UNEXPECTED_CHARACTER_ERROR", $"Unexpected token \"{character}\" at line ({index.Line}, {index.LineIndex}).")
 {
     Character  = character;
     TokenIndex = index;
 }