unify catch fallback value sources
This commit is contained in:
@@ -2072,72 +2072,80 @@
|
||||
]
|
||||
},
|
||||
"break_statement": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "break"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "label",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
"type": "PREC_RIGHT",
|
||||
"value": 0,
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "break"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "label",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"continue_statement": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "continue"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "label",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
"type": "PREC_RIGHT",
|
||||
"value": 0,
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "continue"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": ":"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "label",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"defer_statement": {
|
||||
"type": "CHOICE",
|
||||
@@ -3299,17 +3307,8 @@
|
||||
"type": "FIELD",
|
||||
"name": "operator",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "orelse"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "catch"
|
||||
}
|
||||
]
|
||||
"type": "STRING",
|
||||
"value": "orelse"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -3692,29 +3691,20 @@
|
||||
"value": "catch"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "|"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "name",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "capture",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "sink"
|
||||
"name": "error_capture"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "|"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
@@ -3725,10 +3715,35 @@
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "body",
|
||||
"name": "fallback",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "block"
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "block"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "if_statement"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "while_statement"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "for_statement"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "match_statement"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "expression"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5481,6 +5496,14 @@
|
||||
"expression_statement",
|
||||
"parenthesized_expression"
|
||||
],
|
||||
[
|
||||
"assignment_statement",
|
||||
"expression_statement"
|
||||
],
|
||||
[
|
||||
"labeled_block",
|
||||
"expression"
|
||||
],
|
||||
[
|
||||
"block",
|
||||
"tuple_literal",
|
||||
|
||||
@@ -290,10 +290,6 @@
|
||||
"type": ">>",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "catch",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "orelse",
|
||||
"named": false
|
||||
@@ -436,26 +432,42 @@
|
||||
"type": "catch_expression",
|
||||
"named": true,
|
||||
"fields": {
|
||||
"body": {
|
||||
"capture": {
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "error_capture",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"fallback": {
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"types": [
|
||||
{
|
||||
"type": "block",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"types": [
|
||||
},
|
||||
{
|
||||
"type": "identifier",
|
||||
"type": "expression",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "sink",
|
||||
"type": "for_statement",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "if_statement",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "match_statement",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "while_statement",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
|
||||
+1047997
-324168
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user