1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 09:09:31 +00:00

Change format_priority to a method

This commit is contained in:
Étienne Fildadut 2023-12-30 01:35:58 +01:00
parent d42b900388
commit 07cb44256c
23 changed files with 115 additions and 58 deletions

View file

@ -15,12 +15,14 @@ Quote = ast.abstract.Node {
init = function(self, expression)
self.expression = expression
self.format_priority = expression.format_priority
end,
_format = function(self, ...)
return self.expression:format(...) -- Quote is generated transparently by operators
end,
_format_priority = function(self)
return self.expression:format_priority()
end,
traverse = function(self, fn, ...)
fn(self.expression, ...)