示例#1
0
	def get_constants(self):
		for container, defn in self.astinfo.get_definitions('const'):
			scopelist = infogripper.get_full_scope_string(defn)
			scopelist.append(defn.leaf)
			const_name = '_'.join(scopelist)
			const_value = defn.get_attribute('value')[0]
			yield (const_name, const_value)
示例#2
0
	def get_function_names(self):
		func_names = []
		for function_ast in self.exports_list:
				func_scope = infogripper.get_full_scope_string(function_ast)
				func_scope.append(function_ast.leaf)
				func_names.append('_'.join(func_scope))
		return func_names
示例#3
0
	def get_name(self):
		scope_list = infogripper.get_full_scope_string(self.interface)
		assert self.interface.leaf is not None
		assert isinstance(scope_list, list)
		func_scope = scope_list
		func_scope.append(self.interface.leaf)
		func_scope.append(self.ast.leaf)
		return '_'.join(func_scope)
示例#4
0
	def get_name(self):
		#print self.ast.leaf
		scopelist = infogripper.get_full_scope_string(self.ast)
		scopelist.append(self.ast.leaf)

		return '_'.join(scopelist)
示例#5
0
def get_function_name(interface_name, function_ast):
	scopelist = infogripper.get_full_scope_string(function_ast)
	scopelist.append(function_ast.leaf)
	return '_'.join(scopelist)