aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | |
| * | Fix parser to correctly consume outer attrs before ellipsis paramEvgenii P2019-08-071-0/+4
| | |
| * | Fix variadic arg inline testEvgenii P2019-08-071-1/+1
| | |
| * | Add function parameters attributesEvgenii P2019-08-071-0/+16
| | |
* | | assoc types boundsAleksey Kladov2019-08-071-0/+7
|/ /
* / Optimize Parser::is_composite a littleLaurențiu Nicola2019-08-051-19/+35
|/
* fix: parse box syntax inside parenthesescsmoe2019-07-221-0/+3
|
* add await to syntax, parser for await_exprUnreal Hoang2019-07-202-0/+19
|
* allow rustfmt to reorder importsAleksey Kladov2019-07-043-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 attributesRyan Cumming2019-06-301-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 membersRyan Cumming2019-06-301-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 `;`.
* fixed #1384zjy2019-06-282-7/+20
|
* Merge #1415bors[bot]2019-06-241-1/+28
|\ | | | | | | | | | | | | | | | | 1415: fix: specialization r=matklad a=csmoe Closes #1402 r? @matklad Co-authored-by: csmoe <[email protected]>
| * fix: specialization(with blindly parsing)csmoe2019-06-191-1/+28
| | | | | | | | Change-Id: Ic5d2767e8781568d76d4d0013cd6081e95ae8a95
* | fix: box_patterncsmoe2019-06-194-5/+25
| | | | | | | | Change-Id: I45a856d74fb616d3bce33050f9e69d327186bd59
* | fix: box_syntax(#1412)csmoe2019-06-181-0/+5
|/ | | | Change-Id: I6e20e0163fa545de37226c1561b3b7103615626c
* fix: support existential typecsmoe2019-06-122-3/+17
|
* fix: never type with bindingcsmoe2019-06-072-2/+4
| | | | Change-Id: I14e1bc628b9d2dfdb1f40de3d3707f4e872767f2
* [#1083] Try block syntax: fix testsAndrey Tkachenko2019-06-061-7/+7
|