5ef4ccd6322a8b7c5e8ead0ae3c89426d7be7d72
This PR introduces two new nodes for the parser to recognize the `MagicCommand` tokens: * `StmtLineMagic` for statement position i.e., magic commands on their own line: ```python %matplotlib inline !pwd ``` * `ExprLineMagic` for expression position i.e., magic commands in an assignment statement: ```python # Only `?` and `!` are valid in this position dir = !pwd ``` Both nodes are identical in their structure as in it contains the magic kind and the command value as `String`.
RustPython parser as a library
This project is forked from RustPython project. The parser is one of the core part of RustPython and Ruff project.
We try to keep these crates as a well-packaged library for more potential users.
Projects
- RustPython is a Python interpreter
- Ruff is an extremely fast Python linter
- Pylyzer is a static code analyzer / language server for Python
- Baembal is a Python package to accelerate
ast.parse
Languages
Rust
96.1%
Python
2.6%
TypeScript
0.9%
RenderScript
0.2%
Shell
0.1%