tweaks to formatting and optimize map definitions
This commit is contained in:
1 parent
947e13835e
commit
7087fa8510
2 files changed
+3
-3
No files matched your search
@@ -1727,7 +1727,7 @@ public class Expression
|
|||||||
// a few exceptions which we don't implement in the framework for simplicity for now
|
// a few exceptions which we don't implement in the framework for simplicity for now
|
||||||
if (!operation.pure())
|
if (!operation.pure())
|
||||||
{
|
{
|
||||||
if (!symbol.equals("->") || expectedType != Context.Type.MAPDEF)
|
if (!(symbol.equals("->") || symbol.equals("define")) || expectedType != Context.Type.MAPDEF)
|
||||||
{
|
{
|
||||||
return optimized;
|
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);
|
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);
|
node.op = LazyValue.ofConstant(result);
|
||||||
if (logger != null)
|
if (logger != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ public class ScriptCommand
|
|||||||
{
|
{
|
||||||
return Carpet.Messenger_compose(styleForToken(token) + " " + surface);
|
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)
|
private static String styleForToken(Token token)
|
||||||
|
|||||||
Reference in new issue
Block a user