Exemplo n.º 1
0
 def declaration_type(self):
     traversal = 'identifierToType()'
     projection = ['code']
     result = jutils.raw_lookup(self.node_selection, traversal, projection)
     if result:
         return result[0][0]
     else:
         return None
Exemplo n.º 2
0
 def traverse_to_using_conditions(self):
     traversal = 'symbolToUsingConditions()'
     result = jutils.raw_lookup(self.node_selection, traversal = traversal)
     return map(lambda x : Condition(x[0], x[1].get_properties()), result)
Exemplo n.º 3
0
 def return_value(self):
     traversal = 'calleeToReturnValue()'
     result = jutils.raw_lookup(self.node_selection, traversal = traversal)
     return map(lambda x : Symbol(x[0], x[1].get_properties()), result)
Exemplo n.º 4
0
 def load_properties(self):
     _, node = jutils.raw_lookup(self.node_selection)[0]
     self.properties = node.get_properties()
Exemplo n.º 5
0
 def api_symbol_nodes(self):
     traversal = 'functionToAPISymbolNodes()'
     result = jutils.raw_lookup(self.node_selection, traversal)
     return map(lambda x : ASTNode(x[0], x[1].get_properties()), result)
Exemplo n.º 6
0
 def load_properties(self):
     _, node = jutils.raw_lookup(self.node_selection)[0]
     self.properties = node.get_properties()
Exemplo n.º 7
0
 def api_symbol_nodes(self):
     traversal = 'functionToAPISymbolNodes()'
     result = jutils.raw_lookup(self.node_selection, traversal)
     return map(lambda x: ASTNode(x[0], x[1].get_properties()), result)
Exemplo n.º 8
0
 def children(self):
     traversal = 'children()'
     result = jutils.raw_lookup(self.node_selection, traversal = traversal)
     return map(lambda x : ASTNode(x[0], x[1].get_properties()), result)
Exemplo n.º 9
0
 def traverse_to_using_conditions(self):
     traversal = 'symbolToUsingConditions()'
     result = jutils.raw_lookup(self.node_selection, traversal=traversal)
     return map(lambda x: Condition(x[0], x[1].get_properties()), result)