diff --git a/src/main/java/carpet/script/Expression.java b/src/main/java/carpet/script/Expression.java index 2854b87e..4f238ab2 100644 --- a/src/main/java/carpet/script/Expression.java +++ b/src/main/java/carpet/script/Expression.java @@ -1727,7 +1727,7 @@ public class Expression // a few exceptions which we don't implement in the framework for simplicity for now if (!operation.pure()) { - if (!symbol.equals("->") || expectedType != Context.Type.MAPDEF) + if (!(symbol.equals("->") || symbol.equals("define")) || expectedType != Context.Type.MAPDEF) { return optimized; } @@ -1772,7 +1772,7 @@ public class Expression { result = ((ILazyOperator) operation).lazyEval(ctx, expectedType, this, node.token, args.get(0), args.get(1)).evalValue(null, expectedType); } - node.token.disguiseAs(null, "=>"+result.getString()); + node.token.disguiseAs(null, "=> "+result.getString()); node.op = LazyValue.ofConstant(result); if (logger != null) { diff --git a/src/main/java/carpet/script/ScriptCommand.java b/src/main/java/carpet/script/ScriptCommand.java index 3161f99c..299606ac 100644 --- a/src/main/java/carpet/script/ScriptCommand.java +++ b/src/main/java/carpet/script/ScriptCommand.java @@ -615,7 +615,7 @@ public class ScriptCommand { return Carpet.Messenger_compose(styleForToken(token) + " " + surface); } - return Carpet.Messenger_compose(styleForToken(token)+"br " + surface, "^gi " + token.comment); + return Carpet.Messenger_compose(styleForToken(token)+"u " + surface, "^gi " + token.comment); } private static String styleForToken(Token token)