MCPcopy Create free account
hub / github.com/aio-libs/multidict / split_functions

Function split_functions

tools/codegen_diff.py:170–185  ·  view source on GitHub ↗

Group normalized instructions by the function they belong to.

(lines)

Source from the content-addressed store, hash-verified

168
169
170def split_functions(lines):
171 """Group normalized instructions by the function they belong to."""
172 functions = {}
173 current = None
174 for line in lines:
175 match = FUNC_RE.match(line)
176 if match:
177 current = functions.setdefault(match.group(1), [])
178 continue
179 if current is None:
180 continue
181 for pattern, replacement in SUBSTITUTIONS:
182 line = pattern.sub(replacement, line)
183 if line:
184 current.append(line)
185 return functions
186
187
188def call_targets(instructions):

Callers 1

compareFunction · 0.85

Calls 1

setdefaultMethod · 0.45

Tested by

no test coverage detected