Exemplo n.º 1
0
 public SyntexToken(SyntexKind kind, int position, string text, object value)
 {
     Kind     = kind;
     Position = position;
     Text     = text;
     Value    = value;
 }
Exemplo n.º 2
0
 private SyntexToken Match(SyntexKind kind)
 {
     if (Current.Kind == kind)
     {
         return(NextToken());
     }
     else
     {
         _diagnostics.Add($"Error: unexpected token <{Current.Kind}>, expected {kind} ");
         return(new SyntexToken(kind, Current.Position, null, null));
     }
 }