aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
Commit message (Collapse)AuthorAgeFilesLines
...
* | Use unwrap_or_defaultkjeremy2019-12-201-2/+2
|/
* Improve recovery for incomplete lambdasAleksey Kladov2019-12-172-0/+88
|
* Avoid recompiling serdeAleksey Kladov2019-12-121-3/+4
|
* DynMapAleksey Kladov2019-12-061-2/+12
| | | | | This might, or might not help us to reduce boilerplate associated with plumbing values from analysis to the IDE layer
* :arrow_up: rowanAleksey Kladov2019-12-043-8/+8
|
* Add `ModuleItemsOwner` to `Block`ice10002019-12-032-2/+4
|
* Fix hir for ast::UnionDefAleksey Kladov2019-11-253-19/+29
|
* Introduce dedicated AST node for unionAleksey Kladov2019-11-254-3/+41
| | | | | | | | | | 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 #2343bors[bot]2019-11-243-4/+25
|\ | | | | | | | | | | | | | | | | | | 2343: implement assist invert_if r=matklad a=bravomikekilo fix [issue 2219 invert if condition](https://github.com/rust-analyzer/rust-analyzer/issues/2219) I put the assist cursor range to `if` of the if expression, because both condition and body will be replaced. Is there any way to replace them without cover the cursor position? @matklad Co-authored-by: bravomikekilo <[email protected]>
| * do refact and fix some issuebravomikekilo2019-11-243-4/+25
| |
* | Uniformalize namingAleksey Kladov2019-11-221-2/+2
|/
* Next gen IDs for functionsAleksey Kladov2019-11-201-1/+9
| | | | | | | | | | | | | | | | | The current system with AstIds has two primaraly drawbacks: * It is possible to manufacture IDs out of thin air. For example, it's possible to create IDs for items which are not considered in CrateDefMap due to cfg. Or it is possible to mixup structs and unions, because they share ID space. * Getting the ID of a parent requires a secondary index. Instead, the plan is to pursue the more traditional approach, where each items stores the id of the parent declaration. This makes `FromSource` more awkward, but also more correct: now, to get from an AST to HIR, we first do this recursively for the parent item, and the just search the children of the parent for the matching def
* Allow non-path default type parametersAleksey Kladov2019-11-203-9/+9
|
* :arrow_up: rowanAleksey Kladov2019-11-193-19/+18
|
* Remove the custom impl of AttrsOwner for ImplItemDJMcNab2019-11-183-12/+4
| | | | | | The default impl should have the same behaviour, and it can be generated by codegen. See also `ModuleItem` and `NominalDef`
* Disable doctestsAleksey Kladov2019-11-171-0/+3
|
* Add ast for plain and raw string literalsAleksey Kladov2019-11-161-10/+85
|
* Force passing Source when creating a SourceAnalyzerAleksey Kladov2019-11-151-2/+4
|
* Attempt to implement typed accessorsGeoffry Song2019-11-154-8/+50
|
* Move inclusive range check to validationGeoffry Song2019-11-154-8/+33
|
* 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.
* Make make:: builders slightly more convenientAleksey Kladov2019-11-132-9/+12
|
* Use strongly-typed ast building for early-return assistAleksey Kladov2019-11-131-21/+31
|
* Forbid visibility qualifiers in traitsAleksey Kladov2019-11-114-1/+131
|
* Merge #2149bors[bot]2019-11-041-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | 2149: Handle IfLet in convert_to_guarded_return. r=matklad a=krk Fixes https://github.com/rust-analyzer/rust-analyzer/issues/2124 I could not move the cursor position out of `let`: `le<|>t` vs `let<|>`. Also, please suggest extra test cases. Co-authored-by: krk <[email protected]>
| * Support paths other than "Some".krk2019-11-011-2/+3
| |
| * Handle IfLet in convert_to_guarded_return.krk2019-10-311-0/+16
| |
* | Attach docs to staticskjeremy2019-10-312-1/+15
| |
* | traits => match_ast!kjeremy2019-10-301-5/+7
|/
* Document match_ast!kjeremy2019-10-301-0/+14
|
* Some clippy fixeskjeremy2019-10-301-2/+2
|
* fix parsing of for loops inside expressionsAleksey Kladov2019-10-283-48/+149
| | | | closes #2051
* Preserve whitespace at the end of doc commentsJeremy Kolb2019-10-272-4/+27
| | | | | | | | Whitespace can have special meaning in markdown. For instance ending a line with three spaces will render a new line. Note that this behavior diverges from RLS. Fixes #1997
* use correct spacing for enum patternAleksey Kladov2019-10-261-1/+1
|
* Adds "replace with guarded return" assistMikhail Modin2019-10-202-0/+36
|
* rename tools -> xtaskAleksey Kladov2019-10-171-1/+1
|
* Bump depsLaurențiu Nicola2019-10-171-1/+1
|
* Merge #2002bors[bot]2019-10-141-0/+1
|\ | | | | | | | | | | | | | | 2002: Remove unused dependencies r=matklad a=sinkuu Co-authored-by: Shotaro Yamada <[email protected]>
| * Enable `serde` feature in ra_syntax/Cargo.tomlShotaro Yamada2019-10-141-0/+5
| |
| * Remove smol_str dependency from ra_syntaxShotaro Yamada2019-10-111-4/+0
| |
* | add syntax-tree based indentsAleksey Kladov2019-10-122-6/+91
|/
* 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.
* | Merge #1960bors[bot]2019-10-054-132/+31
|\ \ | | | | | | | | | | | | | | | | | | | | | 1960: Replace AST visitors with macro r=viorina a=viorina Fixes #1672. Co-authored-by: Ekaterina Babshukova <[email protected]>
| * | remove `visitor` moduleEkaterina Babshukova2019-10-053-136/+21
| | |
| * | replace AST visitors with macroEkaterina Babshukova2019-10-052-8/+22
| | |
* | | Merge #1928bors[bot]2019-10-052-1/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1928: Support `#[cfg(..)]` r=matklad a=oxalica This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled. Front-end settings are **not** included in this PR. There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949 Fixes #1920 Related: #1073 Co-authored-by: uHOOCCOOHu <[email protected]> Co-authored-by: oxalica <[email protected]>
| * | Pass attributes as token tree to DefCollectoruHOOCCOOHu2019-10-022-1/+3
| |/
* / Fix parsing of block expressions in "forbid_structs" contexts.Geoffry Song2019-10-039-44/+217
|/ | | | | | 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).