Closed TimKaptan closed 4 years ago
I fixed this problem with following code
import luaparser
from luaparser import ast
from luaparser import astnodes
def visit_Varargs(self, node): pass
luaparser.utils.visitor._methods[('luaparser.ast.WalkVisitor', luaparser.astnodes.Varargs)] = visit_Varargs
def visit_SemiColon(self, node): pass
luaparser.utils.visitor._methods[('luaparser.ast.WalkVisitor', luaparser.astnodes.SemiColon)] = visit_SemiColon
def visit_Repeat(self, node):
self._nodes.append(node)
self.visit(node.body)
self.visit(node.test)
luaparser.utils.visitor._methods[('luaparser.ast.WalkVisitor', luaparser.astnodes.Repeat)] = visit_Repeat
Thanks for fixing. Is there any plan for release this?
I just made a new release :) https://github.com/boolangery/py-lua-parser/releases/tag/3.0.0
When i try to walk the ast tree of a lua file which has semicolon or repeat until loop or varargs, lib throws an exception.