diff --git a/clang/include/clang/Tooling/Syntax/Nodes.h b/clang/include/clang/Tooling/Syntax/Nodes.h --- a/clang/include/clang/Tooling/Syntax/Nodes.h +++ b/clang/include/clang/Tooling/Syntax/Nodes.h @@ -271,9 +271,9 @@ static bool classof(const Node *N) { return N->kind() <= NodeKind::NestedNameSpecifier; } - std::vector specifiers(); + std::vector getSpecifiers(); std::vector> - specifiersAndDoubleColons(); + getSpecifiersAndDoubleColons(); }; /// Models an `unqualified-id`. C++ [expr.prim.id.unqual] @@ -299,9 +299,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::IdExpression; } - NestedNameSpecifier *qualifier(); - Leaf *templateKeyword(); - UnqualifiedId *unqualifiedId(); + NestedNameSpecifier *getQualifier(); + Leaf *getTemplateKeyword(); + UnqualifiedId *getUnqualifiedId(); }; /// An expression of an unknown kind, i.e. one not currently handled by the @@ -321,7 +321,7 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ThisExpression; } - Leaf *thisKeyword(); + Leaf *getThisKeyword(); }; /// Models arguments of a function call. @@ -335,8 +335,8 @@ static bool classof(const Node *N) { return N->kind() <= NodeKind::CallArguments; } - std::vector arguments(); - std::vector> argumentsAndCommas(); + std::vector getArguments(); + std::vector> getArgumentsAndCommas(); }; /// A function call. C++ [expr.call] @@ -349,10 +349,10 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::CallExpression; } - Expression *callee(); - Leaf *openParen(); - CallArguments *arguments(); - Leaf *closeParen(); + Expression *getCallee(); + Leaf *getOpenParen(); + CallArguments *getArguments(); + Leaf *getCloseParen(); }; /// Models a parenthesized expression `(E)`. C++ [expr.prim.paren] @@ -363,9 +363,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ParenExpression; } - Leaf *openParen(); - Expression *subExpression(); - Leaf *closeParen(); + Leaf *getOpenParen(); + Expression *getSubExpression(); + Leaf *getCloseParen(); }; /// Models a class member access. C++ [expr.ref] @@ -382,10 +382,10 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::MemberExpression; } - Expression *object(); - Leaf *accessToken(); - Leaf *templateKeyword(); - IdExpression *member(); + Expression *getObject(); + Leaf *getAccessToken(); + Leaf *getTemplateKeyword(); + IdExpression *getMember(); }; /// Expression for literals. C++ [lex.literal] @@ -404,7 +404,7 @@ N->kind() == NodeKind::CharUserDefinedLiteralExpression || N->kind() == NodeKind::StringUserDefinedLiteralExpression; } - Leaf *literalToken(); + Leaf *getLiteralToken(); }; /// Expression for integer literals. C++ [lex.icon] @@ -539,8 +539,8 @@ return N->kind() == NodeKind::PrefixUnaryOperatorExpression || N->kind() == NodeKind::PostfixUnaryOperatorExpression; } - Leaf *operatorToken(); - Expression *operand(); + Leaf *getOperatorToken(); + Expression *getOperand(); }; /// @@ -588,9 +588,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::BinaryOperatorExpression; } - Expression *lhs(); - Leaf *operatorToken(); - Expression *rhs(); + Expression *getLhs(); + Leaf *getOperatorToken(); + Expression *getRhs(); }; /// An abstract node for C++ statements, e.g. 'while', 'if', etc. @@ -639,8 +639,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::SwitchStatement; } - Leaf *switchKeyword(); - Statement *body(); + Leaf *getSwitchKeyword(); + Statement *getBody(); }; /// case : @@ -650,9 +650,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::CaseStatement; } - Leaf *caseKeyword(); - Expression *caseValue(); - Statement *body(); + Leaf *getCaseKeyword(); + Expression *getCaseValue(); + Statement *getBody(); }; /// default: @@ -662,8 +662,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::DefaultStatement; } - Leaf *defaultKeyword(); - Statement *body(); + Leaf *getDefaultKeyword(); + Statement *getBody(); }; /// if (cond) else @@ -674,10 +674,10 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::IfStatement; } - Leaf *ifKeyword(); - Statement *thenStatement(); - Leaf *elseKeyword(); - Statement *elseStatement(); + Leaf *getIfKeyword(); + Statement *getThenStatement(); + Leaf *getElseKeyword(); + Statement *getElseStatement(); }; /// for (; ; ) @@ -687,8 +687,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ForStatement; } - Leaf *forKeyword(); - Statement *body(); + Leaf *getForKeyword(); + Statement *getBody(); }; /// while () @@ -698,8 +698,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::WhileStatement; } - Leaf *whileKeyword(); - Statement *body(); + Leaf *getWhileKeyword(); + Statement *getBody(); }; /// continue; @@ -709,7 +709,7 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ContinueStatement; } - Leaf *continueKeyword(); + Leaf *getContinueKeyword(); }; /// break; @@ -719,7 +719,7 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::BreakStatement; } - Leaf *breakKeyword(); + Leaf *getBreakKeyword(); }; /// return ; @@ -730,8 +730,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ReturnStatement; } - Leaf *returnKeyword(); - Expression *returnValue(); + Leaf *getReturnKeyword(); + Expression *getReturnValue(); }; /// for ( : ) @@ -741,8 +741,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::RangeBasedForStatement; } - Leaf *forKeyword(); - Statement *body(); + Leaf *getForKeyword(); + Statement *getBody(); }; /// Expression in a statement position, e.g. functions calls inside compound @@ -753,7 +753,7 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ExpressionStatement; } - Expression *expression(); + Expression *getExpression(); }; /// { statement1; statement2; … } @@ -763,10 +763,10 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::CompoundStatement; } - Leaf *lbrace(); + Leaf *getLbrace(); /// FIXME: use custom iterator instead of 'vector'. - std::vector statements(); - Leaf *rbrace(); + std::vector getStatements(); + Leaf *getRbrace(); }; /// A declaration that can appear at the top-level. Note that this does *not* @@ -808,8 +808,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::StaticAssertDeclaration; } - Expression *condition(); - Expression *message(); + Expression *getCondition(); + Expression *getMessage(); }; /// extern declaration @@ -833,7 +833,7 @@ return N->kind() == NodeKind::SimpleDeclaration; } /// FIXME: use custom iterator instead of 'vector'. - std::vector declarators(); + std::vector getDeclarators(); }; /// template @@ -843,8 +843,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::TemplateDeclaration; } - Leaf *templateKeyword(); - Declaration *declaration(); + Leaf *getTemplateKeyword(); + Declaration *getDeclaration(); }; /// template @@ -859,9 +859,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ExplicitTemplateInstantiation; } - Leaf *templateKeyword(); - Leaf *externKeyword(); - Declaration *declaration(); + Leaf *getTemplateKeyword(); + Leaf *getExternKeyword(); + Declaration *getDeclaration(); }; /// namespace { } @@ -951,8 +951,8 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ParenDeclarator; } - Leaf *lparen(); - Leaf *rparen(); + Leaf *getLparen(); + Leaf *getRparen(); }; /// Array size specified inside a declarator. @@ -966,9 +966,9 @@ return N->kind() == NodeKind::ArraySubscript; } // TODO: add an accessor for the "static" keyword. - Leaf *lbracket(); - Expression *size(); - Leaf *rbracket(); + Leaf *getLbracket(); + Expression *getSize(); + Leaf *getRbracket(); }; /// Trailing return type after the parameter list, including the arrow token. @@ -980,10 +980,10 @@ return N->kind() == NodeKind::TrailingReturnType; } // TODO: add accessors for specifiers. - Leaf *arrowToken(); + Leaf *getArrowToken(); // FIXME: This should be a `type-id` following the grammar. Fix this once we // have a representation of `type-id`s. - SimpleDeclarator *declarator(); + SimpleDeclarator *getDeclarator(); }; /// Models a `parameter-declaration-list` which appears within @@ -994,9 +994,9 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ParameterDeclarationList; } - std::vector parameterDeclarations(); + std::vector getParameterDeclarations(); std::vector> - parametersAndCommas(); + getParametersAndCommas(); }; /// Parameter list for a function type and a trailing return type, if the @@ -1016,10 +1016,10 @@ static bool classof(const Node *N) { return N->kind() == NodeKind::ParametersAndQualifiers; } - Leaf *lparen(); - ParameterDeclarationList *parameters(); - Leaf *rparen(); - TrailingReturnType *trailingReturn(); + Leaf *getLparen(); + ParameterDeclarationList *getParameters(); + Leaf *getRparen(); + TrailingReturnType *getTrailingReturn(); }; /// Member pointer inside a declarator diff --git a/clang/lib/Tooling/Syntax/Nodes.cpp b/clang/lib/Tooling/Syntax/Nodes.cpp --- a/clang/lib/Tooling/Syntax/Nodes.cpp +++ b/clang/lib/Tooling/Syntax/Nodes.cpp @@ -224,7 +224,8 @@ // We could have an interator in list to not pay memory costs of temporary // vector -std::vector syntax::NestedNameSpecifier::specifiers() { +std::vector +syntax::NestedNameSpecifier::getSpecifiers() { auto specifiersAsNodes = getElementsAsNodes(); std::vector Children; for (const auto &element : specifiersAsNodes) { @@ -234,7 +235,7 @@ } std::vector> -syntax::NestedNameSpecifier::specifiersAndDoubleColons() { +syntax::NestedNameSpecifier::getSpecifiersAndDoubleColons() { auto specifiersAsNodesAndDoubleColons = getElementsAsNodesAndDelimiters(); std::vector> Children; @@ -246,7 +247,7 @@ return Children; } -std::vector syntax::CallArguments::arguments() { +std::vector syntax::CallArguments::getArguments() { auto ArgumentsAsNodes = getElementsAsNodes(); std::vector Children; for (const auto &ArgumentAsNode : ArgumentsAsNodes) { @@ -256,7 +257,7 @@ } std::vector> -syntax::CallArguments::argumentsAndCommas() { +syntax::CallArguments::getArgumentsAndCommas() { auto ArgumentsAsNodesAndCommas = getElementsAsNodesAndDelimiters(); std::vector> Children; for (const auto &ArgumentAsNodeAndComma : ArgumentsAsNodesAndCommas) { @@ -268,7 +269,7 @@ } std::vector -syntax::ParameterDeclarationList::parameterDeclarations() { +syntax::ParameterDeclarationList::getParameterDeclarations() { auto ParametersAsNodes = getElementsAsNodes(); std::vector Children; for (const auto &ParameterAsNode : ParametersAsNodes) { @@ -278,7 +279,7 @@ } std::vector> -syntax::ParameterDeclarationList::parametersAndCommas() { +syntax::ParameterDeclarationList::getParametersAndCommas() { auto ParametersAsNodesAndCommas = getElementsAsNodesAndDelimiters(); std::vector> Children; @@ -290,215 +291,215 @@ return Children; } -syntax::Expression *syntax::MemberExpression::object() { +syntax::Expression *syntax::MemberExpression::getObject() { return cast_or_null(findChild(syntax::NodeRole::Object)); } -syntax::Leaf *syntax::MemberExpression::templateKeyword() { +syntax::Leaf *syntax::MemberExpression::getTemplateKeyword() { return llvm::cast_or_null( findChild(syntax::NodeRole::TemplateKeyword)); } -syntax::Leaf *syntax::MemberExpression::accessToken() { +syntax::Leaf *syntax::MemberExpression::getAccessToken() { return llvm::cast_or_null( findChild(syntax::NodeRole::AccessToken)); } -syntax::IdExpression *syntax::MemberExpression::member() { +syntax::IdExpression *syntax::MemberExpression::getMember() { return cast_or_null( findChild(syntax::NodeRole::Member)); } -syntax::NestedNameSpecifier *syntax::IdExpression::qualifier() { +syntax::NestedNameSpecifier *syntax::IdExpression::getQualifier() { return cast_or_null( findChild(syntax::NodeRole::Qualifier)); } -syntax::Leaf *syntax::IdExpression::templateKeyword() { +syntax::Leaf *syntax::IdExpression::getTemplateKeyword() { return llvm::cast_or_null( findChild(syntax::NodeRole::TemplateKeyword)); } -syntax::UnqualifiedId *syntax::IdExpression::unqualifiedId() { +syntax::UnqualifiedId *syntax::IdExpression::getUnqualifiedId() { return cast_or_null( findChild(syntax::NodeRole::UnqualifiedId)); } -syntax::Leaf *syntax::ParenExpression::openParen() { +syntax::Leaf *syntax::ParenExpression::getOpenParen() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } -syntax::Expression *syntax::ParenExpression::subExpression() { +syntax::Expression *syntax::ParenExpression::getSubExpression() { return cast_or_null( findChild(syntax::NodeRole::SubExpression)); } -syntax::Leaf *syntax::ParenExpression::closeParen() { +syntax::Leaf *syntax::ParenExpression::getCloseParen() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::Leaf *syntax::ThisExpression::thisKeyword() { +syntax::Leaf *syntax::ThisExpression::getThisKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Leaf *syntax::LiteralExpression::literalToken() { +syntax::Leaf *syntax::LiteralExpression::getLiteralToken() { return cast_or_null(findChild(syntax::NodeRole::LiteralToken)); } -syntax::Expression *syntax::BinaryOperatorExpression::lhs() { +syntax::Expression *syntax::BinaryOperatorExpression::getLhs() { return cast_or_null( findChild(syntax::NodeRole::LeftHandSide)); } -syntax::Leaf *syntax::UnaryOperatorExpression::operatorToken() { +syntax::Leaf *syntax::UnaryOperatorExpression::getOperatorToken() { return cast_or_null(findChild(syntax::NodeRole::OperatorToken)); } -syntax::Expression *syntax::UnaryOperatorExpression::operand() { +syntax::Expression *syntax::UnaryOperatorExpression::getOperand() { return cast_or_null(findChild(syntax::NodeRole::Operand)); } -syntax::Leaf *syntax::BinaryOperatorExpression::operatorToken() { +syntax::Leaf *syntax::BinaryOperatorExpression::getOperatorToken() { return cast_or_null(findChild(syntax::NodeRole::OperatorToken)); } -syntax::Expression *syntax::BinaryOperatorExpression::rhs() { +syntax::Expression *syntax::BinaryOperatorExpression::getRhs() { return cast_or_null( findChild(syntax::NodeRole::RightHandSide)); } -syntax::Expression *syntax::CallExpression::callee() { +syntax::Expression *syntax::CallExpression::getCallee() { return cast_or_null(findChild(syntax::NodeRole::Callee)); } -syntax::Leaf *syntax::CallExpression::openParen() { +syntax::Leaf *syntax::CallExpression::getOpenParen() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } -syntax::CallArguments *syntax::CallExpression::arguments() { +syntax::CallArguments *syntax::CallExpression::getArguments() { return cast_or_null( findChild(syntax::NodeRole::Arguments)); } -syntax::Leaf *syntax::CallExpression::closeParen() { +syntax::Leaf *syntax::CallExpression::getCloseParen() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::Leaf *syntax::SwitchStatement::switchKeyword() { +syntax::Leaf *syntax::SwitchStatement::getSwitchKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::SwitchStatement::body() { +syntax::Statement *syntax::SwitchStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Leaf *syntax::CaseStatement::caseKeyword() { +syntax::Leaf *syntax::CaseStatement::getCaseKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Expression *syntax::CaseStatement::caseValue() { +syntax::Expression *syntax::CaseStatement::getCaseValue() { return cast_or_null( findChild(syntax::NodeRole::CaseValue)); } -syntax::Statement *syntax::CaseStatement::body() { +syntax::Statement *syntax::CaseStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Leaf *syntax::DefaultStatement::defaultKeyword() { +syntax::Leaf *syntax::DefaultStatement::getDefaultKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::DefaultStatement::body() { +syntax::Statement *syntax::DefaultStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Leaf *syntax::IfStatement::ifKeyword() { +syntax::Leaf *syntax::IfStatement::getIfKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::IfStatement::thenStatement() { +syntax::Statement *syntax::IfStatement::getThenStatement() { return cast_or_null( findChild(syntax::NodeRole::ThenStatement)); } -syntax::Leaf *syntax::IfStatement::elseKeyword() { +syntax::Leaf *syntax::IfStatement::getElseKeyword() { return cast_or_null(findChild(syntax::NodeRole::ElseKeyword)); } -syntax::Statement *syntax::IfStatement::elseStatement() { +syntax::Statement *syntax::IfStatement::getElseStatement() { return cast_or_null( findChild(syntax::NodeRole::ElseStatement)); } -syntax::Leaf *syntax::ForStatement::forKeyword() { +syntax::Leaf *syntax::ForStatement::getForKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::ForStatement::body() { +syntax::Statement *syntax::ForStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Leaf *syntax::WhileStatement::whileKeyword() { +syntax::Leaf *syntax::WhileStatement::getWhileKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::WhileStatement::body() { +syntax::Statement *syntax::WhileStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Leaf *syntax::ContinueStatement::continueKeyword() { +syntax::Leaf *syntax::ContinueStatement::getContinueKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Leaf *syntax::BreakStatement::breakKeyword() { +syntax::Leaf *syntax::BreakStatement::getBreakKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Leaf *syntax::ReturnStatement::returnKeyword() { +syntax::Leaf *syntax::ReturnStatement::getReturnKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Expression *syntax::ReturnStatement::returnValue() { +syntax::Expression *syntax::ReturnStatement::getReturnValue() { return cast_or_null( findChild(syntax::NodeRole::ReturnValue)); } -syntax::Leaf *syntax::RangeBasedForStatement::forKeyword() { +syntax::Leaf *syntax::RangeBasedForStatement::getForKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Statement *syntax::RangeBasedForStatement::body() { +syntax::Statement *syntax::RangeBasedForStatement::getBody() { return cast_or_null( findChild(syntax::NodeRole::BodyStatement)); } -syntax::Expression *syntax::ExpressionStatement::expression() { +syntax::Expression *syntax::ExpressionStatement::getExpression() { return cast_or_null( findChild(syntax::NodeRole::Expression)); } -syntax::Leaf *syntax::CompoundStatement::lbrace() { +syntax::Leaf *syntax::CompoundStatement::getLbrace() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } -std::vector syntax::CompoundStatement::statements() { +std::vector syntax::CompoundStatement::getStatements() { std::vector Children; for (auto *C = firstChild(); C; C = C->nextSibling()) { assert(C->role() == syntax::NodeRole::Statement); @@ -507,21 +508,21 @@ return Children; } -syntax::Leaf *syntax::CompoundStatement::rbrace() { +syntax::Leaf *syntax::CompoundStatement::getRbrace() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::Expression *syntax::StaticAssertDeclaration::condition() { +syntax::Expression *syntax::StaticAssertDeclaration::getCondition() { return cast_or_null( findChild(syntax::NodeRole::Condition)); } -syntax::Expression *syntax::StaticAssertDeclaration::message() { +syntax::Expression *syntax::StaticAssertDeclaration::getMessage() { return cast_or_null(findChild(syntax::NodeRole::Message)); } std::vector -syntax::SimpleDeclaration::declarators() { +syntax::SimpleDeclaration::getDeclarators() { std::vector Children; for (auto *C = firstChild(); C; C = C->nextSibling()) { if (C->role() == syntax::NodeRole::Declarator) @@ -530,74 +531,75 @@ return Children; } -syntax::Leaf *syntax::TemplateDeclaration::templateKeyword() { +syntax::Leaf *syntax::TemplateDeclaration::getTemplateKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Declaration *syntax::TemplateDeclaration::declaration() { +syntax::Declaration *syntax::TemplateDeclaration::getDeclaration() { return cast_or_null( findChild(syntax::NodeRole::Declaration)); } -syntax::Leaf *syntax::ExplicitTemplateInstantiation::templateKeyword() { +syntax::Leaf *syntax::ExplicitTemplateInstantiation::getTemplateKeyword() { return cast_or_null( findChild(syntax::NodeRole::IntroducerKeyword)); } -syntax::Leaf *syntax::ExplicitTemplateInstantiation::externKeyword() { +syntax::Leaf *syntax::ExplicitTemplateInstantiation::getExternKeyword() { return cast_or_null(findChild(syntax::NodeRole::ExternKeyword)); } -syntax::Declaration *syntax::ExplicitTemplateInstantiation::declaration() { +syntax::Declaration *syntax::ExplicitTemplateInstantiation::getDeclaration() { return cast_or_null( findChild(syntax::NodeRole::Declaration)); } -syntax::Leaf *syntax::ParenDeclarator::lparen() { +syntax::Leaf *syntax::ParenDeclarator::getLparen() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } -syntax::Leaf *syntax::ParenDeclarator::rparen() { +syntax::Leaf *syntax::ParenDeclarator::getRparen() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::Leaf *syntax::ArraySubscript::lbracket() { +syntax::Leaf *syntax::ArraySubscript::getLbracket() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } -syntax::Expression *syntax::ArraySubscript::size() { +syntax::Expression *syntax::ArraySubscript::getSize() { return cast_or_null(findChild(syntax::NodeRole::Size)); } -syntax::Leaf *syntax::ArraySubscript::rbracket() { +syntax::Leaf *syntax::ArraySubscript::getRbracket() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::Leaf *syntax::TrailingReturnType::arrowToken() { +syntax::Leaf *syntax::TrailingReturnType::getArrowToken() { return cast_or_null(findChild(syntax::NodeRole::ArrowToken)); } -syntax::SimpleDeclarator *syntax::TrailingReturnType::declarator() { +syntax::SimpleDeclarator *syntax::TrailingReturnType::getDeclarator() { return cast_or_null( findChild(syntax::NodeRole::Declarator)); } -syntax::Leaf *syntax::ParametersAndQualifiers::lparen() { +syntax::Leaf *syntax::ParametersAndQualifiers::getLparen() { return cast_or_null(findChild(syntax::NodeRole::OpenParen)); } syntax::ParameterDeclarationList * -syntax::ParametersAndQualifiers::parameters() { +syntax::ParametersAndQualifiers::getParameters() { return cast_or_null( findChild(syntax::NodeRole::Parameters)); } -syntax::Leaf *syntax::ParametersAndQualifiers::rparen() { +syntax::Leaf *syntax::ParametersAndQualifiers::getRparen() { return cast_or_null(findChild(syntax::NodeRole::CloseParen)); } -syntax::TrailingReturnType *syntax::ParametersAndQualifiers::trailingReturn() { +syntax::TrailingReturnType * +syntax::ParametersAndQualifiers::getTrailingReturn() { return cast_or_null( findChild(syntax::NodeRole::TrailingReturn)); }