Skip to content

Commit

Permalink
lua_ast.render: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
StunxFS authored Jun 29, 2024
1 parent f220c0e commit dc2eac8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bsc/lua_ast/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def render_expr(self, expr):
else:
self.writeln()
self.indent -= 1
self.writeln("}")
self.write("}")
elif isinstance(expr, LuaBinaryExpr):
self.write("(")
self.render_expr(expr.left)
Expand All @@ -180,10 +180,10 @@ def render_expr(self, expr):
elif isinstance(expr, LuaIdent):
self.write(expr.name)
elif isinstance(expr, LuaNumberLit):
if "." in expr.value: self.write(expr.value)
if "." in expr.value: # is float self.write(expr.value)
else: self.write(hex(int(expr.value, 0)))
elif isinstance(expr, LuaBooleanLit):
self.write(str(expr.value).lower())
self.write("true" if expr.value else "false")
elif isinstance(expr, LuaNil):
self.write("nil")

Expand Down

0 comments on commit dc2eac8

Please sign in to comment.