mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #24176 from nkcsgexi/syntax-disambiguity
Syntax: use child name instead of type name for gyb-generated functions. NFC
This commit is contained in:
@@ -41,7 +41,8 @@ class Parsed${node.name}Builder {
|
||||
% if child_node and child_node.is_syntax_collection():
|
||||
% child_elt = child_node.collection_element_name
|
||||
% child_elt_type = child_node.collection_element_type
|
||||
SmallVector<ParsedRawSyntaxNode, 8> ${child_elt}Nodes;
|
||||
% child_elt_name = child.name + 'Member'
|
||||
SmallVector<ParsedRawSyntaxNode, 8> ${child_elt_name}s;
|
||||
% end
|
||||
% end
|
||||
|
||||
@@ -55,7 +56,8 @@ public:
|
||||
% if child_node and child_node.is_syntax_collection():
|
||||
% child_elt = child_node.collection_element_name
|
||||
% child_elt_type = child_node.collection_element_type
|
||||
Parsed${node.name}Builder &add${child_elt}(Parsed${child_elt_type} ${child_elt});
|
||||
% child_elt_name = child.name + 'Member'
|
||||
Parsed${node.name}Builder &add${child_elt_name}(Parsed${child_elt_type} ${child_elt});
|
||||
% end
|
||||
% end
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
/// `${child.name}` collection.
|
||||
/// - returns: A copy of the receiver with the provided `${child_elt}`
|
||||
/// appended to its `${child.name}` collection.
|
||||
${node.name} add${child_elt}(${child_elt_type} ${child_elt});
|
||||
${node.name} add${child.name}Member(${child_elt_type} ${child_elt});
|
||||
% end
|
||||
|
||||
/// Returns a copy of the receiver with its `${child.name}` replaced.
|
||||
|
||||
Reference in New Issue
Block a user