mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
[#1083] Try block syntax
This commit is contained in:
parent
b79e6294a6
commit
281c9eeaff
9 changed files with 125 additions and 2 deletions
|
@ -95,6 +95,7 @@ Grammar(
|
|||
"let",
|
||||
"move",
|
||||
"return",
|
||||
"try",
|
||||
],
|
||||
contextual_keywords: [
|
||||
"auto",
|
||||
|
@ -189,6 +190,7 @@ Grammar(
|
|||
"STRUCT_LIT",
|
||||
"NAMED_FIELD_LIST",
|
||||
"NAMED_FIELD",
|
||||
"TRY_BLOCK_EXPR",
|
||||
|
||||
// postfix
|
||||
"CALL_EXPR",
|
||||
|
@ -417,6 +419,9 @@ Grammar(
|
|||
"LoopExpr": (
|
||||
traits: ["LoopBodyOwner"],
|
||||
),
|
||||
"TryBlockExpr": (
|
||||
traits: ["TryBlockBodyOwner"],
|
||||
),
|
||||
"ForExpr": (
|
||||
traits: ["LoopBodyOwner"],
|
||||
options: [
|
||||
|
@ -499,6 +504,7 @@ Grammar(
|
|||
"MethodCallExpr",
|
||||
"FieldExpr",
|
||||
"TryExpr",
|
||||
"TryBlockExpr",
|
||||
"CastExpr",
|
||||
"RefExpr",
|
||||
"PrefixExpr",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue