Jeong, YunWon
d4084fb17a
impl From<T> for ast::Ast ( #62 )
2023-05-21 22:44:07 +09:00
Micha Reiser
33a3c407a9
Merge pull request #60 from astral-sh/reduce-copy
2023-05-19 08:16:28 +02:00
Micha Reiser
fac0c25343
Update python.rs
2023-05-19 08:08:35 +02:00
Micha Reiser
4ff779c298
Update parser/src/python.lalrpop
...
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2023-05-18 22:32:05 +02:00
Micha Reiser
726884b287
Avoid allocating vec
s for each statement
2023-05-18 21:56:17 +02:00
Micha Reiser
851f23668f
Use named parameters to reducue copying
2023-05-18 21:41:06 +02:00
Jeong, YunWon
3654cf0bdf
Add Ast
as top level enum ( #58 )
2023-05-19 01:53:39 +09:00
Jeong, YunWon
6c5c311bab
Fix range field order ( #56 )
...
* Skip validate_arguments when empty
* Fix `range` field order
* Fix unused variable
2023-05-18 21:44:01 +09:00
Jeong, YunWon
531e41ae2c
Upgrade bitflags to remove clippy wanrings ( #54 )
...
* Upgrade bitflags to remove clippy wanrings
* Fix python lint warnings
2023-05-18 01:50:00 +09:00
Jeong, YunWon
b48834fe2d
More flexible map_user and fold for new constructor nodes ( #53 )
...
* make fold.rs file
* Split user_map steps
* Fold for new constructor nodes
2023-05-18 00:16:04 +09:00
Jeong, YunWon
205ee80033
README ( #47 )
2023-05-17 18:01:00 +09:00
Jeong, YunWon
fc301ab1b0
Fix build ( #45 )
...
* remove dedent
* Revert parser-pyo3 crate
2023-05-16 23:54:49 +09:00
Jeong, YunWon
e820928f11
Add experimental pyo3-wrapper feature ( #41 )
...
* Fix pyo3 unit type value error
* Add experimental pyo3-wrapper feature
* location support
2023-05-16 23:45:31 +09:00
Jeong, YunWon
ff17f6e178
Add utilities to enum ( #44 )
...
* Add utilities to enum
* Fix unexpected pyo3 dependency propagation
2023-05-16 23:29:49 +09:00
Jeong YunWon
3bdf8a940a
Hash for ConversionFlag
2023-05-16 22:56:17 +09:00
Jeong, YunWon
9d47d3d212
specialize ConversionFlag ( #42 )
...
* specialize ConversionFlag
* Change value of ConversionFlag to i8 and None to -1
* is_* methods to ConversionFlag
2023-05-16 22:52:50 +09:00
Jeong, YunWon
611dcc2e9b
rustpython_ast + pyo3 ( #25 )
2023-05-16 18:06:54 +09:00
Jeong, YunWon
53de75efc3
Add all node classes to ast module ( #40 )
2023-05-16 16:55:26 +09:00
Jeong, YunWon
0c7d16b61a
Add is_* methods to Tok ( #39 )
2023-05-16 16:08:25 +09:00
Jeong, YunWon
735c06d5f4
Fix full-lexer feature ( #38 )
2023-05-16 15:45:03 +09:00
Jeong, YunWon
02f13abf50
Add Node trait for node type information ( #31 )
2023-05-16 15:41:30 +09:00
Charlie Marsh
10dda125ff
Always emit non-logical newlines for 'empty' lines ( #27 )
2023-05-15 14:13:05 -04:00
Jeong, YunWon
27e3873dc2
Add full-lexer feature ( #36 )
2023-05-16 02:21:34 +09:00
Micha Reiser
dd4cc25227
Reduce copying elements when parsing ( #35 )
2023-05-15 23:20:44 +09:00
Jeong, YunWon
b78001c953
Generic types to generic ( #30 )
2023-05-15 20:22:42 +09:00
Jeong, YunWon
718354673e
Move range to node ( #23 )
...
* black + clippy
* Fix module generation
2023-05-15 16:20:22 +09:00
Micha Reiser
192379cede
Move range
from Attributed
to Node
s ( #22 )
...
* Move `range` from `Attributed` to `Node`s
* No Attributed + custom for Range PoC
* Generate all located variants, generate enum implementations
* Implement `Copy` on simple enums
* Move `Suite` to `ranged` and `located`
* Update tests
---------
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
2023-05-15 15:08:12 +09:00
Micha Reiser
a983f4383f
Add format
and cformat
modules from RustPython
( #24 )
...
* Add `format` and `cformat` modules from `RustPython`
* Introduce `rustpython-format` crate
* Remove unused dependencies
2023-05-12 18:27:05 +09:00
Jeong, YunWon
947fb53d0b
Field accessor and utilities ( #20 )
...
* Apply is-macro to Constant and ast nodes
2023-05-11 19:44:20 +09:00
Jeong, YunWon
2baad9ead6
Merge pull request #19 from RustPython/identifier
...
A few more Identifier utilities
2023-05-11 16:12:46 +09:00
Jeong YunWon
2af9805662
A few more Identifier utilities
2023-05-11 16:05:11 +09:00
Jeong, YunWon
5b2af304a2
Merge pull request #17 from youknowone/ruff
...
ruff integration support
2023-05-11 04:42:52 +09:00
Jeong YunWon
cbe4e8c5f3
Make parser location optional
2023-05-11 04:40:10 +09:00
Jeong YunWon
aabc96dde9
ruff integration support
2023-05-11 04:08:57 +09:00
Jeong YunWon
99e108dd53
*Escape::with_preferred_quote
2023-05-10 21:51:01 +09:00
Jeong YunWon
d6b6df5d1c
ast::Int::to_usize
2023-05-10 21:31:02 +09:00
Jeong YunWon
822cac5aa0
parse_expression{=>_starts}_at
2023-05-10 21:25:58 +09:00
Jeong YunWon
aa101e4f26
fix ImportDots
2023-05-10 20:31:04 +09:00
Jeong, YunWon
cbc4cb286b
Merge pull request #16 from youknowone/ast-int
...
Give identifier and int ast types
2023-05-10 20:19:01 +09:00
Jeong YunWon
6fa3d0f90a
Fine-tune int types
2023-05-10 19:33:39 +09:00
Jeong YunWon
455bcc01a0
Give identifier and int ast types
2023-05-10 19:33:39 +09:00
Jeong, YunWon
d495cd9129
Merge pull request #15 from youknowone/spellchecker
...
Setup spell checker
2023-05-10 18:11:40 +09:00
Jeong YunWon
d8822d1091
spell check ast/asdl_rs.py
2023-05-10 18:05:39 +09:00
Jeong YunWon
75f6ce1ae5
Setup spell checker
2023-05-10 17:57:15 +09:00
Jeong, YunWon
41e9e7280a
Merge pull request #12 from youknowone/visitor
...
Visitor
2023-05-10 17:52:25 +09:00
Jeong YunWon
17c8abcec1
asdl_rs.py to multiple file output
2023-05-10 17:41:01 +09:00
Jeong YunWon
e000b1c304
Remove redundant types
2023-05-10 17:15:01 +09:00
Jeong YunWon
243ca16b34
Fix visitor to fit in new structure
2023-05-10 17:14:44 +09:00
Joshua
4de9580b92
Generate a visitor trait to ast_gen.rs
2023-05-10 17:14:34 +09:00
Jeong, YunWon
5cf85f0b9d
Merge pull request #13 from youknowone/locator
...
Python location transform and related refactoring
2023-05-10 17:04:30 +09:00