aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not add imports before inner attributesKirill Bulatov2020-02-121-0/+9
|
* Merge #3062bors[bot]2020-02-113-2/+43
|\ | | | | | | | | | | | | | | | | | | 3062: Implement slice pattern AST > HIR lowering r=jplatte a=jplatte WIP. The necessary changes for parsing are implemented, but actual inference is not yet. Just wanted to upload what I've got so far so it doesn't get duplicated :) Will fix #3043 Co-authored-by: Jonas Platte <[email protected]>
| * Implement slice pattern AST > HIR loweringJonas Platte2020-02-113-2/+43
| |
* | Address review commentsMatthew Jasper2020-02-102-7/+58
| |
* | Update tests for or-patternsMatthew Jasper2020-02-094-60/+184
| |
* | Add or- and parenthesized-patternsMatthew Jasper2020-02-091-6/+75
| |
* | Some README fixes/cleanupsFlorian Diebold2020-02-091-1/+1
| | | | | | | | Make capitalization more consistent and fix some typos.
* | Rename add import assistKirill Bulatov2020-02-071-1/+1
|/
* 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
* | Merge #3040bors[bot]2020-02-0714-200/+608
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3040: Rework value parameter parsing r=matklad a=tobz1000 Fixes #2847. - `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 __Question__: The pre-existing test `param_list_opt_patterns` has been kept as-is, although the name no longer makes sense (it's testing `Fn__(...)` params, which aren't allowed patterns any more). What would be best to do about this? Co-authored-by: Toby Dimmick <[email protected]>
| * | Closure params testToby Dimmick2020-02-062-0/+73
| | |
| * | 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
* | | Cleanup early return assistAleksey Kladov2020-02-071-8/+21
| | |
* | | Generalize invert_if to just always workAleksey Kladov2020-02-071-1/+5
| |/ |/|
* | A tiny bit more consistent APIAleksey Kladov2020-02-061-1/+1
|/
* Refactor if-let -> match assist to use ast::makeAleksey Kladov2020-02-052-3/+25
|
* Make sure that newly created nodes are the root of the treeAleksey Kladov2020-02-041-2/+11
|
* ra_syntax: added tests for tokenization errorsVeetaha2020-02-03150-49/+427
|
* ra_syntax: add backticks around tokens specimenVeetaha2020-02-031-12/+23
|
* ra_syntax: removed unnecessary init statement from reparsing testsVeetaha2020-02-031-3/+0
|
* ra_syntax: rename first_token() -> lex_first_token()Veetaha2020-02-031-3/+3
|
* ra_syntax: fixed a typo in doc commentVeetaha2020-02-031-2/+4
|
* ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR reviewVeetaha2020-02-037-173/+193
|
* ra_syntax: remove backticks from TokenizeError message since that is not ↵Veetaha2020-02-031-9/+9
| | | | Markdown ;(
* add better docs for tokenize errorsVeetaha2020-02-031-2/+2
|
* ra_syntax: moved ParsedToken derive attribute under the doc commentVeetaha2020-02-031-1/+1
|
* ra_syntax: fixed doc commentVeetaha2020-02-031-1/+1
|
* Reimplemented lexer with vectors instead of iteratorsVeetaha2020-02-038-187/+241
|
* ra_syntax: changed added diagnostics information returned from tokenize() ↵Veetaha2020-02-034-74/+237
| | | | (implemented with iterators)
* Fixed a typoVeetaha2020-01-221-1/+1
|
* Fixed a typoVeetaha2020-01-221-1/+1
|
* Preserved a comment on the bug previously present in ast::Literal::kind()Veetaha2020-01-221-0/+5
|
* ra_syntax: remove code duplication and token reevaluation from ↵Veetaha2020-01-221-30/+20
| | | | ast::Literal::kind()
* changed 'descendants()' to 'children()'TomasKralCZ2020-01-201-4/+1
|
* added eq_token() method to LetStmtTomasKralCZ2020-01-191-0/+7
|
* 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
| | |
* | | Merge #2837bors[bot]2020-01-151-0/+3980
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2837: Accidentally quadratic r=matklad a=matklad Our syntax highlighting is accdentally quadratic. Current state of the PR fixes it in a pretty crude way, looks like for the proper fix we need to redo how source-analyzer works. **NB:** don't be scared by diff stats, that's mostly a test-data file Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Add a testAleksey Kladov2020-01-151-0/+3980
| |/ /
* | | More orthogonal path editingAleksey Kladov2020-01-152-16/+44
| | |
* | | More fluent APIAleksey Kladov2020-01-151-10/+12
| | |
* | | Slightly more fluent APIAleksey Kladov2020-01-152-14/+14
| | |