MCPcopy Create free account
hub / github.com/defold/defold / get_cpp_func

Function get_cpp_func

scripts/dmsdk/gen_cpp.py:136–148  ·  view source on GitHub ↗
(decl)

Source from the content-addressed store, hash-verified

134 return indent_str + '/*# ' + _format_doc_lines(lines, indent) + '\n'+ indent_str + ' */'
135
136def get_cpp_func(decl):
137 ret_type = decl['type']['qualType']
138 index = ret_type.find('(')
139 ret_type = ret_type[:index].strip()
140
141 args = []
142 for inner in decl.get('inner', []):
143 #args.append(inner['type']['qualType'])
144 if not inner['kind'] == 'ParmVarDecl':
145 continue
146 args.append('%s %s' % (inner['type']['qualType'], inner.get('name','')))
147
148 return '%s %s(%s)' % (ret_type, decl['name'], ', '.join(args))
149
150def add_c_docs(docs):
151 for doc in docs['items']:

Callers 1

gen_cpp_headerFunction · 0.85

Calls 3

appendMethod · 0.80
getMethod · 0.65
findMethod · 0.45

Tested by

no test coverage detected