Commit a6b4ef7
Replace Python parser with ruff parser (RustPython#5494)
* stage1
* compiler pass build
* introduce rustpython-compiler-source
* stage2
* fixup
* pass compile
* Fix hello world compiler test
* Fix code generation for if-elif-else statement
* Fix code generation for lambda expression
* Fix code generation for integers
* Fix code generation for fstrings
* Fix code generation for if statement
* Fix code generation for if statement
* Fix code generation for if statement
* Fix code generation for fstring
* Fix code generation for class definition
* Replace feature flags
* Initialize frozen core modules
* Allow __future__ import after module doc comment
* Disable ast module
* Commit remaining fixes for compile errors in examples
* Fix some warnings
* Update ast stdlib module
* Update ast stdlib module
* Update ast stdlib module
* Update ast stdlib module
* Update ast stdlib module
* Split ast stdlib module into files
* Fix codegen for positional arguments with defaults
* Update ast stdlib module
* Update ast stdlib module
* Extract string and constant handling from expression.rs
* Always add required fields to AST nodes
* Compile doc strings correctly again
* Enable "ast" Cargo feature by default
* Refactor compilation of big integer literal
* Update ast stdlib module
* Update ast stdlib module
* Update ast stdlib module
* Reset barebones example
* Fix some left-over warnings
* Undo accidential change
* Adapt shell to ruff parser
* Pin parser to v0.4.10
* fix clippy
* Add TODO about interactive mode
* Fix compilation of complex number expression
* Remove moved code
* Update test case to ruff v0.4.10
* Apply suggestion
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* Apply suggestion
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
* Fix compilation of fstring expression
* Fix compilation of fstring expression
* Fix wasm compile errors
* Attach correct source locations to ast objects
* Fix some more wasm compile errors
* Consider compile mode and enable AST stdlib module again
* Fix incorrect AST source location end column
* Fix compile error if "compiler" feature is not enabled
* Fix regrtests
* Fix some test_ast tests
* Add source range to type ignore
* Fix incompatibility with Rust 2024 edition
* Fix todos by implementing missing ast conversions and deleting unused code
* Appease clippy
* Fix remaining ast tests
* Fix remaining ast tests
* Mark/fix remaining tests
* Fix more
* Hacky windows fix
---------
Co-authored-by: Kangzhi Shi <shikangzhi@gmail.com>
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
Co-authored-by: Noa <coolreader18@gmail.com>1 parent 45c0fa0 commit a6b4ef7
70 files changed
Lines changed: 9981 additions & 6858 deletions
File tree
- Lib/test
- test_future_stmt
- compiler
- codegen
- src
- core
- src
- source
- src
- src
- derive-impl
- derive/src
- examples
- src
- stdlib/src
- vm
- src
- builtins
- stdlib
- ast
- vm
- wasm/lib
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
| |||
0 commit comments