aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/inline
Commit message (Collapse)AuthorAgeFilesLines
* Rename ast::ImplBlock -> ast::ImplDefAleksey Kladov2020-02-2917-20/+20
|
* Parse attr in rhs of let stmtsEdwin Cheng2020-02-282-7/+35
|
* ra_syntax: migrate test data to 0-length text-range of SyntaxError when ↵Veetaha2020-02-1712-34/+34
| | | | constructed from TextUnit
* ra_syntax: reshape SyntaxError for the sake of removing redundancyVeetaha2020-02-1711-32/+32
|
* Run cargo testHan Mertens2020-02-121-0/+26
|
* Run cargo xtask codegenHan Mertens2020-02-121-0/+1
|
* Address review commentsMatthew Jasper2020-02-102-7/+58
|
* Update tests for or-patternsMatthew Jasper2020-02-094-60/+184
|
* Merge #3047bors[bot]2020-02-074-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | 3047: Update async unsafe fn ordering in parser r=matklad a=kiljacken As of rust-lang/rust#61319 the correct order for functions that are both unsafe and async is: `async unsafe fn` and not `unsafe async fn`. This commit updates the parser tests to reflect this, and corrects parsing behavior to accept the correct ordering. Fixes #3025 Co-authored-by: Emil Lauridsen <[email protected]>
| * Update async unsafe fn ordering.Emil Lauridsen2020-02-074-11/+11
| | | | | | | | | | | | | | | | | | | | As of rust-lang/rust#61319 the correct order for functions that are both unsafe and async is: `async unsafe fn` and not `unsafe async fn`. This commit updates the parser tests to reflect this, and corrects parsing behavior to accept the correct ordering. Fixes #3025
* | Closure params testToby Dimmick2020-02-062-0/+73
| |
* | Rework value parameter parsingToby Dimmick2020-02-0610-103/+474
|/ | | | | | | - `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
* Nest attrs into exprs in function argsAleksey Kladov2020-01-171-10/+10
|
* Merge pull request #2813 from jyn514/arg_attributesAleksey Kladov2020-01-172-0/+40
|\ | | | | Allow attributes before function arguments
| * move inline function closer to relevant codeJoshua Nelson2020-01-174-115/+40
| | | | | | | | also updates generated inline tests
| * Allow attributes before function argumentsJoshua Nelson2020-01-122-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for function calls of the form: ```rust ( #[attr(...)] 1.2, #[attr_one(...)] #[attr_two(...)] 1.5, ... etc ... ) ``` Closes https://github.com/rust-analyzer/rust-analyzer/issues/2801
* | Minimize testAleksey Kladov2020-01-166-116/+48
| |
* | Fix array element attribute positionEdwin Cheng2020-01-162-28/+28
|/
* Parse trait aliasesEmil Lauridsen2020-01-092-0/+131
|
* Improve const generics parsingMichael Chesser2020-01-064-19/+73
| | | | | - Handle const generics type args - Fix issue with const generic as first parameter in trait impl
* Merge #2642bors[bot]2019-12-222-3/+6
|\ | | | | | | | | | | | | | | 2642: Use name instead of ident in parser for macro 2.0 syntax r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * Use name instead of ident for macro 2.0 sytnaxEdwin Cheng2019-12-222-3/+6
| |
* | Merge #2641bors[bot]2019-12-222-0/+24
|\ \ | |/ |/| | | | | | | | | | | | | | | | | 2641: Parse const generics r=matklad a=roblabla Adds very primitive support for parsing const generics (`const IDENT: TY`) so that rust-analyzer stops complaining about the syntax being invalid. Fixes #1574 Fixes #2281 Co-authored-by: roblabla <[email protected]>
| * Parse const genericsroblabla2019-12-222-0/+24
| | | | | | | | | | Fixes #1574 Fixes #2281
* | Add macro 2.0 support in parserEdwin Cheng2019-12-214-0/+66
| |
* | Fix parser for macro call in pattern positionEdwin Cheng2019-12-201-5/+4
|/
* Introduce dedicated AST node for unionAleksey Kladov2019-11-251-2/+2
| | | | | | | | | | 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.
* Merge #1951bors[bot]2019-10-082-0/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | 1951: Lower the precedence of the `as` operator. r=matklad a=goffrie Previously, the `as` operator was being parsed like a postfix expression, and therefore being given the highest possible precedence. That caused it to bind more tightly than prefix operators, which it should not. Instead, parse it somewhat like a normal binary expression with some special-casing. Fixes #1851. Co-authored-by: Geoffry Song <[email protected]>
| * Move tests aroundGeoffry Song2019-10-066-141/+89
| |
| * Lower the precedence of the `as` operator.Geoffry Song2019-10-034-43/+141
| | | | | | | | | | | | | | Previously, the `as` operator was being parsed like a postfix expression, and therefore being given the highest possible precedence. That caused it to bind more tightly than prefix operators, which it should not. Instead, parse it somewhat like a normal binary expression with some special-casing.
* | Fix parsing of block expressions in "forbid_structs" contexts.Geoffry Song2019-10-038-43/+216
|/ | | | | | Forbidding block expressions entirely is too strict; instead, we should only forbid them in contexts where we are parsing an optional RHS (i.e. the RHS of a range expression).
* Parse correct AttrInputuHOOCCOOHu2019-09-3014-200/+254
|
* Add indexing to record_field_patkjeremy2019-09-202-0/+79
|
* Merge #1848bors[bot]2019-09-156-4/+489
|\ | | | | | | | | | | | | | | | | | | | | | | 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]>
| * Generate `dot_dot_test`Dylan MacKenzie2019-09-152-0/+481
| |
| * Bless old tests containing a `..` patternDylan MacKenzie2019-09-154-4/+8
| |
* | Add tests for underscores in `const` and `static` itemsDylan MacKenzie2019-09-151-0/+21
| |
* | Allow an underscore as the identifier in `const` itemsDylan MacKenzie2019-09-151-0/+1
|/
* update test dataAleksey Kladov2019-09-0298-3944/+4095
|
* Generate and bless testsDylan MacKenzie2019-08-246-85/+132
|
* rename struct -> record, pos -> tupleAleksey Kladov2019-08-2318-59/+59
|
* Add test for nested box patternDylan MacKenzie2019-08-222-12/+49
|
* Merge #1685bors[bot]2019-08-152-0/+45
|\ | | | | | | | | | | | | | | 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-144-113/+45
| |
| * fix testbravomikekilo2019-08-141-2/+2
| |
| * fix error of RangeFrom in for-loopbravomikekilo2019-08-142-0/+113
| |
* | Merge #1676bors[bot]2019-08-142-1/+83
|\ \ | |/ |/| | | | | | | | | | | 1676: Fix for<'lifetime> for types specified by path r=matklad a=eupn Fixes #1467. Co-authored-by: Evgenii P <[email protected]>
| * Fix for<'lifetime> for types specified by pathEvgenii P2019-08-112-1/+83
| |
* | Merge #1636bors[bot]2019-08-132-0/+69
|\ \ | |/ |/| | | | | | | | | | | 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-132-0/+69
| |