Ashwin Naren
fc331a154f
fix errors and formatting
...
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-04-18 22:41:48 -07:00
Ashwin Naren
12ceb9695c
cleaner panic output
...
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-04-18 22:31:29 -07:00
Ashwin Naren
4d53f5925c
remove match test
2025-04-15 11:56:29 -07:00
Ashwin Naren
21272025c2
improve error handling
2025-04-15 11:54:46 -07:00
Ashwin Naren
d44324d4d0
clippy
2025-04-15 11:44:04 -07:00
Ashwin Naren
628287c14e
update snapshot
2025-04-15 11:42:13 -07:00
Ashwin Naren
e949c9aa3f
rename
2025-04-15 11:41:27 -07:00
Ashwin Naren
09c199a1ba
match cleanup
2025-04-15 10:03:29 -07:00
Ashwin Naren
d47944b2fd
error handling
2025-04-15 10:02:32 -07:00
Ashwin Naren
456e555e8b
better error
2025-04-15 09:25:06 -07:00
Ashwin Naren
c7042fd847
remove unneeded validation
2025-04-15 08:39:58 -07:00
Ashwin Naren
49b348cc7e
Remove Instruction::IsOperation
2025-04-14 22:33:55 -07:00
Jeong, YunWon
4ae2936a45
fix more cspell warnings ( #5689 )
2025-04-11 12:08:07 +09:00
Ashwin Naren
8dc1718002
Match statements rewrite ( #5628 )
2025-04-10 14:00:54 +09:00
ivan-shrimp
3ad8fd711f
fix expression list order
...
don't emit a no-op when unpacking a single element
assume positional args stored as tuple in extended call
2025-03-31 18:00:19 +09:00
Noa
160363fa46
Fix float parsing ( #5643 )
...
* Fix float parsing
* Add rustpython_literal::complex
* Don't call .to_string() on a constant
2025-03-31 14:37:47 +09:00
Noa
d3d92bbb6f
Update unparse to work with ruff & remove ruff_python_codegen
2025-03-27 22:14:58 -05:00
Noa
8081e0d281
Copy unparse.rs from rustpython-parser
2025-03-27 22:09:00 -05:00
Noa
f398321b1f
Remove parser dependency from codegen
2025-03-27 22:09:00 -05:00
Noa
030243a6f9
Split out wtf8 into its own crate
2025-03-28 11:26:29 +09:00
Noa
6b72d2ef5d
Check+lint examples, tests, and benches in CI
2025-03-28 11:26:12 +09:00
Noa
b6aacbf401
Merge pull request #5629 from coolreader18/surrogate-literals
...
Parse surrogates in string literals properly
2025-03-27 10:15:41 -05:00
Noa
c6cab4c43a
Parse surrogates in string literals properly
2025-03-26 22:44:42 -05:00
Jeong YunWon
bc38e9dedd
Apply nightly clippy suggestions
2025-03-26 14:52:23 +09:00
Noa
950a8d5694
Update to ruff_python_parser 0.11
2025-03-19 22:45:57 -05:00
Stefan Lukas
a6b4ef7f5d
Replace Python parser with ruff parser ( #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 >
2025-03-19 21:06:03 -05:00
Noa
6daee1b00e
Warn on elided_lifetimes_in_paths
2025-03-01 13:49:33 +09:00
Ashwin Naren
b870b0e1b5
2024 edition formatting
...
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-02-26 11:48:22 -08:00
Noa
864e8598f8
Enable rust2024-incompatible pat and keyword-ident lints
2025-02-25 00:32:02 -06:00
Ashwin Naren
e8a3406624
itertools upgrade
2025-02-16 10:20:56 +09:00
Ashwin Naren
a46ce8ec3a
Mark version 3.13.0 ( #5495 )
...
* bump to 3.13.1
* fix some tests
* strip left whitespace from doc
* remove specific difflib test that was causing issues
* fix test_enum
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-02-13 14:11:01 +09:00
Lee Dogeon
465627f104
Implement vm logics related with ParamSpec, TypeVarTuple
2025-02-10 21:21:38 +09:00
Ashwin Naren
396a0ca563
Basic Match statements ( #5485 )
...
Signed-off-by: Ashwin Naren <arihant2math@gmail.com >
2025-01-25 23:14:15 +09:00
Jeong YunWon
7d770f55fb
more assertions in switch_to_block
2025-01-21 23:53:23 +09:00
Noa
b7db23bbae
Fix warnings for Rust 1.84
2025-01-11 18:48:27 +09:00
Jeong YunWon
2919df1df5
Mark rust-version 1.78
2024-08-08 23:20:17 +09:00
Jeong YunWon
8673169ee7
0.4.0
2024-08-07 08:38:21 +09:00
James Clarke
08c9a4d86b
Added lints and deny.toml
2024-06-25 03:59:40 +01:00
Jonathan Rotter
7996a10116
await in list comprehension ( #5334 )
...
* check if comprehension element contains await
* force execution to pause in async gen
2024-05-27 16:54:56 +09:00
matheusfgoncalves95
515f0bf9c2
Adding generator_stop to compile_future_features ( #5320 )
...
* Adding generator_stop to compile_future_features.
* Removing expected failure from PEP 479 unit test.
2024-05-13 23:18:55 +09:00
Daniel Chiquito
ac08f4447f
Add 3.12 typing features to the compiler ( #5302 )
2024-05-10 20:09:04 +09:00
Jeong YunWon
019496e3a8
Instruction::ReturnConst
2024-05-09 15:26:16 +09:00
Jeong YunWon
f3501f44cb
Basic async for comprehension support
2024-04-25 20:23:25 +09:00
HyeockJinKim
61f37b10e2
implement async for function in compiler
2024-04-25 20:20:58 +09:00
Aaron Long
2856aff757
Begin async list comprehension implementation
2024-04-25 20:20:22 +09:00
hydrogen602
af8bed6d3f
filter out doc strings with opt level 2
2024-04-25 16:11:04 +09:00
Jeong YunWon
75e790836a
debuggable
2024-04-24 20:44:17 +09:00
Jeong YunWon
075c69a3cd
Skip setattr(__doc__) if not given
2024-04-23 22:44:22 +09:00
Jeong YunWon
8816cd41d5
0.3.1
2024-04-10 17:39:57 +09:00
rrupy
2f8e5189d3
Use ast::Suite::parse instead of deprecated parse_program. ( #5186 )
2024-03-05 22:37:42 +09:00