24 #ifndef QSCRIPTAST_P_H 25 #define QSCRIPTAST_P_H 38 #include <QtCore/QString> 44 class QScriptNameIdImpl;
89 namespace QScript {
namespace AST {
172 Kind_DebuggerStatement
176 startLine(0), startColumn(0),
177 endLine(0), endColumn(0), kind(Kind_Node) {}
199 virtual void accept0(
Visitor *visitor) = 0;
232 virtual void accept0(
Visitor *visitor);
239 name (n) { kind = Kind_IdentifierExpression; }
243 virtual void accept0(
Visitor *visitor);
255 virtual void accept0(
Visitor *visitor);
264 virtual void accept0(
Visitor *visitor);
273 virtual void accept0(
Visitor *visitor);
280 value (v) { kind = Kind_NumericLiteral; }
283 virtual void accept0(
Visitor *visitor);
293 value (v) { kind = Kind_StringLiteral; }
297 virtual void accept0(
Visitor *visitor);
307 pattern (p), flags (f) { kind = Kind_RegExpLiteral; }
311 virtual void accept0(
Visitor *visitor);
323 { kind = Kind_ArrayLiteral; }
327 { kind = Kind_ArrayLiteral; }
331 { kind = Kind_ArrayLiteral; }
335 virtual void accept0(
Visitor *visitor);
349 properties (plist) { kind = Kind_ObjectLiteral; }
353 virtual void accept0(
Visitor *visitor);
363 elision (e), expression (expr), next (this)
364 { kind = Kind_ElementList; }
367 elision (e), expression (expr)
369 kind = Kind_ElementList;
370 next = previous->
next;
371 previous->
next =
this;
383 virtual void accept0(
Visitor *visitor);
395 next (this) { kind = Kind_Elision; }
400 next = previous->
next;
401 previous->
next =
this;
406 virtual void accept0(
Visitor *visitor);
423 name (n), value (v), next (this)
424 { kind = Kind_PropertyNameAndValueList; }
429 kind = Kind_PropertyNameAndValueList;
430 next = previous->
next;
431 previous->
next =
this;
436 virtual void accept0(
Visitor *visitor);
462 id (n) { kind = Kind_IdentifierPropertyName; }
466 virtual void accept0(
Visitor *visitor);
469 QScriptNameIdImpl *
id;
476 id (n) { kind = Kind_StringLiteralPropertyName; }
479 virtual void accept0(
Visitor *visitor);
482 QScriptNameIdImpl *
id;
489 id (n) { kind = Kind_NumericLiteralPropertyName; }
492 virtual void accept0(
Visitor *visitor);
502 base (b), expression (e)
503 { kind = Kind_ArrayMemberExpression; }
507 virtual void accept0(
Visitor *visitor);
519 { kind = Kind_FieldMemberExpression; }
523 virtual void accept0(
Visitor *visitor);
534 base (b), arguments (a)
535 { kind = Kind_NewMemberExpression; }
539 virtual void accept0(
Visitor *visitor);
550 expression (e) { kind = Kind_NewExpression; }
554 virtual void accept0(
Visitor *visitor);
564 base (b), arguments (a)
565 { kind = Kind_CallExpression; }
569 virtual void accept0(
Visitor *visitor);
580 expression (e), next (this)
581 { kind = Kind_ArgumentList; }
586 kind = Kind_ArgumentList;
587 next = previous->
next;
588 previous->
next =
this;
593 virtual void accept0(
Visitor *visitor);
611 base (b) { kind = Kind_PostIncrementExpression; }
615 virtual void accept0(
Visitor *visitor);
625 base (b) { kind = Kind_PostDecrementExpression; }
629 virtual void accept0(
Visitor *visitor);
639 expression (e) { kind = Kind_DeleteExpression; }
642 virtual void accept0(
Visitor *visitor);
652 expression (e) { kind = Kind_VoidExpression; }
656 virtual void accept0(
Visitor *visitor);
666 expression (e) { kind = Kind_TypeOfExpression; }
670 virtual void accept0(
Visitor *visitor);
680 expression (e) { kind = Kind_PreIncrementExpression; }
684 virtual void accept0(
Visitor *visitor);
694 expression (e) { kind = Kind_PreDecrementExpression; }
698 virtual void accept0(
Visitor *visitor);
708 expression (e) { kind = Kind_UnaryPlusExpression; }
712 virtual void accept0(
Visitor *visitor);
722 expression (e) { kind = Kind_UnaryMinusExpression; }
726 virtual void accept0(
Visitor *visitor);
736 expression (e) { kind = Kind_TildeExpression; }
740 virtual void accept0(
Visitor *visitor);
750 expression (e) { kind = Kind_NotExpression; }
754 virtual void accept0(
Visitor *visitor);
765 { kind = Kind_BinaryExpression; }
771 virtual void accept0(
Visitor *visitor);
783 expression (e), ok (t), ko (f)
784 { kind = Kind_ConditionalExpression; }
788 virtual void accept0(
Visitor *visitor);
800 left (l),
right (r) { kind = Kind_Expression; }
804 virtual void accept0(
Visitor *visitor);
815 statements (slist) { kind = Kind_Block; }
819 virtual void accept0(
Visitor *visitor);
829 statement (stmt), next (this)
830 { kind = Kind_StatementList; }
835 kind = Kind_StatementList;
836 next = previous->
next;
837 previous->
next =
this;
842 virtual void accept0(
Visitor *visitor);
861 { kind = Kind_VariableStatement; }
865 virtual void accept0(
Visitor *visitor);
875 name (n), expression (e), readOnly(false)
876 { kind = Kind_VariableDeclaration; }
880 virtual void accept0(
Visitor *visitor);
892 declaration (decl), next (this)
893 { kind = Kind_VariableDeclarationList; }
898 kind = Kind_VariableDeclarationList;
899 next = previous->
next;
900 previous->
next =
this;
905 virtual void accept0(
Visitor *visitor);
913 for (vdl = front; vdl != 0; vdl = vdl->
next)
930 virtual void accept0(
Visitor *visitor);
937 expression (e) { kind = Kind_ExpressionStatement; }
941 virtual void accept0(
Visitor *visitor);
951 expression (e), ok (t), ko (f)
952 { kind = Kind_IfStatement; }
956 virtual void accept0(
Visitor *visitor);
968 statement (stmt), expression (e)
969 { kind = Kind_DoWhileStatement; }
973 virtual void accept0(
Visitor *visitor);
984 expression (e), statement (stmt)
985 { kind = Kind_WhileStatement; }
989 virtual void accept0(
Visitor *visitor);
1000 initialiser (i), condition (c), expression (e), statement (stmt)
1001 { kind = Kind_ForStatement; }
1005 virtual void accept0(
Visitor *visitor);
1018 declarations (vlist), condition (c), expression (e), statement (stmt)
1019 { kind = Kind_LocalForStatement; }
1023 virtual void accept0(
Visitor *visitor);
1036 initialiser (i), expression (e), statement (stmt)
1037 { kind = Kind_ForEachStatement; }
1041 virtual void accept0(
Visitor *visitor);
1053 declaration (v), expression (e), statement (stmt)
1054 { kind = Kind_LocalForEachStatement; }
1058 virtual void accept0(
Visitor *visitor);
1070 label (
l) { kind = Kind_ContinueStatement; }
1074 virtual void accept0(
Visitor *visitor);
1084 label (
l) { kind = Kind_BreakStatement; }
1088 virtual void accept0(
Visitor *visitor);
1098 expression (e) { kind = Kind_ReturnStatement; }
1102 virtual void accept0(
Visitor *visitor);
1112 expression (e), statement (stmt)
1113 { kind = Kind_WithStatement; }
1117 virtual void accept0(
Visitor *visitor);
1128 expression (e), block (b)
1129 { kind = Kind_SwitchStatement; }
1133 virtual void accept0(
Visitor *visitor);
1144 clauses (c), defaultClause (
d), moreClauses (r)
1145 { kind = Kind_CaseBlock; }
1149 virtual void accept0(
Visitor *visitor);
1161 clause (c), next (this)
1162 { kind = Kind_CaseClauses; }
1167 kind = Kind_CaseClauses;
1168 next = previous->
next;
1169 previous->
next =
this;
1174 virtual void accept0(
Visitor *visitor);
1192 expression (e), statements (slist)
1193 { kind = Kind_CaseClause; }
1197 virtual void accept0(
Visitor *visitor);
1209 { kind = Kind_DefaultClause; }
1213 virtual void accept0(
Visitor *visitor);
1223 label (l), statement (stmt)
1224 { kind = Kind_LabelledStatement; }
1228 virtual void accept0(
Visitor *visitor);
1239 expression (e) { kind = Kind_ThrowStatement; }
1243 virtual void accept0(
Visitor *visitor);
1253 statement (stmt), catchExpression (c), finallyExpression (f)
1254 { kind = Kind_TryStatement; }
1257 statement (stmt), catchExpression (0), finallyExpression (f)
1258 { kind = Kind_TryStatement; }
1261 statement (stmt), catchExpression (c), finallyExpression (0)
1262 { kind = Kind_TryStatement; }
1266 virtual void accept0(
Visitor *visitor);
1278 name (n), statement (stmt)
1279 { kind = Kind_Catch; }
1283 virtual void accept0(
Visitor *visitor);
1295 { kind = Kind_Finally; }
1299 virtual void accept0(
Visitor *visitor);
1309 name (n), formals (f), body (b)
1310 { kind = Kind_FunctionExpression; }
1314 virtual void accept0(
Visitor *visitor);
1327 { kind = Kind_FunctionDeclaration; }
1331 virtual void accept0(
Visitor *visitor);
1338 name (n), next (this)
1339 { kind = Kind_FormalParameterList; }
1344 kind = Kind_FormalParameterList;
1345 next = previous->
next;
1346 previous->
next =
this;
1351 virtual void accept0(
Visitor *visitor);
1370 { kind = Kind_FunctionBody; }
1374 virtual void accept0(
Visitor *visitor);
1385 { kind = Kind_Program; }
1389 virtual void accept0(
Visitor *visitor);
1399 element (elt), next (this)
1400 { kind = Kind_SourceElements; }
1405 kind = Kind_SourceElements;
1406 next = previous->
next;
1407 previous->
next =
this;
1412 virtual void accept0(
Visitor *visitor);
1430 { kind = Kind_SourceElement; }
1440 { kind = Kind_FunctionSourceElement; }
1444 virtual void accept0(
Visitor *visitor);
1455 { kind = Kind_StatementSourceElement; }
1459 virtual void accept0(
Visitor *visitor);
1469 { kind = Kind_DebuggerStatement; }
1473 virtual void accept0(
Visitor *visitor);
IfStatement(ExpressionNode *e, Statement *t, Statement *f=0)
WhileStatement(ExpressionNode *e, Statement *stmt)
FieldMemberExpression(ExpressionNode *b, QScriptNameIdImpl *n)
ForEachStatement(ExpressionNode *i, ExpressionNode *e, Statement *stmt)
NumericLiteralPropertyName(double n)
FunctionDeclaration(QScriptNameIdImpl *n, FormalParameterList *f, FunctionBody *b)
StatementList * statements
ObjectLiteral(PropertyNameAndValueList *plist)
StringLiteralPropertyName(QScriptNameIdImpl *n)
NewExpression(ExpressionNode *e)
ExpressionNode * expression
ArrayLiteral(ElementList *elts)
#define QT_END_NAMESPACE
This macro expands to.
ExpressionNode * expression
DefaultClause * defaultClause
QScriptNameIdImpl * label
CaseClauses * moreClauses
virtual ~LocalForStatement()
CaseClause(ExpressionNode *e, StatementList *slist)
virtual ~SwitchStatement()
ConditionalExpression(ExpressionNode *e, ExpressionNode *t, ExpressionNode *f)
Catch(QScriptNameIdImpl *n, Statement *stmt)
virtual ~ConditionalExpression()
DeleteExpression(ExpressionNode *e)
VariableDeclaration * declaration
virtual ~ThisExpression()
virtual ~PostIncrementExpression()
PostIncrementExpression(ExpressionNode *b)
NewMemberExpression(ExpressionNode *b, ArgumentList *a)
ExpressionNode * expression
ForStatement(ExpressionNode *i, ExpressionNode *c, ExpressionNode *e, Statement *stmt)
BreakStatement(QScriptNameIdImpl *l=0)
PropertyNameAndValueList(PropertyNameAndValueList *previous, PropertyName *n, ExpressionNode *v)
void accept(Visitor *visitor)
virtual ~EmptyStatement()
VariableDeclarationList * finish(bool readOnly)
virtual ~ArrayMemberExpression()
PreIncrementExpression(ExpressionNode *e)
CaseClauses(CaseClauses *previous, CaseClause *c)
ExpressionStatement(ExpressionNode *e)
virtual ~IdentifierPropertyName()
CallExpression(ExpressionNode *b, ArgumentList *a)
IdentifierExpression(QScriptNameIdImpl *n)
ExpressionNode * expression
FunctionExpression(QScriptNameIdImpl *n, FormalParameterList *f, FunctionBody *b)
long ASN1_INTEGER_get ASN1_INTEGER * a
SourceElements * elements
DefaultClause(StatementList *slist)
LocalForStatement(VariableDeclarationList *vlist, ExpressionNode *c, ExpressionNode *e, Statement *stmt)
virtual ~VariableStatement()
ExpressionNode * expression
StatementList * statements
PropertyNameAndValueList(PropertyName *n, ExpressionNode *v)
PropertyNameAndValueList * properties
PropertyNameAndValueList * next
virtual ~PreDecrementExpression()
VariableDeclaration(QScriptNameIdImpl *n, ExpressionNode *e)
virtual ~UnaryPlusExpression()
virtual ~VoidExpression()
ExpressionNode * expression
ExpressionNode * expression
virtual ~FieldMemberExpression()
ExpressionNode * expression
ExpressionNode * initialiser
ExpressionNode * expression
virtual ~LocalForEachStatement()
ExpressionNode * condition
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
ExpressionNode * expression
virtual ~SourceElements()
virtual ~ExpressionStatement()
virtual ~FunctionExpression()
ReturnStatement(ExpressionNode *e)
VariableDeclarationList * next
ExpressionNode * expression
ExpressionNode * expression
ExpressionNode * expression
ArgumentList(ArgumentList *previous, ExpressionNode *e)
Expression(ExpressionNode *l, ExpressionNode *r)
UnaryPlusExpression(ExpressionNode *e)
static void acceptChild(Node *node, Visitor *visitor)
virtual ~DebuggerStatement()
virtual ~ReturnStatement()
#define QT_BEGIN_NAMESPACE
This macro expands to.
ExpressionNode * expression
VariableDeclarationList(VariableDeclarationList *previous, VariableDeclaration *decl)
FormalParameterList * formals
FunctionDeclaration * declaration
ExpressionNode * expression
CaseClauses(CaseClause *c)
virtual ~UnaryMinusExpression()
StatementList(StatementList *previous, Statement *stmt)
ExpressionNode * expression
LabelledStatement(QScriptNameIdImpl *l, Statement *stmt)
ThrowStatement(ExpressionNode *e)
FunctionBody(SourceElements *elts)
virtual ~PropertyNameAndValueList()
ExpressionNode * expression
WithStatement(ExpressionNode *e, Statement *stmt)
virtual ~FunctionDeclaration()
IdentifierPropertyName(QScriptNameIdImpl *n)
static QVector< Declaration > declarations(const QVector< StyleRule > &styleRules, const QString &part, quint64 pseudoClass=PseudoClass_Unspecified)
ExpressionNode * expression
ExpressionNode * expression
virtual ~BreakStatement()
RegExpLiteral(QScriptNameIdImpl *p, int f)
DoWhileStatement(Statement *stmt, ExpressionNode *e)
ExpressionNode * expression
virtual ~WhileStatement()
ExpressionNode * expression
ExpressionNode * expression
Elision(Elision *previous)
virtual ~PreIncrementExpression()
FunctionSourceElement(FunctionDeclaration *f)
SwitchStatement(ExpressionNode *e, CaseBlock *b)
ExpressionNode * expression
StringLiteral(QScriptNameIdImpl *v)
Program(SourceElements *elts)
SourceElements(SourceElements *previous, SourceElement *elt)
UnaryMinusExpression(ExpressionNode *e)
ElementList(Elision *e, ExpressionNode *expr)
virtual ~NullExpression()
VariableDeclarationList * declarations
StatementList(Statement *stmt)
PostDecrementExpression(ExpressionNode *b)
ExpressionNode * expression
ExpressionNode * expression
QScriptNameIdImpl * label
PreDecrementExpression(ExpressionNode *e)
virtual bool preVisit(Node *)
TypeOfExpression(ExpressionNode *e)
virtual ~IdentifierExpression()
PropertyNameAndValueList * finish()
TildeExpression(ExpressionNode *e)
virtual ~FunctionSourceElement()
TryStatement(Statement *stmt, Catch *c)
VariableStatement(VariableDeclarationList *vlist)
ContinueStatement(QScriptNameIdImpl *l=0)
BinaryExpression(ExpressionNode *l, int o, ExpressionNode *r)
StatementSourceElement(Statement *stmt)
ExpressionNode * condition
virtual ~StatementSourceElement()
ArrayMemberExpression(ExpressionNode *b, ExpressionNode *e)
ExpressionNode * expression
Block(StatementList *slist)
virtual ~VariableDeclaration()
ArgumentList(ExpressionNode *e)
static const QCssKnownValue properties[NumProperties - 1]
ExpressionNode * initialiser
virtual ~ForEachStatement()
static const QTextHtmlElement elements[Html_NumElements]
virtual void postVisit(Node *)
VoidExpression(ExpressionNode *e)
virtual ~StringLiteralPropertyName()
TryStatement(Statement *stmt, Catch *c, Finally *f)
VariableDeclarationList * declarations
QScriptNameIdImpl * label
NotExpression(ExpressionNode *e)
CaseBlock(CaseClauses *c, DefaultClause *d=0, CaseClauses *r=0)
virtual ~CallExpression()
QScriptNameIdImpl * value
virtual ~NumericLiteral()
SourceElements * finish()
VariableDeclaration * declaration
virtual ~TildeExpression()
virtual ~ContinueStatement()
virtual ~ThrowStatement()
virtual ~DeleteExpression()
virtual ~LabelledStatement()
virtual ~ExpressionNode()
StatementList * statements
virtual ~DoWhileStatement()
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
LocalForEachStatement(VariableDeclaration *v, ExpressionNode *e, Statement *stmt)
virtual ~PostDecrementExpression()
QScriptNameIdImpl * pattern
ArrayLiteral(ElementList *elts, Elision *e)
ExpressionNode * expression
virtual ~NewMemberExpression()
SourceElements(SourceElement *elt)
virtual ~TypeOfExpression()
TryStatement(Statement *stmt, Finally *f)
SourceElements * elements
Finally * finallyExpression
virtual ~NumericLiteralPropertyName()
ElementList(ElementList *previous, Elision *e, ExpressionNode *expr)
ExpressionNode * expression
VariableDeclarationList(VariableDeclaration *decl)
virtual ~VariableDeclarationList()
virtual ~BinaryExpression()