예제 #1
0
 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)
예제 #2
0
 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
예제 #3
0
 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