1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return function (d, b) {
|
7 | extendStatics(d, b);
|
8 | function __() { this.constructor = d; }
|
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
10 | };
|
11 | })();
|
12 | exports.__esModule = true;
|
13 | var Node = (function () {
|
14 | function Node(type, line, column, start, end, raw) {
|
15 | this.type = type;
|
16 | this.line = line;
|
17 | this.column = column;
|
18 | this.start = start;
|
19 | this.end = end;
|
20 | this.raw = raw;
|
21 | this.parentNode = null;
|
22 | }
|
23 | Node.prototype.getChildren = function () {
|
24 | var children = [];
|
25 | for (var _i = 0, _a = this.getChildFields(); _i < _a.length; _i++) {
|
26 | var childField = _a[_i];
|
27 | if (Array.isArray(childField)) {
|
28 | children.push.apply(children, childField.filter(function (node) { return node !== null; }));
|
29 | }
|
30 | else if (childField) {
|
31 | children.push(childField);
|
32 | }
|
33 | }
|
34 | return children;
|
35 | };
|
36 | Node.prototype.getChildFields = function () {
|
37 | var _this = this;
|
38 | return this.getChildNames().map(function (name) { return _this[name]; });
|
39 | };
|
40 | return Node;
|
41 | }());
|
42 | exports.Node = Node;
|
43 | var Identifier = (function (_super) {
|
44 | __extends(Identifier, _super);
|
45 | function Identifier(line, column, start, end, raw, data) {
|
46 | var _this = _super.call(this, 'Identifier', line, column, start, end, raw) || this;
|
47 | _this.data = data;
|
48 | return _this;
|
49 | }
|
50 | Identifier.prototype.getChildNames = function () {
|
51 | return [];
|
52 | };
|
53 | return Identifier;
|
54 | }(Node));
|
55 | exports.Identifier = Identifier;
|
56 | var Bool = (function (_super) {
|
57 | __extends(Bool, _super);
|
58 | function Bool(line, column, start, end, raw, data) {
|
59 | var _this = _super.call(this, 'Bool', line, column, start, end, raw) || this;
|
60 | _this.data = data;
|
61 | return _this;
|
62 | }
|
63 | Bool["true"] = function () {
|
64 | return new Bool(0, 0, 0, 0, '', true);
|
65 | };
|
66 | Bool["false"] = function () {
|
67 | return new Bool(0, 0, 0, 0, '', false);
|
68 | };
|
69 | Bool.prototype.getChildNames = function () {
|
70 | return [];
|
71 | };
|
72 | return Bool;
|
73 | }(Node));
|
74 | exports.Bool = Bool;
|
75 | var JavaScript = (function (_super) {
|
76 | __extends(JavaScript, _super);
|
77 | function JavaScript(line, column, start, end, raw, data) {
|
78 | var _this = _super.call(this, 'JavaScript', line, column, start, end, raw) || this;
|
79 | _this.data = data;
|
80 | return _this;
|
81 | }
|
82 | JavaScript.prototype.getChildNames = function () {
|
83 | return [];
|
84 | };
|
85 | return JavaScript;
|
86 | }(Node));
|
87 | exports.JavaScript = JavaScript;
|
88 | var Number = (function (_super) {
|
89 | __extends(Number, _super);
|
90 | function Number(type, line, column, start, end, raw, data) {
|
91 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
92 | _this.data = data;
|
93 | return _this;
|
94 | }
|
95 | Number.prototype.getChildNames = function () {
|
96 | return [];
|
97 | };
|
98 | return Number;
|
99 | }(Node));
|
100 | exports.Number = Number;
|
101 | var Float = (function (_super) {
|
102 | __extends(Float, _super);
|
103 | function Float(line, column, start, end, raw, data) {
|
104 | return _super.call(this, 'Float', line, column, start, end, raw, data) || this;
|
105 | }
|
106 | return Float;
|
107 | }(Number));
|
108 | exports.Float = Float;
|
109 | var Int = (function (_super) {
|
110 | __extends(Int, _super);
|
111 | function Int(line, column, start, end, raw, data) {
|
112 | return _super.call(this, 'Int', line, column, start, end, raw, data) || this;
|
113 | }
|
114 | return Int;
|
115 | }(Number));
|
116 | exports.Int = Int;
|
117 | var AccessOp = (function (_super) {
|
118 | __extends(AccessOp, _super);
|
119 | function AccessOp(type, line, column, start, end, raw, expression) {
|
120 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
121 | _this.expression = expression;
|
122 | return _this;
|
123 | }
|
124 | return AccessOp;
|
125 | }(Node));
|
126 | exports.AccessOp = AccessOp;
|
127 | var MemberAccessOp = (function (_super) {
|
128 | __extends(MemberAccessOp, _super);
|
129 | function MemberAccessOp(line, column, start, end, raw, expression, member) {
|
130 | var _this = _super.call(this, 'MemberAccessOp', line, column, start, end, raw, expression) || this;
|
131 | _this.member = member;
|
132 | return _this;
|
133 | }
|
134 | MemberAccessOp.prototype.getChildNames = function () {
|
135 | return ['expression', 'member'];
|
136 | };
|
137 | return MemberAccessOp;
|
138 | }(AccessOp));
|
139 | exports.MemberAccessOp = MemberAccessOp;
|
140 | var ProtoMemberAccessOp = (function (_super) {
|
141 | __extends(ProtoMemberAccessOp, _super);
|
142 | function ProtoMemberAccessOp(line, column, start, end, raw, expression) {
|
143 | return _super.call(this, 'ProtoMemberAccessOp', line, column, start, end, raw, expression) || this;
|
144 | }
|
145 | ProtoMemberAccessOp.prototype.getChildNames = function () {
|
146 | return ['expression'];
|
147 | };
|
148 | return ProtoMemberAccessOp;
|
149 | }(AccessOp));
|
150 | exports.ProtoMemberAccessOp = ProtoMemberAccessOp;
|
151 | var SoakedMemberAccessOp = (function (_super) {
|
152 | __extends(SoakedMemberAccessOp, _super);
|
153 | function SoakedMemberAccessOp(line, column, start, end, raw, expression, member) {
|
154 | var _this = _super.call(this, 'SoakedMemberAccessOp', line, column, start, end, raw, expression) || this;
|
155 | _this.member = member;
|
156 | return _this;
|
157 | }
|
158 | SoakedMemberAccessOp.prototype.getChildNames = function () {
|
159 | return ['expression', 'member'];
|
160 | };
|
161 | return SoakedMemberAccessOp;
|
162 | }(AccessOp));
|
163 | exports.SoakedMemberAccessOp = SoakedMemberAccessOp;
|
164 | var SoakedProtoMemberAccessOp = (function (_super) {
|
165 | __extends(SoakedProtoMemberAccessOp, _super);
|
166 | function SoakedProtoMemberAccessOp(line, column, start, end, raw, expression) {
|
167 | return _super.call(this, 'SoakedProtoMemberAccessOp', line, column, start, end, raw, expression) || this;
|
168 | }
|
169 | SoakedProtoMemberAccessOp.prototype.getChildNames = function () {
|
170 | return ['expression'];
|
171 | };
|
172 | return SoakedProtoMemberAccessOp;
|
173 | }(AccessOp));
|
174 | exports.SoakedProtoMemberAccessOp = SoakedProtoMemberAccessOp;
|
175 | var DynamicMemberAccessOp = (function (_super) {
|
176 | __extends(DynamicMemberAccessOp, _super);
|
177 | function DynamicMemberAccessOp(line, column, start, end, raw, expression, indexingExpr) {
|
178 | var _this = _super.call(this, 'DynamicMemberAccessOp', line, column, start, end, raw, expression) || this;
|
179 | _this.indexingExpr = indexingExpr;
|
180 | return _this;
|
181 | }
|
182 | DynamicMemberAccessOp.prototype.getChildNames = function () {
|
183 | return ['expression', 'indexingExpr'];
|
184 | };
|
185 | return DynamicMemberAccessOp;
|
186 | }(AccessOp));
|
187 | exports.DynamicMemberAccessOp = DynamicMemberAccessOp;
|
188 | var SoakedDynamicMemberAccessOp = (function (_super) {
|
189 | __extends(SoakedDynamicMemberAccessOp, _super);
|
190 | function SoakedDynamicMemberAccessOp(line, column, start, end, raw, expression, indexingExpr) {
|
191 | var _this = _super.call(this, 'SoakedDynamicMemberAccessOp', line, column, start, end, raw, expression) || this;
|
192 | _this.indexingExpr = indexingExpr;
|
193 | return _this;
|
194 | }
|
195 | SoakedDynamicMemberAccessOp.prototype.getChildNames = function () {
|
196 | return ['expression', 'indexingExpr'];
|
197 | };
|
198 | return SoakedDynamicMemberAccessOp;
|
199 | }(AccessOp));
|
200 | exports.SoakedDynamicMemberAccessOp = SoakedDynamicMemberAccessOp;
|
201 | var Quasi = (function (_super) {
|
202 | __extends(Quasi, _super);
|
203 | function Quasi(line, column, start, end, raw, data) {
|
204 | var _this = _super.call(this, 'Quasi', line, column, start, end, raw) || this;
|
205 | _this.data = data;
|
206 | return _this;
|
207 | }
|
208 | Quasi.prototype.getChildNames = function () {
|
209 | return [];
|
210 | };
|
211 | return Quasi;
|
212 | }(Node));
|
213 | exports.Quasi = Quasi;
|
214 | var String = (function (_super) {
|
215 | __extends(String, _super);
|
216 | function String(line, column, start, end, raw, quasis, expressions) {
|
217 | var _this = _super.call(this, 'String', line, column, start, end, raw) || this;
|
218 | _this.quasis = quasis;
|
219 | _this.expressions = expressions;
|
220 | return _this;
|
221 | }
|
222 | String.prototype.getChildNames = function () {
|
223 | return ['quasis', 'expressions'];
|
224 | };
|
225 | return String;
|
226 | }(Node));
|
227 | exports.String = String;
|
228 | var TaggedTemplateLiteral = (function (_super) {
|
229 | __extends(TaggedTemplateLiteral, _super);
|
230 | function TaggedTemplateLiteral(line, column, start, end, raw, tag, template) {
|
231 | var _this = _super.call(this, 'TaggedTemplateLiteral', line, column, start, end, raw) || this;
|
232 | _this.tag = tag;
|
233 | _this.template = template;
|
234 | return _this;
|
235 | }
|
236 | TaggedTemplateLiteral.prototype.getChildNames = function () {
|
237 | return ['tag', 'template'];
|
238 | };
|
239 | return TaggedTemplateLiteral;
|
240 | }(Node));
|
241 | exports.TaggedTemplateLiteral = TaggedTemplateLiteral;
|
242 | var ObjectInitialiser = (function (_super) {
|
243 | __extends(ObjectInitialiser, _super);
|
244 | function ObjectInitialiser(line, column, start, end, raw, members) {
|
245 | var _this = _super.call(this, 'ObjectInitialiser', line, column, start, end, raw) || this;
|
246 | _this.members = members;
|
247 | return _this;
|
248 | }
|
249 | ObjectInitialiser.prototype.getChildNames = function () {
|
250 | return ['members'];
|
251 | };
|
252 | return ObjectInitialiser;
|
253 | }(Node));
|
254 | exports.ObjectInitialiser = ObjectInitialiser;
|
255 | var ObjectInitialiserMember = (function (_super) {
|
256 | __extends(ObjectInitialiserMember, _super);
|
257 | function ObjectInitialiserMember(line, column, start, end, raw, key,
|
258 | // If null, this is a shorthand initializer and the key and value are the same.
|
259 | expression) {
|
260 | var _this = _super.call(this, 'ObjectInitialiserMember', line, column, start, end, raw) || this;
|
261 | _this.key = key;
|
262 | _this.expression = expression;
|
263 | return _this;
|
264 | }
|
265 | ObjectInitialiserMember.prototype.getChildNames = function () {
|
266 | return ['key', 'expression'];
|
267 | };
|
268 | return ObjectInitialiserMember;
|
269 | }(Node));
|
270 | exports.ObjectInitialiserMember = ObjectInitialiserMember;
|
271 | var Conditional = (function (_super) {
|
272 | __extends(Conditional, _super);
|
273 | function Conditional(line, column, start, end, raw, condition, consequent, alternate, isUnless) {
|
274 | var _this = _super.call(this, 'Conditional', line, column, start, end, raw) || this;
|
275 | _this.condition = condition;
|
276 | _this.consequent = consequent;
|
277 | _this.alternate = alternate;
|
278 | _this.isUnless = isUnless;
|
279 | return _this;
|
280 | }
|
281 | Conditional.prototype.getChildNames = function () {
|
282 | return ['condition', 'consequent', 'alternate'];
|
283 | };
|
284 | return Conditional;
|
285 | }(Node));
|
286 | exports.Conditional = Conditional;
|
287 | var Program = (function (_super) {
|
288 | __extends(Program, _super);
|
289 | function Program(line, column, start, end, raw, body, context) {
|
290 | var _this = _super.call(this, 'Program', line, column, start, end, raw) || this;
|
291 | _this.body = body;
|
292 | _this.context = context;
|
293 | return _this;
|
294 | }
|
295 | Program.prototype.getChildNames = function () {
|
296 | return ['body'];
|
297 | };
|
298 | return Program;
|
299 | }(Node));
|
300 | exports.Program = Program;
|
301 | var Block = (function (_super) {
|
302 | __extends(Block, _super);
|
303 | function Block(line, column, start, end, raw, statements, inline) {
|
304 | var _this = _super.call(this, 'Block', line, column, start, end, raw) || this;
|
305 | _this.statements = statements;
|
306 | _this.inline = inline;
|
307 | return _this;
|
308 | }
|
309 | Block.prototype.getChildNames = function () {
|
310 | return ['statements'];
|
311 | };
|
312 | Block.prototype.withInline = function (inline) {
|
313 | return new Block(this.line, this.column, this.start, this.end, this.raw, this.statements, inline);
|
314 | };
|
315 | return Block;
|
316 | }(Node));
|
317 | exports.Block = Block;
|
318 | var Loop = (function (_super) {
|
319 | __extends(Loop, _super);
|
320 | function Loop(line, column, start, end, raw, body) {
|
321 | var _this = _super.call(this, 'Loop', line, column, start, end, raw) || this;
|
322 | _this.body = body;
|
323 | return _this;
|
324 | }
|
325 | Loop.prototype.getChildNames = function () {
|
326 | return ['body'];
|
327 | };
|
328 | return Loop;
|
329 | }(Node));
|
330 | exports.Loop = Loop;
|
331 | var While = (function (_super) {
|
332 | __extends(While, _super);
|
333 | function While(line, column, start, end, raw, condition, guard, body, isUntil) {
|
334 | var _this = _super.call(this, 'While', line, column, start, end, raw) || this;
|
335 | _this.condition = condition;
|
336 | _this.guard = guard;
|
337 | _this.body = body;
|
338 | _this.isUntil = isUntil;
|
339 | return _this;
|
340 | }
|
341 | While.prototype.getChildNames = function () {
|
342 | return ['condition', 'guard', 'body'];
|
343 | };
|
344 | return While;
|
345 | }(Node));
|
346 | exports.While = While;
|
347 | var For = (function (_super) {
|
348 | __extends(For, _super);
|
349 | function For(type, line, column, start, end, raw, keyAssignee, valAssignee, target, filter, body) {
|
350 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
351 | _this.keyAssignee = keyAssignee;
|
352 | _this.valAssignee = valAssignee;
|
353 | _this.target = target;
|
354 | _this.filter = filter;
|
355 | _this.body = body;
|
356 | return _this;
|
357 | }
|
358 | return For;
|
359 | }(Node));
|
360 | exports.For = For;
|
361 | var ForOf = (function (_super) {
|
362 | __extends(ForOf, _super);
|
363 | function ForOf(line, column, start, end, raw, keyAssignee, valAssignee, target, filter, body, isOwn) {
|
364 | var _this = _super.call(this, 'ForOf', line, column, start, end, raw, keyAssignee, valAssignee, target, filter, body) || this;
|
365 | _this.isOwn = isOwn;
|
366 | return _this;
|
367 | }
|
368 | ForOf.prototype.getChildNames = function () {
|
369 | return ['keyAssignee', 'valAssignee', 'target', 'filter', 'body'];
|
370 | };
|
371 | return ForOf;
|
372 | }(For));
|
373 | exports.ForOf = ForOf;
|
374 | var ForIn = (function (_super) {
|
375 | __extends(ForIn, _super);
|
376 | function ForIn(line, column, start, end, raw, keyAssignee, valAssignee, target, filter, body, step) {
|
377 | var _this = _super.call(this, 'ForIn', line, column, start, end, raw, keyAssignee, valAssignee, target, filter, body) || this;
|
378 | _this.step = step;
|
379 | return _this;
|
380 | }
|
381 | ForIn.prototype.getChildNames = function () {
|
382 | return ['keyAssignee', 'valAssignee', 'target', 'step', 'filter', 'body'];
|
383 | };
|
384 | return ForIn;
|
385 | }(For));
|
386 | exports.ForIn = ForIn;
|
387 | var ForFrom = (function (_super) {
|
388 | __extends(ForFrom, _super);
|
389 | function ForFrom(line, column, start, end, raw, valAssignee, target, filter, body) {
|
390 | return _super.call(this, 'ForFrom', line, column, start, end, raw, null , valAssignee, target, filter, body) || this;
|
391 | }
|
392 | ForFrom.prototype.getChildNames = function () {
|
393 | return ['keyAssignee', 'valAssignee', 'target', 'filter', 'body'];
|
394 | };
|
395 | return ForFrom;
|
396 | }(For));
|
397 | exports.ForFrom = ForFrom;
|
398 | var Switch = (function (_super) {
|
399 | __extends(Switch, _super);
|
400 | function Switch(line, column, start, end, raw, expression, cases, alternate) {
|
401 | var _this = _super.call(this, 'Switch', line, column, start, end, raw) || this;
|
402 | _this.expression = expression;
|
403 | _this.cases = cases;
|
404 | _this.alternate = alternate;
|
405 | return _this;
|
406 | }
|
407 | Switch.prototype.getChildNames = function () {
|
408 | return ['expression', 'cases', 'alternate'];
|
409 | };
|
410 | return Switch;
|
411 | }(Node));
|
412 | exports.Switch = Switch;
|
413 | var SwitchCase = (function (_super) {
|
414 | __extends(SwitchCase, _super);
|
415 | function SwitchCase(line, column, start, end, raw, conditions, consequent) {
|
416 | var _this = _super.call(this, 'SwitchCase', line, column, start, end, raw) || this;
|
417 | _this.conditions = conditions;
|
418 | _this.consequent = consequent;
|
419 | return _this;
|
420 | }
|
421 | SwitchCase.prototype.getChildNames = function () {
|
422 | return ['conditions', 'consequent'];
|
423 | };
|
424 | return SwitchCase;
|
425 | }(Node));
|
426 | exports.SwitchCase = SwitchCase;
|
427 | var RegexFlags = (function () {
|
428 | function RegexFlags(global, ignoreCase, multiline, unicode, sticky) {
|
429 | this.global = global;
|
430 | this.ignoreCase = ignoreCase;
|
431 | this.multiline = multiline;
|
432 | this.unicode = unicode;
|
433 | this.sticky = sticky;
|
434 | this.g = global;
|
435 | this.i = ignoreCase;
|
436 | this.m = multiline;
|
437 | this.u = unicode;
|
438 | this.y = sticky;
|
439 | }
|
440 | RegexFlags.parse = function (flags) {
|
441 | var global = false;
|
442 | var ignoreCase = false;
|
443 | var multiline = false;
|
444 | var unicode = false;
|
445 | var sticky = false;
|
446 | for (var i = 0; i < flags.length; i++) {
|
447 | switch (flags.charCodeAt(i)) {
|
448 | case 103:
|
449 | global = true;
|
450 | break;
|
451 | case 105:
|
452 | ignoreCase = true;
|
453 | break;
|
454 | case 109:
|
455 | multiline = true;
|
456 | break;
|
457 | case 117:
|
458 | unicode = true;
|
459 | break;
|
460 | case 121:
|
461 | sticky = true;
|
462 | break;
|
463 | default:
|
464 | throw new Error("invalid regular expression flags: " + flags);
|
465 | }
|
466 | }
|
467 | return new RegexFlags(global, ignoreCase, multiline, unicode, sticky);
|
468 | };
|
469 | return RegexFlags;
|
470 | }());
|
471 | exports.RegexFlags = RegexFlags;
|
472 | var Heregex = (function (_super) {
|
473 | __extends(Heregex, _super);
|
474 | function Heregex(line, column, start, end, raw, quasis, expressions, flags) {
|
475 | var _this = _super.call(this, 'Heregex', line, column, start, end, raw) || this;
|
476 | _this.quasis = quasis;
|
477 | _this.expressions = expressions;
|
478 | _this.flags = flags;
|
479 | return _this;
|
480 | }
|
481 | Heregex.prototype.getChildNames = function () {
|
482 | return ['quasis', 'expressions'];
|
483 | };
|
484 | return Heregex;
|
485 | }(Node));
|
486 | exports.Heregex = Heregex;
|
487 | var Null = (function (_super) {
|
488 | __extends(Null, _super);
|
489 | function Null(line, column, start, end, raw) {
|
490 | return _super.call(this, 'Null', line, column, start, end, raw) || this;
|
491 | }
|
492 | Null.prototype.getChildNames = function () {
|
493 | return [];
|
494 | };
|
495 | return Null;
|
496 | }(Node));
|
497 | exports.Null = Null;
|
498 | var Undefined = (function (_super) {
|
499 | __extends(Undefined, _super);
|
500 | function Undefined(line, column, start, end, raw) {
|
501 | return _super.call(this, 'Undefined', line, column, start, end, raw) || this;
|
502 | }
|
503 | Undefined.prototype.getChildNames = function () {
|
504 | return [];
|
505 | };
|
506 | return Undefined;
|
507 | }(Node));
|
508 | exports.Undefined = Undefined;
|
509 | var Regex = (function (_super) {
|
510 | __extends(Regex, _super);
|
511 | function Regex(line, column, start, end, raw, pattern, flags) {
|
512 | var _this = _super.call(this, 'Regex', line, column, start, end, raw) || this;
|
513 | _this.pattern = pattern;
|
514 | _this.flags = flags;
|
515 | return _this;
|
516 | }
|
517 | Regex.prototype.getChildNames = function () {
|
518 | return [];
|
519 | };
|
520 | return Regex;
|
521 | }(Node));
|
522 | exports.Regex = Regex;
|
523 | var Return = (function (_super) {
|
524 | __extends(Return, _super);
|
525 | function Return(line, column, start, end, raw, expression) {
|
526 | var _this = _super.call(this, 'Return', line, column, start, end, raw) || this;
|
527 | _this.expression = expression;
|
528 | return _this;
|
529 | }
|
530 | Return.prototype.getChildNames = function () {
|
531 | return ['expression'];
|
532 | };
|
533 | return Return;
|
534 | }(Node));
|
535 | exports.Return = Return;
|
536 | var YieldReturn = (function (_super) {
|
537 | __extends(YieldReturn, _super);
|
538 | function YieldReturn(line, column, start, end, raw, expression) {
|
539 | var _this = _super.call(this, 'YieldReturn', line, column, start, end, raw) || this;
|
540 | _this.expression = expression;
|
541 | return _this;
|
542 | }
|
543 | YieldReturn.prototype.getChildNames = function () {
|
544 | return ['expression'];
|
545 | };
|
546 | return YieldReturn;
|
547 | }(Node));
|
548 | exports.YieldReturn = YieldReturn;
|
549 | var This = (function (_super) {
|
550 | __extends(This, _super);
|
551 | function This(line, column, start, end, raw) {
|
552 | return _super.call(this, 'This', line, column, start, end, raw) || this;
|
553 | }
|
554 | This.prototype.getChildNames = function () {
|
555 | return [];
|
556 | };
|
557 | return This;
|
558 | }(Node));
|
559 | exports.This = This;
|
560 | var Throw = (function (_super) {
|
561 | __extends(Throw, _super);
|
562 | function Throw(line, column, start, end, raw, expression) {
|
563 | var _this = _super.call(this, 'Throw', line, column, start, end, raw) || this;
|
564 | _this.expression = expression;
|
565 | return _this;
|
566 | }
|
567 | Throw.prototype.getChildNames = function () {
|
568 | return ['expression'];
|
569 | };
|
570 | return Throw;
|
571 | }(Node));
|
572 | exports.Throw = Throw;
|
573 | var ArrayInitialiser = (function (_super) {
|
574 | __extends(ArrayInitialiser, _super);
|
575 | function ArrayInitialiser(line, column, start, end, raw, members) {
|
576 | var _this = _super.call(this, 'ArrayInitialiser', line, column, start, end, raw) || this;
|
577 | _this.members = members;
|
578 | return _this;
|
579 | }
|
580 | ArrayInitialiser.prototype.getChildNames = function () {
|
581 | return ['members'];
|
582 | };
|
583 | return ArrayInitialiser;
|
584 | }(Node));
|
585 | exports.ArrayInitialiser = ArrayInitialiser;
|
586 | var DefaultParam = (function (_super) {
|
587 | __extends(DefaultParam, _super);
|
588 | function DefaultParam(line, column, start, end, raw, param, defaultValue) {
|
589 | var _this = _super.call(this, 'DefaultParam', line, column, start, end, raw) || this;
|
590 | _this.param = param;
|
591 | _this["default"] = defaultValue;
|
592 | return _this;
|
593 | }
|
594 | DefaultParam.prototype.getChildNames = function () {
|
595 | return ['param', 'default'];
|
596 | };
|
597 | return DefaultParam;
|
598 | }(Node));
|
599 | exports.DefaultParam = DefaultParam;
|
600 | var Rest = (function (_super) {
|
601 | __extends(Rest, _super);
|
602 | function Rest(line, column, start, end, raw, expression) {
|
603 | var _this = _super.call(this, 'Rest', line, column, start, end, raw) || this;
|
604 | _this.expression = expression;
|
605 | return _this;
|
606 | }
|
607 | Rest.prototype.getChildNames = function () {
|
608 | return ['expression'];
|
609 | };
|
610 | return Rest;
|
611 | }(Node));
|
612 | exports.Rest = Rest;
|
613 | var Expansion = (function (_super) {
|
614 | __extends(Expansion, _super);
|
615 | function Expansion(line, column, start, end, raw) {
|
616 | return _super.call(this, 'Expansion', line, column, start, end, raw) || this;
|
617 | }
|
618 | Expansion.prototype.getChildNames = function () {
|
619 | return [];
|
620 | };
|
621 | return Expansion;
|
622 | }(Node));
|
623 | exports.Expansion = Expansion;
|
624 | var Break = (function (_super) {
|
625 | __extends(Break, _super);
|
626 | function Break(line, column, start, end, raw) {
|
627 | return _super.call(this, 'Break', line, column, start, end, raw) || this;
|
628 | }
|
629 | Break.prototype.getChildNames = function () {
|
630 | return [];
|
631 | };
|
632 | return Break;
|
633 | }(Node));
|
634 | exports.Break = Break;
|
635 | var Continue = (function (_super) {
|
636 | __extends(Continue, _super);
|
637 | function Continue(line, column, start, end, raw) {
|
638 | return _super.call(this, 'Continue', line, column, start, end, raw) || this;
|
639 | }
|
640 | Continue.prototype.getChildNames = function () {
|
641 | return [];
|
642 | };
|
643 | return Continue;
|
644 | }(Node));
|
645 | exports.Continue = Continue;
|
646 | var Spread = (function (_super) {
|
647 | __extends(Spread, _super);
|
648 | function Spread(line, column, start, end, raw, expression) {
|
649 | var _this = _super.call(this, 'Spread', line, column, start, end, raw) || this;
|
650 | _this.expression = expression;
|
651 | return _this;
|
652 | }
|
653 | Spread.prototype.getChildNames = function () {
|
654 | return ['expression'];
|
655 | };
|
656 | return Spread;
|
657 | }(Node));
|
658 | exports.Spread = Spread;
|
659 | var Range = (function (_super) {
|
660 | __extends(Range, _super);
|
661 | function Range(line, column, start, end, raw, left, right, isInclusive) {
|
662 | var _this = _super.call(this, 'Range', line, column, start, end, raw) || this;
|
663 | _this.left = left;
|
664 | _this.right = right;
|
665 | _this.isInclusive = isInclusive;
|
666 | return _this;
|
667 | }
|
668 | Range.prototype.getChildNames = function () {
|
669 | return ['left', 'right'];
|
670 | };
|
671 | return Range;
|
672 | }(Node));
|
673 | exports.Range = Range;
|
674 | var BinaryOp = (function (_super) {
|
675 | __extends(BinaryOp, _super);
|
676 | function BinaryOp(type, line, column, start, end, raw, left, right) {
|
677 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
678 | _this.left = left;
|
679 | _this.right = right;
|
680 | return _this;
|
681 | }
|
682 | BinaryOp.prototype.getChildNames = function () {
|
683 | return ['left', 'right'];
|
684 | };
|
685 | return BinaryOp;
|
686 | }(Node));
|
687 | exports.BinaryOp = BinaryOp;
|
688 | var UnaryOp = (function (_super) {
|
689 | __extends(UnaryOp, _super);
|
690 | function UnaryOp(type, line, column, start, end, raw, expression) {
|
691 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
692 | _this.expression = expression;
|
693 | return _this;
|
694 | }
|
695 | UnaryOp.prototype.getChildNames = function () {
|
696 | return ['expression'];
|
697 | };
|
698 | return UnaryOp;
|
699 | }(Node));
|
700 | exports.UnaryOp = UnaryOp;
|
701 | var ChainedComparisonOp = (function (_super) {
|
702 | __extends(ChainedComparisonOp, _super);
|
703 | function ChainedComparisonOp(line, column, start, end, raw, operands, operators) {
|
704 | var _this = _super.call(this, 'ChainedComparisonOp', line, column, start, end, raw) || this;
|
705 | _this.operands = operands;
|
706 | _this.operators = operators;
|
707 | return _this;
|
708 | }
|
709 | ChainedComparisonOp.prototype.getChildNames = function () {
|
710 | return ['operands'];
|
711 | };
|
712 | return ChainedComparisonOp;
|
713 | }(Node));
|
714 | exports.ChainedComparisonOp = ChainedComparisonOp;
|
715 | var OperatorInfo = (function () {
|
716 | function OperatorInfo(operator, token) {
|
717 | this.operator = operator;
|
718 | this.token = token;
|
719 | }
|
720 | return OperatorInfo;
|
721 | }());
|
722 | exports.OperatorInfo = OperatorInfo;
|
723 | var EQOp = (function (_super) {
|
724 | __extends(EQOp, _super);
|
725 | function EQOp(line, column, start, end, raw, left, right) {
|
726 | return _super.call(this, 'EQOp', line, column, start, end, raw, left, right) || this;
|
727 | }
|
728 | return EQOp;
|
729 | }(BinaryOp));
|
730 | exports.EQOp = EQOp;
|
731 | var NEQOp = (function (_super) {
|
732 | __extends(NEQOp, _super);
|
733 | function NEQOp(line, column, start, end, raw, left, right) {
|
734 | return _super.call(this, 'NEQOp', line, column, start, end, raw, left, right) || this;
|
735 | }
|
736 | return NEQOp;
|
737 | }(BinaryOp));
|
738 | exports.NEQOp = NEQOp;
|
739 | var LTOp = (function (_super) {
|
740 | __extends(LTOp, _super);
|
741 | function LTOp(line, column, start, end, raw, left, right) {
|
742 | return _super.call(this, 'LTOp', line, column, start, end, raw, left, right) || this;
|
743 | }
|
744 | return LTOp;
|
745 | }(BinaryOp));
|
746 | exports.LTOp = LTOp;
|
747 | var LTEOp = (function (_super) {
|
748 | __extends(LTEOp, _super);
|
749 | function LTEOp(line, column, start, end, raw, left, right) {
|
750 | return _super.call(this, 'LTEOp', line, column, start, end, raw, left, right) || this;
|
751 | }
|
752 | return LTEOp;
|
753 | }(BinaryOp));
|
754 | exports.LTEOp = LTEOp;
|
755 | var GTOp = (function (_super) {
|
756 | __extends(GTOp, _super);
|
757 | function GTOp(line, column, start, end, raw, left, right) {
|
758 | return _super.call(this, 'GTOp', line, column, start, end, raw, left, right) || this;
|
759 | }
|
760 | return GTOp;
|
761 | }(BinaryOp));
|
762 | exports.GTOp = GTOp;
|
763 | var GTEOp = (function (_super) {
|
764 | __extends(GTEOp, _super);
|
765 | function GTEOp(line, column, start, end, raw, left, right) {
|
766 | return _super.call(this, 'GTEOp', line, column, start, end, raw, left, right) || this;
|
767 | }
|
768 | return GTEOp;
|
769 | }(BinaryOp));
|
770 | exports.GTEOp = GTEOp;
|
771 | var LogicalNotOp = (function (_super) {
|
772 | __extends(LogicalNotOp, _super);
|
773 | function LogicalNotOp(line, column, start, end, raw, expression) {
|
774 | return _super.call(this, 'LogicalNotOp', line, column, start, end, raw, expression) || this;
|
775 | }
|
776 | return LogicalNotOp;
|
777 | }(UnaryOp));
|
778 | exports.LogicalNotOp = LogicalNotOp;
|
779 | var LogicalAndOp = (function (_super) {
|
780 | __extends(LogicalAndOp, _super);
|
781 | function LogicalAndOp(line, column, start, end, raw, left, right) {
|
782 | return _super.call(this, 'LogicalAndOp', line, column, start, end, raw, left, right) || this;
|
783 | }
|
784 | return LogicalAndOp;
|
785 | }(BinaryOp));
|
786 | exports.LogicalAndOp = LogicalAndOp;
|
787 | var LogicalOrOp = (function (_super) {
|
788 | __extends(LogicalOrOp, _super);
|
789 | function LogicalOrOp(line, column, start, end, raw, left, right) {
|
790 | return _super.call(this, 'LogicalOrOp', line, column, start, end, raw, left, right) || this;
|
791 | }
|
792 | return LogicalOrOp;
|
793 | }(BinaryOp));
|
794 | exports.LogicalOrOp = LogicalOrOp;
|
795 | var SubtractOp = (function (_super) {
|
796 | __extends(SubtractOp, _super);
|
797 | function SubtractOp(line, column, start, end, raw, left, right) {
|
798 | return _super.call(this, 'SubtractOp', line, column, start, end, raw, left, right) || this;
|
799 | }
|
800 | return SubtractOp;
|
801 | }(BinaryOp));
|
802 | exports.SubtractOp = SubtractOp;
|
803 | var PlusOp = (function (_super) {
|
804 | __extends(PlusOp, _super);
|
805 | function PlusOp(line, column, start, end, raw, left, right) {
|
806 | return _super.call(this, 'PlusOp', line, column, start, end, raw, left, right) || this;
|
807 | }
|
808 | return PlusOp;
|
809 | }(BinaryOp));
|
810 | exports.PlusOp = PlusOp;
|
811 | var UnaryPlusOp = (function (_super) {
|
812 | __extends(UnaryPlusOp, _super);
|
813 | function UnaryPlusOp(line, column, start, end, raw, expression) {
|
814 | return _super.call(this, 'UnaryPlusOp', line, column, start, end, raw, expression) || this;
|
815 | }
|
816 | return UnaryPlusOp;
|
817 | }(UnaryOp));
|
818 | exports.UnaryPlusOp = UnaryPlusOp;
|
819 | var MultiplyOp = (function (_super) {
|
820 | __extends(MultiplyOp, _super);
|
821 | function MultiplyOp(line, column, start, end, raw, left, right) {
|
822 | return _super.call(this, 'MultiplyOp', line, column, start, end, raw, left, right) || this;
|
823 | }
|
824 | return MultiplyOp;
|
825 | }(BinaryOp));
|
826 | exports.MultiplyOp = MultiplyOp;
|
827 | var DivideOp = (function (_super) {
|
828 | __extends(DivideOp, _super);
|
829 | function DivideOp(line, column, start, end, raw, left, right) {
|
830 | return _super.call(this, 'DivideOp', line, column, start, end, raw, left, right) || this;
|
831 | }
|
832 | return DivideOp;
|
833 | }(BinaryOp));
|
834 | exports.DivideOp = DivideOp;
|
835 | var FloorDivideOp = (function (_super) {
|
836 | __extends(FloorDivideOp, _super);
|
837 | function FloorDivideOp(line, column, start, end, raw, left, right) {
|
838 | return _super.call(this, 'FloorDivideOp', line, column, start, end, raw, left, right) || this;
|
839 | }
|
840 | return FloorDivideOp;
|
841 | }(BinaryOp));
|
842 | exports.FloorDivideOp = FloorDivideOp;
|
843 | var ExistsOp = (function (_super) {
|
844 | __extends(ExistsOp, _super);
|
845 | function ExistsOp(line, column, start, end, raw, left, right) {
|
846 | return _super.call(this, 'ExistsOp', line, column, start, end, raw, left, right) || this;
|
847 | }
|
848 | return ExistsOp;
|
849 | }(BinaryOp));
|
850 | exports.ExistsOp = ExistsOp;
|
851 | var UnaryExistsOp = (function (_super) {
|
852 | __extends(UnaryExistsOp, _super);
|
853 | function UnaryExistsOp(line, column, start, end, raw, expression) {
|
854 | return _super.call(this, 'UnaryExistsOp', line, column, start, end, raw, expression) || this;
|
855 | }
|
856 | return UnaryExistsOp;
|
857 | }(UnaryOp));
|
858 | exports.UnaryExistsOp = UnaryExistsOp;
|
859 | var UnaryNegateOp = (function (_super) {
|
860 | __extends(UnaryNegateOp, _super);
|
861 | function UnaryNegateOp(line, column, start, end, raw, expression) {
|
862 | return _super.call(this, 'UnaryNegateOp', line, column, start, end, raw, expression) || this;
|
863 | }
|
864 | return UnaryNegateOp;
|
865 | }(UnaryOp));
|
866 | exports.UnaryNegateOp = UnaryNegateOp;
|
867 | var BitNotOp = (function (_super) {
|
868 | __extends(BitNotOp, _super);
|
869 | function BitNotOp(line, column, start, end, raw, expression) {
|
870 | return _super.call(this, 'BitNotOp', line, column, start, end, raw, expression) || this;
|
871 | }
|
872 | return BitNotOp;
|
873 | }(UnaryOp));
|
874 | exports.BitNotOp = BitNotOp;
|
875 | var BitAndOp = (function (_super) {
|
876 | __extends(BitAndOp, _super);
|
877 | function BitAndOp(line, column, start, end, raw, left, right) {
|
878 | return _super.call(this, 'BitAndOp', line, column, start, end, raw, left, right) || this;
|
879 | }
|
880 | return BitAndOp;
|
881 | }(BinaryOp));
|
882 | exports.BitAndOp = BitAndOp;
|
883 | var BitOrOp = (function (_super) {
|
884 | __extends(BitOrOp, _super);
|
885 | function BitOrOp(line, column, start, end, raw, left, right) {
|
886 | return _super.call(this, 'BitOrOp', line, column, start, end, raw, left, right) || this;
|
887 | }
|
888 | return BitOrOp;
|
889 | }(BinaryOp));
|
890 | exports.BitOrOp = BitOrOp;
|
891 | var BitXorOp = (function (_super) {
|
892 | __extends(BitXorOp, _super);
|
893 | function BitXorOp(line, column, start, end, raw, left, right) {
|
894 | return _super.call(this, 'BitXorOp', line, column, start, end, raw, left, right) || this;
|
895 | }
|
896 | return BitXorOp;
|
897 | }(BinaryOp));
|
898 | exports.BitXorOp = BitXorOp;
|
899 | var LeftShiftOp = (function (_super) {
|
900 | __extends(LeftShiftOp, _super);
|
901 | function LeftShiftOp(line, column, start, end, raw, left, right) {
|
902 | return _super.call(this, 'LeftShiftOp', line, column, start, end, raw, left, right) || this;
|
903 | }
|
904 | return LeftShiftOp;
|
905 | }(BinaryOp));
|
906 | exports.LeftShiftOp = LeftShiftOp;
|
907 | var SignedRightShiftOp = (function (_super) {
|
908 | __extends(SignedRightShiftOp, _super);
|
909 | function SignedRightShiftOp(line, column, start, end, raw, left, right) {
|
910 | return _super.call(this, 'SignedRightShiftOp', line, column, start, end, raw, left, right) || this;
|
911 | }
|
912 | return SignedRightShiftOp;
|
913 | }(BinaryOp));
|
914 | exports.SignedRightShiftOp = SignedRightShiftOp;
|
915 | var UnsignedRightShiftOp = (function (_super) {
|
916 | __extends(UnsignedRightShiftOp, _super);
|
917 | function UnsignedRightShiftOp(line, column, start, end, raw, left, right) {
|
918 | return _super.call(this, 'UnsignedRightShiftOp', line, column, start, end, raw, left, right) || this;
|
919 | }
|
920 | return UnsignedRightShiftOp;
|
921 | }(BinaryOp));
|
922 | exports.UnsignedRightShiftOp = UnsignedRightShiftOp;
|
923 | var PreDecrementOp = (function (_super) {
|
924 | __extends(PreDecrementOp, _super);
|
925 | function PreDecrementOp(line, column, start, end, raw, expression) {
|
926 | return _super.call(this, 'PreDecrementOp', line, column, start, end, raw, expression) || this;
|
927 | }
|
928 | return PreDecrementOp;
|
929 | }(UnaryOp));
|
930 | exports.PreDecrementOp = PreDecrementOp;
|
931 | var PreIncrementOp = (function (_super) {
|
932 | __extends(PreIncrementOp, _super);
|
933 | function PreIncrementOp(line, column, start, end, raw, expression) {
|
934 | return _super.call(this, 'PreIncrementOp', line, column, start, end, raw, expression) || this;
|
935 | }
|
936 | return PreIncrementOp;
|
937 | }(UnaryOp));
|
938 | exports.PreIncrementOp = PreIncrementOp;
|
939 | var PostDecrementOp = (function (_super) {
|
940 | __extends(PostDecrementOp, _super);
|
941 | function PostDecrementOp(line, column, start, end, raw, expression) {
|
942 | return _super.call(this, 'PostDecrementOp', line, column, start, end, raw, expression) || this;
|
943 | }
|
944 | return PostDecrementOp;
|
945 | }(UnaryOp));
|
946 | exports.PostDecrementOp = PostDecrementOp;
|
947 | var PostIncrementOp = (function (_super) {
|
948 | __extends(PostIncrementOp, _super);
|
949 | function PostIncrementOp(line, column, start, end, raw, expression) {
|
950 | return _super.call(this, 'PostIncrementOp', line, column, start, end, raw, expression) || this;
|
951 | }
|
952 | return PostIncrementOp;
|
953 | }(UnaryOp));
|
954 | exports.PostIncrementOp = PostIncrementOp;
|
955 | var ExpOp = (function (_super) {
|
956 | __extends(ExpOp, _super);
|
957 | function ExpOp(line, column, start, end, raw, left, right) {
|
958 | return _super.call(this, 'ExpOp', line, column, start, end, raw, left, right) || this;
|
959 | }
|
960 | return ExpOp;
|
961 | }(BinaryOp));
|
962 | exports.ExpOp = ExpOp;
|
963 | var RemOp = (function (_super) {
|
964 | __extends(RemOp, _super);
|
965 | function RemOp(line, column, start, end, raw, left, right) {
|
966 | return _super.call(this, 'RemOp', line, column, start, end, raw, left, right) || this;
|
967 | }
|
968 | return RemOp;
|
969 | }(BinaryOp));
|
970 | exports.RemOp = RemOp;
|
971 | var ModuloOp = (function (_super) {
|
972 | __extends(ModuloOp, _super);
|
973 | function ModuloOp(line, column, start, end, raw, left, right) {
|
974 | return _super.call(this, 'ModuloOp', line, column, start, end, raw, left, right) || this;
|
975 | }
|
976 | return ModuloOp;
|
977 | }(BinaryOp));
|
978 | exports.ModuloOp = ModuloOp;
|
979 | var InOp = (function (_super) {
|
980 | __extends(InOp, _super);
|
981 | function InOp(line, column, start, end, raw, left, right, isNot) {
|
982 | var _this = _super.call(this, 'InOp', line, column, start, end, raw, left, right) || this;
|
983 | _this.isNot = isNot;
|
984 | return _this;
|
985 | }
|
986 | return InOp;
|
987 | }(BinaryOp));
|
988 | exports.InOp = InOp;
|
989 | var BaseAssignOp = (function (_super) {
|
990 | __extends(BaseAssignOp, _super);
|
991 | function BaseAssignOp(type, line, column, start, end, raw, assignee, expression) {
|
992 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
993 | _this.assignee = assignee;
|
994 | _this.expression = expression;
|
995 | return _this;
|
996 | }
|
997 | BaseAssignOp.prototype.getChildNames = function () {
|
998 | return ['assignee', 'expression'];
|
999 | };
|
1000 | return BaseAssignOp;
|
1001 | }(Node));
|
1002 | exports.BaseAssignOp = BaseAssignOp;
|
1003 | var AssignOp = (function (_super) {
|
1004 | __extends(AssignOp, _super);
|
1005 | function AssignOp(line, column, start, end, raw, assignee, expression) {
|
1006 | return _super.call(this, 'AssignOp', line, column, start, end, raw, assignee, expression) || this;
|
1007 | }
|
1008 | AssignOp.prototype.withExpression = function (expression) {
|
1009 | return new AssignOp(this.line, this.column, this.start, this.end, this.raw, this.assignee, expression);
|
1010 | };
|
1011 | return AssignOp;
|
1012 | }(BaseAssignOp));
|
1013 | exports.AssignOp = AssignOp;
|
1014 | var CompoundAssignOp = (function (_super) {
|
1015 | __extends(CompoundAssignOp, _super);
|
1016 | function CompoundAssignOp(line, column, start, end, raw, assignee, expression, op) {
|
1017 | var _this = _super.call(this, 'CompoundAssignOp', line, column, start, end, raw, assignee, expression) || this;
|
1018 | _this.op = op;
|
1019 | return _this;
|
1020 | }
|
1021 | return CompoundAssignOp;
|
1022 | }(BaseAssignOp));
|
1023 | exports.CompoundAssignOp = CompoundAssignOp;
|
1024 | var ExtendsOp = (function (_super) {
|
1025 | __extends(ExtendsOp, _super);
|
1026 | function ExtendsOp(line, column, start, end, raw, left, right) {
|
1027 | return _super.call(this, 'ExtendsOp', line, column, start, end, raw, left, right) || this;
|
1028 | }
|
1029 | return ExtendsOp;
|
1030 | }(BinaryOp));
|
1031 | exports.ExtendsOp = ExtendsOp;
|
1032 | var SeqOp = (function (_super) {
|
1033 | __extends(SeqOp, _super);
|
1034 | function SeqOp(line, column, start, end, raw, left, right) {
|
1035 | return _super.call(this, 'SeqOp', line, column, start, end, raw, left, right) || this;
|
1036 | }
|
1037 | return SeqOp;
|
1038 | }(BinaryOp));
|
1039 | exports.SeqOp = SeqOp;
|
1040 | var TypeofOp = (function (_super) {
|
1041 | __extends(TypeofOp, _super);
|
1042 | function TypeofOp(line, column, start, end, raw, expression) {
|
1043 | return _super.call(this, 'TypeofOp', line, column, start, end, raw, expression) || this;
|
1044 | }
|
1045 | return TypeofOp;
|
1046 | }(UnaryOp));
|
1047 | exports.TypeofOp = TypeofOp;
|
1048 | var InstanceofOp = (function (_super) {
|
1049 | __extends(InstanceofOp, _super);
|
1050 | function InstanceofOp(line, column, start, end, raw, left, right, isNot) {
|
1051 | var _this = _super.call(this, 'InstanceofOp', line, column, start, end, raw, left, right) || this;
|
1052 | _this.isNot = isNot;
|
1053 | return _this;
|
1054 | }
|
1055 | return InstanceofOp;
|
1056 | }(BinaryOp));
|
1057 | exports.InstanceofOp = InstanceofOp;
|
1058 | var OfOp = (function (_super) {
|
1059 | __extends(OfOp, _super);
|
1060 | function OfOp(line, column, start, end, raw, left, right, isNot) {
|
1061 | var _this = _super.call(this, 'OfOp', line, column, start, end, raw, left, right) || this;
|
1062 | _this.isNot = isNot;
|
1063 | return _this;
|
1064 | }
|
1065 | return OfOp;
|
1066 | }(BinaryOp));
|
1067 | exports.OfOp = OfOp;
|
1068 | var DeleteOp = (function (_super) {
|
1069 | __extends(DeleteOp, _super);
|
1070 | function DeleteOp(line, column, start, end, raw, expression) {
|
1071 | return _super.call(this, 'DeleteOp', line, column, start, end, raw, expression) || this;
|
1072 | }
|
1073 | return DeleteOp;
|
1074 | }(UnaryOp));
|
1075 | exports.DeleteOp = DeleteOp;
|
1076 | var Yield = (function (_super) {
|
1077 | __extends(Yield, _super);
|
1078 | function Yield(line, column, start, end, raw, expression) {
|
1079 | var _this = _super.call(this, 'Yield', line, column, start, end, raw) || this;
|
1080 | _this.expression = expression;
|
1081 | return _this;
|
1082 | }
|
1083 | Yield.prototype.getChildNames = function () {
|
1084 | return ['expression'];
|
1085 | };
|
1086 | return Yield;
|
1087 | }(Node));
|
1088 | exports.Yield = Yield;
|
1089 | var YieldFrom = (function (_super) {
|
1090 | __extends(YieldFrom, _super);
|
1091 | function YieldFrom(line, column, start, end, raw, expression) {
|
1092 | var _this = _super.call(this, 'YieldFrom', line, column, start, end, raw) || this;
|
1093 | _this.expression = expression;
|
1094 | return _this;
|
1095 | }
|
1096 | YieldFrom.prototype.getChildNames = function () {
|
1097 | return ['expression'];
|
1098 | };
|
1099 | return YieldFrom;
|
1100 | }(Node));
|
1101 | exports.YieldFrom = YieldFrom;
|
1102 | var Slice = (function (_super) {
|
1103 | __extends(Slice, _super);
|
1104 | function Slice(line, column, start, end, raw, expression, left, right, isInclusive) {
|
1105 | var _this = _super.call(this, 'Slice', line, column, start, end, raw) || this;
|
1106 | _this.expression = expression;
|
1107 | _this.left = left;
|
1108 | _this.right = right;
|
1109 | _this.isInclusive = isInclusive;
|
1110 | return _this;
|
1111 | }
|
1112 | Slice.prototype.getChildNames = function () {
|
1113 | return ['expression', 'left', 'right'];
|
1114 | };
|
1115 | return Slice;
|
1116 | }(Node));
|
1117 | exports.Slice = Slice;
|
1118 | var SoakedSlice = (function (_super) {
|
1119 | __extends(SoakedSlice, _super);
|
1120 | function SoakedSlice(line, column, start, end, raw, expression, left, right, isInclusive) {
|
1121 | var _this = _super.call(this, 'SoakedSlice', line, column, start, end, raw) || this;
|
1122 | _this.expression = expression;
|
1123 | _this.left = left;
|
1124 | _this.right = right;
|
1125 | _this.isInclusive = isInclusive;
|
1126 | return _this;
|
1127 | }
|
1128 | SoakedSlice.prototype.getChildNames = function () {
|
1129 | return ['expression', 'left', 'right'];
|
1130 | };
|
1131 | return SoakedSlice;
|
1132 | }(Node));
|
1133 | exports.SoakedSlice = SoakedSlice;
|
1134 | var BaseFunction = (function (_super) {
|
1135 | __extends(BaseFunction, _super);
|
1136 | function BaseFunction(type, line, column, start, end, raw, parameters, body) {
|
1137 | var _this = _super.call(this, type, line, column, start, end, raw) || this;
|
1138 | _this.parameters = parameters;
|
1139 | _this.body = body;
|
1140 | return _this;
|
1141 | }
|
1142 | BaseFunction.prototype.getChildNames = function () {
|
1143 | return ['parameters', 'body'];
|
1144 | };
|
1145 | return BaseFunction;
|
1146 | }(Node));
|
1147 | exports.BaseFunction = BaseFunction;
|
1148 | var Function = (function (_super) {
|
1149 | __extends(Function, _super);
|
1150 | function Function(line, column, start, end, raw, parameters, body) {
|
1151 | return _super.call(this, 'Function', line, column, start, end, raw, parameters, body) || this;
|
1152 | }
|
1153 | Function.prototype.withParameters = function (parameters) {
|
1154 | return new Function(this.line, this.column, this.start, this.end, this.raw, parameters, this.body);
|
1155 | };
|
1156 | return Function;
|
1157 | }(BaseFunction));
|
1158 | exports.Function = Function;
|
1159 | var BoundFunction = (function (_super) {
|
1160 | __extends(BoundFunction, _super);
|
1161 | function BoundFunction(line, column, start, end, raw, parameters, body) {
|
1162 | return _super.call(this, 'BoundFunction', line, column, start, end, raw, parameters, body) || this;
|
1163 | }
|
1164 | BoundFunction.prototype.withParameters = function (parameters) {
|
1165 | return new BoundFunction(this.line, this.column, this.start, this.end, this.raw, parameters, this.body);
|
1166 | };
|
1167 | return BoundFunction;
|
1168 | }(BaseFunction));
|
1169 | exports.BoundFunction = BoundFunction;
|
1170 | var GeneratorFunction = (function (_super) {
|
1171 | __extends(GeneratorFunction, _super);
|
1172 | function GeneratorFunction(line, column, start, end, raw, parameters, body) {
|
1173 | return _super.call(this, 'GeneratorFunction', line, column, start, end, raw, parameters, body) || this;
|
1174 | }
|
1175 | GeneratorFunction.prototype.withParameters = function (parameters) {
|
1176 | return new GeneratorFunction(this.line, this.column, this.start, this.end, this.raw, parameters, this.body);
|
1177 | };
|
1178 | return GeneratorFunction;
|
1179 | }(BaseFunction));
|
1180 | exports.GeneratorFunction = GeneratorFunction;
|
1181 | var BoundGeneratorFunction = (function (_super) {
|
1182 | __extends(BoundGeneratorFunction, _super);
|
1183 | function BoundGeneratorFunction(line, column, start, end, raw, parameters, body) {
|
1184 | return _super.call(this, 'BoundGeneratorFunction', line, column, start, end, raw, parameters, body) || this;
|
1185 | }
|
1186 | BoundGeneratorFunction.prototype.withParameters = function (parameters) {
|
1187 | return new BoundGeneratorFunction(this.line, this.column, this.start, this.end, this.raw, parameters, this.body);
|
1188 | };
|
1189 | return BoundGeneratorFunction;
|
1190 | }(BaseFunction));
|
1191 | exports.BoundGeneratorFunction = BoundGeneratorFunction;
|
1192 | var Try = (function (_super) {
|
1193 | __extends(Try, _super);
|
1194 | function Try(line, column, start, end, raw, body, catchAssignee, catchBody, finallyBody) {
|
1195 | var _this = _super.call(this, 'Try', line, column, start, end, raw) || this;
|
1196 | _this.body = body;
|
1197 | _this.catchAssignee = catchAssignee;
|
1198 | _this.catchBody = catchBody;
|
1199 | _this.finallyBody = finallyBody;
|
1200 | return _this;
|
1201 | }
|
1202 | Try.prototype.getChildNames = function () {
|
1203 | return ['body', 'catchAssignee', 'catchBody', 'finallyBody'];
|
1204 | };
|
1205 | return Try;
|
1206 | }(Node));
|
1207 | exports.Try = Try;
|
1208 | var Constructor = (function (_super) {
|
1209 | __extends(Constructor, _super);
|
1210 | function Constructor(line, column, start, end, raw, assignee, expression) {
|
1211 | return _super.call(this, 'Constructor', line, column, start, end, raw, assignee, expression) || this;
|
1212 | }
|
1213 | return Constructor;
|
1214 | }(BaseAssignOp));
|
1215 | exports.Constructor = Constructor;
|
1216 | var ClassProtoAssignOp = (function (_super) {
|
1217 | __extends(ClassProtoAssignOp, _super);
|
1218 | function ClassProtoAssignOp(line, column, start, end, raw, assignee, expression) {
|
1219 | return _super.call(this, 'ClassProtoAssignOp', line, column, start, end, raw, assignee, expression) || this;
|
1220 | }
|
1221 | return ClassProtoAssignOp;
|
1222 | }(BaseAssignOp));
|
1223 | exports.ClassProtoAssignOp = ClassProtoAssignOp;
|
1224 | var Class = (function (_super) {
|
1225 | __extends(Class, _super);
|
1226 | function Class(line, column, start, end, raw, nameAssignee, name, body, boundMembers, parent, ctor) {
|
1227 | var _this = _super.call(this, 'Class', line, column, start, end, raw) || this;
|
1228 | _this.nameAssignee = nameAssignee;
|
1229 | _this.name = name;
|
1230 | _this.body = body;
|
1231 | _this.boundMembers = boundMembers;
|
1232 | _this.parent = parent;
|
1233 | _this.ctor = ctor;
|
1234 | return _this;
|
1235 | }
|
1236 | Class.prototype.getChildNames = function () {
|
1237 | return ['nameAssignee', 'parent', 'body'];
|
1238 | };
|
1239 | return Class;
|
1240 | }(Node));
|
1241 | exports.Class = Class;
|
1242 | var FunctionApplication = (function (_super) {
|
1243 | __extends(FunctionApplication, _super);
|
1244 | function FunctionApplication(line, column, start, end, raw, fn, args) {
|
1245 | var _this = _super.call(this, 'FunctionApplication', line, column, start, end, raw) || this;
|
1246 | _this["function"] = fn;
|
1247 | _this.arguments = args;
|
1248 | return _this;
|
1249 | }
|
1250 | FunctionApplication.prototype.getChildNames = function () {
|
1251 | return ['function', 'arguments'];
|
1252 | };
|
1253 | return FunctionApplication;
|
1254 | }(Node));
|
1255 | exports.FunctionApplication = FunctionApplication;
|
1256 | var SoakedFunctionApplication = (function (_super) {
|
1257 | __extends(SoakedFunctionApplication, _super);
|
1258 | function SoakedFunctionApplication(line, column, start, end, raw, fn, args) {
|
1259 | var _this = _super.call(this, 'SoakedFunctionApplication', line, column, start, end, raw) || this;
|
1260 | _this["function"] = fn;
|
1261 | _this.arguments = args;
|
1262 | return _this;
|
1263 | }
|
1264 | SoakedFunctionApplication.prototype.getChildNames = function () {
|
1265 | return ['function', 'arguments'];
|
1266 | };
|
1267 | return SoakedFunctionApplication;
|
1268 | }(Node));
|
1269 | exports.SoakedFunctionApplication = SoakedFunctionApplication;
|
1270 | var Super = (function (_super) {
|
1271 | __extends(Super, _super);
|
1272 | function Super(line, column, start, end, raw) {
|
1273 | return _super.call(this, 'Super', line, column, start, end, raw) || this;
|
1274 | }
|
1275 | Super.prototype.getChildNames = function () {
|
1276 | return [];
|
1277 | };
|
1278 | return Super;
|
1279 | }(Node));
|
1280 | exports.Super = Super;
|
1281 | var BareSuperFunctionApplication = (function (_super) {
|
1282 | __extends(BareSuperFunctionApplication, _super);
|
1283 | function BareSuperFunctionApplication(line, column, start, end, raw) {
|
1284 | return _super.call(this, 'BareSuperFunctionApplication', line, column, start, end, raw) || this;
|
1285 | }
|
1286 | BareSuperFunctionApplication.prototype.getChildNames = function () {
|
1287 | return [];
|
1288 | };
|
1289 | return BareSuperFunctionApplication;
|
1290 | }(Node));
|
1291 | exports.BareSuperFunctionApplication = BareSuperFunctionApplication;
|
1292 | var NewOp = (function (_super) {
|
1293 | __extends(NewOp, _super);
|
1294 | function NewOp(line, column, start, end, raw, ctor, args) {
|
1295 | var _this = _super.call(this, 'NewOp', line, column, start, end, raw) || this;
|
1296 | _this.ctor = ctor;
|
1297 | _this.arguments = args;
|
1298 | return _this;
|
1299 | }
|
1300 | NewOp.prototype.getChildNames = function () {
|
1301 | return ['ctor', 'arguments'];
|
1302 | };
|
1303 | return NewOp;
|
1304 | }(Node));
|
1305 | exports.NewOp = NewOp;
|
1306 | var SoakedNewOp = (function (_super) {
|
1307 | __extends(SoakedNewOp, _super);
|
1308 | function SoakedNewOp(line, column, start, end, raw, ctor, args) {
|
1309 | var _this = _super.call(this, 'SoakedNewOp', line, column, start, end, raw) || this;
|
1310 | _this.ctor = ctor;
|
1311 | _this.arguments = args;
|
1312 | return _this;
|
1313 | }
|
1314 | SoakedNewOp.prototype.getChildNames = function () {
|
1315 | return ['ctor', 'arguments'];
|
1316 | };
|
1317 | return SoakedNewOp;
|
1318 | }(Node));
|
1319 | exports.SoakedNewOp = SoakedNewOp;
|
1320 | var DoOp = (function (_super) {
|
1321 | __extends(DoOp, _super);
|
1322 | function DoOp(line, column, start, end, raw, expression) {
|
1323 | var _this = _super.call(this, 'DoOp', line, column, start, end, raw) || this;
|
1324 | _this.expression = expression;
|
1325 | return _this;
|
1326 | }
|
1327 | DoOp.prototype.getChildNames = function () {
|
1328 | return ['expression'];
|
1329 | };
|
1330 | return DoOp;
|
1331 | }(Node));
|
1332 | exports.DoOp = DoOp;
|
1333 | var ImportDeclaration = (function (_super) {
|
1334 | __extends(ImportDeclaration, _super);
|
1335 | function ImportDeclaration(line, column, start, end, raw, defaultBinding, namespaceImport, namedImports, source) {
|
1336 | var _this = _super.call(this, 'ImportDeclaration', line, column, start, end, raw) || this;
|
1337 | _this.defaultBinding = defaultBinding;
|
1338 | _this.namespaceImport = namespaceImport;
|
1339 | _this.namedImports = namedImports;
|
1340 | _this.source = source;
|
1341 | return _this;
|
1342 | }
|
1343 | ImportDeclaration.prototype.getChildNames = function () {
|
1344 | return ['defaultBinding', 'namespaceImport', 'namedImports', 'source'];
|
1345 | };
|
1346 | return ImportDeclaration;
|
1347 | }(Node));
|
1348 | exports.ImportDeclaration = ImportDeclaration;
|
1349 | var ExportNamedDeclaration = (function (_super) {
|
1350 | __extends(ExportNamedDeclaration, _super);
|
1351 | function ExportNamedDeclaration(line, column, start, end, raw,
|
1352 | // This may be an assignment to an identifier, or it could be another binding expression like a class.
|
1353 | expression) {
|
1354 | var _this = _super.call(this, 'ExportNamedDeclaration', line, column, start, end, raw) || this;
|
1355 | _this.expression = expression;
|
1356 | return _this;
|
1357 | }
|
1358 | ExportNamedDeclaration.prototype.getChildNames = function () {
|
1359 | return ['expression'];
|
1360 | };
|
1361 | return ExportNamedDeclaration;
|
1362 | }(Node));
|
1363 | exports.ExportNamedDeclaration = ExportNamedDeclaration;
|
1364 | var ExportBindingsDeclaration = (function (_super) {
|
1365 | __extends(ExportBindingsDeclaration, _super);
|
1366 | function ExportBindingsDeclaration(line, column, start, end, raw, namedExports, source) {
|
1367 | var _this = _super.call(this, 'ExportBindingsDeclaration', line, column, start, end, raw) || this;
|
1368 | _this.namedExports = namedExports;
|
1369 | _this.source = source;
|
1370 | return _this;
|
1371 | }
|
1372 | ExportBindingsDeclaration.prototype.getChildNames = function () {
|
1373 | return ['namedExports', 'source'];
|
1374 | };
|
1375 | return ExportBindingsDeclaration;
|
1376 | }(Node));
|
1377 | exports.ExportBindingsDeclaration = ExportBindingsDeclaration;
|
1378 | var ExportDefaultDeclaration = (function (_super) {
|
1379 | __extends(ExportDefaultDeclaration, _super);
|
1380 | function ExportDefaultDeclaration(line, column, start, end, raw, expression) {
|
1381 | var _this = _super.call(this, 'ExportDefaultDeclaration', line, column, start, end, raw) || this;
|
1382 | _this.expression = expression;
|
1383 | return _this;
|
1384 | }
|
1385 | ExportDefaultDeclaration.prototype.getChildNames = function () {
|
1386 | return ['expression'];
|
1387 | };
|
1388 | return ExportDefaultDeclaration;
|
1389 | }(Node));
|
1390 | exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
|
1391 | var ExportAllDeclaration = (function (_super) {
|
1392 | __extends(ExportAllDeclaration, _super);
|
1393 | function ExportAllDeclaration(line, column, start, end, raw, source) {
|
1394 | var _this = _super.call(this, 'ExportAllDeclaration', line, column, start, end, raw) || this;
|
1395 | _this.source = source;
|
1396 | return _this;
|
1397 | }
|
1398 | ExportAllDeclaration.prototype.getChildNames = function () {
|
1399 | return ['source'];
|
1400 | };
|
1401 | return ExportAllDeclaration;
|
1402 | }(Node));
|
1403 | exports.ExportAllDeclaration = ExportAllDeclaration;
|
1404 | var ModuleSpecifier = (function (_super) {
|
1405 | __extends(ModuleSpecifier, _super);
|
1406 | function ModuleSpecifier(line, column, start, end, raw, original, alias) {
|
1407 | var _this = _super.call(this, 'ModuleSpecifier', line, column, start, end, raw) || this;
|
1408 | _this.original = original;
|
1409 | _this.alias = alias;
|
1410 | return _this;
|
1411 | }
|
1412 | ModuleSpecifier.prototype.getChildNames = function () {
|
1413 | return ['original', 'alias'];
|
1414 | };
|
1415 | return ModuleSpecifier;
|
1416 | }(Node));
|
1417 | exports.ModuleSpecifier = ModuleSpecifier;
|