9.3.10 CollectionLiteralExpCS
该表达式代表一个集合字面量表达式。
CollectionLiteralExpCS ::= CollectionTypeIdentifierCS ‘{‘ CollectionLiteralPartsCS? ‘}’
抽象语法映射
CollectionLiteralExpCS.ast : CollectionLiteralExp
合成的属性
CollectionLiteralExpCS.ast.parts = CollectionLiteralPartsCS.ast
CollectionLiteralExpCS.ast.kind = CollectionTypeIdentifierCS.ast
继承的属性
CollectionTypeIdentifierCS.env = CollectionLiteralExpCS.env
CollectionLiteralPartsCS.env = CollectionLiteralExpCS.env
歧义消除规则
[1] 字面量中集合类型不能是Collection。
CollectionTypeIdentifierCS.ast <> ‘Collection’