MCPcopy Index your code
hub / github.com/python/cpython / parse_var_decl

Function parse_var_decl

Tools/c-analyzer/c_parser/parser/_common.py:92–116  ·  view source on GitHub ↗
(decl)

Source from the content-addressed store, hash-verified

90
91
92def parse_var_decl(decl):
93 m = re.match(VAR_DECL, decl, re.VERBOSE)
94 (storage, typequal, typespec, declarator,
95 name,
96 wrappedname,
97 funcptrname,
98 ) = m.groups()
99 if name:
100 kind = 'simple'
101 elif wrappedname:
102 kind = 'wrapped'
103 name = wrappedname
104 elif funcptrname:
105 kind = 'funcptr'
106 name = funcptrname
107 else:
108 raise NotImplementedError
109 abstract = declarator.replace(name, '')
110 vartype = {
111 'storage': storage,
112 'typequal': typequal,
113 'typespec': typespec,
114 'abstract': abstract,
115 }
116 return (kind, name, vartype)
117
118
119#############################

Callers 4

parse_function_bodyFunction · 0.85
_parse_next_local_staticFunction · 0.85
_parse_struct_nextFunction · 0.85
_parse_nextFunction · 0.85

Calls 3

matchMethod · 0.45
groupsMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…