MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / get_ast

Function get_ast

tools/compare_ast_symdb.py:23–35  ·  view source on GitHub ↗
(debug)

Source from the content-addressed store, hash-verified

21
22
23def get_ast(debug):
24 debug = re.sub(r' f:0x[0-9a-fA-F]+', '', debug)
25 debug = re.sub(r" '[a-zA-Z0-9: *]+'", '', debug)
26
27 pos1 = debug.rfind('\n##AST\n')
28 if pos1 < 0:
29 return ''
30 pos1 = debug.find('\n', pos1) + 1
31 assert pos1 > 0
32 pos2 = debug.find("\n##", pos1)
33 if pos2 < 0:
34 return debug[pos1:]
35 return debug[pos1:pos2-1]
36
37
38def get_symdb(debug):

Callers 1

compare_ast_symdbFunction · 0.85

Calls 1

findMethod · 0.45

Tested by

no test coverage detected