TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

9 lines
213 B

import ast
import json
from ast2json import ast2json
import sys
if __name__ == "__main__":
file_name = sys.argv[1]
tree = ast2json(ast.parse(open(file_name).read()))
print(json.dumps(tree, indent=4))