Lukas Wirth
a483d3bc37
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
2024-04-14 16:02:38 +02:00
Lukas Wirth
83370fe5d7
Use Edition::CURRENT
2024-04-14 15:30:29 +02:00
Johann Hemmann
2cf5d8811a
Raise edition one more level
2024-04-14 15:11:33 +02:00
Johann Hemmann
454e481422
Add edition to all parse
functions of the parser crate
2024-04-14 15:07:43 +02:00
Tetsuharu Ohzeki
81c35d1f56
syntax: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Lukas Wirth
890eb17b4e
Replace ID based TokenMap with proper relative text-ranges / spans
2023-11-28 10:55:39 +01:00
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
Josh Soref
bc7d84c3ce
Spelling
...
* a rule
* access
* after
* amount
* annotations
* assignment
* assist
* associated
* attribute
* borrowed
* built-in type
* clarification
* command
* const
* constructor
* corresponding
* counterparts
* curlies
* dependencies
* deterministic
* diagnostic
* duplicates
* edge
* edited
* efficient
* elsewhere
* execution
* expression
* extensions
* extracted
* fill
* github
* helper
* heuristic
* incomplete
* indent end
* inlay
* invocation
* lifetime
* looking
* maybe
* move
* mutability
* mutable
* necessarily
* necessary
* negative
* nonexistent
* occurred
* offsets
* offsetted
* overridden
* parameters
* params
* params_and_where_preds_in_scope
* paredit
* parent
* parentheses
* prepended if
* punctuation
* receive
* receiver
* referring
* repeated
* representing
* semantically
* separately
* shouldnot
* siblings
* similar
* something's
* statement
* struct
* structure
* surprise
* the
* this
* transparent
* unimplemented
* unnamed
* unnecessary
* unneeded
* unreachable
* unterminated
* utilities
* variant
* variants
* visibility
* work around (v)
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-19 09:45:55 -04:00
Aleksey Kladov
660cf34d8c
dead code
2021-12-28 19:13:30 +03:00
Aleksey Kladov
f4cb0ff9be
internal: move ws attachment logic to the parser crate
...
This has to re-introduce the `sink` pattern, because doing this purely
with iterators is awkward :( Maaaybe the event vector was a false start?
But, anyway, I like the current factoring more -- it sort-of obvious
that we do want to keep ws-attachment business in the parser, and that
we also don't want that to depend on the particular tree structure. I
think `shortcuts` module achieves that.
2021-12-26 16:47:10 +03:00
Aleksey Kladov
f692fafee8
rename
2021-12-25 22:03:57 +03: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
a022ad68c9
internal: move all the lexing to the parser crate
2021-12-18 17:20:38 +03:00
Aleksey Kladov
958f20ff84
minor: dead code
2021-12-18 14:55:20 +03:00
Aleksey Kladov
6ce587ba5a
parser tests work
2021-12-12 18:31:05 +03:00
Aramis Razzaghipour
eff195852d
Fix miscellaneous Clippy lints
2021-10-03 23:53:30 +11:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
...
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
Clemens Wasser
629e8d1ed0
Apply more clippy suggestions and update generated
2021-06-03 12:46:56 +02:00
Aleksey Kladov
188b0f96f9
Add more docs
2021-05-22 16:53:47 +03:00
Lukas Wirth
4b5b54279a
Attach comments to ast::Impl
2021-05-15 17:32:28 +02:00
Edwin Cheng
eedadd7024
Add support for doc on hover for macro 2.0
2021-03-27 14:57:11 +08:00
Aleksey Kladov
f5a81ec468
Upgrade rowan
...
Notably, new rowan comes with support for mutable syntax trees.
2021-03-16 16:10:49 +03:00
Lukas Wirth
6e6d75bbdc
Attach trivia to ast::Union nodes
2021-03-14 11:11:01 +01:00
Aleksey Kladov
3429b32ad1
⬆️ rowan
...
It now stores text inline with tokens
2021-01-20 14:04:53 +03:00
Aleksey Kladov
6dbba4d75d
Remove useless wrapper
2021-01-15 20:15:33 +03:00
Vincent Esche
21f8239ac8
Fixed typos in code comments
2021-01-09 15:41:29 +01:00
Kevaundray Wedderburn
72b9a4fbd3
Change <|> to $0 - Rebase
2021-01-07 12:09:23 +00:00
Lukas Wirth
dd496223f5
Node-ify lifetimes
2020-12-16 14:16:09 +01:00
Jonas Schievink
c1cb595382
Move to upstream macro_rules!
model
2020-12-15 15:37:37 +01:00
Lukas Wirth
a1c8bdecfd
Use items can also have doc comments
2020-12-04 17:09:40 +01:00
Aleksey Kladov
a27186636d
Fix attachment of inner doc comments
2020-11-12 12:09:12 +01:00
Aleksey Kladov
5ba4f949c2
Kill RAW_ literals
...
Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.
2020-11-06 22:23:14 +01:00
Aleksey Kladov
6725dcf847
Minor, cleanup style
2020-11-06 21:09:37 +01:00
Aleksey Kladov
b610118453
Deny unreachable-pub
...
It's very useful when `pub` is equivalent to "this is crate's public
API", let's enforce this!
Ideally, we should enforce it for local `cargo test`, and only during
CI, but that needs https://github.com/rust-lang/cargo/issues/5034 .
2020-11-02 14:07:08 +01:00
Aleksey Kladov
fd8622e1ec
Cleanup
2020-10-07 11:55:20 +02:00
kjeremy
ff678e1349
Up rustc-ap-rustc_lexer to 681
...
cargo update as well
2020-10-01 15:21:13 -04:00
Aleksey Kladov
a1c187eef3
Rename ra_syntax -> syntax
2020-08-12 18:30:53 +02:00