Commit Graph

23 Commits

Author SHA1 Message Date
Alexis (Poliorcetics) Bourget
d7fdf141a4 fix: various clippy lints 2023-05-07 09:43:37 +02:00
Lukas Wirth
a756c9ad08 Fixup comments 2023-02-07 18:08:05 +01:00
Lukas Wirth
6fa6efe90f fix: Fix parsing of nested tuple field accesses in a cursed way 2023-02-03 17:18:48 +01:00
Maybe Waffle
4a16afa264 Parse do yeet expressions 2022-12-28 22:42:26 +00:00
Yuri Astrakhan
e16c76e3c3 Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.

The change was automatically created with, so there are far less change
of an accidental typo.

```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Jonas Schievink
c110481dd4 Reset parser step count when bumping 2022-12-19 16:27:00 +01:00
Jonas Schievink
9e0aaf4cf3 Parse ..= X patterns 2022-12-13 17:32:25 +01:00
Amos Wenger
816f7fe12a Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
Aleksey Kladov
74de79b1da internal: rename 2021-12-25 22:02:26 +03:00
Aleksey Kladov
d0d05075ed internal: replace TreeSink with a data structure
The general theme of this is to make parser a better independent
library.

The specific thing we do here is replacing callback based TreeSink with
a data structure. That is, rather than calling user-provided tree
construction methods, the parser now spits out a very bare-bones tree,
effectively a log of a DFS traversal.

This makes the parser usable without any *specifc* tree sink, and allows
us to, eg, move tests into this crate.

Now, it's also true that this is a distinction without a difference, as
the old and the new interface are equivalent in expressiveness. Still,
this new thing seems somewhat simpler. But yeah, I admit I don't have a
suuper strong motivation here, just a hunch that this is better.
2021-12-25 22:02:26 +03:00
Aleksey Kladov
6e4bb57014 simplify 2021-12-12 19:31:32 +03:00
Aleksey Kladov
26bfd6023f Switch parser to use tokens 2021-12-12 16:54:09 +03:00
Laurențiu Nicola
f5db6e0e95 Bump parser step limit a little 2021-12-06 11:47:36 +02:00
Aleksey Kladov
485c5e6717 internal: remove unused dollars 2021-10-23 20:44:35 +03:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Aleksey Kladov
56964c9bd3 feat: allow attributes on all expressions
Attrs are syntactically valid on any expression, even if they are not
allowed semantically everywhere yet.
2021-09-25 22:19:27 +03:00
Aleksey Kladov
7dc331faef fix: correct extend_to logic in parser
Previously we swapped to events in the buffer, but that might be wrong
if there aer `forward_parent` links pointing to the swapped-out node.

Let's do the same via parent links instead, keeping the nodes in place
2021-09-25 22:09:50 +03:00
Aleksey Kladov
6997adfee7 simplify attribute parsing 2021-09-25 18:07:51 +03:00
Frank Steffahn
75073451c6 Fix three more (reverse) “a”/“an” typos 2021-08-22 17:48:15 +02:00
Jade
e3a67ccec6 tree-wide: fix rustdoc warnings, add some links 2021-08-03 21:34:20 -07:00
Aleksey Kladov
dc1577d58d Add even more docs 2021-05-22 17:20:22 +03:00
Edwin Cheng
8d62576a9b Fixed expr meta var after path colons in mbe 2021-01-10 20:52:46 +08:00
Aleksey Kladov
50a02eb359 Rename ra_parser -> parser 2020-08-12 17:14:23 +02:00