aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
Commit message (Collapse)AuthorAgeFilesLines
* Allow attributes on top level expressionpcpthm2019-03-194-35/+79
| | | | | | A top level expression is either - a expression statement or - the last expression in a block
* Merge #991bors[bot]2019-03-186-71/+61
|\ | | | | | | | | | | | | | | | | | | | | | | 991: Use Marker argument for item parsers r=matklad a=pcpthm Before doing this for expressions, I found that the pattern (Marker argument) should be applied to the item parsers because visiblity and modifiers are parsed in a separate function. Fixed some parser bugs: - Fix pub_expr: `pub 42;` was allowed. - Fix incorrect parsing of crate::path: incorrectly parsed as `crate` as a visibility. Co-authored-by: pcpthm <[email protected]>
| * Use Marker argument for item parserspcpthm2019-03-186-71/+61
| | | | | | | | | | - Fix pub_expr - Fix incorrect parsing of crate::path
* | Merge #987bors[bot]2019-03-182-84/+70
|\| | | | | | | | | | | | | | | | | | | | | | | 987: Refactor maybe_item to use Marker argument r=pcpthm a=pcpthm As suggested at <https://github.com/rust-analyzer/rust-analyzer/pull/980#issuecomment-473659745>. For expression paring functions, changing signature - from `fn(&mut Parser) -> Option<CompletedMarker>` to `fn(&mut Parser, Marker) -> Result<CompletedMarker, Marker>` - from `fn(&mut Parser) -> CompletedMarker` to `fn(&mut Parser, Marker) -> CompletedMarker` is my plan. Co-authored-by: pcpthm <[email protected]>
| * Apply stylistic changes suggestedpcpthm2019-03-182-17/+14
| |
| * Refactor maybe_item to use Marker argumentpcpthm2019-03-172-86/+75
| |
* | Merge #983bors[bot]2019-03-171-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 983: support remainder assignment operator r=matklad a=JeanMertz `%=` was returning errors for me, turns out it wasn't added as a valid assignment operation. I'm not sure what the best location would be to add a test for this. Please let me know and I'll add one. Co-authored-by: Jean Mertz <[email protected]>
| * | support remainder assignment operatorJean Mertz2019-03-171-0/+1
| | |
* | | Fix parse tree of attribute on match armpcpthm2019-03-171-15/+15
| |/ |/|
* | Merge #985bors[bot]2019-03-171-57/+56
|\ \ | | | | | | | | | | | | | | | | | | | | | 985: simplify parsing blocks a bit r=pcpthm a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | simplify parsing blocks a bitAleksey Kladov2019-03-171-57/+56
| |/
* / Allow attribute on struct literal fieldpcpthm2019-03-171-1/+6
|/
* Allow MINUS at the start of a pattern.Michael Chesser2019-03-141-1/+1
|
* Add test for async blockCaio2019-03-101-1/+2
|
* Add async keywordCaio2019-03-093-1/+18
|
* Introduce pattern_list to parse pipe separated patternsVille Penttinen2019-03-052-10/+18
| | | | | pattern_list comes in two variants, one uses the default PAT_RECOVERY_SET as the recovery set, while other allows the user to provide a recovery set.
* Add support for parsing multiple if and while-let patternsVille Penttinen2019-03-041-0/+10
|
* allow `mut ident` patterns in trait methodsAleksey Kladov2019-03-041-1/+2
| | | | closes #928
* allow aliases in underscoresAleksey Kladov2019-03-042-1/+4
| | | | | | | | this helps with use foo::Trait as _; syntax
* Merge #926bors[bot]2019-03-041-1/+6
|\ | | | | | | | | | | | | | | 926: allow vararg functions r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * allow vararg functionsAleksey Kladov2019-03-041-1/+6
| |
* | improve error recoveryAleksey Kladov2019-03-041-17/+7
| | | | | | | | parse the contents of error block as an expression
* | extract block contents into a functionAleksey Kladov2019-03-041-2/+6
|/
* rename type to type_alias in the AST as wellAleksey Kladov2019-02-252-3/+3
|
* docsAleksey Kladov2019-02-213-15/+39
|
* fix the testAleksey Kladov2019-02-211-2/+2
|
* fix compilationAleksey Kladov2019-02-211-7/+7
|
* move parser to a separate crateAleksey Kladov2019-02-2123-0/+4283