This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
forked from RustPython/Parser
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add line magic stmt and expr AST nodes (#31)
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`.
- Loading branch information
1 parent
e363fb8
commit 5ef4ccd
Showing
10 changed files
with
20,554 additions
and
13,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.