f1241bc3934e62499ccd7b44dafd0ae43f673202
[profile/ivi/qtdeclarative.git] / src / declarative / qml / parser / qdeclarativejsastfwd_p.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: http://www.qt-project.org/
6 **
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 **
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 **
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
29 **
30 ** Other Usage
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 #ifndef QDECLARATIVEJSAST_FWD_P_H
43 #define QDECLARATIVEJSAST_FWD_P_H
44
45 #include "qdeclarativejsglobal_p.h"
46
47 #include <QtCore/qglobal.h>
48
49 //
50 //  W A R N I N G
51 //  -------------
52 //
53 // This file is not part of the Qt API.  It exists purely as an
54 // implementation detail.  This header file may change from version to
55 // version without notice, or even be removed.
56 //
57 // We mean it.
58 //
59
60 QT_QML_BEGIN_NAMESPACE
61
62 namespace QDeclarativeJS { namespace AST {
63
64 class SourceLocation
65 {
66 public:
67     SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0)
68         : offset(offset), length(length),
69           startLine(line), startColumn(column)
70     { }
71
72     bool isValid() const { return length != 0; }
73
74     quint32 begin() const { return offset; }
75     quint32 end() const { return offset + length; }
76
77 // attributes
78     // ### encode
79     quint32 offset;
80     quint32 length;
81     quint32 startLine;
82     quint32 startColumn;
83 };
84
85 class Visitor;
86 class Node;
87 class ExpressionNode;
88 class Statement;
89 class ThisExpression;
90 class IdentifierExpression;
91 class NullExpression;
92 class TrueLiteral;
93 class FalseLiteral;
94 class NumericLiteral;
95 class StringLiteral;
96 class RegExpLiteral;
97 class ArrayLiteral;
98 class ObjectLiteral;
99 class ElementList;
100 class Elision;
101 class PropertyNameAndValueList;
102 class PropertyName;
103 class IdentifierPropertyName;
104 class StringLiteralPropertyName;
105 class NumericLiteralPropertyName;
106 class ArrayMemberExpression;
107 class FieldMemberExpression;
108 class NewMemberExpression;
109 class NewExpression;
110 class CallExpression;
111 class ArgumentList;
112 class PostIncrementExpression;
113 class PostDecrementExpression;
114 class DeleteExpression;
115 class VoidExpression;
116 class TypeOfExpression;
117 class PreIncrementExpression;
118 class PreDecrementExpression;
119 class UnaryPlusExpression;
120 class UnaryMinusExpression;
121 class TildeExpression;
122 class NotExpression;
123 class BinaryExpression;
124 class ConditionalExpression;
125 class Expression; // ### rename
126 class Block;
127 class StatementList;
128 class VariableStatement;
129 class VariableDeclarationList;
130 class VariableDeclaration;
131 class EmptyStatement;
132 class ExpressionStatement;
133 class IfStatement;
134 class DoWhileStatement;
135 class WhileStatement;
136 class ForStatement;
137 class LocalForStatement;
138 class ForEachStatement;
139 class LocalForEachStatement;
140 class ContinueStatement;
141 class BreakStatement;
142 class ReturnStatement;
143 class WithStatement;
144 class SwitchStatement;
145 class CaseBlock;
146 class CaseClauses;
147 class CaseClause;
148 class DefaultClause;
149 class LabelledStatement;
150 class ThrowStatement;
151 class TryStatement;
152 class Catch;
153 class Finally;
154 class FunctionDeclaration;
155 class FunctionExpression;
156 class FormalParameterList;
157 class FunctionBody;
158 class Program;
159 class SourceElements;
160 class SourceElement;
161 class FunctionSourceElement;
162 class StatementSourceElement;
163 class DebuggerStatement;
164 class NestedExpression;
165
166 // ui elements
167 class UiProgram;
168 class UiImportList;
169 class UiImport;
170 class UiPublicMember;
171 class UiObjectDefinition;
172 class UiObjectInitializer;
173 class UiObjectBinding;
174 class UiScriptBinding;
175 class UiSourceElement;
176 class UiArrayBinding;
177 class UiObjectMember;
178 class UiObjectMemberList;
179 class UiArrayMemberList;
180 class UiQualifiedId;
181
182 } } // namespace AST
183
184 QT_QML_END_NAMESPACE
185
186 #endif