1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | //// Types
|
---|
9 | export var TypeModifier;
|
---|
10 | (function (TypeModifier) {
|
---|
11 | TypeModifier[TypeModifier["Const"] = 0] = "Const";
|
---|
12 | })(TypeModifier || (TypeModifier = {}));
|
---|
13 | export class Type {
|
---|
14 | constructor(modifiers = []) {
|
---|
15 | this.modifiers = modifiers;
|
---|
16 | }
|
---|
17 | hasModifier(modifier) {
|
---|
18 | return this.modifiers.indexOf(modifier) !== -1;
|
---|
19 | }
|
---|
20 | }
|
---|
21 | export var BuiltinTypeName;
|
---|
22 | (function (BuiltinTypeName) {
|
---|
23 | BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic";
|
---|
24 | BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool";
|
---|
25 | BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String";
|
---|
26 | BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int";
|
---|
27 | BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number";
|
---|
28 | BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function";
|
---|
29 | BuiltinTypeName[BuiltinTypeName["Inferred"] = 6] = "Inferred";
|
---|
30 | BuiltinTypeName[BuiltinTypeName["None"] = 7] = "None";
|
---|
31 | })(BuiltinTypeName || (BuiltinTypeName = {}));
|
---|
32 | export class BuiltinType extends Type {
|
---|
33 | constructor(name, modifiers) {
|
---|
34 | super(modifiers);
|
---|
35 | this.name = name;
|
---|
36 | }
|
---|
37 | visitType(visitor, context) {
|
---|
38 | return visitor.visitBuiltinType(this, context);
|
---|
39 | }
|
---|
40 | }
|
---|
41 | export class ExpressionType extends Type {
|
---|
42 | constructor(value, modifiers, typeParams = null) {
|
---|
43 | super(modifiers);
|
---|
44 | this.value = value;
|
---|
45 | this.typeParams = typeParams;
|
---|
46 | }
|
---|
47 | visitType(visitor, context) {
|
---|
48 | return visitor.visitExpressionType(this, context);
|
---|
49 | }
|
---|
50 | }
|
---|
51 | export class ArrayType extends Type {
|
---|
52 | constructor(of, modifiers) {
|
---|
53 | super(modifiers);
|
---|
54 | this.of = of;
|
---|
55 | }
|
---|
56 | visitType(visitor, context) {
|
---|
57 | return visitor.visitArrayType(this, context);
|
---|
58 | }
|
---|
59 | }
|
---|
60 | export class MapType extends Type {
|
---|
61 | constructor(valueType, modifiers) {
|
---|
62 | super(modifiers);
|
---|
63 | this.valueType = valueType || null;
|
---|
64 | }
|
---|
65 | visitType(visitor, context) {
|
---|
66 | return visitor.visitMapType(this, context);
|
---|
67 | }
|
---|
68 | }
|
---|
69 | export const DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);
|
---|
70 | export const INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);
|
---|
71 | export const BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);
|
---|
72 | export const INT_TYPE = new BuiltinType(BuiltinTypeName.Int);
|
---|
73 | export const NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);
|
---|
74 | export const STRING_TYPE = new BuiltinType(BuiltinTypeName.String);
|
---|
75 | export const FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);
|
---|
76 | export const NONE_TYPE = new BuiltinType(BuiltinTypeName.None);
|
---|
77 | ///// Expressions
|
---|
78 | export var UnaryOperator;
|
---|
79 | (function (UnaryOperator) {
|
---|
80 | UnaryOperator[UnaryOperator["Minus"] = 0] = "Minus";
|
---|
81 | UnaryOperator[UnaryOperator["Plus"] = 1] = "Plus";
|
---|
82 | })(UnaryOperator || (UnaryOperator = {}));
|
---|
83 | export var BinaryOperator;
|
---|
84 | (function (BinaryOperator) {
|
---|
85 | BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals";
|
---|
86 | BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals";
|
---|
87 | BinaryOperator[BinaryOperator["Identical"] = 2] = "Identical";
|
---|
88 | BinaryOperator[BinaryOperator["NotIdentical"] = 3] = "NotIdentical";
|
---|
89 | BinaryOperator[BinaryOperator["Minus"] = 4] = "Minus";
|
---|
90 | BinaryOperator[BinaryOperator["Plus"] = 5] = "Plus";
|
---|
91 | BinaryOperator[BinaryOperator["Divide"] = 6] = "Divide";
|
---|
92 | BinaryOperator[BinaryOperator["Multiply"] = 7] = "Multiply";
|
---|
93 | BinaryOperator[BinaryOperator["Modulo"] = 8] = "Modulo";
|
---|
94 | BinaryOperator[BinaryOperator["And"] = 9] = "And";
|
---|
95 | BinaryOperator[BinaryOperator["Or"] = 10] = "Or";
|
---|
96 | BinaryOperator[BinaryOperator["BitwiseAnd"] = 11] = "BitwiseAnd";
|
---|
97 | BinaryOperator[BinaryOperator["Lower"] = 12] = "Lower";
|
---|
98 | BinaryOperator[BinaryOperator["LowerEquals"] = 13] = "LowerEquals";
|
---|
99 | BinaryOperator[BinaryOperator["Bigger"] = 14] = "Bigger";
|
---|
100 | BinaryOperator[BinaryOperator["BiggerEquals"] = 15] = "BiggerEquals";
|
---|
101 | BinaryOperator[BinaryOperator["NullishCoalesce"] = 16] = "NullishCoalesce";
|
---|
102 | })(BinaryOperator || (BinaryOperator = {}));
|
---|
103 | export function nullSafeIsEquivalent(base, other) {
|
---|
104 | if (base == null || other == null) {
|
---|
105 | return base == other;
|
---|
106 | }
|
---|
107 | return base.isEquivalent(other);
|
---|
108 | }
|
---|
109 | function areAllEquivalentPredicate(base, other, equivalentPredicate) {
|
---|
110 | const len = base.length;
|
---|
111 | if (len !== other.length) {
|
---|
112 | return false;
|
---|
113 | }
|
---|
114 | for (let i = 0; i < len; i++) {
|
---|
115 | if (!equivalentPredicate(base[i], other[i])) {
|
---|
116 | return false;
|
---|
117 | }
|
---|
118 | }
|
---|
119 | return true;
|
---|
120 | }
|
---|
121 | export function areAllEquivalent(base, other) {
|
---|
122 | return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement));
|
---|
123 | }
|
---|
124 | export class Expression {
|
---|
125 | constructor(type, sourceSpan) {
|
---|
126 | this.type = type || null;
|
---|
127 | this.sourceSpan = sourceSpan || null;
|
---|
128 | }
|
---|
129 | prop(name, sourceSpan) {
|
---|
130 | return new ReadPropExpr(this, name, null, sourceSpan);
|
---|
131 | }
|
---|
132 | key(index, type, sourceSpan) {
|
---|
133 | return new ReadKeyExpr(this, index, type, sourceSpan);
|
---|
134 | }
|
---|
135 | callMethod(name, params, sourceSpan) {
|
---|
136 | return new InvokeMethodExpr(this, name, params, null, sourceSpan);
|
---|
137 | }
|
---|
138 | callFn(params, sourceSpan, pure) {
|
---|
139 | return new InvokeFunctionExpr(this, params, null, sourceSpan, pure);
|
---|
140 | }
|
---|
141 | instantiate(params, type, sourceSpan) {
|
---|
142 | return new InstantiateExpr(this, params, type, sourceSpan);
|
---|
143 | }
|
---|
144 | conditional(trueCase, falseCase = null, sourceSpan) {
|
---|
145 | return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);
|
---|
146 | }
|
---|
147 | equals(rhs, sourceSpan) {
|
---|
148 | return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);
|
---|
149 | }
|
---|
150 | notEquals(rhs, sourceSpan) {
|
---|
151 | return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);
|
---|
152 | }
|
---|
153 | identical(rhs, sourceSpan) {
|
---|
154 | return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);
|
---|
155 | }
|
---|
156 | notIdentical(rhs, sourceSpan) {
|
---|
157 | return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);
|
---|
158 | }
|
---|
159 | minus(rhs, sourceSpan) {
|
---|
160 | return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);
|
---|
161 | }
|
---|
162 | plus(rhs, sourceSpan) {
|
---|
163 | return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);
|
---|
164 | }
|
---|
165 | divide(rhs, sourceSpan) {
|
---|
166 | return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);
|
---|
167 | }
|
---|
168 | multiply(rhs, sourceSpan) {
|
---|
169 | return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);
|
---|
170 | }
|
---|
171 | modulo(rhs, sourceSpan) {
|
---|
172 | return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);
|
---|
173 | }
|
---|
174 | and(rhs, sourceSpan) {
|
---|
175 | return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);
|
---|
176 | }
|
---|
177 | bitwiseAnd(rhs, sourceSpan, parens = true) {
|
---|
178 | return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);
|
---|
179 | }
|
---|
180 | or(rhs, sourceSpan) {
|
---|
181 | return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);
|
---|
182 | }
|
---|
183 | lower(rhs, sourceSpan) {
|
---|
184 | return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);
|
---|
185 | }
|
---|
186 | lowerEquals(rhs, sourceSpan) {
|
---|
187 | return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);
|
---|
188 | }
|
---|
189 | bigger(rhs, sourceSpan) {
|
---|
190 | return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);
|
---|
191 | }
|
---|
192 | biggerEquals(rhs, sourceSpan) {
|
---|
193 | return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);
|
---|
194 | }
|
---|
195 | isBlank(sourceSpan) {
|
---|
196 | // Note: We use equals by purpose here to compare to null and undefined in JS.
|
---|
197 | // We use the typed null to allow strictNullChecks to narrow types.
|
---|
198 | return this.equals(TYPED_NULL_EXPR, sourceSpan);
|
---|
199 | }
|
---|
200 | cast(type, sourceSpan) {
|
---|
201 | return new CastExpr(this, type, sourceSpan);
|
---|
202 | }
|
---|
203 | nullishCoalesce(rhs, sourceSpan) {
|
---|
204 | return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan);
|
---|
205 | }
|
---|
206 | toStmt() {
|
---|
207 | return new ExpressionStatement(this, null);
|
---|
208 | }
|
---|
209 | }
|
---|
210 | export var BuiltinVar;
|
---|
211 | (function (BuiltinVar) {
|
---|
212 | BuiltinVar[BuiltinVar["This"] = 0] = "This";
|
---|
213 | BuiltinVar[BuiltinVar["Super"] = 1] = "Super";
|
---|
214 | BuiltinVar[BuiltinVar["CatchError"] = 2] = "CatchError";
|
---|
215 | BuiltinVar[BuiltinVar["CatchStack"] = 3] = "CatchStack";
|
---|
216 | })(BuiltinVar || (BuiltinVar = {}));
|
---|
217 | export class ReadVarExpr extends Expression {
|
---|
218 | constructor(name, type, sourceSpan) {
|
---|
219 | super(type, sourceSpan);
|
---|
220 | if (typeof name === 'string') {
|
---|
221 | this.name = name;
|
---|
222 | this.builtin = null;
|
---|
223 | }
|
---|
224 | else {
|
---|
225 | this.name = null;
|
---|
226 | this.builtin = name;
|
---|
227 | }
|
---|
228 | }
|
---|
229 | isEquivalent(e) {
|
---|
230 | return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;
|
---|
231 | }
|
---|
232 | isConstant() {
|
---|
233 | return false;
|
---|
234 | }
|
---|
235 | visitExpression(visitor, context) {
|
---|
236 | return visitor.visitReadVarExpr(this, context);
|
---|
237 | }
|
---|
238 | set(value) {
|
---|
239 | if (!this.name) {
|
---|
240 | throw new Error(`Built in variable ${this.builtin} can not be assigned to.`);
|
---|
241 | }
|
---|
242 | return new WriteVarExpr(this.name, value, null, this.sourceSpan);
|
---|
243 | }
|
---|
244 | }
|
---|
245 | export class TypeofExpr extends Expression {
|
---|
246 | constructor(expr, type, sourceSpan) {
|
---|
247 | super(type, sourceSpan);
|
---|
248 | this.expr = expr;
|
---|
249 | }
|
---|
250 | visitExpression(visitor, context) {
|
---|
251 | return visitor.visitTypeofExpr(this, context);
|
---|
252 | }
|
---|
253 | isEquivalent(e) {
|
---|
254 | return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr);
|
---|
255 | }
|
---|
256 | isConstant() {
|
---|
257 | return this.expr.isConstant();
|
---|
258 | }
|
---|
259 | }
|
---|
260 | export class WrappedNodeExpr extends Expression {
|
---|
261 | constructor(node, type, sourceSpan) {
|
---|
262 | super(type, sourceSpan);
|
---|
263 | this.node = node;
|
---|
264 | }
|
---|
265 | isEquivalent(e) {
|
---|
266 | return e instanceof WrappedNodeExpr && this.node === e.node;
|
---|
267 | }
|
---|
268 | isConstant() {
|
---|
269 | return false;
|
---|
270 | }
|
---|
271 | visitExpression(visitor, context) {
|
---|
272 | return visitor.visitWrappedNodeExpr(this, context);
|
---|
273 | }
|
---|
274 | }
|
---|
275 | export class WriteVarExpr extends Expression {
|
---|
276 | constructor(name, value, type, sourceSpan) {
|
---|
277 | super(type || value.type, sourceSpan);
|
---|
278 | this.name = name;
|
---|
279 | this.value = value;
|
---|
280 | }
|
---|
281 | isEquivalent(e) {
|
---|
282 | return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);
|
---|
283 | }
|
---|
284 | isConstant() {
|
---|
285 | return false;
|
---|
286 | }
|
---|
287 | visitExpression(visitor, context) {
|
---|
288 | return visitor.visitWriteVarExpr(this, context);
|
---|
289 | }
|
---|
290 | toDeclStmt(type, modifiers) {
|
---|
291 | return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);
|
---|
292 | }
|
---|
293 | toConstDecl() {
|
---|
294 | return this.toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);
|
---|
295 | }
|
---|
296 | }
|
---|
297 | export class WriteKeyExpr extends Expression {
|
---|
298 | constructor(receiver, index, value, type, sourceSpan) {
|
---|
299 | super(type || value.type, sourceSpan);
|
---|
300 | this.receiver = receiver;
|
---|
301 | this.index = index;
|
---|
302 | this.value = value;
|
---|
303 | }
|
---|
304 | isEquivalent(e) {
|
---|
305 | return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&
|
---|
306 | this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);
|
---|
307 | }
|
---|
308 | isConstant() {
|
---|
309 | return false;
|
---|
310 | }
|
---|
311 | visitExpression(visitor, context) {
|
---|
312 | return visitor.visitWriteKeyExpr(this, context);
|
---|
313 | }
|
---|
314 | }
|
---|
315 | export class WritePropExpr extends Expression {
|
---|
316 | constructor(receiver, name, value, type, sourceSpan) {
|
---|
317 | super(type || value.type, sourceSpan);
|
---|
318 | this.receiver = receiver;
|
---|
319 | this.name = name;
|
---|
320 | this.value = value;
|
---|
321 | }
|
---|
322 | isEquivalent(e) {
|
---|
323 | return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&
|
---|
324 | this.name === e.name && this.value.isEquivalent(e.value);
|
---|
325 | }
|
---|
326 | isConstant() {
|
---|
327 | return false;
|
---|
328 | }
|
---|
329 | visitExpression(visitor, context) {
|
---|
330 | return visitor.visitWritePropExpr(this, context);
|
---|
331 | }
|
---|
332 | }
|
---|
333 | export var BuiltinMethod;
|
---|
334 | (function (BuiltinMethod) {
|
---|
335 | BuiltinMethod[BuiltinMethod["ConcatArray"] = 0] = "ConcatArray";
|
---|
336 | BuiltinMethod[BuiltinMethod["SubscribeObservable"] = 1] = "SubscribeObservable";
|
---|
337 | BuiltinMethod[BuiltinMethod["Bind"] = 2] = "Bind";
|
---|
338 | })(BuiltinMethod || (BuiltinMethod = {}));
|
---|
339 | export class InvokeMethodExpr extends Expression {
|
---|
340 | constructor(receiver, method, args, type, sourceSpan) {
|
---|
341 | super(type, sourceSpan);
|
---|
342 | this.receiver = receiver;
|
---|
343 | this.args = args;
|
---|
344 | if (typeof method === 'string') {
|
---|
345 | this.name = method;
|
---|
346 | this.builtin = null;
|
---|
347 | }
|
---|
348 | else {
|
---|
349 | this.name = null;
|
---|
350 | this.builtin = method;
|
---|
351 | }
|
---|
352 | }
|
---|
353 | isEquivalent(e) {
|
---|
354 | return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&
|
---|
355 | this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);
|
---|
356 | }
|
---|
357 | isConstant() {
|
---|
358 | return false;
|
---|
359 | }
|
---|
360 | visitExpression(visitor, context) {
|
---|
361 | return visitor.visitInvokeMethodExpr(this, context);
|
---|
362 | }
|
---|
363 | }
|
---|
364 | export class InvokeFunctionExpr extends Expression {
|
---|
365 | constructor(fn, args, type, sourceSpan, pure = false) {
|
---|
366 | super(type, sourceSpan);
|
---|
367 | this.fn = fn;
|
---|
368 | this.args = args;
|
---|
369 | this.pure = pure;
|
---|
370 | }
|
---|
371 | isEquivalent(e) {
|
---|
372 | return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&
|
---|
373 | areAllEquivalent(this.args, e.args) && this.pure === e.pure;
|
---|
374 | }
|
---|
375 | isConstant() {
|
---|
376 | return false;
|
---|
377 | }
|
---|
378 | visitExpression(visitor, context) {
|
---|
379 | return visitor.visitInvokeFunctionExpr(this, context);
|
---|
380 | }
|
---|
381 | }
|
---|
382 | export class TaggedTemplateExpr extends Expression {
|
---|
383 | constructor(tag, template, type, sourceSpan) {
|
---|
384 | super(type, sourceSpan);
|
---|
385 | this.tag = tag;
|
---|
386 | this.template = template;
|
---|
387 | }
|
---|
388 | isEquivalent(e) {
|
---|
389 | return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) &&
|
---|
390 | areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) &&
|
---|
391 | areAllEquivalent(this.template.expressions, e.template.expressions);
|
---|
392 | }
|
---|
393 | isConstant() {
|
---|
394 | return false;
|
---|
395 | }
|
---|
396 | visitExpression(visitor, context) {
|
---|
397 | return visitor.visitTaggedTemplateExpr(this, context);
|
---|
398 | }
|
---|
399 | }
|
---|
400 | export class InstantiateExpr extends Expression {
|
---|
401 | constructor(classExpr, args, type, sourceSpan) {
|
---|
402 | super(type, sourceSpan);
|
---|
403 | this.classExpr = classExpr;
|
---|
404 | this.args = args;
|
---|
405 | }
|
---|
406 | isEquivalent(e) {
|
---|
407 | return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&
|
---|
408 | areAllEquivalent(this.args, e.args);
|
---|
409 | }
|
---|
410 | isConstant() {
|
---|
411 | return false;
|
---|
412 | }
|
---|
413 | visitExpression(visitor, context) {
|
---|
414 | return visitor.visitInstantiateExpr(this, context);
|
---|
415 | }
|
---|
416 | }
|
---|
417 | export class LiteralExpr extends Expression {
|
---|
418 | constructor(value, type, sourceSpan) {
|
---|
419 | super(type, sourceSpan);
|
---|
420 | this.value = value;
|
---|
421 | }
|
---|
422 | isEquivalent(e) {
|
---|
423 | return e instanceof LiteralExpr && this.value === e.value;
|
---|
424 | }
|
---|
425 | isConstant() {
|
---|
426 | return true;
|
---|
427 | }
|
---|
428 | visitExpression(visitor, context) {
|
---|
429 | return visitor.visitLiteralExpr(this, context);
|
---|
430 | }
|
---|
431 | }
|
---|
432 | export class TemplateLiteral {
|
---|
433 | constructor(elements, expressions) {
|
---|
434 | this.elements = elements;
|
---|
435 | this.expressions = expressions;
|
---|
436 | }
|
---|
437 | }
|
---|
438 | export class TemplateLiteralElement {
|
---|
439 | constructor(text, sourceSpan, rawText) {
|
---|
440 | var _a;
|
---|
441 | this.text = text;
|
---|
442 | this.sourceSpan = sourceSpan;
|
---|
443 | // If `rawText` is not provided, try to extract the raw string from its
|
---|
444 | // associated `sourceSpan`. If that is also not available, "fake" the raw
|
---|
445 | // string instead by escaping the following control sequences:
|
---|
446 | // - "\" would otherwise indicate that the next character is a control character.
|
---|
447 | // - "`" and "${" are template string control sequences that would otherwise prematurely
|
---|
448 | // indicate the end of the template literal element.
|
---|
449 | this.rawText =
|
---|
450 | (_a = rawText !== null && rawText !== void 0 ? rawText : sourceSpan === null || sourceSpan === void 0 ? void 0 : sourceSpan.toString()) !== null && _a !== void 0 ? _a : escapeForTemplateLiteral(escapeSlashes(text));
|
---|
451 | }
|
---|
452 | }
|
---|
453 | export class MessagePiece {
|
---|
454 | constructor(text, sourceSpan) {
|
---|
455 | this.text = text;
|
---|
456 | this.sourceSpan = sourceSpan;
|
---|
457 | }
|
---|
458 | }
|
---|
459 | export class LiteralPiece extends MessagePiece {
|
---|
460 | }
|
---|
461 | export class PlaceholderPiece extends MessagePiece {
|
---|
462 | }
|
---|
463 | export class LocalizedString extends Expression {
|
---|
464 | constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) {
|
---|
465 | super(STRING_TYPE, sourceSpan);
|
---|
466 | this.metaBlock = metaBlock;
|
---|
467 | this.messageParts = messageParts;
|
---|
468 | this.placeHolderNames = placeHolderNames;
|
---|
469 | this.expressions = expressions;
|
---|
470 | }
|
---|
471 | isEquivalent(e) {
|
---|
472 | // return e instanceof LocalizedString && this.message === e.message;
|
---|
473 | return false;
|
---|
474 | }
|
---|
475 | isConstant() {
|
---|
476 | return false;
|
---|
477 | }
|
---|
478 | visitExpression(visitor, context) {
|
---|
479 | return visitor.visitLocalizedString(this, context);
|
---|
480 | }
|
---|
481 | /**
|
---|
482 | * Serialize the given `meta` and `messagePart` into "cooked" and "raw" strings that can be used
|
---|
483 | * in a `$localize` tagged string. The format of the metadata is the same as that parsed by
|
---|
484 | * `parseI18nMeta()`.
|
---|
485 | *
|
---|
486 | * @param meta The metadata to serialize
|
---|
487 | * @param messagePart The first part of the tagged string
|
---|
488 | */
|
---|
489 | serializeI18nHead() {
|
---|
490 | const MEANING_SEPARATOR = '|';
|
---|
491 | const ID_SEPARATOR = '@@';
|
---|
492 | const LEGACY_ID_INDICATOR = '␟';
|
---|
493 | let metaBlock = this.metaBlock.description || '';
|
---|
494 | if (this.metaBlock.meaning) {
|
---|
495 | metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR}${metaBlock}`;
|
---|
496 | }
|
---|
497 | if (this.metaBlock.customId) {
|
---|
498 | metaBlock = `${metaBlock}${ID_SEPARATOR}${this.metaBlock.customId}`;
|
---|
499 | }
|
---|
500 | if (this.metaBlock.legacyIds) {
|
---|
501 | this.metaBlock.legacyIds.forEach(legacyId => {
|
---|
502 | metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`;
|
---|
503 | });
|
---|
504 | }
|
---|
505 | return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0));
|
---|
506 | }
|
---|
507 | getMessagePartSourceSpan(i) {
|
---|
508 | var _a, _b;
|
---|
509 | return (_b = (_a = this.messageParts[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : this.sourceSpan;
|
---|
510 | }
|
---|
511 | getPlaceholderSourceSpan(i) {
|
---|
512 | var _a, _b, _c, _d;
|
---|
513 | return (_d = (_b = (_a = this.placeHolderNames[i]) === null || _a === void 0 ? void 0 : _a.sourceSpan) !== null && _b !== void 0 ? _b : (_c = this.expressions[i]) === null || _c === void 0 ? void 0 : _c.sourceSpan) !== null && _d !== void 0 ? _d : this.sourceSpan;
|
---|
514 | }
|
---|
515 | /**
|
---|
516 | * Serialize the given `placeholderName` and `messagePart` into "cooked" and "raw" strings that
|
---|
517 | * can be used in a `$localize` tagged string.
|
---|
518 | *
|
---|
519 | * @param placeholderName The placeholder name to serialize
|
---|
520 | * @param messagePart The following message string after this placeholder
|
---|
521 | */
|
---|
522 | serializeI18nTemplatePart(partIndex) {
|
---|
523 | const placeholderName = this.placeHolderNames[partIndex - 1].text;
|
---|
524 | const messagePart = this.messageParts[partIndex];
|
---|
525 | return createCookedRawString(placeholderName, messagePart.text, this.getMessagePartSourceSpan(partIndex));
|
---|
526 | }
|
---|
527 | }
|
---|
528 | const escapeSlashes = (str) => str.replace(/\\/g, '\\\\');
|
---|
529 | const escapeStartingColon = (str) => str.replace(/^:/, '\\:');
|
---|
530 | const escapeColons = (str) => str.replace(/:/g, '\\:');
|
---|
531 | const escapeForTemplateLiteral = (str) => str.replace(/`/g, '\\`').replace(/\${/g, '$\\{');
|
---|
532 | /**
|
---|
533 | * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`.
|
---|
534 | *
|
---|
535 | * The `raw` text must have various character sequences escaped:
|
---|
536 | * * "\" would otherwise indicate that the next character is a control character.
|
---|
537 | * * "`" and "${" are template string control sequences that would otherwise prematurely indicate
|
---|
538 | * the end of a message part.
|
---|
539 | * * ":" inside a metablock would prematurely indicate the end of the metablock.
|
---|
540 | * * ":" at the start of a messagePart with no metablock would erroneously indicate the start of a
|
---|
541 | * metablock.
|
---|
542 | *
|
---|
543 | * @param metaBlock Any metadata that should be prepended to the string
|
---|
544 | * @param messagePart The message part of the string
|
---|
545 | */
|
---|
546 | function createCookedRawString(metaBlock, messagePart, range) {
|
---|
547 | if (metaBlock === '') {
|
---|
548 | return {
|
---|
549 | cooked: messagePart,
|
---|
550 | raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))),
|
---|
551 | range,
|
---|
552 | };
|
---|
553 | }
|
---|
554 | else {
|
---|
555 | return {
|
---|
556 | cooked: `:${metaBlock}:${messagePart}`,
|
---|
557 | raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`),
|
---|
558 | range,
|
---|
559 | };
|
---|
560 | }
|
---|
561 | }
|
---|
562 | export class ExternalExpr extends Expression {
|
---|
563 | constructor(value, type, typeParams = null, sourceSpan) {
|
---|
564 | super(type, sourceSpan);
|
---|
565 | this.value = value;
|
---|
566 | this.typeParams = typeParams;
|
---|
567 | }
|
---|
568 | isEquivalent(e) {
|
---|
569 | return e instanceof ExternalExpr && this.value.name === e.value.name &&
|
---|
570 | this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;
|
---|
571 | }
|
---|
572 | isConstant() {
|
---|
573 | return false;
|
---|
574 | }
|
---|
575 | visitExpression(visitor, context) {
|
---|
576 | return visitor.visitExternalExpr(this, context);
|
---|
577 | }
|
---|
578 | }
|
---|
579 | export class ExternalReference {
|
---|
580 | constructor(moduleName, name, runtime) {
|
---|
581 | this.moduleName = moduleName;
|
---|
582 | this.name = name;
|
---|
583 | this.runtime = runtime;
|
---|
584 | }
|
---|
585 | }
|
---|
586 | export class ConditionalExpr extends Expression {
|
---|
587 | constructor(condition, trueCase, falseCase = null, type, sourceSpan) {
|
---|
588 | super(type || trueCase.type, sourceSpan);
|
---|
589 | this.condition = condition;
|
---|
590 | this.falseCase = falseCase;
|
---|
591 | this.trueCase = trueCase;
|
---|
592 | }
|
---|
593 | isEquivalent(e) {
|
---|
594 | return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&
|
---|
595 | this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);
|
---|
596 | }
|
---|
597 | isConstant() {
|
---|
598 | return false;
|
---|
599 | }
|
---|
600 | visitExpression(visitor, context) {
|
---|
601 | return visitor.visitConditionalExpr(this, context);
|
---|
602 | }
|
---|
603 | }
|
---|
604 | export class NotExpr extends Expression {
|
---|
605 | constructor(condition, sourceSpan) {
|
---|
606 | super(BOOL_TYPE, sourceSpan);
|
---|
607 | this.condition = condition;
|
---|
608 | }
|
---|
609 | isEquivalent(e) {
|
---|
610 | return e instanceof NotExpr && this.condition.isEquivalent(e.condition);
|
---|
611 | }
|
---|
612 | isConstant() {
|
---|
613 | return false;
|
---|
614 | }
|
---|
615 | visitExpression(visitor, context) {
|
---|
616 | return visitor.visitNotExpr(this, context);
|
---|
617 | }
|
---|
618 | }
|
---|
619 | export class AssertNotNull extends Expression {
|
---|
620 | constructor(condition, sourceSpan) {
|
---|
621 | super(condition.type, sourceSpan);
|
---|
622 | this.condition = condition;
|
---|
623 | }
|
---|
624 | isEquivalent(e) {
|
---|
625 | return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);
|
---|
626 | }
|
---|
627 | isConstant() {
|
---|
628 | return false;
|
---|
629 | }
|
---|
630 | visitExpression(visitor, context) {
|
---|
631 | return visitor.visitAssertNotNullExpr(this, context);
|
---|
632 | }
|
---|
633 | }
|
---|
634 | export class CastExpr extends Expression {
|
---|
635 | constructor(value, type, sourceSpan) {
|
---|
636 | super(type, sourceSpan);
|
---|
637 | this.value = value;
|
---|
638 | }
|
---|
639 | isEquivalent(e) {
|
---|
640 | return e instanceof CastExpr && this.value.isEquivalent(e.value);
|
---|
641 | }
|
---|
642 | isConstant() {
|
---|
643 | return false;
|
---|
644 | }
|
---|
645 | visitExpression(visitor, context) {
|
---|
646 | return visitor.visitCastExpr(this, context);
|
---|
647 | }
|
---|
648 | }
|
---|
649 | export class FnParam {
|
---|
650 | constructor(name, type = null) {
|
---|
651 | this.name = name;
|
---|
652 | this.type = type;
|
---|
653 | }
|
---|
654 | isEquivalent(param) {
|
---|
655 | return this.name === param.name;
|
---|
656 | }
|
---|
657 | }
|
---|
658 | export class FunctionExpr extends Expression {
|
---|
659 | constructor(params, statements, type, sourceSpan, name) {
|
---|
660 | super(type, sourceSpan);
|
---|
661 | this.params = params;
|
---|
662 | this.statements = statements;
|
---|
663 | this.name = name;
|
---|
664 | }
|
---|
665 | isEquivalent(e) {
|
---|
666 | return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&
|
---|
667 | areAllEquivalent(this.statements, e.statements);
|
---|
668 | }
|
---|
669 | isConstant() {
|
---|
670 | return false;
|
---|
671 | }
|
---|
672 | visitExpression(visitor, context) {
|
---|
673 | return visitor.visitFunctionExpr(this, context);
|
---|
674 | }
|
---|
675 | toDeclStmt(name, modifiers) {
|
---|
676 | return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);
|
---|
677 | }
|
---|
678 | }
|
---|
679 | export class UnaryOperatorExpr extends Expression {
|
---|
680 | constructor(operator, expr, type, sourceSpan, parens = true) {
|
---|
681 | super(type || NUMBER_TYPE, sourceSpan);
|
---|
682 | this.operator = operator;
|
---|
683 | this.expr = expr;
|
---|
684 | this.parens = parens;
|
---|
685 | }
|
---|
686 | isEquivalent(e) {
|
---|
687 | return e instanceof UnaryOperatorExpr && this.operator === e.operator &&
|
---|
688 | this.expr.isEquivalent(e.expr);
|
---|
689 | }
|
---|
690 | isConstant() {
|
---|
691 | return false;
|
---|
692 | }
|
---|
693 | visitExpression(visitor, context) {
|
---|
694 | return visitor.visitUnaryOperatorExpr(this, context);
|
---|
695 | }
|
---|
696 | }
|
---|
697 | export class BinaryOperatorExpr extends Expression {
|
---|
698 | constructor(operator, lhs, rhs, type, sourceSpan, parens = true) {
|
---|
699 | super(type || lhs.type, sourceSpan);
|
---|
700 | this.operator = operator;
|
---|
701 | this.rhs = rhs;
|
---|
702 | this.parens = parens;
|
---|
703 | this.lhs = lhs;
|
---|
704 | }
|
---|
705 | isEquivalent(e) {
|
---|
706 | return e instanceof BinaryOperatorExpr && this.operator === e.operator &&
|
---|
707 | this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);
|
---|
708 | }
|
---|
709 | isConstant() {
|
---|
710 | return false;
|
---|
711 | }
|
---|
712 | visitExpression(visitor, context) {
|
---|
713 | return visitor.visitBinaryOperatorExpr(this, context);
|
---|
714 | }
|
---|
715 | }
|
---|
716 | export class ReadPropExpr extends Expression {
|
---|
717 | constructor(receiver, name, type, sourceSpan) {
|
---|
718 | super(type, sourceSpan);
|
---|
719 | this.receiver = receiver;
|
---|
720 | this.name = name;
|
---|
721 | }
|
---|
722 | isEquivalent(e) {
|
---|
723 | return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&
|
---|
724 | this.name === e.name;
|
---|
725 | }
|
---|
726 | isConstant() {
|
---|
727 | return false;
|
---|
728 | }
|
---|
729 | visitExpression(visitor, context) {
|
---|
730 | return visitor.visitReadPropExpr(this, context);
|
---|
731 | }
|
---|
732 | set(value) {
|
---|
733 | return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);
|
---|
734 | }
|
---|
735 | }
|
---|
736 | export class ReadKeyExpr extends Expression {
|
---|
737 | constructor(receiver, index, type, sourceSpan) {
|
---|
738 | super(type, sourceSpan);
|
---|
739 | this.receiver = receiver;
|
---|
740 | this.index = index;
|
---|
741 | }
|
---|
742 | isEquivalent(e) {
|
---|
743 | return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&
|
---|
744 | this.index.isEquivalent(e.index);
|
---|
745 | }
|
---|
746 | isConstant() {
|
---|
747 | return false;
|
---|
748 | }
|
---|
749 | visitExpression(visitor, context) {
|
---|
750 | return visitor.visitReadKeyExpr(this, context);
|
---|
751 | }
|
---|
752 | set(value) {
|
---|
753 | return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);
|
---|
754 | }
|
---|
755 | }
|
---|
756 | export class LiteralArrayExpr extends Expression {
|
---|
757 | constructor(entries, type, sourceSpan) {
|
---|
758 | super(type, sourceSpan);
|
---|
759 | this.entries = entries;
|
---|
760 | }
|
---|
761 | isConstant() {
|
---|
762 | return this.entries.every(e => e.isConstant());
|
---|
763 | }
|
---|
764 | isEquivalent(e) {
|
---|
765 | return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);
|
---|
766 | }
|
---|
767 | visitExpression(visitor, context) {
|
---|
768 | return visitor.visitLiteralArrayExpr(this, context);
|
---|
769 | }
|
---|
770 | }
|
---|
771 | export class LiteralMapEntry {
|
---|
772 | constructor(key, value, quoted) {
|
---|
773 | this.key = key;
|
---|
774 | this.value = value;
|
---|
775 | this.quoted = quoted;
|
---|
776 | }
|
---|
777 | isEquivalent(e) {
|
---|
778 | return this.key === e.key && this.value.isEquivalent(e.value);
|
---|
779 | }
|
---|
780 | }
|
---|
781 | export class LiteralMapExpr extends Expression {
|
---|
782 | constructor(entries, type, sourceSpan) {
|
---|
783 | super(type, sourceSpan);
|
---|
784 | this.entries = entries;
|
---|
785 | this.valueType = null;
|
---|
786 | if (type) {
|
---|
787 | this.valueType = type.valueType;
|
---|
788 | }
|
---|
789 | }
|
---|
790 | isEquivalent(e) {
|
---|
791 | return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);
|
---|
792 | }
|
---|
793 | isConstant() {
|
---|
794 | return this.entries.every(e => e.value.isConstant());
|
---|
795 | }
|
---|
796 | visitExpression(visitor, context) {
|
---|
797 | return visitor.visitLiteralMapExpr(this, context);
|
---|
798 | }
|
---|
799 | }
|
---|
800 | export class CommaExpr extends Expression {
|
---|
801 | constructor(parts, sourceSpan) {
|
---|
802 | super(parts[parts.length - 1].type, sourceSpan);
|
---|
803 | this.parts = parts;
|
---|
804 | }
|
---|
805 | isEquivalent(e) {
|
---|
806 | return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);
|
---|
807 | }
|
---|
808 | isConstant() {
|
---|
809 | return false;
|
---|
810 | }
|
---|
811 | visitExpression(visitor, context) {
|
---|
812 | return visitor.visitCommaExpr(this, context);
|
---|
813 | }
|
---|
814 | }
|
---|
815 | export const THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);
|
---|
816 | export const SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);
|
---|
817 | export const CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);
|
---|
818 | export const CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);
|
---|
819 | export const NULL_EXPR = new LiteralExpr(null, null, null);
|
---|
820 | export const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);
|
---|
821 | //// Statements
|
---|
822 | export var StmtModifier;
|
---|
823 | (function (StmtModifier) {
|
---|
824 | StmtModifier[StmtModifier["Final"] = 0] = "Final";
|
---|
825 | StmtModifier[StmtModifier["Private"] = 1] = "Private";
|
---|
826 | StmtModifier[StmtModifier["Exported"] = 2] = "Exported";
|
---|
827 | StmtModifier[StmtModifier["Static"] = 3] = "Static";
|
---|
828 | })(StmtModifier || (StmtModifier = {}));
|
---|
829 | export class LeadingComment {
|
---|
830 | constructor(text, multiline, trailingNewline) {
|
---|
831 | this.text = text;
|
---|
832 | this.multiline = multiline;
|
---|
833 | this.trailingNewline = trailingNewline;
|
---|
834 | }
|
---|
835 | toString() {
|
---|
836 | return this.multiline ? ` ${this.text} ` : this.text;
|
---|
837 | }
|
---|
838 | }
|
---|
839 | export class JSDocComment extends LeadingComment {
|
---|
840 | constructor(tags) {
|
---|
841 | super('', /* multiline */ true, /* trailingNewline */ true);
|
---|
842 | this.tags = tags;
|
---|
843 | }
|
---|
844 | toString() {
|
---|
845 | return serializeTags(this.tags);
|
---|
846 | }
|
---|
847 | }
|
---|
848 | export class Statement {
|
---|
849 | constructor(modifiers = [], sourceSpan = null, leadingComments) {
|
---|
850 | this.modifiers = modifiers;
|
---|
851 | this.sourceSpan = sourceSpan;
|
---|
852 | this.leadingComments = leadingComments;
|
---|
853 | }
|
---|
854 | hasModifier(modifier) {
|
---|
855 | return this.modifiers.indexOf(modifier) !== -1;
|
---|
856 | }
|
---|
857 | addLeadingComment(leadingComment) {
|
---|
858 | var _a;
|
---|
859 | this.leadingComments = (_a = this.leadingComments) !== null && _a !== void 0 ? _a : [];
|
---|
860 | this.leadingComments.push(leadingComment);
|
---|
861 | }
|
---|
862 | }
|
---|
863 | export class DeclareVarStmt extends Statement {
|
---|
864 | constructor(name, value, type, modifiers, sourceSpan, leadingComments) {
|
---|
865 | super(modifiers, sourceSpan, leadingComments);
|
---|
866 | this.name = name;
|
---|
867 | this.value = value;
|
---|
868 | this.type = type || (value && value.type) || null;
|
---|
869 | }
|
---|
870 | isEquivalent(stmt) {
|
---|
871 | return stmt instanceof DeclareVarStmt && this.name === stmt.name &&
|
---|
872 | (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);
|
---|
873 | }
|
---|
874 | visitStatement(visitor, context) {
|
---|
875 | return visitor.visitDeclareVarStmt(this, context);
|
---|
876 | }
|
---|
877 | }
|
---|
878 | export class DeclareFunctionStmt extends Statement {
|
---|
879 | constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) {
|
---|
880 | super(modifiers, sourceSpan, leadingComments);
|
---|
881 | this.name = name;
|
---|
882 | this.params = params;
|
---|
883 | this.statements = statements;
|
---|
884 | this.type = type || null;
|
---|
885 | }
|
---|
886 | isEquivalent(stmt) {
|
---|
887 | return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&
|
---|
888 | areAllEquivalent(this.statements, stmt.statements);
|
---|
889 | }
|
---|
890 | visitStatement(visitor, context) {
|
---|
891 | return visitor.visitDeclareFunctionStmt(this, context);
|
---|
892 | }
|
---|
893 | }
|
---|
894 | export class ExpressionStatement extends Statement {
|
---|
895 | constructor(expr, sourceSpan, leadingComments) {
|
---|
896 | super([], sourceSpan, leadingComments);
|
---|
897 | this.expr = expr;
|
---|
898 | }
|
---|
899 | isEquivalent(stmt) {
|
---|
900 | return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);
|
---|
901 | }
|
---|
902 | visitStatement(visitor, context) {
|
---|
903 | return visitor.visitExpressionStmt(this, context);
|
---|
904 | }
|
---|
905 | }
|
---|
906 | export class ReturnStatement extends Statement {
|
---|
907 | constructor(value, sourceSpan = null, leadingComments) {
|
---|
908 | super([], sourceSpan, leadingComments);
|
---|
909 | this.value = value;
|
---|
910 | }
|
---|
911 | isEquivalent(stmt) {
|
---|
912 | return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);
|
---|
913 | }
|
---|
914 | visitStatement(visitor, context) {
|
---|
915 | return visitor.visitReturnStmt(this, context);
|
---|
916 | }
|
---|
917 | }
|
---|
918 | export class AbstractClassPart {
|
---|
919 | constructor(type = null, modifiers = []) {
|
---|
920 | this.type = type;
|
---|
921 | this.modifiers = modifiers;
|
---|
922 | }
|
---|
923 | hasModifier(modifier) {
|
---|
924 | return this.modifiers.indexOf(modifier) !== -1;
|
---|
925 | }
|
---|
926 | }
|
---|
927 | export class ClassField extends AbstractClassPart {
|
---|
928 | constructor(name, type, modifiers, initializer) {
|
---|
929 | super(type, modifiers);
|
---|
930 | this.name = name;
|
---|
931 | this.initializer = initializer;
|
---|
932 | }
|
---|
933 | isEquivalent(f) {
|
---|
934 | return this.name === f.name;
|
---|
935 | }
|
---|
936 | }
|
---|
937 | export class ClassMethod extends AbstractClassPart {
|
---|
938 | constructor(name, params, body, type, modifiers) {
|
---|
939 | super(type, modifiers);
|
---|
940 | this.name = name;
|
---|
941 | this.params = params;
|
---|
942 | this.body = body;
|
---|
943 | }
|
---|
944 | isEquivalent(m) {
|
---|
945 | return this.name === m.name && areAllEquivalent(this.body, m.body);
|
---|
946 | }
|
---|
947 | }
|
---|
948 | export class ClassGetter extends AbstractClassPart {
|
---|
949 | constructor(name, body, type, modifiers) {
|
---|
950 | super(type, modifiers);
|
---|
951 | this.name = name;
|
---|
952 | this.body = body;
|
---|
953 | }
|
---|
954 | isEquivalent(m) {
|
---|
955 | return this.name === m.name && areAllEquivalent(this.body, m.body);
|
---|
956 | }
|
---|
957 | }
|
---|
958 | export class ClassStmt extends Statement {
|
---|
959 | constructor(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan, leadingComments) {
|
---|
960 | super(modifiers, sourceSpan, leadingComments);
|
---|
961 | this.name = name;
|
---|
962 | this.parent = parent;
|
---|
963 | this.fields = fields;
|
---|
964 | this.getters = getters;
|
---|
965 | this.constructorMethod = constructorMethod;
|
---|
966 | this.methods = methods;
|
---|
967 | }
|
---|
968 | isEquivalent(stmt) {
|
---|
969 | return stmt instanceof ClassStmt && this.name === stmt.name &&
|
---|
970 | nullSafeIsEquivalent(this.parent, stmt.parent) &&
|
---|
971 | areAllEquivalent(this.fields, stmt.fields) &&
|
---|
972 | areAllEquivalent(this.getters, stmt.getters) &&
|
---|
973 | this.constructorMethod.isEquivalent(stmt.constructorMethod) &&
|
---|
974 | areAllEquivalent(this.methods, stmt.methods);
|
---|
975 | }
|
---|
976 | visitStatement(visitor, context) {
|
---|
977 | return visitor.visitDeclareClassStmt(this, context);
|
---|
978 | }
|
---|
979 | }
|
---|
980 | export class IfStmt extends Statement {
|
---|
981 | constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) {
|
---|
982 | super([], sourceSpan, leadingComments);
|
---|
983 | this.condition = condition;
|
---|
984 | this.trueCase = trueCase;
|
---|
985 | this.falseCase = falseCase;
|
---|
986 | }
|
---|
987 | isEquivalent(stmt) {
|
---|
988 | return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&
|
---|
989 | areAllEquivalent(this.trueCase, stmt.trueCase) &&
|
---|
990 | areAllEquivalent(this.falseCase, stmt.falseCase);
|
---|
991 | }
|
---|
992 | visitStatement(visitor, context) {
|
---|
993 | return visitor.visitIfStmt(this, context);
|
---|
994 | }
|
---|
995 | }
|
---|
996 | export class TryCatchStmt extends Statement {
|
---|
997 | constructor(bodyStmts, catchStmts, sourceSpan = null, leadingComments) {
|
---|
998 | super([], sourceSpan, leadingComments);
|
---|
999 | this.bodyStmts = bodyStmts;
|
---|
1000 | this.catchStmts = catchStmts;
|
---|
1001 | }
|
---|
1002 | isEquivalent(stmt) {
|
---|
1003 | return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&
|
---|
1004 | areAllEquivalent(this.catchStmts, stmt.catchStmts);
|
---|
1005 | }
|
---|
1006 | visitStatement(visitor, context) {
|
---|
1007 | return visitor.visitTryCatchStmt(this, context);
|
---|
1008 | }
|
---|
1009 | }
|
---|
1010 | export class ThrowStmt extends Statement {
|
---|
1011 | constructor(error, sourceSpan = null, leadingComments) {
|
---|
1012 | super([], sourceSpan, leadingComments);
|
---|
1013 | this.error = error;
|
---|
1014 | }
|
---|
1015 | isEquivalent(stmt) {
|
---|
1016 | return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);
|
---|
1017 | }
|
---|
1018 | visitStatement(visitor, context) {
|
---|
1019 | return visitor.visitThrowStmt(this, context);
|
---|
1020 | }
|
---|
1021 | }
|
---|
1022 | export class AstTransformer {
|
---|
1023 | transformExpr(expr, context) {
|
---|
1024 | return expr;
|
---|
1025 | }
|
---|
1026 | transformStmt(stmt, context) {
|
---|
1027 | return stmt;
|
---|
1028 | }
|
---|
1029 | visitReadVarExpr(ast, context) {
|
---|
1030 | return this.transformExpr(ast, context);
|
---|
1031 | }
|
---|
1032 | visitWrappedNodeExpr(ast, context) {
|
---|
1033 | return this.transformExpr(ast, context);
|
---|
1034 | }
|
---|
1035 | visitTypeofExpr(expr, context) {
|
---|
1036 | return this.transformExpr(new TypeofExpr(expr.expr.visitExpression(this, context), expr.type, expr.sourceSpan), context);
|
---|
1037 | }
|
---|
1038 | visitWriteVarExpr(expr, context) {
|
---|
1039 | return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
|
---|
1040 | }
|
---|
1041 | visitWriteKeyExpr(expr, context) {
|
---|
1042 | return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
|
---|
1043 | }
|
---|
1044 | visitWritePropExpr(expr, context) {
|
---|
1045 | return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);
|
---|
1046 | }
|
---|
1047 | visitInvokeMethodExpr(ast, context) {
|
---|
1048 | const method = ast.builtin || ast.name;
|
---|
1049 | return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
|
---|
1050 | }
|
---|
1051 | visitInvokeFunctionExpr(ast, context) {
|
---|
1052 | return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
|
---|
1053 | }
|
---|
1054 | visitTaggedTemplateExpr(ast, context) {
|
---|
1055 | return this.transformExpr(new TaggedTemplateExpr(ast.tag.visitExpression(this, context), new TemplateLiteral(ast.template.elements, ast.template.expressions.map((e) => e.visitExpression(this, context))), ast.type, ast.sourceSpan), context);
|
---|
1056 | }
|
---|
1057 | visitInstantiateExpr(ast, context) {
|
---|
1058 | return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);
|
---|
1059 | }
|
---|
1060 | visitLiteralExpr(ast, context) {
|
---|
1061 | return this.transformExpr(ast, context);
|
---|
1062 | }
|
---|
1063 | visitLocalizedString(ast, context) {
|
---|
1064 | return this.transformExpr(new LocalizedString(ast.metaBlock, ast.messageParts, ast.placeHolderNames, this.visitAllExpressions(ast.expressions, context), ast.sourceSpan), context);
|
---|
1065 | }
|
---|
1066 | visitExternalExpr(ast, context) {
|
---|
1067 | return this.transformExpr(ast, context);
|
---|
1068 | }
|
---|
1069 | visitConditionalExpr(ast, context) {
|
---|
1070 | return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context), ast.type, ast.sourceSpan), context);
|
---|
1071 | }
|
---|
1072 | visitNotExpr(ast, context) {
|
---|
1073 | return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
|
---|
1074 | }
|
---|
1075 | visitAssertNotNullExpr(ast, context) {
|
---|
1076 | return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);
|
---|
1077 | }
|
---|
1078 | visitCastExpr(ast, context) {
|
---|
1079 | return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);
|
---|
1080 | }
|
---|
1081 | visitFunctionExpr(ast, context) {
|
---|
1082 | return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);
|
---|
1083 | }
|
---|
1084 | visitUnaryOperatorExpr(ast, context) {
|
---|
1085 | return this.transformExpr(new UnaryOperatorExpr(ast.operator, ast.expr.visitExpression(this, context), ast.type, ast.sourceSpan), context);
|
---|
1086 | }
|
---|
1087 | visitBinaryOperatorExpr(ast, context) {
|
---|
1088 | return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);
|
---|
1089 | }
|
---|
1090 | visitReadPropExpr(ast, context) {
|
---|
1091 | return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);
|
---|
1092 | }
|
---|
1093 | visitReadKeyExpr(ast, context) {
|
---|
1094 | return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);
|
---|
1095 | }
|
---|
1096 | visitLiteralArrayExpr(ast, context) {
|
---|
1097 | return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);
|
---|
1098 | }
|
---|
1099 | visitLiteralMapExpr(ast, context) {
|
---|
1100 | const entries = ast.entries.map((entry) => new LiteralMapEntry(entry.key, entry.value.visitExpression(this, context), entry.quoted));
|
---|
1101 | const mapType = new MapType(ast.valueType);
|
---|
1102 | return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);
|
---|
1103 | }
|
---|
1104 | visitCommaExpr(ast, context) {
|
---|
1105 | return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);
|
---|
1106 | }
|
---|
1107 | visitAllExpressions(exprs, context) {
|
---|
1108 | return exprs.map(expr => expr.visitExpression(this, context));
|
---|
1109 | }
|
---|
1110 | visitDeclareVarStmt(stmt, context) {
|
---|
1111 | const value = stmt.value && stmt.value.visitExpression(this, context);
|
---|
1112 | return this.transformStmt(new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1113 | }
|
---|
1114 | visitDeclareFunctionStmt(stmt, context) {
|
---|
1115 | return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1116 | }
|
---|
1117 | visitExpressionStmt(stmt, context) {
|
---|
1118 | return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1119 | }
|
---|
1120 | visitReturnStmt(stmt, context) {
|
---|
1121 | return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1122 | }
|
---|
1123 | visitDeclareClassStmt(stmt, context) {
|
---|
1124 | const parent = stmt.parent.visitExpression(this, context);
|
---|
1125 | const getters = stmt.getters.map(getter => new ClassGetter(getter.name, this.visitAllStatements(getter.body, context), getter.type, getter.modifiers));
|
---|
1126 | const ctorMethod = stmt.constructorMethod &&
|
---|
1127 | new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);
|
---|
1128 | const methods = stmt.methods.map(method => new ClassMethod(method.name, method.params, this.visitAllStatements(method.body, context), method.type, method.modifiers));
|
---|
1129 | return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);
|
---|
1130 | }
|
---|
1131 | visitIfStmt(stmt, context) {
|
---|
1132 | return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1133 | }
|
---|
1134 | visitTryCatchStmt(stmt, context) {
|
---|
1135 | return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1136 | }
|
---|
1137 | visitThrowStmt(stmt, context) {
|
---|
1138 | return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan, stmt.leadingComments), context);
|
---|
1139 | }
|
---|
1140 | visitAllStatements(stmts, context) {
|
---|
1141 | return stmts.map(stmt => stmt.visitStatement(this, context));
|
---|
1142 | }
|
---|
1143 | }
|
---|
1144 | export class RecursiveAstVisitor {
|
---|
1145 | visitType(ast, context) {
|
---|
1146 | return ast;
|
---|
1147 | }
|
---|
1148 | visitExpression(ast, context) {
|
---|
1149 | if (ast.type) {
|
---|
1150 | ast.type.visitType(this, context);
|
---|
1151 | }
|
---|
1152 | return ast;
|
---|
1153 | }
|
---|
1154 | visitBuiltinType(type, context) {
|
---|
1155 | return this.visitType(type, context);
|
---|
1156 | }
|
---|
1157 | visitExpressionType(type, context) {
|
---|
1158 | type.value.visitExpression(this, context);
|
---|
1159 | if (type.typeParams !== null) {
|
---|
1160 | type.typeParams.forEach(param => this.visitType(param, context));
|
---|
1161 | }
|
---|
1162 | return this.visitType(type, context);
|
---|
1163 | }
|
---|
1164 | visitArrayType(type, context) {
|
---|
1165 | return this.visitType(type, context);
|
---|
1166 | }
|
---|
1167 | visitMapType(type, context) {
|
---|
1168 | return this.visitType(type, context);
|
---|
1169 | }
|
---|
1170 | visitWrappedNodeExpr(ast, context) {
|
---|
1171 | return ast;
|
---|
1172 | }
|
---|
1173 | visitTypeofExpr(ast, context) {
|
---|
1174 | return this.visitExpression(ast, context);
|
---|
1175 | }
|
---|
1176 | visitReadVarExpr(ast, context) {
|
---|
1177 | return this.visitExpression(ast, context);
|
---|
1178 | }
|
---|
1179 | visitWriteVarExpr(ast, context) {
|
---|
1180 | ast.value.visitExpression(this, context);
|
---|
1181 | return this.visitExpression(ast, context);
|
---|
1182 | }
|
---|
1183 | visitWriteKeyExpr(ast, context) {
|
---|
1184 | ast.receiver.visitExpression(this, context);
|
---|
1185 | ast.index.visitExpression(this, context);
|
---|
1186 | ast.value.visitExpression(this, context);
|
---|
1187 | return this.visitExpression(ast, context);
|
---|
1188 | }
|
---|
1189 | visitWritePropExpr(ast, context) {
|
---|
1190 | ast.receiver.visitExpression(this, context);
|
---|
1191 | ast.value.visitExpression(this, context);
|
---|
1192 | return this.visitExpression(ast, context);
|
---|
1193 | }
|
---|
1194 | visitInvokeMethodExpr(ast, context) {
|
---|
1195 | ast.receiver.visitExpression(this, context);
|
---|
1196 | this.visitAllExpressions(ast.args, context);
|
---|
1197 | return this.visitExpression(ast, context);
|
---|
1198 | }
|
---|
1199 | visitInvokeFunctionExpr(ast, context) {
|
---|
1200 | ast.fn.visitExpression(this, context);
|
---|
1201 | this.visitAllExpressions(ast.args, context);
|
---|
1202 | return this.visitExpression(ast, context);
|
---|
1203 | }
|
---|
1204 | visitTaggedTemplateExpr(ast, context) {
|
---|
1205 | ast.tag.visitExpression(this, context);
|
---|
1206 | this.visitAllExpressions(ast.template.expressions, context);
|
---|
1207 | return this.visitExpression(ast, context);
|
---|
1208 | }
|
---|
1209 | visitInstantiateExpr(ast, context) {
|
---|
1210 | ast.classExpr.visitExpression(this, context);
|
---|
1211 | this.visitAllExpressions(ast.args, context);
|
---|
1212 | return this.visitExpression(ast, context);
|
---|
1213 | }
|
---|
1214 | visitLiteralExpr(ast, context) {
|
---|
1215 | return this.visitExpression(ast, context);
|
---|
1216 | }
|
---|
1217 | visitLocalizedString(ast, context) {
|
---|
1218 | return this.visitExpression(ast, context);
|
---|
1219 | }
|
---|
1220 | visitExternalExpr(ast, context) {
|
---|
1221 | if (ast.typeParams) {
|
---|
1222 | ast.typeParams.forEach(type => type.visitType(this, context));
|
---|
1223 | }
|
---|
1224 | return this.visitExpression(ast, context);
|
---|
1225 | }
|
---|
1226 | visitConditionalExpr(ast, context) {
|
---|
1227 | ast.condition.visitExpression(this, context);
|
---|
1228 | ast.trueCase.visitExpression(this, context);
|
---|
1229 | ast.falseCase.visitExpression(this, context);
|
---|
1230 | return this.visitExpression(ast, context);
|
---|
1231 | }
|
---|
1232 | visitNotExpr(ast, context) {
|
---|
1233 | ast.condition.visitExpression(this, context);
|
---|
1234 | return this.visitExpression(ast, context);
|
---|
1235 | }
|
---|
1236 | visitAssertNotNullExpr(ast, context) {
|
---|
1237 | ast.condition.visitExpression(this, context);
|
---|
1238 | return this.visitExpression(ast, context);
|
---|
1239 | }
|
---|
1240 | visitCastExpr(ast, context) {
|
---|
1241 | ast.value.visitExpression(this, context);
|
---|
1242 | return this.visitExpression(ast, context);
|
---|
1243 | }
|
---|
1244 | visitFunctionExpr(ast, context) {
|
---|
1245 | this.visitAllStatements(ast.statements, context);
|
---|
1246 | return this.visitExpression(ast, context);
|
---|
1247 | }
|
---|
1248 | visitUnaryOperatorExpr(ast, context) {
|
---|
1249 | ast.expr.visitExpression(this, context);
|
---|
1250 | return this.visitExpression(ast, context);
|
---|
1251 | }
|
---|
1252 | visitBinaryOperatorExpr(ast, context) {
|
---|
1253 | ast.lhs.visitExpression(this, context);
|
---|
1254 | ast.rhs.visitExpression(this, context);
|
---|
1255 | return this.visitExpression(ast, context);
|
---|
1256 | }
|
---|
1257 | visitReadPropExpr(ast, context) {
|
---|
1258 | ast.receiver.visitExpression(this, context);
|
---|
1259 | return this.visitExpression(ast, context);
|
---|
1260 | }
|
---|
1261 | visitReadKeyExpr(ast, context) {
|
---|
1262 | ast.receiver.visitExpression(this, context);
|
---|
1263 | ast.index.visitExpression(this, context);
|
---|
1264 | return this.visitExpression(ast, context);
|
---|
1265 | }
|
---|
1266 | visitLiteralArrayExpr(ast, context) {
|
---|
1267 | this.visitAllExpressions(ast.entries, context);
|
---|
1268 | return this.visitExpression(ast, context);
|
---|
1269 | }
|
---|
1270 | visitLiteralMapExpr(ast, context) {
|
---|
1271 | ast.entries.forEach((entry) => entry.value.visitExpression(this, context));
|
---|
1272 | return this.visitExpression(ast, context);
|
---|
1273 | }
|
---|
1274 | visitCommaExpr(ast, context) {
|
---|
1275 | this.visitAllExpressions(ast.parts, context);
|
---|
1276 | return this.visitExpression(ast, context);
|
---|
1277 | }
|
---|
1278 | visitAllExpressions(exprs, context) {
|
---|
1279 | exprs.forEach(expr => expr.visitExpression(this, context));
|
---|
1280 | }
|
---|
1281 | visitDeclareVarStmt(stmt, context) {
|
---|
1282 | if (stmt.value) {
|
---|
1283 | stmt.value.visitExpression(this, context);
|
---|
1284 | }
|
---|
1285 | if (stmt.type) {
|
---|
1286 | stmt.type.visitType(this, context);
|
---|
1287 | }
|
---|
1288 | return stmt;
|
---|
1289 | }
|
---|
1290 | visitDeclareFunctionStmt(stmt, context) {
|
---|
1291 | this.visitAllStatements(stmt.statements, context);
|
---|
1292 | if (stmt.type) {
|
---|
1293 | stmt.type.visitType(this, context);
|
---|
1294 | }
|
---|
1295 | return stmt;
|
---|
1296 | }
|
---|
1297 | visitExpressionStmt(stmt, context) {
|
---|
1298 | stmt.expr.visitExpression(this, context);
|
---|
1299 | return stmt;
|
---|
1300 | }
|
---|
1301 | visitReturnStmt(stmt, context) {
|
---|
1302 | stmt.value.visitExpression(this, context);
|
---|
1303 | return stmt;
|
---|
1304 | }
|
---|
1305 | visitDeclareClassStmt(stmt, context) {
|
---|
1306 | stmt.parent.visitExpression(this, context);
|
---|
1307 | stmt.getters.forEach(getter => this.visitAllStatements(getter.body, context));
|
---|
1308 | if (stmt.constructorMethod) {
|
---|
1309 | this.visitAllStatements(stmt.constructorMethod.body, context);
|
---|
1310 | }
|
---|
1311 | stmt.methods.forEach(method => this.visitAllStatements(method.body, context));
|
---|
1312 | return stmt;
|
---|
1313 | }
|
---|
1314 | visitIfStmt(stmt, context) {
|
---|
1315 | stmt.condition.visitExpression(this, context);
|
---|
1316 | this.visitAllStatements(stmt.trueCase, context);
|
---|
1317 | this.visitAllStatements(stmt.falseCase, context);
|
---|
1318 | return stmt;
|
---|
1319 | }
|
---|
1320 | visitTryCatchStmt(stmt, context) {
|
---|
1321 | this.visitAllStatements(stmt.bodyStmts, context);
|
---|
1322 | this.visitAllStatements(stmt.catchStmts, context);
|
---|
1323 | return stmt;
|
---|
1324 | }
|
---|
1325 | visitThrowStmt(stmt, context) {
|
---|
1326 | stmt.error.visitExpression(this, context);
|
---|
1327 | return stmt;
|
---|
1328 | }
|
---|
1329 | visitAllStatements(stmts, context) {
|
---|
1330 | stmts.forEach(stmt => stmt.visitStatement(this, context));
|
---|
1331 | }
|
---|
1332 | }
|
---|
1333 | export function findReadVarNames(stmts) {
|
---|
1334 | const visitor = new _ReadVarVisitor();
|
---|
1335 | visitor.visitAllStatements(stmts, null);
|
---|
1336 | return visitor.varNames;
|
---|
1337 | }
|
---|
1338 | class _ReadVarVisitor extends RecursiveAstVisitor {
|
---|
1339 | constructor() {
|
---|
1340 | super(...arguments);
|
---|
1341 | this.varNames = new Set();
|
---|
1342 | }
|
---|
1343 | visitDeclareFunctionStmt(stmt, context) {
|
---|
1344 | // Don't descend into nested functions
|
---|
1345 | return stmt;
|
---|
1346 | }
|
---|
1347 | visitDeclareClassStmt(stmt, context) {
|
---|
1348 | // Don't descend into nested classes
|
---|
1349 | return stmt;
|
---|
1350 | }
|
---|
1351 | visitReadVarExpr(ast, context) {
|
---|
1352 | if (ast.name) {
|
---|
1353 | this.varNames.add(ast.name);
|
---|
1354 | }
|
---|
1355 | return null;
|
---|
1356 | }
|
---|
1357 | }
|
---|
1358 | export function collectExternalReferences(stmts) {
|
---|
1359 | const visitor = new _FindExternalReferencesVisitor();
|
---|
1360 | visitor.visitAllStatements(stmts, null);
|
---|
1361 | return visitor.externalReferences;
|
---|
1362 | }
|
---|
1363 | class _FindExternalReferencesVisitor extends RecursiveAstVisitor {
|
---|
1364 | constructor() {
|
---|
1365 | super(...arguments);
|
---|
1366 | this.externalReferences = [];
|
---|
1367 | }
|
---|
1368 | visitExternalExpr(e, context) {
|
---|
1369 | this.externalReferences.push(e.value);
|
---|
1370 | return super.visitExternalExpr(e, context);
|
---|
1371 | }
|
---|
1372 | }
|
---|
1373 | export function applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {
|
---|
1374 | if (!sourceSpan) {
|
---|
1375 | return stmt;
|
---|
1376 | }
|
---|
1377 | const transformer = new _ApplySourceSpanTransformer(sourceSpan);
|
---|
1378 | return stmt.visitStatement(transformer, null);
|
---|
1379 | }
|
---|
1380 | export function applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {
|
---|
1381 | if (!sourceSpan) {
|
---|
1382 | return expr;
|
---|
1383 | }
|
---|
1384 | const transformer = new _ApplySourceSpanTransformer(sourceSpan);
|
---|
1385 | return expr.visitExpression(transformer, null);
|
---|
1386 | }
|
---|
1387 | class _ApplySourceSpanTransformer extends AstTransformer {
|
---|
1388 | constructor(sourceSpan) {
|
---|
1389 | super();
|
---|
1390 | this.sourceSpan = sourceSpan;
|
---|
1391 | }
|
---|
1392 | _clone(obj) {
|
---|
1393 | const clone = Object.create(obj.constructor.prototype);
|
---|
1394 | for (let prop of Object.keys(obj)) {
|
---|
1395 | clone[prop] = obj[prop];
|
---|
1396 | }
|
---|
1397 | return clone;
|
---|
1398 | }
|
---|
1399 | transformExpr(expr, context) {
|
---|
1400 | if (!expr.sourceSpan) {
|
---|
1401 | expr = this._clone(expr);
|
---|
1402 | expr.sourceSpan = this.sourceSpan;
|
---|
1403 | }
|
---|
1404 | return expr;
|
---|
1405 | }
|
---|
1406 | transformStmt(stmt, context) {
|
---|
1407 | if (!stmt.sourceSpan) {
|
---|
1408 | stmt = this._clone(stmt);
|
---|
1409 | stmt.sourceSpan = this.sourceSpan;
|
---|
1410 | }
|
---|
1411 | return stmt;
|
---|
1412 | }
|
---|
1413 | }
|
---|
1414 | export function leadingComment(text, multiline = false, trailingNewline = true) {
|
---|
1415 | return new LeadingComment(text, multiline, trailingNewline);
|
---|
1416 | }
|
---|
1417 | export function jsDocComment(tags = []) {
|
---|
1418 | return new JSDocComment(tags);
|
---|
1419 | }
|
---|
1420 | export function variable(name, type, sourceSpan) {
|
---|
1421 | return new ReadVarExpr(name, type, sourceSpan);
|
---|
1422 | }
|
---|
1423 | export function importExpr(id, typeParams = null, sourceSpan) {
|
---|
1424 | return new ExternalExpr(id, null, typeParams, sourceSpan);
|
---|
1425 | }
|
---|
1426 | export function importType(id, typeParams, typeModifiers) {
|
---|
1427 | return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;
|
---|
1428 | }
|
---|
1429 | export function expressionType(expr, typeModifiers, typeParams) {
|
---|
1430 | return new ExpressionType(expr, typeModifiers, typeParams);
|
---|
1431 | }
|
---|
1432 | export function typeofExpr(expr) {
|
---|
1433 | return new TypeofExpr(expr);
|
---|
1434 | }
|
---|
1435 | export function literalArr(values, type, sourceSpan) {
|
---|
1436 | return new LiteralArrayExpr(values, type, sourceSpan);
|
---|
1437 | }
|
---|
1438 | export function literalMap(values, type = null) {
|
---|
1439 | return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null);
|
---|
1440 | }
|
---|
1441 | export function unary(operator, expr, type, sourceSpan) {
|
---|
1442 | return new UnaryOperatorExpr(operator, expr, type, sourceSpan);
|
---|
1443 | }
|
---|
1444 | export function not(expr, sourceSpan) {
|
---|
1445 | return new NotExpr(expr, sourceSpan);
|
---|
1446 | }
|
---|
1447 | export function assertNotNull(expr, sourceSpan) {
|
---|
1448 | return new AssertNotNull(expr, sourceSpan);
|
---|
1449 | }
|
---|
1450 | export function fn(params, body, type, sourceSpan, name) {
|
---|
1451 | return new FunctionExpr(params, body, type, sourceSpan, name);
|
---|
1452 | }
|
---|
1453 | export function ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) {
|
---|
1454 | return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);
|
---|
1455 | }
|
---|
1456 | export function taggedTemplate(tag, template, type, sourceSpan) {
|
---|
1457 | return new TaggedTemplateExpr(tag, template, type, sourceSpan);
|
---|
1458 | }
|
---|
1459 | export function literal(value, type, sourceSpan) {
|
---|
1460 | return new LiteralExpr(value, type, sourceSpan);
|
---|
1461 | }
|
---|
1462 | export function localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) {
|
---|
1463 | return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan);
|
---|
1464 | }
|
---|
1465 | export function isNull(exp) {
|
---|
1466 | return exp instanceof LiteralExpr && exp.value === null;
|
---|
1467 | }
|
---|
1468 | /*
|
---|
1469 | * Serializes a `Tag` into a string.
|
---|
1470 | * Returns a string like " @foo {bar} baz" (note the leading whitespace before `@foo`).
|
---|
1471 | */
|
---|
1472 | function tagToString(tag) {
|
---|
1473 | let out = '';
|
---|
1474 | if (tag.tagName) {
|
---|
1475 | out += ` @${tag.tagName}`;
|
---|
1476 | }
|
---|
1477 | if (tag.text) {
|
---|
1478 | if (tag.text.match(/\/\*|\*\//)) {
|
---|
1479 | throw new Error('JSDoc text cannot contain "/*" and "*/"');
|
---|
1480 | }
|
---|
1481 | out += ' ' + tag.text.replace(/@/g, '\\@');
|
---|
1482 | }
|
---|
1483 | return out;
|
---|
1484 | }
|
---|
1485 | function serializeTags(tags) {
|
---|
1486 | if (tags.length === 0)
|
---|
1487 | return '';
|
---|
1488 | if (tags.length === 1 && tags[0].tagName && !tags[0].text) {
|
---|
1489 | // The JSDOC comment is a single simple tag: e.g `/** @tagname */`.
|
---|
1490 | return `*${tagToString(tags[0])} `;
|
---|
1491 | }
|
---|
1492 | let out = '*\n';
|
---|
1493 | for (const tag of tags) {
|
---|
1494 | out += ' *';
|
---|
1495 | // If the tagToString is multi-line, insert " * " prefixes on lines.
|
---|
1496 | out += tagToString(tag).replace(/\n/g, '\n * ');
|
---|
1497 | out += '\n';
|
---|
1498 | }
|
---|
1499 | out += ' ';
|
---|
1500 | return out;
|
---|
1501 | }
|
---|
1502 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0cHV0X2FzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL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