aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
Commit message (Collapse)AuthorAgeFilesLines
...
* 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).
* Merge branch 'master' into feature/issue/1856Alexander Andreev2019-09-3037-657/+1095
|\ | | | | | | | | # Conflicts: # crates/ra_assists/src/ast_editor.rs
| * FixesuHOOCCOOHu2019-09-301-9/+0
| |
| * Fix API of AttruHOOCCOOHu2019-09-304-47/+26
| |
| * Parse correct AttrInputuHOOCCOOHu2019-09-3032-599/+825
| |
| * cleanup editorAleksey Kladov2019-09-301-1/+4
| |
| * remove ast_editor.rsAleksey Kladov2019-09-301-0/+12
| |
| * move remove bounds to ast/edit.rsAleksey Kladov2019-09-301-1/+15
| |
| * move field list to ast/edit.rsAleksey Kladov2019-09-302-3/+96
| |
| * migrate add impl items to the new editing APIAleksey Kladov2019-09-281-3/+94
| |
| * simplify strip attrsAleksey Kladov2019-09-283-3/+32
| |
* | Added test for check doc strings in crates.Alexander Andreev2019-09-3013-1/+25
|/ | | | #1856
* Merge #1815bors[bot]2019-09-271-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1815: Support correct `$crate` expansion in macros r=uHOOCCOOHu a=uHOOCCOOHu This PR makes normal use cases of `$crate` from macros work as expected. It makes more macros from `std` work. Type inference works well with `panic`, `unimplemented`, `format`, and maybe more. Sadly that `vec![1, 2, 3]` still not works, but it is not longer an issue about macro. Screenshot: ![Screenshot_20190927_022136](https://user-images.githubusercontent.com/14816024/65714465-b4568f80-e0cd-11e9-8043-dd44c2ae8040.png) Co-authored-by: uHOOCCOOHu <[email protected]>
| * Refactor `Name` ready for hygienic macrouHOOCCOOHu2019-09-261-0/+10
| |
* | Start simplifying editing APIAleksey Kladov2019-09-264-0/+103
|/
* move diff to ra_syntaxAleksey Kladov2019-09-261-0/+42
|
* keep ast creation API simpleAleksey Kladov2019-09-262-0/+136
|
* add new editing API, suitable for modifying several nodes at onceAleksey Kladov2019-09-253-0/+42
|
* fewer monomorphisationsAleksey Kladov2019-09-251-2/+2
|
* simplifyAleksey Kladov2019-09-241-4/+1
|
* 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
* Support path starting with a typeuHOOCCOOHu2019-09-152-1/+4
|
* Merge #1848bors[bot]2019-09-159-7/+529
|\ | | | | | | | | | | | | | | | | | | | | | | 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 `DotDotPat` to ASTDylan MacKenzie2019-09-152-2/+38
| | | | | | | | This is modeled on `PlaceholderPat`.
* | 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
|/
* Infer box expressionuHOOCCOOHu2019-09-112-3/+39
|
* 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-103-1/+146
|
* Fix outer doc-comments of `macro_rules`uHOOCCOOHu2019-09-093-2/+44
|
* Lower `Fn(X, Y) -> Z` pathsFlorian Diebold2019-09-072-1/+7
|