mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add support to syntax tree
This commit is contained in:
@@ -102,10 +102,25 @@ ATTRIBUTE_NODES = [
|
||||
element='Syntax', element_name='SpecializeAttribute',
|
||||
element_choices=[
|
||||
'LabeledSpecializeEntry',
|
||||
'AvailabilityEntry',
|
||||
'TargetFunctionEntry',
|
||||
'GenericWhereClause',
|
||||
]),
|
||||
|
||||
Node('AvailabilityEntry', kind='Syntax',
|
||||
description='''
|
||||
The availability argument for the _specialize attribute
|
||||
''',
|
||||
children=[
|
||||
Child('Label', kind='IdentifierToken',
|
||||
description='The label of the argument'),
|
||||
Child('Colon', kind='ColonToken',
|
||||
description='The colon separating the label and the value'),
|
||||
Child('AvailabilityList', kind='AvailabilitySpecList',
|
||||
collection_element_name='Availability'),
|
||||
Child('Semicolon', kind='SemicolonToken'),
|
||||
]),
|
||||
|
||||
# Representation of e.g. 'exported: true,'
|
||||
# labeled-specialize-entry -> identifier ':' token ','?
|
||||
Node('LabeledSpecializeEntry', kind='Syntax',
|
||||
|
||||
Reference in New Issue
Block a user