Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge #1848 | bors[bot] | 2019-09-15 | 2 | -10/+43 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | 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]> | |||||
| * | Parse `..` as a proper pattern | Dylan MacKenzie | 2019-09-15 | 1 | -10/+42 | |
| | | ||||||
| * | Add `DotDotPat` to AST | Dylan MacKenzie | 2019-09-15 | 1 | -0/+1 | |
| | | | | | | | | This is modeled on `PlaceholderPat`. | |||||
* | | Allow an underscore as the identifier in `const` items | Dylan MacKenzie | 2019-09-15 | 2 | -2/+11 | |
|/ | ||||||
* | don't break parser error recovery in presence of macros | Aleksey Kladov | 2019-09-12 | 1 | -2/+2 | |
| | | | | | | | Parser has the invariant that `{}` are balanced. Previous code tried (unsucesfuly) maintain the same invariant for `$()` as well, but it was done in a rather ad-hoc manner: it's not at all obvious that it is possible to maintain both invariants! | |||||
* | cleanup dollar handling in expressions | Aleksey Kladov | 2019-09-10 | 3 | -96/+51 | |
| | ||||||
* | "Fix" mbe to work with decomposed tokens | Aleksey Kladov | 2019-09-10 | 1 | -57/+0 | |
| | | | | We regressed $i * 2 where $i = 1 + 1, need to fix that! | |||||
* | WIP: switch to fully decomposed tokens internally | Aleksey Kladov | 2019-09-10 | 9 | -279/+277 | |
| | ||||||
* | introduce bump as a better-checked alternative to bump_any | Aleksey Kladov | 2019-09-09 | 2 | -2/+8 | |
| | ||||||
* | rename bump -> bump_any | Aleksey Kladov | 2019-09-09 | 16 | -132/+132 | |
| | ||||||
* | tiny simplification | Aleksey Kladov | 2019-09-09 | 4 | -5/+8 | |
| | ||||||
* | better error recovery for use trees | Aleksey Kladov | 2019-09-05 | 2 | -2/+5 | |
| | ||||||
* | always wrap block into an expression | Aleksey Kladov | 2019-09-02 | 3 | -3/+8 | |
| | ||||||
* | simplify | Aleksey Kladov | 2019-09-02 | 2 | -56/+35 | |
| | ||||||
* | cleanup | Aleksey Kladov | 2019-09-02 | 5 | -90/+86 | |
| | ||||||
* | Handle `Struct { box i }` syntax | Dylan MacKenzie | 2019-08-24 | 1 | -0/+3 | |
| | | | | | | Named structs can have `box` patterns that will bind to their fields. This is similar to the behavior of the `ref` and `mut` fields, but is at least a little bit surprising. | |||||
* | Centralize `box` pattern tests in `patterns.rs` | Dylan MacKenzie | 2019-08-24 | 2 | -7/+0 | |
| | ||||||
* | Parse `BoxPat` | Dylan MacKenzie | 2019-08-24 | 1 | -19/+32 | |
| | ||||||
* | Add `BoxPat` variant | Dylan MacKenzie | 2019-08-23 | 1 | -0/+1 | |
| | ||||||
* | rename struct -> record, pos -> tuple | Aleksey Kladov | 2019-08-23 | 6 | -44/+44 | |
| | ||||||
* | Add test for nested box pattern | Dylan MacKenzie | 2019-08-22 | 1 | -0/+2 | |
| | ||||||
* | Add BOX_KW to PATTERN_FIRST | Dylan MacKenzie | 2019-08-22 | 1 | -1/+1 | |
| | ||||||
* | use derive(Debug) for SyntaxKind | Aleksey Kladov | 2019-08-19 | 2 | -255/+9 | |
| | ||||||
* | plug new boilerplate_gen into ra_tools | Aleksey Kladov | 2019-08-19 | 1 | -4/+0 | |
| | ||||||
* | use new quote-generated syntax kinds | Aleksey Kladov | 2019-08-19 | 2 | -577/+538 | |
| | ||||||
* | Merge #1685 | bors[bot] | 2019-08-15 | 1 | -1/+13 | |
|\ | | | | | | | | | | | | | | | 1685: fix error of RangeFrom in for-loop r=DJMcNab a=bravomikekilo fix [issue-1542](https://github.com/rust-analyzer/rust-analyzer/issues/1542) @matklad Co-authored-by: bravomikekilo <[email protected]> | |||||
| * | fix test position | bravomikekilo | 2019-08-14 | 1 | -10/+6 | |
| | | ||||||
| * | fix error of RangeFrom in for-loop | bravomikekilo | 2019-08-14 | 1 | -1/+17 | |
| | | ||||||
* | | Merge #1676 | bors[bot] | 2019-08-14 | 8 | -12/+17 | |
|\ \ | |/ |/| | | | | | | | | | | | 1676: Fix for<'lifetime> for types specified by path r=matklad a=eupn Fixes #1467. Co-authored-by: Evgenii P <[email protected]> | |||||
| * | Fix is_path_start to accept T![<], fix is_path_start usages | Evgenii P | 2019-08-13 | 8 | -13/+17 | |
| | | ||||||
| * | Fix for<'lifetime> for types specified by path | Evgenii P | 2019-08-11 | 1 | -1/+2 | |
| | | ||||||
* | | Merge #1636 | bors[bot] | 2019-08-13 | 1 | -7/+12 | |
|\ \ | |/ |/| | | | | | | | | | | | 1636: fix block parse problem r=matklad a=bravomikekilo try to fix [issue-1598](https://github.com/rust-analyzer/rust-analyzer/issues/1598). Co-authored-by: bravomikekilo <[email protected]> | |||||
| * | add inline test | bravomikekilo | 2019-08-13 | 1 | -0/+6 | |
| | | ||||||
| * | fix block parse problem | bravomikekilo | 2019-08-03 | 1 | -7/+6 | |
| | | ||||||
* | | Move numeric names inside of `NameRef` | Aleksey Kladov | 2019-08-09 | 5 | -12/+20 | |
| | | ||||||
* | | Make name_ref to accept numeric names optionally | Evgenii P | 2019-08-09 | 5 | -9/+9 | |
| | | ||||||
* | | Parse tuple struct field initialization | Evgenii P | 2019-08-09 | 2 | -2/+3 | |
| | | ||||||
* | | Merge #1661 | bors[bot] | 2019-08-08 | 1 | -1/+12 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1661: Parse function parameters attributes r=matklad a=eupn Fixes #1397. The [RFC-2565](https://github.com/rust-lang/rfcs/blob/master/text/2565-formal-function-parameter-attributes.md) specifies `#[attributes]` to function parameters: ```rust fn foo(#[attr] a, #[unused] b, #[must_use] ...) { // ... } ``` This PR adds those attributes into grammar and to the parser, extending corresponding inline tests. Co-authored-by: Evgenii P <[email protected]> | |||||
| * | | Fix parser tests according to review | Evgenii P | 2019-08-08 | 1 | -13/+4 | |
| | | | ||||||
| * | | Deduplicate while loop break condition | Evgenii P | 2019-08-08 | 1 | -2/+2 | |
| | | | ||||||
| * | | Fix parser to correctly consume outer attrs before ellipsis param | Evgenii P | 2019-08-07 | 1 | -0/+4 | |
| | | | ||||||
| * | | Fix variadic arg inline test | Evgenii P | 2019-08-07 | 1 | -1/+1 | |
| | | | ||||||
| * | | Add function parameters attributes | Evgenii P | 2019-08-07 | 1 | -0/+16 | |
| | | | ||||||
* | | | assoc types bounds | Aleksey Kladov | 2019-08-07 | 1 | -0/+7 | |
|/ / | ||||||
* / | Optimize Parser::is_composite a little | Laurențiu Nicola | 2019-08-05 | 1 | -19/+35 | |
|/ | ||||||
* | fix: parse box syntax inside parentheses | csmoe | 2019-07-22 | 1 | -0/+3 | |
| | ||||||
* | add await to syntax, parser for await_expr | Unreal Hoang | 2019-07-20 | 2 | -0/+19 | |
| | ||||||
* | allow rustfmt to reorder imports | Aleksey Kladov | 2019-07-04 | 3 | -5/+6 | |
| | | | | | | This wasn't a right decision in the first place, the feature flag was broken in the last rustfmt release, and syntax highlighting of imports is more important anyway | |||||
* | Remove parse error on array initializer attributes | Ryan Cumming | 2019-06-30 | 1 | -11/+0 | |
| | | | | | This is actually allowed by the `rustc` parser but most attributes will fail later due to attributes on expressions being experimental. | |||||
* | Support attributes on array members | Ryan Cumming | 2019-06-30 | 1 | -0/+28 | |
| | | | | | | | | | | | | Array members are allow to have attributes such as `#[cfg]`. This is a bit tricky as we don't know if the first expression is an initializer or a member until we encounter a `;`. This reuses a trick from `stmt` where we remember if we saw an attribute and then raise an error if the first expression ends up being an initializer. This isn't perfect as the error isn't correctly located on the attribute or initializer; it ends up immediately after the `;`. |