]> git.lizzy.rs Git - metalua.git/commitdiff
ast_to_src: format function calls and unary operators without space master
authorLizzy Fleckenstein <eliasfleckenstein@web.de>
Sun, 23 Apr 2023 18:11:06 +0000 (20:11 +0200)
committerLizzy Fleckenstein <eliasfleckenstein@web.de>
Sun, 23 Apr 2023 18:59:07 +0000 (20:59 +0200)
metalua/compiler/ast_to_src.mlua

index 5bf96650a97b19a575d19ce0b6ab6fd7372cbac4..2245c2f45f0c0058db3a146595b7c3451a345a3d 100644 (file)
@@ -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