예제 #1
0
 public UnexpectedTokenException(Token current, TokenKind[] tokenKinds)
     : base(string.Format("On line {0} expected {1} but got {2}.",
     current.Line, string.Join(",",tokenKinds), current.Kind ))
 {
     EncounteredToken = current;
     ExpectedTokenKinds = tokenKinds;
 }
예제 #2
0
 public UnexpectedTokenException(Token current, TokenKind kind)
     : this(current, new[]{kind})
 {
 }