lcc/Compiler/Parser/Exceptions/UnexpectedTokenException.cs
Clemens-Dautermann b3fe78fffb Added Parser
- can parse a basic token list to an AST
2020-08-17 01:07:59 +02:00

20 lines
No EOL
527 B
C#

using System;
using Compiler.Lexer;
namespace Compiler.Parser.Exceptions
{
public class UnexpectedTokenException : Exception
{
public TokenType expected { get; set; }
public TokenType got { get; set; }
public override string Message { get; }
public UnexpectedTokenException(TokenType expected, TokenType got)
{
this.expected = expected;
this.got = got;
this.Message = "Unexpected Token " + got + ". Expected: " + expected;
}
}
}