aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser/inline
Commit message (Collapse)AuthorAgeFilesLines
* Add WherePred to allow predicate access in WhereClauseVille Penttinen2019-03-311-5/+8
| | | | | This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be parsed using TYPE_BOUND_LIST
* Update testsVille Penttinen2019-03-312-10/+54
|
* Update testsVille Penttinen2019-03-3015-176/+292
|
* Fix parsing <= in type_argsVille Penttinen2019-03-302-6/+27
|
* Support references in higher-ranked trait boundsVille Penttinen2019-03-242-1/+127
| | | | Fixes #1020
* Error about attributes onpcpthm2019-03-192-0/+59
| | | | unallowed types of expression statement
* Allow attributes on top level expressionpcpthm2019-03-194-0/+152
| | | | | | A top level expression is either - a expression statement or - the last expression in a block
* Merge #991bors[bot]2019-03-187-7/+85
|\ | | | | | | | | | | | | | | | | | | | | | | 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-187-7/+85
| | | | | | | | | | - Fix pub_expr - Fix incorrect parsing of crate::path
* | Fix parse tree of attribute on match armpcpthm2019-03-171-78/+78
|/
* Allow attribute on struct literal fieldpcpthm2019-03-172-0/+48
|
* Add test for async blockCaio2019-03-102-0/+32
|
* Add async keywordCaio2019-03-092-0/+17
|
* Add support for parsing multiple if and while-let patternsVille Penttinen2019-03-042-1/+164
|
* allow `mut ident` patterns in trait methodsAleksey Kladov2019-03-042-11/+26
| | | | closes #928
* allow aliases in underscoresAleksey Kladov2019-03-042-1/+17
| | | | | | | | this helps with use foo::Trait as _; syntax
* allow vararg functionsAleksey Kladov2019-03-042-0/+50
|
* 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
|