MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / walk

Function walk

code2flow/ruby.py:58–72  ·  view source on GitHub ↗

Given an ast element (list), walk it in a dfs to get every el (list) out of it :param tree_el ast: :rtype: list[ast]

(tree_el)

Source from the content-addressed store, hash-verified

56
57
58def walk(tree_el):
59 """
60 Given an ast element (list), walk it in a dfs to get every el (list) out of it
61
62 :param tree_el ast:
63 :rtype: list[ast]
64 """
65
66 if not tree_el:
67 return []
68 ret = [tree_el]
69 for el in tree_el:
70 if isinstance(el, list):
71 ret += walk(el)
72 return ret
73
74
75def make_calls(body_el):

Callers 1

make_callsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected