mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Formalize Labeled Syntax
This represents labeled statements as an explicit kind of statement and removes the Labeled trait. Any kind of statement is allowed to be labeled in the tree, but we specifically diagnose the syntax elements that aren't allowed to have labels. This homogenizes the way clients deal with statement labels and also makes parser recovery quite a bit easier in the case where we have a label but no actual statement following it.
This commit is contained in:
@@ -268,6 +268,7 @@ SYNTAX_NODE_SERIALIZATION_CODES = {
|
||||
'MissingType': 264,
|
||||
'MissingPattern': 265,
|
||||
'GarbageNodes' : 266,
|
||||
'LabeledStmt': 267,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user