removed wierd token morphs

This commit is contained in:
gnembon committed 2025-02-19 12:31:47 +01:00
1 parent eb1ca9702c
commit a2c11c6762
1 file changed
+4 -4
+4 -4
View File
@@ -1378,11 +1378,11 @@ public class Expression
{ {
throw new ExpressionException(context, this, token, "Not a number"); throw new ExpressionException(context, this, token, "Not a number");
} }
token.morph(Token.TokenType.CONSTANT, token.surface); //token.morph(Token.TokenType.CONSTANT, token.surface);
nodeStack.push(ExpressionNode.ofConstant(number, token)); nodeStack.push(ExpressionNode.ofConstant(number, token));
} }
case STRINGPARAM -> { case STRINGPARAM -> {
token.morph(Token.TokenType.CONSTANT, token.surface); //token.morph(Token.TokenType.CONSTANT, token.surface);
nodeStack.push(ExpressionNode.ofConstant(new StringValue(token.surface), token)); nodeStack.push(ExpressionNode.ofConstant(new StringValue(token.surface), token));
} }
case HEX_LITERAL -> { case HEX_LITERAL -> {
@@ -1395,7 +1395,7 @@ public class Expression
{ {
throw new ExpressionException(context, this, token, "Not a number"); throw new ExpressionException(context, this, token, "Not a number");
} }
token.morph(Token.TokenType.CONSTANT, token.surface); //token.morph(Token.TokenType.CONSTANT, token.surface);
nodeStack.push(ExpressionNode.ofConstant(hexNumber, token)); nodeStack.push(ExpressionNode.ofConstant(hexNumber, token));
} }
default -> throw new ExpressionException(context, this, token, "Unexpected token '" + token.surface + "'"); default -> throw new ExpressionException(context, this, token, "Unexpected token '" + token.surface + "'");
@@ -1553,7 +1553,7 @@ public class Expression
else else
{ {
returnNode.op = LazyValue.ofConstant(Value.NULL); returnNode.op = LazyValue.ofConstant(Value.NULL);
returnNode.token.morph(Token.TokenType.CONSTANT, ""); returnNode.token.morph(Token.TokenType.CONSTANT, "null");
returnNode.args = Collections.emptyList(); returnNode.args = Collections.emptyList();
if (logger != null) if (logger != null)
{ {