Commit graph

387 commits

Author SHA1 Message Date
Jeong YunWon
d2f137b372 Update malachite-bigint 2025-02-10 14:01:30 +09:00
Jeong, YunWon
4588ea5c3e
malachite-bigint v0.2.2 (#132) 2025-02-03 10:35:12 +09:00
Jeong YunWon
328e085805 malachite-bigint 0.2.1 2025-02-03 09:51:59 +09:00
Jeong YunWon
f07b97cef3 Fix match parsing 2025-01-22 01:45:40 +09:00
Jeong YunWon
e00297d1c7 apply clippy suggestions 2025-01-22 01:40:09 +09:00
Kaan Büyükerdem
5e9d9853e7
Fix inconsistencies with cpython while parsing format strings (#124)
* Fix inconsistencies with cpython while parsing format strings which contain colons inside square brackets

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2024-10-31 17:19:49 +09:00
Jeong, YunWon
a5b08096a0
fix clippy warnings (#123)
* fix clippy warnings

* update CI ruff command
2024-08-07 08:29:20 +09:00
Jeong YunWon
8dd2aea267 mark 0.4.0 2024-08-07 07:52:29 +09:00
Dan Nasman
00d2f1d1a7 fix formatting issues 2024-07-23 11:14:27 +09:00
Dan Nasman
50638bd06e change function name 2024-07-23 11:14:27 +09:00
Dan Nasman
cfb9c937be add underline handling to float parsing 2024-07-23 11:14:27 +09:00
Dan Nasman
36f34ce5d2 disallow consecutive separators when parsing floats 2024-07-23 11:14:27 +09:00
hydrogen602
51b5f80ae3 fix for Lib/test/test_future_stmt/test_future.py: test_annotations 2024-05-12 16:12:44 +09:00
Daniel Chiquito
649fdd4be9 Fix type param order during source location
There is a `debug_assert!` during source location which verifies that
there is no backtracking during the location scanning process. Type
params were being folded after everything else, which required a
backtrack. This caused any code with function or class type parameters
to break when run in debug mode.
2024-05-12 16:09:30 +09:00
Jeong, YunWon
6a2aa264b1
Merge pull request #107 from m-spitfire/fix-unparse
fix(ast): make unparse module public
2024-05-10 14:10:32 +09:00
Jeong, YunWon
a95045bc62
Merge pull request #117 from youknowone/0.3.1
Release 0.3.1 + remove ast-pyo3 from repository
2024-04-07 02:57:01 +09:00
Jeong YunWon
5c73f635a4 0.3.1 2024-04-07 02:38:42 +09:00
Jeong YunWon
37a1190dfb Remove ast-pyo3 from repository 2024-04-07 02:34:35 +09:00
yt2b
9ce55aefde
Incorrect f-string parsing (#112)
* Fix parse_fstring

* Add test

* Push char

* Remove unused import
2024-01-23 17:20:32 +09:00
Harsha Teja Kanna
8731e9fc50
Added num/malachite features for format crate (#109) 2023-12-28 12:52:22 +09:00
Jeong, YunWon
29c4728dbe
remove size assertions to avoid nightly error (#111) 2023-12-28 01:36:46 +09:00
Jeong YunWon
c0923cbc1c malachite-bigint 0.2.0 2023-12-28 01:06:17 +09:00
Harsha Teja Kanna
a367239af1
Fix the invalid license name for cargo-deny (#110) 2023-12-28 00:59:03 +09:00
Steve Shi
52edf4525e
Merge pull request #103 from qingshi163/malachite041
Bump malachite to 0.4.4
2023-11-07 19:34:31 +02:00
Kangzhi Shi
82e1d95cfb Bump malachite to 0.4.4 2023-11-05 06:47:14 +02:00
Kangzhi Shi
28eff35cee Bump malachite to 0.4.1 2023-11-01 22:03:23 +02:00
Murad Bashirov
6ff2284953 fix(ast): make unparse module public 2023-10-22 15:11:52 +09:00
Jeong, YunWon
13cae0af64
Clean up Cargo.toml and bump dependency versions (#104)
* Update PyO3

* replace unicode_names2 to official release

* clean up Cargo.toml and bump dependency versions
2023-10-03 20:50:52 +09:00
Jeong, YunWon
a1e4336f70
0.3.0 (#92) 2023-08-30 00:04:44 +09:00
Jeong, YunWon
d09bce80e6
vendor text_size and source_location (#102) 2023-08-29 19:52:25 +09:00
Zanie Blue
b07966695a
Fix TypeAliasName to store name instead of load (#99)
* Fix `TypeAliasName` to store name instead of load

* Update snapshot tests
2023-07-29 14:23:49 +09:00
Zanie Blue
704eb40108
Add parsing of type alias statements i.e. the type keyword (#97)
Extends #95
Closes #82 

Adds parsing of new `type` soft keyword for defining type aliases.

Supports type alias statements as defined in PEP 695 e.g. 

```python
# A non-generic type alias
type IntOrStr = int | str

# A generic type alias
type ListOrSet[T] = list[T] | set[T]

# A type alias that includes a forward reference
type AnimalOrVegetable = Animal | "Vegetable"

# A generic self-referential type alias
type RecursiveList[T] = T | list[RecursiveList[T]]
```

All type parameter kinds are supported as in #95.

Builds on soft keyword abstractions introduced in https://github.com/RustPython/RustPython/pull/4519
2023-07-17 11:00:08 -04:00
Zanie Blue
6980037ad9
Parse type parameters in function definitions (#96)
* Parse type parameters in function definitions
* Add test for combined items
2023-07-15 06:51:32 +09:00
Micha Reiser
c33fbeef54
Parse type parameters in class definitions 2023-07-14 17:15:30 +02:00
Zanie
3ec64e124a Consolidate tests and add coverage for trailing comma 2023-07-13 08:51:23 -05:00
Zanie
e0a8f5b7b3 Add bound to test case test_parse_class_with_all_possible_generic_types 2023-07-13 08:40:24 -05:00
Zanie
b06b2662c9 Add test for tuple bounds 2023-07-13 08:40:24 -05:00
Zanie
76a3245479 Remove test for empty generic class Foo[]: ...
Not valid syntax
2023-07-13 08:40:24 -05:00
Zanie
d923aa92bb Parse type parameters in class definitions 2023-07-13 08:40:24 -05:00
Micha Reiser
c8092b20a2
Update to the latest ASDL
Update to the latest ASDL
2023-07-13 10:41:50 +02:00
Zanie
7516c4248c Move type_param stubs into LALRPOP definition 2023-07-11 09:42:45 -05:00
Zanie
3617a6c52b Bump size assertion for Stmt from 136 to 160 bytes 2023-07-10 16:48:05 -05:00
Zanie
30f461b7e9 Revert formatting changes to python.rs 2023-07-10 14:26:45 -05:00
Zanie
7b0aeeec4b Add stub type_params handling for class and function definitions 2023-07-10 14:00:34 -05:00
Zanie
df2b5dfed0 Regenerate code with latest ASDL 2023-07-10 13:45:36 -05:00
Zanie
25b23998ad Update Python ASDL for Python 3.12
From 46c1097868
2023-07-10 13:15:17 -05:00
Jeong, YunWon
69d27d924c
Rename unconventional nodes (#74) 2023-06-17 01:54:00 +09:00
Jeong, YunWon
5270020423
rustpython_ast python package (#79) 2023-06-17 01:32:27 +09:00
yt2b
edcfcb4a74
Fix bool format (#91)
* Fix format_bool

* Add test_format_bool
2023-06-15 14:56:03 +09:00
Jeong, YunWon
40a603208f
Add Pylyzer
done by https://github.com/mtshiba/pylyzer/pull/37
2023-06-11 21:56:59 +09:00