The pure-py command: tokenize, parse, check and run PurePy
Dependencies
moon add marianoguerra/pure-py-clipure-py tokens FILE one token per line
pure-py dump FILE [--pos] the abstract syntax tree
pure-py unparse FILE Python source regenerated from the tree
pure-py parse FILE... reject what PurePy excludes syntactically
pure-py check FILE... decide module well-formedness
pure-py check-program MAIN decide program well-formedness
pure-py run MAIN [ARGS...] evaluate a programerror[purepy::captured-reassignment]: 'x' captured by previous statement, reassigned here
╭─[ shadow_captured.py:6:5 ]
│
4 │ ╭ def g():
5 │ ├ return x
│ ╰─ 'x' captured here
6 │ x = 6
│ ──┬──
│ ╰─ reassigned here
│
├─ help: a closure captured this name, and PurePy has no cell for it to see
│ a later value; bind a new name instead
╰─Install
Download zipThe pure-py command: tokenize, parse, check and run PurePy
Dependencies