mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:54:47 +01:00
Change StructLiteral and StructTypeLiteral parsing to use an ambiguous start. (#2396)
This is necessary in order to use a bracketing approach; parsing doesn't know the contained format until it parses the first element, which we don't want to do look-ahead for. I think the bracketing is higher value than knowing the format before adding the node.
This commit is contained in:
@@ -77,10 +77,10 @@ CARBON_PARSE_NODE_KIND(PostfixOperator)
|
||||
// Struct literals.
|
||||
CARBON_PARSE_NODE_KIND(StructLiteral)
|
||||
CARBON_PARSE_NODE_KIND(StructTypeLiteral)
|
||||
CARBON_PARSE_NODE_KIND(StructLiteralOrTypeLiteralStart)
|
||||
CARBON_PARSE_NODE_KIND(StructFieldDesignator)
|
||||
CARBON_PARSE_NODE_KIND(StructFieldValue)
|
||||
CARBON_PARSE_NODE_KIND(StructFieldType)
|
||||
CARBON_PARSE_NODE_KIND(StructComma)
|
||||
CARBON_PARSE_NODE_KIND(StructEnd)
|
||||
|
||||
#undef CARBON_PARSE_NODE_KIND
|
||||
|
||||
Reference in New Issue
Block a user