From a2c11c676206f7af49c842ed44fa678cdc326f8c Mon Sep 17 00:00:00 2001 From: gnembon <41132274+gnembon@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:31:47 +0100 Subject: [PATCH] removed wierd token morphs --- src/main/java/carpet/script/Expression.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/carpet/script/Expression.java b/src/main/java/carpet/script/Expression.java index 46114c24..13439f3a 100644 --- a/src/main/java/carpet/script/Expression.java +++ b/src/main/java/carpet/script/Expression.java @@ -1378,11 +1378,11 @@ public class Expression { 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)); } 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)); } case HEX_LITERAL -> { @@ -1395,7 +1395,7 @@ public class Expression { 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)); } default -> throw new ExpressionException(context, this, token, "Unexpected token '" + token.surface + "'"); @@ -1553,7 +1553,7 @@ public class Expression else { returnNode.op = LazyValue.ofConstant(Value.NULL); - returnNode.token.morph(Token.TokenType.CONSTANT, ""); + returnNode.token.morph(Token.TokenType.CONSTANT, "null"); returnNode.args = Collections.emptyList(); if (logger != null) {