multiline stings cause tokens to offset incorrectly error messages

This commit is contained in:
gnembon committed 2020-05-02 12:47:07 -03:00
1 parent 4e17f2277e
commit dbb29cbeb9
1 file changed
+5
@@ -201,6 +201,11 @@ public class Tokenizer implements Iterator<Tokenizer.Token>
{
token.append(input.charAt(pos++));
linepos++;
if (ch=='\n')
{
lineno++;
linepos = 0;
}
if (pos == input.length() && expression != null && context != null)
throw new ExpressionException(context, this.expression, token, "Program truncated");
}