SameTypeRequirementSyntaxData:: SameTypeRequirementSyntaxData(RC<RawSyntax> Raw, const SyntaxData *Parent, CursorIndex IndexInParent) : GenericRequirementSyntaxData(Raw, Parent, IndexInParent) { assert(Raw->Kind == SyntaxKind::SameTypeRequirement); assert(Raw->Layout.size() == 3); syntax_assert_child_kind(Raw, SameTypeRequirementSyntax::Cursor::LeftTypeIdentifier, SyntaxKind::TypeIdentifier); syntax_assert_child_token_text(Raw, SameTypeRequirementSyntax::Cursor::EqualityToken, tok::oper_binary_spaced, "=="); assert(Raw->getChild(SameTypeRequirementSyntax::Cursor::RightType)->isType()); }
TupleTypeElementSyntaxData:: TupleTypeElementSyntaxData(RC<RawSyntax> Raw, const SyntaxData *Parent, CursorIndex IndexInParent) : SyntaxData(Raw, Parent, IndexInParent) { assert(Raw->Kind == SyntaxKind::TupleTypeElement); assert(Raw->Layout.size() == 6); syntax_assert_child_token(Raw, TupleTypeElementSyntax::Cursor::Label, tok::identifier); syntax_assert_child_token_text(Raw, TupleTypeElementSyntax::Cursor::ColonToken, tok::colon, ":"); syntax_assert_child_kind(Raw, TupleTypeElementSyntax::Cursor::Attributes, SyntaxKind::TypeAttributes); syntax_assert_child_token_text(Raw, TupleTypeElementSyntax::Cursor::InoutToken, tok::kw_inout, "inout"); syntax_assert_child_token_text(Raw, TupleTypeElementSyntax::Cursor::CommaToken, tok::comma, ","); assert(Raw->getChild(TupleTypeElementSyntax::Cursor::Type)->isType()); }