Lukas Wirth
3b11ff8c4d
Lower asm expressions
2024-09-05 09:59:08 +02:00
Lukas Wirth
86658c66b4
Parse builtin#asm expressions
2024-09-04 14:09:03 +02:00
Lukas Wirth
d235d09bf9
Parse try
as a keyword only in edition 2018 and up
2024-07-19 15:43:20 +02:00
Lukas Wirth
713c47f25b
Add basic edition inline parser test support
2024-07-19 15:19:43 +02:00
Lukas Wirth
7011094685
Add always disabled gen parse support
2024-07-17 10:49:12 +02:00
Lukas Wirth
dc4e5987a4
fix: Improve error recovery for match arms
2024-03-19 10:55:47 +01:00
Pavan Kumar Sunkara
2a41b2cd94
Improve readability of the parser code
2024-03-08 12:00:24 +00:00
Maybe Waffle
e146139957
Add support for become
expr/tail calls
2024-02-14 14:57:18 +00:00
Lukas Wirth
abe8f1ece4
Implement builtin#format_args, using rustc's format_args parser
2023-09-05 19:19:46 +02:00
Lukas Wirth
3431d586e5
Insert builtin#asm into asm! expansion
2023-09-05 14:00:49 +02:00
Lukas Wirth
15048304e3
Implement offset_of in hir-def and hir-ty
2023-09-05 12:27:52 +02:00
Lukas Wirth
9b8eb807a3
Parse builtin# syntax
2023-09-05 10:36:35 +02:00
Lukas Wirth
7d1bf7023d
Recover from leading comma in tuple pat and expr
2023-06-01 08:40:50 +02:00
Lukas Wirth
4b577e2bc8
Support c string literals
2023-05-18 11:06:05 +02:00
XFFXFF
6e97527eae
add is_blocklike func on BlockLike
2023-03-07 17:27:52 +08:00
XFFXFF
995aacfce8
show diagnostic for } token followed by else in let else statement
2023-03-07 08:24:25 +08:00
Lukas Wirth
4f6b5f41d4
Recover better for more delimited sequences
2023-02-14 13:52:15 +01:00
Lukas Wirth
1be24e0899
internal: Improve parser recovery a bunch
2023-02-11 20:28:36 +01:00
onestacked
872408500b
Parse const_closures syntax.
...
Enables parsing of the syntax for `#![features(const_closures)]` introduced in https://github.com/rust-lang/rust/pull/106004
2023-01-19 15:40:07 +01:00
Maybe Waffle
4a16afa264
Parse do yeet
expressions
2022-12-28 22:42:26 +00:00
Jonas Schievink
ed48bd8b9d
Fix parsing of _ = x
in closure body
2022-12-12 12:57:29 +01:00
Amos Wenger
7e285e1ef5
Run cargo fmt
2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Jonas Schievink
9bd11459ba
Revert "Auto merge of #12149 - jonas-schievink:literally-just-a-literal, r=jonas-schievink"
...
This reverts commit cc9ae2b89e
, reversing
changes made to 7dfd1cb572
.
2022-05-13 15:08:14 +02:00
Jonas Schievink
37443eb9a1
Maybe everything else *should* have to deal with it
2022-05-05 16:28:59 +02:00
Jonas Schievink
2fe38d3b63
Indicate the number of float tokens in the first token
2022-05-05 16:28:59 +02:00
Jonas Schievink
34dc8e9383
Wrap floats in token trees in FLOAT_LITERAL
node
2022-05-05 16:28:59 +02:00
Jonas Schievink
1bc3305d95
Split float literal tokens at the .
2022-05-05 16:28:58 +02:00
Jonas Schievink
502c519e7d
Wrap float literals in their own node
2022-05-05 16:28:14 +02:00
Lukas Wirth
d8341c5b92
Parse for<'a> closure syntax
2022-04-10 17:50:14 +02:00
Jonas Schievink
872b7b9660
Wrap macros in expr position in MacroExpr
node
2022-04-05 17:43:34 +02:00
Chayim Refael Friedman
d9f0731bd2
Parse destructuring assignment
...
The only patterns we should parse are `..` in structs and `_`: the rest are either not supported or already valid expressions.
2022-03-02 01:51:25 +00:00
Chayim Refael Friedman
de8633f15f
Parse let
expressions in order to support let
chains
...
We still need to reject freestanding `let` expressions: see https://github.com/rust-analyzer/rust-analyzer/issues/11320#issuecomment-1018212465 .
2022-02-21 08:34:34 +02:00
bellau
06452cd102
Fix style
2022-02-14 07:41:50 +01:00
bellau
dc68b89469
oops, remove println
2022-02-13 09:11:35 +01:00
bellau
0a18a050b5
fix handle static async and static async move
2022-02-13 09:09:44 +01:00
bellau
2008607946
support static move too
2022-02-12 16:07:58 +01:00
bellau
ccab6afabc
Fix Immovable generator syntax (static ||) not recognized #11448
2022-02-12 15:17:10 +01:00
Aleksey Kladov
485c5e6717
internal: remove unused dollars
2021-10-23 20:44:35 +03:00
Aramis Razzaghipour
55c0b86cde
Add semicolons for consistency
...
`clippy::semicolon_if_nothing_returned`
2021-10-03 23:39:43 +11:00
Aleksey Kladov
393f80e036
minor
2021-10-02 13:20:45 +03:00
Aleksey Kladov
2bf81922f7
internal: more reasonable grammar for blocks
...
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-26 19:16:09 +03:00
Aleksey Kladov
56964c9bd3
feat: allow attributes on all expressions
...
Attrs are syntactically valid on any expression, even if they are not
allowed semantically everywhere yet.
2021-09-25 22:19:27 +03:00
Jonas Schievink
d568e7686a
Support if let
match guards
2021-08-13 00:25:14 +02:00
Lukas Wirth
f04cff102f
Simplify
2021-07-30 13:12:52 +02:00
Lukas Wirth
4de447b293
Attach comma token to MATCH_ARM instead of MATCH_ARM_LIST
2021-07-29 23:02:52 +02:00
Clemens Wasser
3c6dc0f89d
Apply a few clippy suggestions
2021-06-03 11:46:03 +02:00
Aleksey Kladov
dc1577d58d
Add even more docs
2021-05-22 17:20:22 +03:00
Daiki Ihara
85cd3524e2
Add support for yiled keyword
2021-01-15 23:35:17 +09:00
Lukas Wirth
e618d12903
Replace SyntaxKind usage with T! macro where applicable
2021-01-10 17:14:01 +01:00