Improved error message (added character position.

This commit is contained in:
Achim D. Brucker 2018-05-19 20:36:28 +01:00
parent 9141f8ead4
commit 867df13019
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ object LaTeXLexer extends RegexParsers {
def apply(code: String): Either[LaTeXLexerError, List[LaTeXToken]] = {
parse(tokens, code) match {
case NoSuccess(msg, next) => Left(LaTeXLexerError(msg))
case NoSuccess(msg, next) => Left(LaTeXLexerError(msg + "at position "+next.pos))
case Success(result, next) => Right(result)
}
}