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

Function splootFromPython

python/convert_ast.py:331–338  ·  view source on GitHub ↗
(codeString)

Source from the content-addressed store, hash-verified

329
330
331def splootFromPython(codeString):
332 global lineno
333 lineno = 1
334 tree = ast_comments.parse(codeString)
335 fileNode = {"type":"PYTHON_FILE","properties":{},"childSets":{"body": []}}
336 fileNode["childSets"]["body"] = getBlockBodyFromStatements(tree.body)
337
338 return fileNode
339
340def splootNodeFromPython(codeString):
341 global lineno

Callers 15

testEmptyCodeMethod · 0.90
testHelloNameMethod · 0.90
testFunctionMethod · 0.90
testListMethod · 0.90
testImportMethod · 0.90
testImportFromMethod · 0.90
testTupleMethod · 0.90
testSetMethod · 0.90
testElifMethod · 0.90
testWhileLoopMethod · 0.90
testForLoopMethod · 0.90
testBreakMethod · 0.90

Calls 1

Tested by 15

testEmptyCodeMethod · 0.72
testHelloNameMethod · 0.72
testFunctionMethod · 0.72
testListMethod · 0.72
testImportMethod · 0.72
testImportFromMethod · 0.72
testTupleMethod · 0.72
testSetMethod · 0.72
testElifMethod · 0.72
testWhileLoopMethod · 0.72
testForLoopMethod · 0.72
testBreakMethod · 0.72