def get_free_variables(self, start_pos: Pos) -> FreeVariables: freevars = FreeVariables() if isinstance(self.tree, tuple): for e in self.tree: freevars = freevars.union(e.get_free_variables(start_pos)) return freevars return self.tree.get_free_variables(start_pos)
def get_free_variables(self, start_pos: Pos) -> FreeVariables: freevars = FreeVariables() for member in self.members: freevars = freevars.union(member.get_free_variables(start_pos)) return freevars
def get_free_variables(self, start_pos: Pos) -> FreeVariables: accum = FreeVariables() for _, member in self.members: accum = accum.union(member.get_free_variables(start_pos)) accum = accum.union(self.splatted.get_free_variables(start_pos)) return accum