From e7fcdba2e7f374b0f742332d61ef05ab1dd9485d Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Sun, 23 Apr 2023 20:11:06 +0200 Subject: [PATCH] ast_to_src: format function calls and unary operators without space --- metalua/compiler/ast_to_src.mlua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metalua/compiler/ast_to_src.mlua b/metalua/compiler/ast_to_src.mlua index 5bf9665..2245c2f 100644 --- a/metalua/compiler/ast_to_src.mlua +++ b/metalua/compiler/ast_to_src.mlua @@ -150,8 +150,8 @@ local op_symbol = { div = " / ", mod = " % ", pow = " ^ ", concat = " .. ", eq = " == ", ne = " ~= ", lt = " < ", le = " <= ", ["and"] = " and ", - ["or"] = " or ", ["not"] = "not ", len = "# ", - ["unm"] = " - ", + ["or"] = " or ", ["not"] = "not ", len = "#", + ["unm"] = "-", } -------------------------------------------------------------------------------- @@ -432,7 +432,7 @@ function M:Call (node, f) self:acc (wrap and "(" or "") self:node (f) self:acc (wrap and ")" or "") - self:acc (parens and " (" or " ") + self:acc (parens and "(" or " ") self:list (node, ", ", 2) -- skip `f'. self:acc (parens and ")") end -- 2.44.0