Lexer
- When throwing an exception when lexing include the current position and column
This commit is contained in:
parent
d716c306a2
commit
078a971a67
|
@ -20,7 +20,8 @@ public final class LexerException : TError
|
||||||
|
|
||||||
this(Lexer offendingInstance, LexerError errType = LexerError.OTHER, string msg = "")
|
this(Lexer offendingInstance, LexerError errType = LexerError.OTHER, string msg = "")
|
||||||
{
|
{
|
||||||
super(to!(string)(errType)~(msg.length ? ": "~msg : ""));
|
string positionString = "("~to!(string)(offendingInstance.line)~", "~to!(string)(offendingInstance.column)~")";
|
||||||
|
super("LexerException("~to!(string)(errType)~")"~(msg.length ? ": "~msg : "")~" at "~positionString);
|
||||||
this.offendingInstance = offendingInstance;
|
this.offendingInstance = offendingInstance;
|
||||||
this.errType = errType;
|
this.errType = errType;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue