MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / walk

Function walk

scripts/code_verify_rules.py:1262–1271  ·  view source on GitHub ↗
(n, depth)

Source from the content-addressed store, hash-verified

1260 LAMBDA = "lambda_expression"
1261
1262 def walk(n, depth):
1263 best = depth
1264 for c in n.children:
1265 if c.type == LAMBDA:
1266 continue # lambda body is its own scope
1267 if c.type in NESTERS:
1268 best = max(best, walk(c, depth + 1))
1269 else:
1270 best = max(best, walk(c, depth))
1271 return best
1272
1273 return walk(body_node, 0)
1274

Callers 2

findMessageMethod · 0.85
_max_nesting_depthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected