annotate trunk/src/Expressions.d @ 277:38a68e534a3b

- Made classes Declaration, Expression and Statement abstract. - Added declarations to enum NodeKind. - Added mixin(set_kind) statement to every constructor that inherits from Declaration.
author aziz
date Mon, 06 Aug 2007 15:15:01 +0000
parents d6b2f7616ca5
children 0c1a2eba0c91
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
1 /++
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
2 Author: Aziz Köksal
249
32d354584b28 - Upgraded license notices to GPL3.
aziz
parents: 248
diff changeset
3 License: GPL3
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
4 +/
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
5 module Expressions;
240
deab661906ae - Classes Declaration, Expression, Statement and Type inherit from Node now.
aziz
parents: 198
diff changeset
6 import SyntaxTree;
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
7 import Token;
94
0fe650a7a8d1 - Renamed Type enum to InfoType in module Information.
aziz
parents: 89
diff changeset
8 import Types;
130
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
9 import Declarations;
193
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
10 import Statements;
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
11
277
38a68e534a3b - Made classes Declaration, Expression and Statement abstract.
aziz
parents: 276
diff changeset
12 abstract class Expression : Node
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
13 {
240
deab661906ae - Classes Declaration, Expression, Statement and Type inherit from Node now.
aziz
parents: 198
diff changeset
14 this()
deab661906ae - Classes Declaration, Expression, Statement and Type inherit from Node now.
aziz
parents: 198
diff changeset
15 {
275
e8de572e4d01 - Changed enum NodeType to NodeCategory.
aziz
parents: 269
diff changeset
16 super(NodeCategory.Expression);
240
deab661906ae - Classes Declaration, Expression, Statement and Type inherit from Node now.
aziz
parents: 198
diff changeset
17 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
18 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
19
136
96468715ea79 - Returning EmptyExpression in parsePrimaryExpression() when no token matched.
aziz
parents: 133
diff changeset
20 class EmptyExpression : Expression
96468715ea79 - Returning EmptyExpression in parsePrimaryExpression() when no token matched.
aziz
parents: 133
diff changeset
21 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
22 this()
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
23 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
24 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
25 }
136
96468715ea79 - Returning EmptyExpression in parsePrimaryExpression() when no token matched.
aziz
parents: 133
diff changeset
26 }
96468715ea79 - Returning EmptyExpression in parsePrimaryExpression() when no token matched.
aziz
parents: 133
diff changeset
27
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
28 class BinaryExpression : Expression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
29 {
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
30 Expression left, right;
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
31 Token* tok;
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
32 this(Expression left, Expression right, Token* tok)
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
33 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
34 mixin(set_kind);
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
35 this.left = left;
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
36 this.right = right;
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
37 this.tok = tok;
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
38 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
39 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
40
72
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
41 class CondExpression : BinaryExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
42 {
72
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
43 Expression condition;
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
44 this(Expression condition, Expression left, Expression right)
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
45 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
46 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
47 mixin(set_kind);
72
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
48 this.condition = condition;
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
49 }
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
50 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
51
72
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
52 class CommaExpression : BinaryExpression
f75e359f939f - Added parseExpression() method.
aziz
parents: 71
diff changeset
53 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
54 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
55 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
56 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
57 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
58 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
59 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
60
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
61 class OrOrExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
62 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
63 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
64 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
65 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
66 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
67 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
68 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
69
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
70 class AndAndExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
71 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
72 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
73 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
74 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
75 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
76 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
77 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
78
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
79 class OrExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
80 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
81 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
82 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
83 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
84 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
85 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
86 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
87
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
88 class XorExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
89 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
90 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
91 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
92 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
93 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
94 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
95 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
96
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
97 class AndExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
98 {
251
67a798459532 - Added parameter Token* tok to some Expression constructors. Adapted parser accordingly.
aziz
parents: 249
diff changeset
99 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
100 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
101 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
102 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
103 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
104 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
105
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
106 class CmpExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
107 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
108 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
109 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
110 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
111 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
112 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
113 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
114
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
115 class EqualExpression : CmpExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
116 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
117 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
118 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
119 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
120 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
121 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
122 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
123
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
124 class IdentityExpression : CmpExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
125 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
126 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
127 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
128 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
129 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
130 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
131 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
132
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
133 class RelExpression : CmpExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
134 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
135 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
136 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
137 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
138 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
139 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
140 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
141
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
142 class InExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
143 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
144 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
145 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
146 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
147 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
148 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
149 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
150
75
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
151 class LShiftExpression : BinaryExpression
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
152 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
153 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
154 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
155 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
156 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
157 }
75
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
158 }
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
159
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
160 class RShiftExpression : BinaryExpression
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
161 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
162 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
163 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
164 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
165 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
166 }
75
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
167 }
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
168
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
169 class URShiftExpression : BinaryExpression
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
170 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
171 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
172 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
173 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
174 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
175 }
75
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
176 }
3f976d9e0833 - Implemented parseShiftExpression().
aziz
parents: 74
diff changeset
177
76
a85f9edf6ce7 - Implemented parseAddExpression().
aziz
parents: 75
diff changeset
178 class PlusExpression : BinaryExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
179 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
180 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
181 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
182 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
183 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
184 }
76
a85f9edf6ce7 - Implemented parseAddExpression().
aziz
parents: 75
diff changeset
185 }
a85f9edf6ce7 - Implemented parseAddExpression().
aziz
parents: 75
diff changeset
186
a85f9edf6ce7 - Implemented parseAddExpression().
aziz
parents: 75
diff changeset
187 class MinusExpression : BinaryExpression
a85f9edf6ce7 - Implemented parseAddExpression().
aziz
parents: 75
diff changeset
188 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
189 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
190 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
191 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
192 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
193 }
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
194 }
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
195
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
196 class CatExpression : BinaryExpression
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
197 {
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
198 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
199 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
200 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
201 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
202 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
203 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
204
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
205 class MulExpression : BinaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
206 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
207 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
208 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
209 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
210 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
211 }
77
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
212 }
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
213
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
214 class DivExpression : BinaryExpression
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
215 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
216 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
217 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
218 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
219 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
220 }
77
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
221 }
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
222
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
223 class ModExpression : BinaryExpression
7e21c4df1c02 - Implemented parseMulExpression().
aziz
parents: 76
diff changeset
224 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
225 this(Expression left, Expression right, Token* tok)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
226 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
227 super(left, right, tok);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
228 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
229 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
230 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
231
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
232 class AssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
233 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
234 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
235 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
236 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
237 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
238 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
239 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
240 class LShiftAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
241 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
242 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
243 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
244 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
245 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
246 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
247 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
248 class RShiftAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
249 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
250 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
251 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
252 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
253 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
254 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
255 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
256 class URShiftAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
257 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
258 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
259 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
260 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
261 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
262 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
263 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
264 class OrAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
265 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
266 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
267 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
268 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
269 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
270 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
271 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
272 class AndAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
273 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
274 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
275 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
276 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
277 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
278 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
279 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
280 class PlusAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
281 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
282 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
283 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
284 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
285 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
286 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
287 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
288 class MinusAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
289 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
290 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
291 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
292 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
293 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
294 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
295 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
296 class DivAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
297 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
298 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
299 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
300 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
301 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
302 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
303 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
304 class MulAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
305 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
306 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
307 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
308 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
309 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
310 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
311 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
312 class ModAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
313 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
314 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
315 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
316 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
317 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
318 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
319 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
320 class XorAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
321 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
322 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
323 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
324 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
325 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
326 }
71
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
327 }
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
328 class CatAssignExpression : BinaryExpression
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
329 {
b3777cca323c - Added Identity and NotIdentity tokens.
aziz
parents: 70
diff changeset
330 this(Expression left, Expression right)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
331 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
332 super(left, right, null);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
333 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
334 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
335 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
336
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
337 class UnaryExpression : Expression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
338 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
339 Expression e;
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
340 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
341 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
342 this.e = e;
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
343 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
344 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
345 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
346
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
347 class AddressExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
348 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
349 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
350 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
351 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
352 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
353 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
354 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
355
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
356 class PreIncrExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
357 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
358 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
359 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
360 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
361 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
362 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
363 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
364
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
365 class PreDecrExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
366 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
367 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
368 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
369 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
370 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
371 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
372 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
373
79
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
374 class PostIncrExpression : UnaryExpression
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
375 {
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
376 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
377 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
378 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
379 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
380 }
79
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
381 }
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
382
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
383 class PostDecrExpression : UnaryExpression
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
384 {
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
385 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
386 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
387 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
388 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
389 }
79
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
390 }
df4e5c7ad58a - Implemented most of parsePostExpression() and parsePreExpression().
aziz
parents: 78
diff changeset
391
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
392 class DerefExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
393 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
394 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
395 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
396 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
397 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
398 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
399 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
400
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
401 class SignExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
402 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
403 this(Expression e)
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
404 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
405 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
406 mixin(set_kind);
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
407 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
408 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
409
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
410 class NotExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
411 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
412 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
413 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
414 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
415 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
416 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
417 }
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
418
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
419 class CompExpression : UnaryExpression
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
420 {
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
421 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
422 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
423 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
424 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
425 }
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
426 }
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
427 /+
81
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
428 class DotIdExpression : UnaryExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
429 {
108
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
430 string ident;
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
431 this(Expression e, string ident)
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
432 {
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
433 super(e);
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
434 this.ident = ident;
469188935d56 - Added ident member to DotIdExpression.
aziz
parents: 101
diff changeset
435 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
436 }
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
437 +/
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
438 /+
153
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
439 class DotTemplateInstanceExpression : UnaryExpression
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
440 {
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
441 string ident;
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
442 TemplateArguments targs;
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
443 this(Expression e, string ident, TemplateArguments targs)
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
444 {
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
445 super(e);
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
446 this.ident = ident;
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
447 this.targs = targs;
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
448 }
66790fc2c0a2 - Added method parseIdentifierListType().
aziz
parents: 152
diff changeset
449 }
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
450 +/
160
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
451 class PostDotListExpression : UnaryExpression
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
452 {
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
453 DotListExpression dotList;
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
454 this(Expression e, DotListExpression dotList)
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
455 {
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
456 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
457 mixin(set_kind);
160
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
458 this.dotList = dotList;
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
459 }
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
460 }
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
461
81
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
462 class CallExpression : UnaryExpression
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
463 {
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
464 Expression[] args;
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
465 this(Expression e, Expression[] args)
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
466 {
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
467 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
468 mixin(set_kind);
81
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
469 this.args = args;
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
470 }
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
471 }
aa1ea2548dd9 - Fixed parseExpression() method.
aziz
parents: 79
diff changeset
472
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
473 class NewExpression : /*Unary*/Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
474 {
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
475 Expression[] newArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
476 Type type;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
477 Expression[] ctorArgs;
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
478 this(/*Expression e, */Expression[] newArgs, Type type, Expression[] ctorArgs)
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
479 {
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
480 /*super(e);*/
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
481 mixin(set_kind);
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
482 this.newArgs = newArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
483 this.type = type;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
484 this.ctorArgs = ctorArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
485 }
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
486 }
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
487
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
488 class NewAnonClassExpression : /*Unary*/Expression
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
489 {
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
490 Expression[] newArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
491 BaseClass[] bases;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
492 Expression[] ctorArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
493 Declaration[] decls;
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
494 this(/*Expression e, */Expression[] newArgs, BaseClass[] bases, Expression[] ctorArgs, Declaration[] decls)
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
495 {
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
496 /*super(e);*/
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
497 mixin(set_kind);
144
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
498 this.newArgs = newArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
499 this.bases = bases;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
500 this.ctorArgs = ctorArgs;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
501 this.decls = decls;
cfd890b250e6 - Added bool parameter to parseBaseClasses. BaseClasses in anonymous classes don't start with a colon.
aziz
parents: 136
diff changeset
502 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
503 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
504
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
505 class DeleteExpression : UnaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
506 {
78
f043759fb59a - Added code to parseUnaryExpression(); not fully implemented.
aziz
parents: 77
diff changeset
507 this(Expression e)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
508 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
509 super(e);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
510 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
511 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
512 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
513
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
514 class CastExpression : UnaryExpression
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
515 {
99
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
516 Type type;
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
517 this(Expression e, Type type)
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
518 {
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
519 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
520 mixin(set_kind);
99
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
521 this.type = type;
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
522 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
523 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
524
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
525 class IndexExpression : UnaryExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
526 {
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
527 Expression[] args;
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
528 this(Expression e, Expression[] args)
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
529 {
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
530 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
531 mixin(set_kind);
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
532 this.args = args;
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
533 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
534 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
535
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
536 class SliceExpression : UnaryExpression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
537 {
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
538 Expression left, right;
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
539 this(Expression e, Expression left, Expression right)
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
540 {
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
541 super(e);
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
542 mixin(set_kind);
83
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
543 this.left = left;
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
544 this.right = right;
9e6d66f647c9 - Fix: IsExpression was created instead of IdentityExpression.
aziz
parents: 81
diff changeset
545 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
546 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
547
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
548 /*
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
549 class PrimaryExpression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
550 {
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
551
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
552 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
553 */
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
554
89
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
555 class IdentifierExpression : Expression
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
556 {
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
557 Token* identifier;
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
558 this(Token* identifier)
89
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
559 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
560 mixin(set_kind);
89
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
561 this.identifier = identifier;
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
562 }
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
563 }
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
564 /*
152
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
565 class IdentifierListExpression : Expression
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
566 {
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
567 Expression[] identList;
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
568 this(Expression[] identList)
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
569 {
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
570 this.identList = identList;
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
571 }
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
572 }
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
573 */
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
574 class DotListExpression : Expression
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
575 {
160
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
576 Expression[] items;
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
577 this(Expression[] items)
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
578 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
579 mixin(set_kind);
160
c21192e8be2b - Parsing PostDotListExpression in parsePostExpression().
aziz
parents: 157
diff changeset
580 this.items = items;
154
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
581 }
0e7cefb15e43 - Renamed IdentifierListExpression to DotListExpression, and parseIdentifierListExpression() to parseDotListExpression().
aziz
parents: 153
diff changeset
582 }
152
fe2e36eb4b45 - Added method parseIdentifierListExpression() and class IdentifierListExpression.
aziz
parents: 150
diff changeset
583
150
753bc07bf3a0 - Forgot to pass ident to constructor of TemplateArgument.
aziz
parents: 144
diff changeset
584 class TemplateInstanceExpression : Expression
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
585 {
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
586 Token* ident;
150
753bc07bf3a0 - Forgot to pass ident to constructor of TemplateArgument.
aziz
parents: 144
diff changeset
587 TemplateArguments targs;
252
788398655d24 - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 251
diff changeset
588 this(Token* ident, TemplateArguments targs)
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
589 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
590 mixin(set_kind);
150
753bc07bf3a0 - Forgot to pass ident to constructor of TemplateArgument.
aziz
parents: 144
diff changeset
591 this.ident = ident;
753bc07bf3a0 - Forgot to pass ident to constructor of TemplateArgument.
aziz
parents: 144
diff changeset
592 this.targs = targs;
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
593 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
594 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
595
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
596 class ThisExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
597 {
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
598 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
599 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
600 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
601 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
602 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
603
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
604 class SuperExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
605 {
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
606 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
607 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
608 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
609 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
610 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
611
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
612 class NullExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
613 {
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
614 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
615 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
616 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
617 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
618 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
619
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
620 class DollarExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
621 {
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
622 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
623 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
624 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
625 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
626 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
627
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
628 class BoolExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
629 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
630 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
631 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
632 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
633 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
634 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
635
97
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
636 class IntNumberExpression : Expression
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
637 {
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
638 TOK type;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
639 ulong number;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
640 this(TOK type, ulong number)
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
641 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
642 mixin(set_kind);
97
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
643 this.number = number;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
644 this.type = type;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
645 }
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
646 }
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
647
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
648 class RealNumberExpression : Expression
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
649 {
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
650 TOK type;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
651 real number;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
652 this(TOK type, real number)
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
653 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
654 mixin(set_kind);
97
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
655 this.number = number;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
656 this.type = type;
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
657 }
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
658 }
1a83e5070a84 - Added code for parsing IntNumber- and RealNumberExpressions.
aziz
parents: 94
diff changeset
659
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
660 class CharLiteralExpression : Expression
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
661 {
242
7ec7ad8df9da - Changed type of member tok in class BinaryExpression to Token*.
aziz
parents: 240
diff changeset
662 this()
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
663 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
664 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
665 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
666 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
667
157
fdbd47d72614 - Renamed class StringLiteralExpression to StringLiteralsExpression.
aziz
parents: 154
diff changeset
668 class StringLiteralsExpression : Expression
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
669 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
670 Token*[] strings;
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
671 this(Token*[] strings)
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
672 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
673 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
674 this.strings = strings;
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
675 }
84
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
676 }
ac8d961d10d1 - Added code for parsing This-,Super-,Null-,Bool-,Dollar-,CharLiteral- and StringLiteralExpression.
aziz
parents: 83
diff changeset
677
85
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
678 class ArrayLiteralExpression : Expression
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
679 {
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
680 Expression[] values;
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
681 this(Expression[] values)
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
682 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
683 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
684 this.values = values;
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
685 }
85
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
686 }
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
687
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
688 class AssocArrayLiteralExpression : Expression
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
689 {
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
690 Expression[] keys, values;
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
691 this(Expression[] keys, Expression[] values)
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
692 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
693 mixin(set_kind);
85
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
694 this.keys = keys;
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
695 this.values = values;
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
696 }
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
697 }
d8dc3171440d - Fixed parsing CallExpression and IndexExpression.
aziz
parents: 84
diff changeset
698
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
699 class AssertExpression : Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
700 {
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
701 Expression expr, msg;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
702 this(Expression expr, Expression msg)
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
703 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
704 mixin(set_kind);
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
705 this.expr = expr;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
706 this.msg = msg;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
707 }
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
708 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
709
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
710 class MixinExpression : Expression
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
711 {
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
712 Expression expr;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
713 this(Expression expr)
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
714 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
715 mixin(set_kind);
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
716 this.expr = expr;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
717 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
718 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
719
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
720 class ImportExpression : Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
721 {
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
722 Expression expr;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
723 this(Expression expr)
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
724 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
725 mixin(set_kind);
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
726 this.expr = expr;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
727 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
728 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
729
101
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
730 class TypeofExpression : Expression
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
731 {
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
732 Type type;
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
733 this(Type type)
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
734 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
735 mixin(set_kind);
101
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
736 this.type = type;
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
737 }
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
738 }
6f3c5473c5e5 - Implemented parsing TypeofExpression.
aziz
parents: 100
diff changeset
739
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
740 class TypeDotIdExpression : Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
741 {
94
0fe650a7a8d1 - Renamed Type enum to InfoType in module Information.
aziz
parents: 89
diff changeset
742 Type type;
243
461e544ebb53 - Added method requireId().
aziz
parents: 242
diff changeset
743 Token* ident;
461e544ebb53 - Added method requireId().
aziz
parents: 242
diff changeset
744 this(Type type, Token* ident)
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
745 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
746 mixin(set_kind);
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
747 this.type = type;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
748 this.ident = ident;
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
749 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
750 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
751
86
0459c902a370 - Added code for parsing Assert-, Mixin-, Import-, Typeid- and TypeDotIdExpressions.
aziz
parents: 85
diff changeset
752 class TypeidExpression : Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
753 {
99
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
754 Type type;
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
755 this(Type type)
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
756 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
757 mixin(set_kind);
99
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
758 this.type = type;
6b8c248f5911 - Added member type to classes CastExpression and TypeidExpression.
aziz
parents: 97
diff changeset
759 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
760 }
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
761
89
18c71269fb52 - Added code for parsing IdentifierExpression.
aziz
parents: 86
diff changeset
762 class IsExpression : Expression
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
763 {
100
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
764 Type type;
253
4279b638c63e - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 252
diff changeset
765 Token* ident;
248
63a15b082c0c - Removed class SpecializationType.
aziz
parents: 243
diff changeset
766 Token* opTok, specTok;
63a15b082c0c - Removed class SpecializationType.
aziz
parents: 243
diff changeset
767 Type specType;
253
4279b638c63e - Changed some string types to Token*. Adapted parser accordingly.
aziz
parents: 252
diff changeset
768 this(Type type, Token* ident, Token* opTok, Token* specTok, Type specType)
100
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
769 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
770 mixin(set_kind);
100
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
771 this.type = type;
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
772 this.ident = ident;
248
63a15b082c0c - Removed class SpecializationType.
aziz
parents: 243
diff changeset
773 this.opTok = opTok;
63a15b082c0c - Removed class SpecializationType.
aziz
parents: 243
diff changeset
774 this.specTok = specTok;
100
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
775 this.specType = specType;
538e8b546669 - Added code for parsing IsExpressions.
aziz
parents: 99
diff changeset
776 }
70
0d3ef6daec04 - Added Expression class stubs.
aziz
parents:
diff changeset
777 }
130
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
778
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
779 class FunctionLiteralExpression : Expression
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
780 {
193
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
781 FunctionType funcType;
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
782 FunctionBody funcBody;
133
3924b1ee1302 - Added code for parsing function and delegate literal expressions.
aziz
parents: 130
diff changeset
783 TOK funcTok;
3924b1ee1302 - Added code for parsing function and delegate literal expressions.
aziz
parents: 130
diff changeset
784
193
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
785 this(FunctionType funcType, FunctionBody funcBody, TOK funcTok = TOK.Invalid)
130
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
786 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
787 mixin(set_kind);
193
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
788 this.funcType = funcType;
2a2975b6d539 - Using parseFunctionBody() when parsing FunctionLiteralExpression.
aziz
parents: 160
diff changeset
789 this.funcBody = funcBody;
133
3924b1ee1302 - Added code for parsing function and delegate literal expressions.
aziz
parents: 130
diff changeset
790 this.funcTok = funcTok;
130
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
791 }
0467f01ed524 - Fix: parameters can have optional identifier.
aziz
parents: 108
diff changeset
792 }
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
793
269
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
794 version(D2)
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
795 {
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
796 class TraitsExpression : Expression
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
797 {
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
798 Token* ident;
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
799 TemplateArguments targs;
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
800 this(typeof(ident) ident, typeof(targs) targs)
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
801 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
802 mixin(set_kind);
269
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
803 this.ident = ident;
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
804 }
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
805 }
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
806 }
a416e09c08ea - Implemented D 2.0 additions.
aziz
parents: 263
diff changeset
807
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
808 class VoidInitializer : Expression
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
809 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
810 this()
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
811 {
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
812 mixin(set_kind);
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
813 }
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
814 }
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
815
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
816 class ArrayInitializer : Expression
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
817 {
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
818 Expression[] keys;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
819 Expression[] values;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
820 this(Expression[] keys, Expression[] values)
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
821 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
822 mixin(set_kind);
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
823 this.keys = keys;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
824 this.values = values;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
825 }
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
826 }
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
827
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
828 class StructInitializer : Expression
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
829 {
263
ebcf7941f1db - Changed some string types to Token*.
aziz
parents: 253
diff changeset
830 Token*[] idents;
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
831 Expression[] values;
263
ebcf7941f1db - Changed some string types to Token*.
aziz
parents: 253
diff changeset
832 this(Token*[] idents, Expression[] values)
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
833 {
276
d6b2f7616ca5 - Added enum NodeKind to classify different nodes in the AST. Correspondingly added member 'kind' to class Node.
aziz
parents: 275
diff changeset
834 mixin(set_kind);
198
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
835 this.idents = idents;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
836 this.values = values;
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
837 }
88c1777a9e51 - Implemented parseInitializer() and parseNonVoidInitializer().
aziz
parents: 193
diff changeset
838 }