aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
Commit message (Collapse)AuthorAgeFilesLines
* simplifyAleksey Kladov2019-09-241-0/+5
|
* Support loop as argumentkjeremy2019-09-201-0/+1
|
* Simplify match armkjeremy2019-09-201-2/+1
|
* Merge #1884bors[bot]2019-09-201-2/+12
|\ | | | | | | | | | | | | | | 1884: Add indexing to record_field_pat r=matklad a=kjeremy Fixes #1870 Co-authored-by: kjeremy <[email protected]>
| * Apply suggestionkjeremy2019-09-201-3/+2
| |
| * Add indexing to record_field_patkjeremy2019-09-201-2/+13
| |
* | fix infinite loop in the parserAleksey Kladov2019-09-201-7/+11
|/ | | | closes #1866
* Merge #1881bors[bot]2019-09-201-1/+1
|\ | | | | | | | | | | | | | | 1881: don't confuse macro with != r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * don't confuse macro with !=Aleksey Kladov2019-09-201-1/+1
| | | | | | | | closes #1871
* | Replace usages of bump_any with bumpkjeremy2019-09-1914-87/+87
|/
* Merge #1848bors[bot]2019-09-152-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 patternDylan MacKenzie2019-09-151-10/+42
| |
| * Add `DotDotPat` to ASTDylan MacKenzie2019-09-151-0/+1
| | | | | | | | This is modeled on `PlaceholderPat`.
* | Allow an underscore as the identifier in `const` itemsDylan MacKenzie2019-09-152-2/+11
|/
* don't break parser error recovery in presence of macrosAleksey Kladov2019-09-121-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 expressionsAleksey Kladov2019-09-103-96/+51
|
* "Fix" mbe to work with decomposed tokensAleksey Kladov2019-09-101-57/+0
| | | | We regressed $i * 2 where $i = 1 + 1, need to fix that!
* WIP: switch to fully decomposed tokens internallyAleksey Kladov2019-09-109-279/+277
|
* introduce bump as a better-checked alternative to bump_anyAleksey Kladov2019-09-092-2/+8
|
* rename bump -> bump_anyAleksey Kladov2019-09-0916-132/+132
|
* tiny simplificationAleksey Kladov2019-09-094-5/+8
|
* better error recovery for use treesAleksey Kladov2019-09-052-2/+5
|
* always wrap block into an expressionAleksey Kladov2019-09-023-3/+8
|
* simplifyAleksey Kladov2019-09-022-56/+35
|
* cleanupAleksey Kladov2019-09-025-90/+86
|
* Handle `Struct { box i }` syntaxDylan MacKenzie2019-08-241-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 MacKenzie2019-08-242-7/+0
|
* Parse `BoxPat`Dylan MacKenzie2019-08-241-19/+32
|
* Add `BoxPat` variantDylan MacKenzie2019-08-231-0/+1
|
* rename struct -> record, pos -> tupleAleksey Kladov2019-08-236-44/+44
|
* Add test for nested box patternDylan MacKenzie2019-08-221-0/+2
|
* Add BOX_KW to PATTERN_FIRSTDylan MacKenzie2019-08-221-1/+1
|
* use derive(Debug) for SyntaxKindAleksey Kladov2019-08-192-255/+9
|
* plug new boilerplate_gen into ra_toolsAleksey Kladov2019-08-191-4/+0
|
* use new quote-generated syntax kindsAleksey Kladov2019-08-192-577/+538
|
* Merge #1685bors[bot]2019-08-151-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 positionbravomikekilo2019-08-141-10/+6
| |
| * fix error of RangeFrom in for-loopbravomikekilo2019-08-141-1/+17
| |
* | Merge #1676bors[bot]2019-08-148-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 usagesEvgenii P2019-08-138-13/+17
| |
| * Fix for<'lifetime> for types specified by pathEvgenii P2019-08-111-1/+2
| |
* | Merge #1636bors[bot]2019-08-131-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 testbravomikekilo2019-08-131-0/+6
| |
| * fix block parse problembravomikekilo2019-08-031-7/+6
| |
* | Move numeric names inside of `NameRef`Aleksey Kladov2019-08-095-12/+20
| |
* | Make name_ref to accept numeric names optionallyEvgenii P2019-08-095-9/+9
| |
* | Parse tuple struct field initializationEvgenii P2019-08-092-2/+3
| |
* | Merge #1661bors[bot]2019-08-081-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 reviewEvgenii P2019-08-081-13/+4
| | |
| * | Deduplicate while loop break conditionEvgenii P2019-08-081-2/+2
| | |