about summary refs log tree commit diff
path: root/crates/syntax/src/tests
AgeCommit message (Collapse)AuthorLines
2022-05-13Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, ↵Jonas Schievink-17/+2
r=jonas-schievink" This reverts commit cc9ae2b89e01a30e441371b9fd3376c3d03a475f, reversing changes made to 7dfd1cb572d8d4fd951237361e43ecddd9c9a852.
2022-05-05Indicate the number of float tokens in the first tokenJonas Schievink-1/+14
2022-05-05Split float literal tokens at the `.`Jonas Schievink-3/+3
2022-05-05Wrap float literals in their own nodeJonas Schievink-0/+2
2022-05-05Lower values of char and byte literalsLaurențiu Nicola-1/+1
2022-04-05Wrap macros in expr position in `MacroExpr` nodeJonas Schievink-0/+1
2022-04-01internal: Move rust.ungram into rust-analyzer/crates/syntaxLukas Wirth-2/+3
2022-03-05fix: Recognize `Self` as a proper keywordLukas Wirth-12/+16
2022-03-05Merge #11598bors[bot]-0/+1
11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2 Part of #11532. Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into ```rust { let (<gensym_a>, <gensym_b>) = (b, a); a = <gensym_a>; b = <gensym_b>; } ``` rustc uses hygiene to implement that, but we don't support hygiene yet. However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error. I'm still looking for the best way to do lowering, though. Fixes #11454. Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2022-03-02Parse destructuring assignmentChayim Refael Friedman-0/+1
The only patterns we should parse are `..` in structs and `_`: the rest are either not supported or already valid expressions.
2022-02-26Fix body selection in while loopsLaurențiu Nicola-2/+3
2022-02-21Parse `let` expressions in order to support `let` chainsChayim Refael Friedman-1/+1
We still need to reject freestanding `let` expressions: see https://github.com/rust-analyzer/rust-analyzer/issues/11320#issuecomment-1018212465.
2022-01-08Allow doc comments on all `Item`sJonas Schievink-1/+3
2022-01-07Generate `AnyHasDocComments` nodeLukas Wirth-0/+27
2021-12-26internal: move inline parser tests to parser crateAleksey Kladov-124/+0
2021-12-12parser tests workAleksey Kladov-0/+12
2021-10-30Fix for-loop expressions breaking with BlockExpr iterableLukas Wirth-4/+11
2021-10-28Refactor ide handling for paths in derive inputsLukas Wirth-1/+1
2021-10-23internal: remove unused dollarsAleksey Kladov-10/+1
2021-10-19internal: Parse const trait boundsLukas Wirth-0/+1
2021-10-07Support `let...else`Jonas Schievink-0/+1
2021-10-03Fix miscellaneous Clippy lintsAramis Razzaghipour-7/+8
2021-10-02minor: generated code readabilityAleksey Kladov-1/+2
2021-09-27Rename `*Owner` traits to `Has*`Lukas Wirth-8/+8
2021-09-27Rename `Dyn*` nodes to `Any*` nodesLukas Wirth-4/+4
2021-09-26internal: more reasonable grammar for blocksAleksey Kladov-1/+1
Consider these expples { 92 } async { 92 } 'a: { 92 } #[a] { 92 } Previously the tree for them were BLOCK_EXPR { ... } EFFECT_EXPR async BLOCK_EXPR { ... } EFFECT_EXPR 'a: BLOCK_EXPR { ... } BLOCK_EXPR #[a] { ... } As you see, it gets progressively worse :) The last two items are especially odd. The last one even violates the balanced curleys invariant we have (#10357) The new approach is to say that the stuff in `{}` is stmt_list, and the block is stmt_list + optional modifiers BLOCK_EXPR STMT_LIST { ... } BLOCK_EXPR async STMT_LIST { ... } BLOCK_EXPR 'a: STMT_LIST { ... } BLOCK_EXPR #[a] STMT_LIST { ... }
2021-09-25minore: improve consistencyAleksey Kladov-8/+8
2021-09-21SimplifyLukas Wirth-5/+1
2021-09-21SimplifyLukas Wirth-7/+5
2021-09-21Generate ast nodes for each ast traitLukas Wirth-0/+61
2021-09-06minor: modernizeAleksey Kladov-0/+1
2021-07-03internal: overhaul code generationAleksey Kladov-0/+1129
* Keep codegen adjacent to the relevant crates. * Remove codgen deps from xtask, speeding-up from-source installation. This regresses the release process a bit, as it now needs to run the tests (and, by extension, compile the code).