about summary refs log tree commit diff
path: root/crates/syntax/test_data
AgeCommit message (Collapse)AuthorLines
2022-02-21Validate `let` expressionsChayim Refael Friedman-0/+230
Emit an error if they're found in an invalid position.
2022-02-21Update testsChayim Refael Friedman-6/+4
Unfortunately, we lost some recovery for expressions.
2021-12-28remove fragments from syntaxAleksey Kladov-55/+0
2021-12-28drop dead codeAleksey Kladov-223/+0
2021-12-28internal: start isolating ssr-related parsing APIs to SSRAleksey Kladov-25/+0
2021-12-26internal: move inline parser tests to parser crateAleksey Kladov-11880/+0
2021-12-26internal: move outlined parser testsAleksey Kladov-14960/+0
2021-12-18move testsAleksey Kladov-687/+0
2021-11-18fix: parse the range pat inside the tuple patzhoufan-81/+162
2021-11-16Remove validation of `super` in use pathsLaurențiu Nicola-79/+0
2021-11-10Handle pub tuple fields in tuple structsAdam Bratschi-Kaye-0/+31
The current implementation will throw a parser error for tuple structs that contain a pub tuple field. For example, ```rust struct Foo(pub (u32, u32)); ``` is valid Rust, but rust-analyzer will throw a parser error. This is because the parens after `pub` is treated as a visibility context. Allowing a tuple type to follow `pub` in the special case when we are defining fields in a tuple struct can fix the issue.
2021-10-19internal: Parse const trait boundsLukas Wirth-9/+21
2021-10-14a few clippy fixesMilo-2/+2
2021-10-07Support `let...else`Jonas Schievink-0/+52
2021-10-06parser: fix parsing of macro call inside generic argscynecx-0/+37
2021-10-06Merge #10420bors[bot]-9/+53
10420: Parse outer attributes on StructPatternEtCetera r=jonas-schievink a=XFFXFF Try to fix https://github.com/rust-analyzer/rust-analyzer/issues/8610 Related pr in ungrammer: https://github.com/rust-analyzer/ungrammar/pull/41 Co-authored-by: zhoufan <1247714429@qq.com>
2021-10-04make Some(1..) parsedzhoufan-89/+170
2021-10-02Parse outer attributes on StructPatternEtCeterazhoufan-9/+53
2021-09-26internal: more reasonable grammar for blocksAleksey Kladov-10937/+11321
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-25feat: allow attributes on all expressionsAleksey Kladov-239/+222
Attrs are syntactically valid on any expression, even if they are not allowed semantically everywhere yet.
2021-09-25minor: more condensed testsAleksey Kladov-126/+122
2021-09-25minor: more focusted testsAleksey Kladov-134/+94
2021-09-19internal: more focused tests for const argumentsAleksey Kladov-166/+299
2021-09-19fix: don't allow two turbo-fishes in generic argumentsAleksey Kladov-32/+38
2021-09-19internal: add erroneous test for double turbo fishAleksey Kladov-0/+122
We parse `f` successfully, but that is a bug.
2021-09-18minor: improve readabilityAleksey Kladov-0/+0
2021-09-18internal: parser cleanupAleksey Kladov-71/+131
2021-09-18internal: minimize use_tree parser testsAleksey Kladov-504/+276
The code here is intentionally dense and does exactly what is written. Explaining semantic difference between Rust 2015 and 2018 doesn't help with understanding syntax. Better to just add more targeted tests.
2021-09-18internal: parser cleanupsAleksey Kladov-65/+46
2021-09-18internal: more focused trait item parsing testsAleksey Kladov-221/+224
2021-09-18intenral: more local tests for staticsAleksey Kladov-40/+42
2021-09-18internal: cleanup adt parsingAleksey Kladov-130/+51
2021-09-18internal: cleanup item parsingAleksey Kladov-35/+0
2021-09-17internal: more local parsing tests for macrosAleksey Kladov-141/+141
2021-09-17internal: more focused parsing testsAleksey Kladov-123/+160
2021-09-17internal: more local test for mod itemAleksey Kladov-95/+95
2021-09-17internal: more local parsing testsAleksey Kladov-0/+28
2021-09-13internal: fix bugs in tests by simplifying codeAleksey Kladov-4/+126
2021-08-30internal: improve styleAleksey Kladov-22/+21
Group related stuff together, use only on path for parsing extern blocks (they actually have modifiers). Perhaps we should get rid of items_without_modifiers altogether? Better to handle these kinds on diagnostics in validation layer...
2021-08-30fix: avoid panic when parsing extern blockAleksey Kladov-0/+30
closes #10083
2021-08-13Support `if let` match guardsJonas Schievink-10/+39
2021-08-04Split the testJade-0/+32
2021-08-03Support exclusive_range_patternJade-18/+35
Fix #9779
2021-07-30SimplifyLukas Wirth-2/+2
2021-07-29Attach comma token to MATCH_ARM instead of MATCH_ARM_LISTLukas Wirth-74/+74
2021-07-26Fix generic_arg not parsing opt_generic_arg_list properly in arg listsLukas Wirth-63/+78
2021-07-18Merge #9619bors[bot]-44/+84
9619: Support GATs for associated type arg parsing r=Veykril a=Veykril Fixes #9602 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-07-18Support GATs for associated type arg parsingLukas Wirth-44/+84
2021-07-17feat: improve parser error recovery for function parametersAleksey Kladov-15/+68
2021-06-17Fix parser tests for 1.53Lukas Wirth-198/+198