aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser/inline
Commit message (Collapse)AuthorAgeFilesLines
* rename type to type_alias in the AST as wellAleksey Kladov2019-02-2528-37/+37
|
* Enable parsing attributes for generic lifetimes and type parametersVille Penttinen2019-02-172-0/+63
|
* Enable parsing of attributes inside a match blockVille Penttinen2019-02-174-0/+229
| | | | | | | We allow invalid inner attributes to be parsed, e.g. inner attributes that are not directly after the opening brace of the match block. Instead we run validation on `MatchArmList` to allow better reporting of errors.
* make macro a NameOwnerAleksey Kladov2019-02-112-2/+4
|
* Fix handling of literal patternsFlorian Diebold2019-02-092-21/+31
| | | | | Wrap them in a LiteralPat node so they can be distinguished from literal expressions.
* Add AST for extern crateFlorian Diebold2019-02-041-1/+1
| | | | Also change it to parse the crate name as a NAME_REF, not a NAME.
* Merge #692bors[bot]2019-01-312-0/+43
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 692: [WIP] Correctly parse attributes r=matklad a=DJMcNab Reference - https://doc.rust-lang.org/reference/attributes.html This fixes/investigates inner attributes for: - [x] `impl` blocks - [x] `extern` blocks - [x] `fn`s (fixes #689) - [x] `mod`s (already supported) - [x] 'block expressions' (the long text just describes all 'blocks' used as statements) This also investigates/fixes outer attributes for: - [ ] 'most statements' (see also: #685, https://doc.rust-lang.org/reference/expressions.html#expression-attributes) - [x] Enum variants, Struct and Union fields (Fixed in #507) - [ ] 'Match expression arms' (@matklad can you provide a test case which explains what this means?) - [ ] 'Generic lifetime or type parameters' - [ ] 'Elements of array expressions, tuple expressions, call expressions, tuple-style struct and enum variant expressions' - [ ] 'The tail expression of block expressions' Co-authored-by: DJMcNab <[email protected]>
| * Correctly parse inner attributes of impl blocksDJMcNab2019-01-272-0/+43
| |
* | Infer type of match guardMarcus Klaas de Vries2019-01-283-40/+95
|/
* Merge #660bors[bot]2019-01-262-0/+45
|\ | | | | | | | | | | | | | | 660: Support macro calls in type position r=matklad a=regiontog A [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fdc6dd4ddaece92a72fa2a292b75e27c) demonstrating the syntax in question. Co-authored-by: Erlend Tobiassen <[email protected]>
| * Support macro calls in type positionErlend Tobiassen2019-01-252-0/+45
| |
* | rename POS_FIELD -> POS_FIELD_DEFAleksey Kladov2019-01-253-10/+10
|/ | | | to match NAMED_FIELD_DEF
* Support universal function call syntax in function callsDJMcNab2019-01-242-6/+85
|
* Add test for placeholder parameters in trait fn defsErlend Tobiassen2019-01-222-0/+35
|
* Update tests after allowing where predicate to accept typesErlend Tobiassen2019-01-221-12/+13
|
* Change parsing of struct field patternsMarcus Klaas de Vries2019-01-191-12/+10
|
* Finish move of StructField for pattern type inferenceMarcus Klaas de Vries2019-01-191-20/+26
|
* Fix handling of attributes in positional field listsDJMcNab2019-01-122-0/+43
|
* Fix handling of where clauses in tuple structsDJMcNab2019-01-102-0/+64
|
* Rename traits::impl_item -> impl_block as well, as well as the testsFlorian Diebold2019-01-044-0/+0
|
* Rename ImplItem to ImplBlockFlorian Diebold2019-01-0411-16/+16
| | | | | rustc uses the name ImplItem for items in impls, not the impl {} block itself, which could lead to confusion.
* parse minus before number literalcsmoe2018-12-302-33/+46
|
* Fix where clauses using fully qualified path syntaxDJMcNab2018-12-212-8/+37
|
* Run gen-testsDJMcNab2018-12-202-0/+59
|
* Fix the tests and fix the precommit hookDJMcNab2018-12-20239-268/+173
|
* Fix ambiguity with if breakDJMcNab2018-12-202-0/+71
| | | | Brought up by #290
* Add tests and only traverse in the crates directoryDJMcNab2018-12-194-87/+168
|
* Move is_block to lower in the call treeDJMcNab2018-12-192-61/+61
|
* Fix parsing of inclusive ranges (#214)DJMcNab2018-12-192-27/+65
| | | | I'm not certain that this is correct, so extra eyes would be good
* Fixed cast expression parsing in ra_syntax.Roland Ruckerbauer2018-12-172-6/+48
| | | | | | | | | | | | | | | | | | | | | | The cast expression expected any type via types::type_() function, but the language spec does only allow TypeNoBounds (types without direct extra bounds via `+`). **Example:** ```rust fn test() { 6i8 as i32 + 5; } ``` This fails, because the types::type_() function which should parse the type after the as keyword is greedy, and takes all plus sign after path types as extra. My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`) function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers. This function is then called by `type_()` and the new public `type_no_bounds()`.
* Update use path testDJMcNab2018-12-052-74/+2
|
* Improve/add the use_item documentationDJMcNab2018-12-0510-0/+485
|
* rename ROOT -> SOURCE_FILEAleksey Kladov2018-11-07113-113/+113
|
* grammar: for predicates in whereAleksey Kladov2018-11-052-0/+62
| | | | closes #191
* Support leading pipe in match armsDaniel McNab2018-10-032-12/+56
|
* support 2018 pathsAleksey Kladov2018-09-292-0/+16
|
* generate testsuite for impl_typecsmoe2018-09-262-0/+83
|
* rename all thingsAleksey Kladov2018-09-16219-0/+5401