4#ifndef QQMLJSASTVISITOR_P_H
5#define QQMLJSASTVISITOR_P_H
25#define QQmlJSASTUiClassListToVisit \
28 X(UiPragmaValueList) \
33 X(UiObjectDefinition) \
34 X(UiObjectInitializer) \
39 X(UiObjectMemberList) \
40 X(UiArrayMemberList) \
42 X(UiEnumDeclaration) \
44 X(UiVersionSpecifier) \
45 X(UiInlineComponent) \
50#define QQmlJSASTQQmlJSClassListToVisit \
53 X(IdentifierExpression) \
64 X(PatternElementList) \
65 X(PatternPropertyList) \
70 X(IdentifierPropertyName) \
71 X(StringLiteralPropertyName) \
72 X(NumericLiteralPropertyName) \
73 X(ComputedPropertyName) \
74 X(ArrayMemberExpression) \
75 X(FieldMemberExpression) \
77 X(NewMemberExpression) \
81 X(PostIncrementExpression) \
82 X(PostDecrementExpression) \
86 X(PreIncrementExpression) \
87 X(PreDecrementExpression) \
88 X(UnaryPlusExpression) \
89 X(UnaryMinusExpression) \
93 X(ConditionalExpression) \
97 X(VariableStatement) \
98 X(VariableDeclarationList) \
100 X(ExpressionStatement) \
102 X(DoWhileStatement) \
105 X(ForEachStatement) \
106 X(ContinueStatement) \
116 X(LabelledStatement) \
121 X(FunctionDeclaration) \
122 X(FunctionExpression) \
123 X(FormalParameterList) \
125 X(ClassDeclaration) \
126 X(ClassElementList) \
134 X(ImportDeclaration) \
138 X(ExportDeclaration) \
140 X(DebuggerStatement) \
144#define QQmlJSASTClassListToVisit QQmlJSASTUiClassListToVisit QQmlJSASTQQmlJSClassListToVisit
146namespace QQmlJS {
namespace AST {
160 ++(m_visitor->m_recursionDepth);
165 --(m_visitor->m_recursionDepth);
169 return m_visitor->m_recursionDepth < s_recursionLimit;
173 static const quint16 s_recursionLimit = 4096;
184 virtual bool visit(name *) = 0; \
185 virtual void endVisit(name *) = 0;
207 bool visit(name *) override { return true; } \
208 void endVisit(name *) override { }
RecursionDepthCheck(RecursionDepthCheck &&)=delete
RecursionDepthCheck(BaseVisitor *visitor)
RecursionDepthCheck & operator=(RecursionDepthCheck &&)=delete
virtual QQmlJSASTClassListToVisit void throwRecursionDepthError()=0
quint16 recursionDepth() const
virtual bool preVisit(Node *)=0
virtual void postVisit(Node *)=0
bool preVisit(Node *) override
void postVisit(Node *) override
Combined button and popup list for selecting options.
#define QQmlJSASTClassListToVisit
#define QML_PARSER_EXPORT