This commit is contained in:
hneemann 2019-07-06 14:24:44 +02:00
parent e079729e1a
commit 383b15dc06

View File

@ -192,7 +192,7 @@ public class Parser {
return lino(c -> ref.declareVar(c, initVal.value(c)));
case EQUAL:
if (export)
throw newParserException("export not alowed here!");
throw newParserException("export not allowed here!");
final Expression val = parseExpression();
if (isRealStatement) expect(SEMICOLON);
return lino(c -> {
@ -204,18 +204,18 @@ public class Parser {
case ADD:
expect(ADD);
if (export)
throw newParserException("export not alowed here!");
throw newParserException("export not allowed here!");
if (isRealStatement) expect(SEMICOLON);
return lino(c -> ref.set(c, Value.toLong(ref.get(c)) + 1));
case SUB:
expect(SUB);
if (export)
throw newParserException("export not alowed here!");
throw newParserException("export not allowed here!");
if (isRealStatement) expect(SEMICOLON);
return lino(c -> ref.set(c, Value.toLong(ref.get(c)) - 1));
case SEMICOLON:
if (export)
throw newParserException("export not alowed here!");
throw newParserException("export not allowed here!");
return lino(ref::get);
default:
throw newUnexpectedToken(refToken);