@@ -14,10 +14,10 @@ class ParseException : Exception { const LexPosition pos; - private this( const LexPosition pos, string msg ) - { super(sprintf!"%s [%s]"(msg, pos)); this.pos = pos; } + this( const LexPosition pos, string msg, string file="", int line=0, Throwable next=null ) + { super(sprintf!"[%s] %s"(pos, msg), file, line, next); this.pos = pos; } } private auto createException(Lexer)(Lexer lex, string msg) { return new ParseException(lex.empty?null:lex.front.pos, msg); } @@ -26,9 +26,9 @@ auto parseString(S, T...)(S str, T fn_ln_cn) { return parserFromString(str, fn_ln_cn).parse(); } -auto parseFile(S, T...)(S filename,T ln_cn) +auto parseFile(S, T...)(S filename, T ln_cn) { return parserFromString(filename, ln_cn).parse(); } /// Named Constructor of Parser