From: Lizzy Fleckenstein Date: Sun, 23 Apr 2023 18:11:06 +0000 (+0200) Subject: ast_to_src: format function calls and unary operators without space X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=e7fcdba2e7f374b0f742332d61ef05ab1dd9485d;p=metalua.git ast_to_src: format function calls and unary operators without space --- 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