forked from rust-lang/rust-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables parsing of the syntax for `#![features(const_closures)]` introduced in rust-lang/rust#106004
- Loading branch information
1 parent
93c8ae0
commit 5aaa7df
Showing
4 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
crates/parser/test_data/parser/inline/ok/0205_const_closure.rast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
SOURCE_FILE | ||
FN | ||
FN_KW "fn" | ||
WHITESPACE " " | ||
NAME | ||
IDENT "main" | ||
PARAM_LIST | ||
L_PAREN "(" | ||
R_PAREN ")" | ||
WHITESPACE " " | ||
BLOCK_EXPR | ||
STMT_LIST | ||
L_CURLY "{" | ||
WHITESPACE " " | ||
LET_STMT | ||
LET_KW "let" | ||
WHITESPACE " " | ||
IDENT_PAT | ||
NAME | ||
IDENT "cl" | ||
WHITESPACE " " | ||
EQ "=" | ||
WHITESPACE " " | ||
CLOSURE_EXPR | ||
CONST_KW "const" | ||
WHITESPACE " " | ||
PARAM_LIST | ||
PIPE "|" | ||
PIPE "|" | ||
WHITESPACE " " | ||
BIN_EXPR | ||
UNDERSCORE_EXPR | ||
UNDERSCORE "_" | ||
WHITESPACE " " | ||
EQ "=" | ||
WHITESPACE " " | ||
LITERAL | ||
INT_NUMBER "0" | ||
SEMICOLON ";" | ||
WHITESPACE " " | ||
R_CURLY "}" | ||
WHITESPACE "\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fn main() { let cl = const || _ = 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters