File indexing completed on 2024-05-19 15:42:36
0001 /* 0002 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0003 SPDX-FileCopyrightText: 2011 Sven Brauch <svenbrauch@googlemail.com> 0004 SPDX-FileCopyrightText: 2012 Patrick Spendrin <ps_ml@gmx.de> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include "astvisitor.h" 0010 0011 /** 0012 * Note: This has been generated using utilities/generate.py 0013 * but you can modifiy it, it's not regenerated automatically 0014 */ 0015 0016 namespace Python 0017 { 0018 0019 AstVisitor::AstVisitor() { } 0020 AstVisitor::~AstVisitor() { } 0021 0022 0023 void AstVisitor::visitNode(Ast* node) 0024 { 0025 if ( ! node ) return; 0026 switch ( node->astType ) { 0027 case Ast::CodeAstType: this->visitCode(static_cast<CodeAst*>(node)); break; 0028 case Ast::FunctionDefinitionAstType: this->visitFunctionDefinition(static_cast<FunctionDefinitionAst*>(node)); break; 0029 case Ast::ClassDefinitionAstType: this->visitClassDefinition(static_cast<ClassDefinitionAst*>(node)); break; 0030 case Ast::ReturnAstType: this->visitReturn(static_cast<ReturnAst*>(node)); break; 0031 case Ast::AwaitAstType: this->visitAwait(static_cast<AwaitAst*>(node)); break; 0032 case Ast::DeleteAstType: this->visitDelete(static_cast<DeleteAst*>(node)); break; 0033 case Ast::AssignmentAstType: this->visitAssignment(static_cast<AssignmentAst*>(node)); break; 0034 case Ast::AugmentedAssignmentAstType: this->visitAugmentedAssignment(static_cast<AugmentedAssignmentAst*>(node)); break; 0035 case Ast::AnnotationAssignmentAstType: this->visitAnnotationAssignment(static_cast<AnnotationAssignmentAst*>(node)); break; 0036 case Ast::AssignmentExpressionAstType: this->visitAssignmentExpression(static_cast<AssignmentExpressionAst*>(node)); break; 0037 case Ast::ForAstType: this->visitFor(static_cast<ForAst*>(node)); break; 0038 case Ast::WhileAstType: this->visitWhile(static_cast<WhileAst*>(node)); break; 0039 case Ast::IfAstType: this->visitIf(static_cast<IfAst*>(node)); break; 0040 case Ast::WithAstType: this->visitWith(static_cast<WithAst*>(node)); break; 0041 case Ast::RaiseAstType: this->visitRaise(static_cast<RaiseAst*>(node)); break; 0042 case Ast::TryAstType: this->visitTry(static_cast<TryAst*>(node)); break; 0043 case Ast::TryStarAstType: this->visitTryStar(static_cast<TryStarAst*>(node)); break; 0044 case Ast::AssertionAstType: this->visitAssertion(static_cast<AssertionAst*>(node)); break; 0045 case Ast::ImportAstType: this->visitImport(static_cast<ImportAst*>(node)); break; 0046 case Ast::ImportFromAstType: this->visitImportFrom(static_cast<ImportFromAst*>(node)); break; 0047 case Ast::GlobalAstType: this->visitGlobal(static_cast<GlobalAst*>(node)); break; 0048 case Ast::BreakAstType: this->visitBreak(static_cast<BreakAst*>(node)); break; 0049 case Ast::ContinueAstType: this->visitContinue(static_cast<ContinueAst*>(node)); break; 0050 case Ast::PassAstType: this->visitPass(static_cast<PassAst*>(node)); break; 0051 case Ast::NonlocalAstType: this->visitNonlocal(static_cast<NonlocalAst*>(node)); break; 0052 case Ast::BooleanOperationAstType: this->visitBooleanOperation(static_cast<BooleanOperationAst*>(node)); break; 0053 case Ast::BinaryOperationAstType: this->visitBinaryOperation(static_cast<BinaryOperationAst*>(node)); break; 0054 case Ast::UnaryOperationAstType: this->visitUnaryOperation(static_cast<UnaryOperationAst*>(node)); break; 0055 case Ast::LambdaAstType: this->visitLambda(static_cast<LambdaAst*>(node)); break; 0056 case Ast::IfExpressionAstType: this->visitIfExpression(static_cast<IfExpressionAst*>(node)); break; 0057 case Ast::DictAstType: this->visitDict(static_cast<DictAst*>(node)); break; 0058 case Ast::SetAstType: this->visitSet(static_cast<SetAst*>(node)); break; 0059 case Ast::ListComprehensionAstType: this->visitListComprehension(static_cast<ListComprehensionAst*>(node)); break; 0060 case Ast::SetComprehensionAstType: this->visitSetComprehension(static_cast<SetComprehensionAst*>(node)); break; 0061 case Ast::DictionaryComprehensionAstType: this->visitDictionaryComprehension(static_cast<DictionaryComprehensionAst*>(node)); break; 0062 case Ast::GeneratorExpressionAstType: this->visitGeneratorExpression(static_cast<GeneratorExpressionAst*>(node)); break; 0063 case Ast::CompareAstType: this->visitCompare(static_cast<CompareAst*>(node)); break; 0064 case Ast::NumberAstType: this->visitNumber(static_cast<NumberAst*>(node)); break; 0065 case Ast::StringAstType: this->visitString(static_cast<StringAst*>(node)); break; 0066 case Ast::FormattedValueAstType: this->visitFormattedValue(static_cast<FormattedValueAst*>(node)); break; 0067 case Ast::JoinedStringAstType: this->visitJoinedString(static_cast<JoinedStringAst*>(node)); break; 0068 case Ast::BytesAstType: this->visitBytes(static_cast<BytesAst*>(node)); break; 0069 case Ast::YieldAstType: this->visitYield(static_cast<YieldAst*>(node)); break; 0070 case Ast::NameAstType: this->visitName(static_cast<NameAst*>(node)); break; 0071 case Ast::NameConstantAstType: this->visitNameConstant(static_cast<NameConstantAst*>(node)); break; 0072 case Ast::CallAstType: this->visitCall(static_cast<CallAst*>(node)); break; 0073 case Ast::AttributeAstType: this->visitAttribute(static_cast<AttributeAst*>(node)); break; 0074 case Ast::SubscriptAstType: this->visitSubscript(static_cast<SubscriptAst*>(node)); break; 0075 case Ast::StarredAstType: this->visitStarred(static_cast<StarredAst*>(node)); break; 0076 case Ast::ListAstType: this->visitList(static_cast<ListAst*>(node)); break; 0077 case Ast::TupleAstType: this->visitTuple(static_cast<TupleAst*>(node)); break; 0078 case Ast::EllipsisAstType: this->visitEllipsis(static_cast<EllipsisAst*>(node)); break; 0079 case Ast::SliceAstType: this->visitSlice(static_cast<SliceAst*>(node)); break; 0080 case Ast::ArgumentsAstType: this->visitArguments(static_cast<ArgumentsAst*>(node)); break; 0081 case Ast::KeywordAstType: this->visitKeyword(static_cast<KeywordAst*>(node)); break; 0082 case Ast::ArgAstType: this->visitArg(static_cast<ArgAst*>(node)); break; 0083 case Ast::ComprehensionAstType: this->visitComprehension(static_cast<ComprehensionAst*>(node)); break; 0084 case Ast::ExceptionHandlerAstType: this->visitExceptionHandler(static_cast<ExceptionHandlerAst*>(node)); break; 0085 case Ast::AliasAstType: this->visitAlias(static_cast<AliasAst*>(node)); break; 0086 case Ast::ExpressionAstType: this->visitExpression(static_cast<ExpressionAst*>(node)); break; 0087 case Ast::YieldFromAstType: this->visitYieldFrom(static_cast<YieldFromAst*>(node)); break; 0088 case Ast::WithItemAstType: this->visitWithItem(static_cast<WithItemAst*>(node)); break; 0089 case Ast::MatchAstType: this->visitMatch(static_cast<MatchAst*>(node)); break; 0090 case Ast::MatchCaseAstType: this->visitMatchCase(static_cast<MatchCaseAst*>(node)); break; 0091 case Ast::MatchValueAstType: this->visitMatchValue(static_cast<MatchValueAst*>(node)); break; 0092 case Ast::MatchSingletonAstType: this->visitMatchSingleton(static_cast<MatchSingletonAst*>(node)); break; 0093 case Ast::MatchSequenceAstType: this->visitMatchSequence(static_cast<MatchSequenceAst*>(node)); break; 0094 case Ast::MatchMappingAstType: this->visitMatchMapping(static_cast<MatchMappingAst*>(node)); break; 0095 case Ast::MatchClassAstType: this->visitMatchClass(static_cast<MatchClassAst*>(node)); break; 0096 case Ast::MatchStarAstType: this->visitMatchStar(static_cast<MatchStarAst*>(node)); break; 0097 case Ast::MatchAsAstType: this->visitMatchAs(static_cast<MatchAsAst*>(node)); break; 0098 case Ast::MatchOrAstType: this->visitMatchOr(static_cast<MatchOrAst*>(node)); break; 0099 case Ast::IdentifierAstType: break; 0100 case Ast::StatementAstType: break; 0101 case Ast::ConstantAstType: break; 0102 case Ast::PatternAstType: break; 0103 case Ast::LastAstType: Q_ASSERT(false); break; 0104 case Ast::LastStatementType: Q_ASSERT(false); break; 0105 case Ast::LastExpressionType: Q_ASSERT(false); break; 0106 case Ast::LastPatternType: Q_ASSERT(false); break; 0107 } 0108 } 0109 0110 }