MCPcopy Create free account
hub / github.com/SplootCode/splootcode / getStatementsFromBlock

Function getStatementsFromBlock

python/executor.py:313–321  ·  view source on GitHub ↗
(blockChildSet, traced)

Source from the content-addressed store, hash-verified

311
312
313def getStatementsFromBlock(blockChildSet, traced):
314 statements = []
315 for node in blockChildSet:
316 new_statements = generateAstStatement(node, traced)
317 if new_statements:
318 statements.extend(new_statements)
319 if len(statements) == 0:
320 return [ast.Pass()]
321 return statements
322
323
324def generateIfStatementFromElif(elif_node, else_nodes, traced):

Callers 9

testGeneratedCodeMethod · 0.90
generateElseStatementFunction · 0.70
generateIfStatementFunction · 0.70
generateForStatementFunction · 0.70
generateWhileStatementFunction · 0.70
executePythonFileFunction · 0.70

Calls 1

generateAstStatementFunction · 0.70

Tested by 1

testGeneratedCodeMethod · 0.72