Esempio n. 1
0
TypeAttributeSyntax
SyntaxFactory::makeTypeAttribute(RC<TokenSyntax> AtSignToken,
                                RC<TokenSyntax> Identifier,
                                RC<TokenSyntax> LeftParen,
                                BalancedTokensSyntax BalancedTokens,
                                RC<TokenSyntax> RightParen) {
  auto Raw = RawSyntax::make(SyntaxKind::TypeAttribute,
                             {
                               AtSignToken,
                               Identifier,
                               LeftParen,
                               BalancedTokens.getRaw(),
                               RightParen,
                             },
                             SourcePresence::Present);
  auto Data = TypeAttributeSyntaxData::make(Raw);
  return TypeAttributeSyntax { Data, Data.get() };
}
Esempio n. 2
0
TypeAttributeSyntax TypeAttributeSyntax::
withBalancedTokens(BalancedTokensSyntax NewBalancedTokens) const {
  return Data->replaceChild<TypeAttributeSyntax>(NewBalancedTokens.getRaw(),
                                                 Cursor::BalancedTokens);
}