Commit Graph

36 Commits

Author SHA1 Message Date
Jeong YunWon 1d366d52ab Let `located` only for python located stuff 2023-05-10 14:35:38 +09:00
Jeong YunWon a3d9d8cb14 numerous refactoring
- Split parser core and compiler core. Fix #14
- AST int type to `u32`
- Updated asdl_rs.py and update_asdl.sh fix #6
- Use `ruff_python_ast::SourceLocation` for Python source location. Deleted our own Location.
- Renamed ast::Located to ast::Attributed to distinguish terms for TextSize and SourceLocation
- `ast::<Node>`s for TextSize located ast. `ast::located::<Node>` for Python source located ast.
- And also strictly renaming `located` to refer only python location related interfaces.
- `SourceLocator` to convert locations.
- New `source-code` features of to disable python locations when unnecessary.
- Also including fully merging https://github.com/astral-sh/RustPython/pull/4 closes #9
2023-05-10 14:35:38 +09:00
Jeong YunWon 09a6afdd04 Adapt SourceLocation 2023-05-09 20:34:48 +09:00
Jeong YunWon a14e43e03a Separate byteoffset ast and located ast 2023-05-09 00:21:52 +09:00
Jeong YunWon f47dfca4e3 Rename compiler Location to TextSize 2023-05-08 03:38:10 +09:00
Micha Reiser 58c35ab458 Replace row/column based Location with byte-offsets. 2023-05-08 03:38:10 +09:00
Jeong YunWon 6d7358090b Refactor ast to hold data as seperated type 2023-05-07 19:20:47 +09:00
Jeong YunWon a73bac9ed1 Add python lint 2023-05-06 14:34:31 +09:00
Jeong YunWon 80109b1fe0 rustpython-literal 2023-05-05 21:49:12 +09:00
Jeong YunWon bd64603950 Refactor common::bytes::repr using common::escape 2023-05-03 16:08:48 +09:00
Jeong YunWon 5b0e92d725 Refactor common::str::repr using common::escape 2023-05-03 13:47:04 +09:00
Micha Reiser ae9d3c3193 Add `Located::start`, `Located::end` and impl `Deref` 2023-04-26 10:24:34 -06:00
Jeong YunWon a9f4b59f40 module objects' type as PyModule 2023-04-20 20:48:57 +09:00
Jeong YunWon f9b5469642 Update cspell for compiler 2023-03-16 22:39:09 +09:00
Jeong YunWon e26369a34e use super::* from tests submodules 2023-02-22 21:01:39 +09:00
Jeong YunWon 39fc23cf92 relocate feature-independent use 2023-02-22 20:28:03 +09:00
Charlie Marsh 8caa28f0f8 Update Python.asdl from CPython 3.11.1 2023-02-21 12:19:51 +09:00
John Pham 4bdc2d47c1 Make common::repr throw error instead of panic (#4520) 2023-02-19 22:09:54 +09:00
Jeong YunWon a73bee7aae use workspace dependencies 2023-02-06 15:30:38 +09:00
harupy f2ffe12f8c Fix comment 2023-01-22 00:06:52 +09:00
harupy 393869c47c Add Option to Dict.keys field 2023-01-15 16:43:13 +09:00
harupy d3c4551629 Fix unparse 2023-01-15 13:11:55 +09:00
harupy 581f6e176c Fix dict spreading in dict literal 2023-01-15 13:01:59 +09:00
Noa 884a7bdb15 Bump all crate versions to 0.2.0 2023-01-11 00:14:28 -06:00
Jeong YunWon 509cf7ed0d Fix nightly clippy warnings 2023-01-07 21:07:10 +09:00
Anders Kaseorg f4672e4256 Remove unnecessary boxing of ASDL product children
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-12-14 02:30:02 -08:00
dvermd fa41a1e2f6 Fix ast types' _fields and use 0-based column 2022-10-27 03:09:38 +09:00
Jeong YunWon 48c0cb5599 Merge pull request #4218 from charliermarsh/charlie/clone
Make AST nodes Clone-able
2022-10-17 13:47:21 +09:00
Charlie Marsh 1cc342e4ed Add end locations to all nodes (#4192) 2022-10-17 13:18:30 +09:00
Charlie Marsh 5da5490b19 Make AST nodes Clone-able 2022-10-16 11:01:17 -04:00
Jeong YunWon a414677892 remove Mode from codegen root 2022-08-23 05:15:27 +09:00
Jeong YunWon 904fc477f1 integrate ast::Location into compilre-core::Location 2022-08-22 08:42:20 +09:00
Jeong YunWon bfac0355dc Share location between compiler crates 2022-08-22 08:42:20 +09:00
Jeong YunWon c16e650071 rustpython-bytecode -> rustpython-compiler-core 2022-08-22 08:42:20 +09:00
Jeong YunWon acde8bb625 sort Cargo.toml dependencies 2022-08-22 08:42:20 +09:00
Jeong YunWon 53c48bf6b9 reorganize compiler crates 2022-08-22 04:42:42 +09:00