Beispiel #1
0
 def find_types_in_func(self, node):
     assert(type(node) == ProcedureImplDecl)
     path = [
         Many,
         NestedDeclBlock,
         Many,
         TypeSection,
         Any,
         TypeDecl,
     ]
     ns = self.find(node, path)
     ns = map(self.select_in_type_decl, ns)
     ns = util.flatten(ns)
     return ns
Beispiel #2
0
 def find_variables_in_class(self, node):
     assert(type(node) == ClassType)
     path = [
         Many,
         ClassBody,
         Many,
         ClassMember,
         Any,
         VarDecl,
     ]
     ns = self.find(node, path)
     ns = map(self.select_in_var_decl, ns)
     ns = util.flatten(ns)
     return ns
Beispiel #3
0
 def find_params_in_func(self, node):
     assert(type(node) in [ProcedureImplDecl, ProcedureIntfDecl])
     path = [
         Many,
         ProcedureIntfDecl,
         ProcedureSignature,
         Many,
         FormalParameters,
         FormalParameter,
     ]
     ns = self.find(node, path)
     ns = map(self.select_in_formal_parameter, ns)
     ns = util.flatten(ns)
     return ns
Beispiel #4
0
 def find_types_in_unit(self, node):
     assert(type(node) in [InterfaceSection, ImplementationSection])
     path = [
         Any,
         Any,
         Any,
         Any,
         TypeSection,
         Any,
         TypeDecl,
     ]
     ns = self.find(node, path)
     ns = map(self.select_in_type_decl, ns)
     ns = util.flatten(ns)
     return ns