Show better error message on 's∀'

see #15
This commit is contained in:
Arne Keller 2021-08-21 16:50:37 +02:00
parent b558d3cbf5
commit c190289f6f

View File

@ -151,7 +151,9 @@ public class LambdaLexer {
} while (pos < term.length() && Character.isLetterOrDigit(term.charAt(pos))
&& (int) term.charAt(pos) < 128);
if (pos < term.length() && (int) term.charAt(pos) >= 128) {
return new Result<>(null, ParseError.unexpectedCharacter2(term.charAt(pos), pos, term, errorType));
return new Result<>(null,
ParseError.unexpectedCharacter2(term.charAt(pos), pos, term, errorType)
.expectedType(TokenType.VARIABLE));
}
String s = sb.toString();
TokenType type;