aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data
Commit message (Collapse)AuthorAgeFilesLines
* Rework value parameter parsingToby Dimmick2020-02-0612-200/+535
| | | | | | | - `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
* ra_syntax: added tests for tokenization errorsVeetaha2020-02-03148-27/+363
|
* Nest attrs into exprs in function argsAleksey Kladov2020-01-172-28/+22
|
* Extract expr_with_attrsAleksey Kladov2020-01-171-10/+14
|
* 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
| |
* | Simplify array parsingAleksey Kladov2020-01-161-20/+13
| |
* | Merge #2827bors[bot]2020-01-162-28/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 2827: Fix array element attribute position r=matklad a=edwin0cheng This PR fixed a bug which an ATTR node insert in the wrong place in array element. ~~And introduce `precede_next` for allow outer attributes to insert into a parsed `expr`.~~ related #2783 Co-authored-by: Edwin Cheng <[email protected]>
| * | Fix array element attribute positionEdwin Cheng2020-01-162-28/+28
| |/
* / Add a testAleksey Kladov2020-01-151-0/+3980
|/
* 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-223-5/+10
|\ | | | | | | | | | | | | | | 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-223-5/+10
| |
* | 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-217-328/+240
| |
* | Fix parser for macro call in pattern positionEdwin Cheng2019-12-201-5/+4
|/
* Improve recovery for incomplete lambdasAleksey Kladov2019-12-172-0/+88
|
* Introduce dedicated AST node for unionAleksey Kladov2019-11-252-3/+3
| | | | | | | | | | 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.
* Attempt to implement typed accessorsGeoffry Song2019-11-151-1/+1
|
* Move inclusive range check to validationGeoffry Song2019-11-152-8/+15
|
* Fix parsing of "postfix" range expressions.Geoffry Song2019-11-156-0/+118
| | | | | | | | | | Right now they are handled in `postfix_dot_expr`, but that doesn't allow it to correctly handle precedence. Integrate it more tightly with the Pratt parser instead. Also includes a drive-by fix for parsing `match .. {}`. Fixes #2242.
* Forbid visibility qualifiers in traitsAleksey Kladov2019-11-112-0/+105
|
* fix parsing of for loops inside expressionsAleksey Kladov2019-10-283-48/+149
| | | | closes #2051
* Merge #1951bors[bot]2019-10-084-0/+150
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-068-141/+193
| |
| * 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-3030-598/+779
|
* Support loop as argumentkjeremy2019-09-202-0/+64
|
* Merge #1884bors[bot]2019-09-202-0/+79
|\ | | | | | | | | | | | | | | 1884: Add indexing to record_field_pat r=matklad a=kjeremy Fixes #1870 Co-authored-by: kjeremy <[email protected]>
| * Add indexing to record_field_patkjeremy2019-09-202-0/+79
| |
* | fix infinite loop in the parserAleksey Kladov2019-09-202-0/+53
|/ | | | closes #1866
* don't confuse macro with !=Aleksey Kladov2019-09-202-0/+69
| | | | closes #1871
* Merge #1848bors[bot]2019-09-157-5/+491
|\ | | | | | | | | | | | | | | | | | | | | | | 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-155-5/+10
| |
* | Add tests for underscores in `const` and `static` itemsDylan MacKenzie2019-09-153-38/+78
| |
* | Allow an underscore as the identifier in `const` itemsDylan MacKenzie2019-09-151-0/+1
|/
* add a jointness parser testsAleksey Kladov2019-09-102-0/+55
| | | | cc https://github.com/rust-lang/rust/issues/64242
* WIP: switch to fully decomposed tokens internallyAleksey Kladov2019-09-102-0/+131
|
* Fix outer doc-comments of `macro_rules`uHOOCCOOHu2019-09-092-0/+42
|
* better error recovery for use treesAleksey Kladov2019-09-053-1/+60
|
* update test dataAleksey Kladov2019-09-02150-8970/+9245
|
* Generate and bless testsDylan MacKenzie2019-08-247-85/+227
|
* Centralize `box` pattern tests in `patterns.rs`Dylan MacKenzie2019-08-241-0/+6
|
* rename struct -> record, pos -> tupleAleksey Kladov2019-08-2336-126/+126
|