MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / node_if

Function node_if

ngrams.py:249–266  ·  view source on GitHub ↗
(node: dict)

Source from the content-addressed store, hash-verified

247
248
249def node_if(node: dict) -> ASTNodeIdentifier:
250 stmt = ASTNodeIdentifier(node_type='if')
251 body = ASTNodeIdentifier(node_type='if_body')
252
253 for b in node['body']:
254 body += extract_identifier(b)
255 stmt += body
256
257 orelse = ASTNodeIdentifier(node_type='if_orelse')
258 for o in node['orelse']:
259 orelse += extract_identifier(o)
260 stmt += orelse
261
262 test = ASTNodeIdentifier(node_type='if_test')
263 test += extract_identifier(node['test'])
264 stmt += test
265
266 return stmt
267
268
269def node_compare(node: dict) -> ASTNodeIdentifier:

Callers

nothing calls this directly

Calls 2

ASTNodeIdentifierClass · 0.85
extract_identifierFunction · 0.85

Tested by

no test coverage detected