| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We used to parse it as T: Fn() -> (u8 + Send), which is different from
the rustc behavior of T: (Fn() -> u8) + Send
|
|
|
|
|
|
|
|
| |
The sytax tree output files now use .rast extension
(rust-analyzer syntax tree or rust abstract syntax tree
(whatever)).
This format has a editors/code/ra_syntax_tree.tmGrammar.json declaration
that supplies nice syntax highlighting for .rast files.
|
|
|
|
| |
This commit changes the parser to attach doc-comments to the corresponding declaration in case there are newlines in between the doc-comment and the declaration.
|
|
|
|
| |
closes #3571
|
| |
|
| |
|
|
|
|
|
|
|
| |
- `Fn__(...)` parameters with idents/patterns no longer parse
- Trait function parameters with arbitrary patterns parse
- Trait function parameters without idents/patterns no longer parse
- `fn(...)` parameters no longer parse with patterns other than a single ident
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Although structs and unions have the same syntax and differ only in
the keyword, re-using the single syntax node for both of them leads to
confusion in practice, and propagates further down the hir in an
upleasent way.
Moreover, static and consts also share syntax, but we use different
nodes for them.
|
|
|
|
|
|
|
|
|
|
| |
Right now they are handled in `postfix_dot_expr`, but that doesn't allow it to
correctly handle precedence. Integrate it more tightly with the Pratt parser
instead.
Also includes a drive-by fix for parsing `match .. {}`.
Fixes #2242.
|
|
|
|
| |
closes #2051
|
| |
|
| |
|
| |
|
|
|
|
| |
closes #1871
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1848: Parse `..` as a full pattern r=matklad a=ecstatic-morse
Resolves #1479.
This PR implements [RFC 2707](https://github.com/rust-lang/rfcs/pull/2707) in the parser. It introduces a new `DotDotPat` AST node modeled on `PlaceholderPat` and changes the parsing of tuple and slice patterns to conform to the RFC.
Notably, this PR does *not* change the resulting AST when `..` appears in a struct pattern (e.g. `Struct { a, b: c, .. }`). I *think* this is the behavior mandated by RFC 2707, but someone should confirm this.
Co-authored-by: Dylan MacKenzie <[email protected]>
|
| | |
|
|/ |
|
|
|
|
| |
cc https://github.com/rust-lang/rust/issues/64242
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|