@angular/compiler 19.1.4 → 19.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/compiler.mjs +341 -96
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +61 -20
- package/package.json +2 -2
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.
|
|
2
|
+
* @license Angular v19.2.0-next.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1199,7 +1199,7 @@ class InvokeFunctionExpr extends Expression {
|
|
|
1199
1199
|
return new InvokeFunctionExpr(this.fn.clone(), this.args.map((arg) => arg.clone()), this.type, this.sourceSpan, this.pure);
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
|
-
class
|
|
1202
|
+
class TaggedTemplateLiteralExpr extends Expression {
|
|
1203
1203
|
tag;
|
|
1204
1204
|
template;
|
|
1205
1205
|
constructor(tag, template, type, sourceSpan) {
|
|
@@ -1208,19 +1208,18 @@ class TaggedTemplateExpr extends Expression {
|
|
|
1208
1208
|
this.template = template;
|
|
1209
1209
|
}
|
|
1210
1210
|
isEquivalent(e) {
|
|
1211
|
-
return (e instanceof
|
|
1211
|
+
return (e instanceof TaggedTemplateLiteralExpr &&
|
|
1212
1212
|
this.tag.isEquivalent(e.tag) &&
|
|
1213
|
-
|
|
1214
|
-
areAllEquivalent(this.template.expressions, e.template.expressions));
|
|
1213
|
+
this.template.isEquivalent(e.template));
|
|
1215
1214
|
}
|
|
1216
1215
|
isConstant() {
|
|
1217
1216
|
return false;
|
|
1218
1217
|
}
|
|
1219
1218
|
visitExpression(visitor, context) {
|
|
1220
|
-
return visitor.
|
|
1219
|
+
return visitor.visitTaggedTemplateLiteralExpr(this, context);
|
|
1221
1220
|
}
|
|
1222
1221
|
clone() {
|
|
1223
|
-
return new
|
|
1222
|
+
return new TaggedTemplateLiteralExpr(this.tag.clone(), this.template.clone(), this.type, this.sourceSpan);
|
|
1224
1223
|
}
|
|
1225
1224
|
}
|
|
1226
1225
|
class InstantiateExpr extends Expression {
|
|
@@ -1265,24 +1264,35 @@ class LiteralExpr extends Expression {
|
|
|
1265
1264
|
return new LiteralExpr(this.value, this.type, this.sourceSpan);
|
|
1266
1265
|
}
|
|
1267
1266
|
}
|
|
1268
|
-
class
|
|
1267
|
+
class TemplateLiteralExpr extends Expression {
|
|
1269
1268
|
elements;
|
|
1270
1269
|
expressions;
|
|
1271
|
-
constructor(elements, expressions) {
|
|
1270
|
+
constructor(elements, expressions, sourceSpan) {
|
|
1271
|
+
super(null, sourceSpan);
|
|
1272
1272
|
this.elements = elements;
|
|
1273
1273
|
this.expressions = expressions;
|
|
1274
1274
|
}
|
|
1275
|
+
isEquivalent(e) {
|
|
1276
|
+
return (e instanceof TemplateLiteralExpr &&
|
|
1277
|
+
areAllEquivalentPredicate(this.elements, e.elements, (a, b) => a.text === b.text) &&
|
|
1278
|
+
areAllEquivalent(this.expressions, e.expressions));
|
|
1279
|
+
}
|
|
1280
|
+
isConstant() {
|
|
1281
|
+
return false;
|
|
1282
|
+
}
|
|
1283
|
+
visitExpression(visitor, context) {
|
|
1284
|
+
return visitor.visitTemplateLiteralExpr(this, context);
|
|
1285
|
+
}
|
|
1275
1286
|
clone() {
|
|
1276
|
-
return new
|
|
1287
|
+
return new TemplateLiteralExpr(this.elements.map((el) => el.clone()), this.expressions.map((expr) => expr.clone()));
|
|
1277
1288
|
}
|
|
1278
1289
|
}
|
|
1279
|
-
class
|
|
1290
|
+
class TemplateLiteralElementExpr extends Expression {
|
|
1280
1291
|
text;
|
|
1281
|
-
sourceSpan;
|
|
1282
1292
|
rawText;
|
|
1283
1293
|
constructor(text, sourceSpan, rawText) {
|
|
1294
|
+
super(STRING_TYPE, sourceSpan);
|
|
1284
1295
|
this.text = text;
|
|
1285
|
-
this.sourceSpan = sourceSpan;
|
|
1286
1296
|
// If `rawText` is not provided, try to extract the raw string from its
|
|
1287
1297
|
// associated `sourceSpan`. If that is also not available, "fake" the raw
|
|
1288
1298
|
// string instead by escaping the following control sequences:
|
|
@@ -1292,8 +1302,17 @@ class TemplateLiteralElement {
|
|
|
1292
1302
|
this.rawText =
|
|
1293
1303
|
rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text));
|
|
1294
1304
|
}
|
|
1305
|
+
visitExpression(visitor, context) {
|
|
1306
|
+
return visitor.visitTemplateLiteralElementExpr(this, context);
|
|
1307
|
+
}
|
|
1308
|
+
isEquivalent(e) {
|
|
1309
|
+
return (e instanceof TemplateLiteralElementExpr && e.text === this.text && e.rawText === this.rawText);
|
|
1310
|
+
}
|
|
1311
|
+
isConstant() {
|
|
1312
|
+
return true;
|
|
1313
|
+
}
|
|
1295
1314
|
clone() {
|
|
1296
|
-
return new
|
|
1315
|
+
return new TemplateLiteralElementExpr(this.text, this.sourceSpan, this.rawText);
|
|
1297
1316
|
}
|
|
1298
1317
|
}
|
|
1299
1318
|
class LiteralPiece {
|
|
@@ -1994,9 +2013,9 @@ class RecursiveAstVisitor$1 {
|
|
|
1994
2013
|
this.visitAllExpressions(ast.args, context);
|
|
1995
2014
|
return this.visitExpression(ast, context);
|
|
1996
2015
|
}
|
|
1997
|
-
|
|
2016
|
+
visitTaggedTemplateLiteralExpr(ast, context) {
|
|
1998
2017
|
ast.tag.visitExpression(this, context);
|
|
1999
|
-
|
|
2018
|
+
ast.template.visitExpression(this, context);
|
|
2000
2019
|
return this.visitExpression(ast, context);
|
|
2001
2020
|
}
|
|
2002
2021
|
visitInstantiateExpr(ast, context) {
|
|
@@ -2071,6 +2090,14 @@ class RecursiveAstVisitor$1 {
|
|
|
2071
2090
|
this.visitAllExpressions(ast.parts, context);
|
|
2072
2091
|
return this.visitExpression(ast, context);
|
|
2073
2092
|
}
|
|
2093
|
+
visitTemplateLiteralExpr(ast, context) {
|
|
2094
|
+
this.visitAllExpressions(ast.elements, context);
|
|
2095
|
+
this.visitAllExpressions(ast.expressions, context);
|
|
2096
|
+
return this.visitExpression(ast, context);
|
|
2097
|
+
}
|
|
2098
|
+
visitTemplateLiteralElementExpr(ast, context) {
|
|
2099
|
+
return this.visitExpression(ast, context);
|
|
2100
|
+
}
|
|
2074
2101
|
visitAllExpressions(exprs, context) {
|
|
2075
2102
|
exprs.forEach((expr) => expr.visitExpression(this, context));
|
|
2076
2103
|
}
|
|
@@ -2154,7 +2181,7 @@ function ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments)
|
|
|
2154
2181
|
return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments);
|
|
2155
2182
|
}
|
|
2156
2183
|
function taggedTemplate(tag, template, type, sourceSpan) {
|
|
2157
|
-
return new
|
|
2184
|
+
return new TaggedTemplateLiteralExpr(tag, template, type, sourceSpan);
|
|
2158
2185
|
}
|
|
2159
2186
|
function literal(value, type, sourceSpan) {
|
|
2160
2187
|
return new LiteralExpr(value, type, sourceSpan);
|
|
@@ -2230,11 +2257,11 @@ var output_ast = /*#__PURE__*/Object.freeze({
|
|
|
2230
2257
|
WriteKeyExpr: WriteKeyExpr,
|
|
2231
2258
|
WritePropExpr: WritePropExpr,
|
|
2232
2259
|
InvokeFunctionExpr: InvokeFunctionExpr,
|
|
2233
|
-
|
|
2260
|
+
TaggedTemplateLiteralExpr: TaggedTemplateLiteralExpr,
|
|
2234
2261
|
InstantiateExpr: InstantiateExpr,
|
|
2235
2262
|
LiteralExpr: LiteralExpr,
|
|
2236
|
-
|
|
2237
|
-
|
|
2263
|
+
TemplateLiteralExpr: TemplateLiteralExpr,
|
|
2264
|
+
TemplateLiteralElementExpr: TemplateLiteralElementExpr,
|
|
2238
2265
|
LiteralPiece: LiteralPiece,
|
|
2239
2266
|
PlaceholderPiece: PlaceholderPiece,
|
|
2240
2267
|
LocalizedString: LocalizedString,
|
|
@@ -3615,16 +3642,26 @@ class AbstractEmitterVisitor {
|
|
|
3615
3642
|
ctx.print(expr, `)`);
|
|
3616
3643
|
return null;
|
|
3617
3644
|
}
|
|
3618
|
-
|
|
3645
|
+
visitTaggedTemplateLiteralExpr(expr, ctx) {
|
|
3619
3646
|
expr.tag.visitExpression(this, ctx);
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3647
|
+
expr.template.visitExpression(this, ctx);
|
|
3648
|
+
return null;
|
|
3649
|
+
}
|
|
3650
|
+
visitTemplateLiteralExpr(expr, ctx) {
|
|
3651
|
+
ctx.print(expr, '`');
|
|
3652
|
+
for (let i = 0; i < expr.elements.length; i++) {
|
|
3653
|
+
expr.elements[i].visitExpression(this, ctx);
|
|
3654
|
+
const expression = i < expr.expressions.length ? expr.expressions[i] : null;
|
|
3655
|
+
if (expression !== null) {
|
|
3656
|
+
ctx.print(expression, '${');
|
|
3657
|
+
expression.visitExpression(this, ctx);
|
|
3658
|
+
ctx.print(expression, '}');
|
|
3659
|
+
}
|
|
3625
3660
|
}
|
|
3626
3661
|
ctx.print(expr, '`');
|
|
3627
|
-
|
|
3662
|
+
}
|
|
3663
|
+
visitTemplateLiteralElementExpr(expr, ctx) {
|
|
3664
|
+
ctx.print(expr, expr.rawText);
|
|
3628
3665
|
}
|
|
3629
3666
|
visitWrappedNodeExpr(ast, ctx) {
|
|
3630
3667
|
throw new Error('Abstract emitter cannot visit WrappedNodeExpr.');
|
|
@@ -4486,6 +4523,28 @@ class SafeCall extends AST {
|
|
|
4486
4523
|
return visitor.visitSafeCall(this, context);
|
|
4487
4524
|
}
|
|
4488
4525
|
}
|
|
4526
|
+
class TemplateLiteral extends AST {
|
|
4527
|
+
elements;
|
|
4528
|
+
expressions;
|
|
4529
|
+
constructor(span, sourceSpan, elements, expressions) {
|
|
4530
|
+
super(span, sourceSpan);
|
|
4531
|
+
this.elements = elements;
|
|
4532
|
+
this.expressions = expressions;
|
|
4533
|
+
}
|
|
4534
|
+
visit(visitor, context) {
|
|
4535
|
+
return visitor.visitTemplateLiteral(this, context);
|
|
4536
|
+
}
|
|
4537
|
+
}
|
|
4538
|
+
class TemplateLiteralElement extends AST {
|
|
4539
|
+
text;
|
|
4540
|
+
constructor(span, sourceSpan, text) {
|
|
4541
|
+
super(span, sourceSpan);
|
|
4542
|
+
this.text = text;
|
|
4543
|
+
}
|
|
4544
|
+
visit(visitor, context) {
|
|
4545
|
+
return visitor.visitTemplateLiteralElement(this, context);
|
|
4546
|
+
}
|
|
4547
|
+
}
|
|
4489
4548
|
/**
|
|
4490
4549
|
* Records the absolute position of a text span in a source file, where `start` and `end` are the
|
|
4491
4550
|
* starting and ending byte offsets, respectively, of the text span in a source file.
|
|
@@ -4633,6 +4692,18 @@ class RecursiveAstVisitor {
|
|
|
4633
4692
|
this.visit(ast.receiver, context);
|
|
4634
4693
|
this.visitAll(ast.args, context);
|
|
4635
4694
|
}
|
|
4695
|
+
visitTemplateLiteral(ast, context) {
|
|
4696
|
+
// Iterate in the declaration order. Note that there will
|
|
4697
|
+
// always be one expression less than the number of elements.
|
|
4698
|
+
for (let i = 0; i < ast.elements.length; i++) {
|
|
4699
|
+
this.visit(ast.elements[i], context);
|
|
4700
|
+
const expression = i < ast.expressions.length ? ast.expressions[i] : null;
|
|
4701
|
+
if (expression !== null) {
|
|
4702
|
+
this.visit(expression, context);
|
|
4703
|
+
}
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
visitTemplateLiteralElement(ast, context) { }
|
|
4636
4707
|
// This is not part of the AstVisitor interface, just a helper method
|
|
4637
4708
|
visitAll(asts, context) {
|
|
4638
4709
|
for (const ast of asts) {
|
|
@@ -6742,7 +6813,7 @@ class AbstractJsEmitterVisitor extends AbstractEmitterVisitor {
|
|
|
6742
6813
|
ctx.println(stmt, `;`);
|
|
6743
6814
|
return null;
|
|
6744
6815
|
}
|
|
6745
|
-
|
|
6816
|
+
visitTaggedTemplateLiteralExpr(ast, ctx) {
|
|
6746
6817
|
// The following convoluted piece of code is effectively the downlevelled equivalent of
|
|
6747
6818
|
// ```
|
|
6748
6819
|
// tag`...`
|
|
@@ -6763,6 +6834,23 @@ class AbstractJsEmitterVisitor extends AbstractEmitterVisitor {
|
|
|
6763
6834
|
ctx.print(ast, ')');
|
|
6764
6835
|
return null;
|
|
6765
6836
|
}
|
|
6837
|
+
visitTemplateLiteralExpr(expr, ctx) {
|
|
6838
|
+
ctx.print(expr, '`');
|
|
6839
|
+
for (let i = 0; i < expr.elements.length; i++) {
|
|
6840
|
+
expr.elements[i].visitExpression(this, ctx);
|
|
6841
|
+
const expression = i < expr.expressions.length ? expr.expressions[i] : null;
|
|
6842
|
+
if (expression !== null) {
|
|
6843
|
+
ctx.print(expression, '${');
|
|
6844
|
+
expression.visitExpression(this, ctx);
|
|
6845
|
+
ctx.print(expression, '}');
|
|
6846
|
+
}
|
|
6847
|
+
}
|
|
6848
|
+
ctx.print(expr, '`');
|
|
6849
|
+
}
|
|
6850
|
+
visitTemplateLiteralElementExpr(expr, ctx) {
|
|
6851
|
+
ctx.print(expr, expr.rawText);
|
|
6852
|
+
return null;
|
|
6853
|
+
}
|
|
6766
6854
|
visitFunctionExpr(ast, ctx) {
|
|
6767
6855
|
ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`);
|
|
6768
6856
|
this._visitParams(ast.params, ctx);
|
|
@@ -10340,7 +10428,7 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
10340
10428
|
else if (expr instanceof NotExpr) {
|
|
10341
10429
|
expr.condition = transformExpressionsInExpression(expr.condition, transform, flags);
|
|
10342
10430
|
}
|
|
10343
|
-
else if (expr instanceof
|
|
10431
|
+
else if (expr instanceof TaggedTemplateLiteralExpr) {
|
|
10344
10432
|
expr.tag = transformExpressionsInExpression(expr.tag, transform, flags);
|
|
10345
10433
|
expr.template.expressions = expr.template.expressions.map((e) => transformExpressionsInExpression(e, transform, flags));
|
|
10346
10434
|
}
|
|
@@ -10357,6 +10445,11 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
10357
10445
|
else if (expr instanceof WrappedNodeExpr) {
|
|
10358
10446
|
// TODO: Do we need to transform any TS nodes nested inside of this expression?
|
|
10359
10447
|
}
|
|
10448
|
+
else if (expr instanceof TemplateLiteralExpr) {
|
|
10449
|
+
for (let i = 0; i < expr.expressions.length; i++) {
|
|
10450
|
+
expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform, flags);
|
|
10451
|
+
}
|
|
10452
|
+
}
|
|
10360
10453
|
else if (expr instanceof ReadVarExpr ||
|
|
10361
10454
|
expr instanceof ExternalExpr ||
|
|
10362
10455
|
expr instanceof LiteralExpr) {
|
|
@@ -12011,7 +12104,7 @@ class ElementAttributes {
|
|
|
12011
12104
|
if (!isStringLiteral(value)) {
|
|
12012
12105
|
throw Error('AssertionError: extracted attribute value should be string literal');
|
|
12013
12106
|
}
|
|
12014
|
-
array.push(taggedTemplate(trustedValueFn, new
|
|
12107
|
+
array.push(taggedTemplate(trustedValueFn, new TemplateLiteralExpr([new TemplateLiteralElementExpr(value.value)], []), undefined, value.sourceSpan));
|
|
12015
12108
|
}
|
|
12016
12109
|
else {
|
|
12017
12110
|
array.push(value);
|
|
@@ -17513,6 +17606,12 @@ var TokenType;
|
|
|
17513
17606
|
TokenType[TokenType["Number"] = 6] = "Number";
|
|
17514
17607
|
TokenType[TokenType["Error"] = 7] = "Error";
|
|
17515
17608
|
})(TokenType || (TokenType = {}));
|
|
17609
|
+
var StringTokenKind;
|
|
17610
|
+
(function (StringTokenKind) {
|
|
17611
|
+
StringTokenKind[StringTokenKind["Plain"] = 0] = "Plain";
|
|
17612
|
+
StringTokenKind[StringTokenKind["TemplateLiteralPart"] = 1] = "TemplateLiteralPart";
|
|
17613
|
+
StringTokenKind[StringTokenKind["TemplateLiteralEnd"] = 2] = "TemplateLiteralEnd";
|
|
17614
|
+
})(StringTokenKind || (StringTokenKind = {}));
|
|
17516
17615
|
const KEYWORDS = [
|
|
17517
17616
|
'var',
|
|
17518
17617
|
'let',
|
|
@@ -17528,14 +17627,7 @@ const KEYWORDS = [
|
|
|
17528
17627
|
];
|
|
17529
17628
|
class Lexer {
|
|
17530
17629
|
tokenize(text) {
|
|
17531
|
-
|
|
17532
|
-
const tokens = [];
|
|
17533
|
-
let token = scanner.scanToken();
|
|
17534
|
-
while (token != null) {
|
|
17535
|
-
tokens.push(token);
|
|
17536
|
-
token = scanner.scanToken();
|
|
17537
|
-
}
|
|
17538
|
-
return tokens;
|
|
17630
|
+
return new _Scanner(text).scan();
|
|
17539
17631
|
}
|
|
17540
17632
|
}
|
|
17541
17633
|
class Token {
|
|
@@ -17552,55 +17644,67 @@ class Token {
|
|
|
17552
17644
|
this.strValue = strValue;
|
|
17553
17645
|
}
|
|
17554
17646
|
isCharacter(code) {
|
|
17555
|
-
return this.type
|
|
17647
|
+
return this.type === TokenType.Character && this.numValue === code;
|
|
17556
17648
|
}
|
|
17557
17649
|
isNumber() {
|
|
17558
|
-
return this.type
|
|
17650
|
+
return this.type === TokenType.Number;
|
|
17559
17651
|
}
|
|
17560
17652
|
isString() {
|
|
17561
|
-
return this.type
|
|
17653
|
+
return this.type === TokenType.String;
|
|
17562
17654
|
}
|
|
17563
17655
|
isOperator(operator) {
|
|
17564
|
-
return this.type
|
|
17656
|
+
return this.type === TokenType.Operator && this.strValue === operator;
|
|
17565
17657
|
}
|
|
17566
17658
|
isIdentifier() {
|
|
17567
|
-
return this.type
|
|
17659
|
+
return this.type === TokenType.Identifier;
|
|
17568
17660
|
}
|
|
17569
17661
|
isPrivateIdentifier() {
|
|
17570
|
-
return this.type
|
|
17662
|
+
return this.type === TokenType.PrivateIdentifier;
|
|
17571
17663
|
}
|
|
17572
17664
|
isKeyword() {
|
|
17573
|
-
return this.type
|
|
17665
|
+
return this.type === TokenType.Keyword;
|
|
17574
17666
|
}
|
|
17575
17667
|
isKeywordLet() {
|
|
17576
|
-
return this.type
|
|
17668
|
+
return this.type === TokenType.Keyword && this.strValue === 'let';
|
|
17577
17669
|
}
|
|
17578
17670
|
isKeywordAs() {
|
|
17579
|
-
return this.type
|
|
17671
|
+
return this.type === TokenType.Keyword && this.strValue === 'as';
|
|
17580
17672
|
}
|
|
17581
17673
|
isKeywordNull() {
|
|
17582
|
-
return this.type
|
|
17674
|
+
return this.type === TokenType.Keyword && this.strValue === 'null';
|
|
17583
17675
|
}
|
|
17584
17676
|
isKeywordUndefined() {
|
|
17585
|
-
return this.type
|
|
17677
|
+
return this.type === TokenType.Keyword && this.strValue === 'undefined';
|
|
17586
17678
|
}
|
|
17587
17679
|
isKeywordTrue() {
|
|
17588
|
-
return this.type
|
|
17680
|
+
return this.type === TokenType.Keyword && this.strValue === 'true';
|
|
17589
17681
|
}
|
|
17590
17682
|
isKeywordFalse() {
|
|
17591
|
-
return this.type
|
|
17683
|
+
return this.type === TokenType.Keyword && this.strValue === 'false';
|
|
17592
17684
|
}
|
|
17593
17685
|
isKeywordThis() {
|
|
17594
|
-
return this.type
|
|
17686
|
+
return this.type === TokenType.Keyword && this.strValue === 'this';
|
|
17595
17687
|
}
|
|
17596
17688
|
isKeywordTypeof() {
|
|
17597
17689
|
return this.type === TokenType.Keyword && this.strValue === 'typeof';
|
|
17598
17690
|
}
|
|
17599
17691
|
isError() {
|
|
17600
|
-
return this.type
|
|
17692
|
+
return this.type === TokenType.Error;
|
|
17601
17693
|
}
|
|
17602
17694
|
toNumber() {
|
|
17603
|
-
return this.type
|
|
17695
|
+
return this.type === TokenType.Number ? this.numValue : -1;
|
|
17696
|
+
}
|
|
17697
|
+
isTemplateLiteralPart() {
|
|
17698
|
+
return this.isString() && this.kind === StringTokenKind.TemplateLiteralPart;
|
|
17699
|
+
}
|
|
17700
|
+
isTemplateLiteralEnd() {
|
|
17701
|
+
return this.isString() && this.kind === StringTokenKind.TemplateLiteralEnd;
|
|
17702
|
+
}
|
|
17703
|
+
isTemplateLiteralInterpolationStart() {
|
|
17704
|
+
return this.isOperator('${');
|
|
17705
|
+
}
|
|
17706
|
+
isTemplateLiteralInterpolationEnd() {
|
|
17707
|
+
return this.isOperator('}');
|
|
17604
17708
|
}
|
|
17605
17709
|
toString() {
|
|
17606
17710
|
switch (this.type) {
|
|
@@ -17619,6 +17723,13 @@ class Token {
|
|
|
17619
17723
|
}
|
|
17620
17724
|
}
|
|
17621
17725
|
}
|
|
17726
|
+
class StringToken extends Token {
|
|
17727
|
+
kind;
|
|
17728
|
+
constructor(index, end, strValue, kind) {
|
|
17729
|
+
super(index, end, TokenType.String, 0, strValue);
|
|
17730
|
+
this.kind = kind;
|
|
17731
|
+
}
|
|
17732
|
+
}
|
|
17622
17733
|
function newCharacterToken(index, end, code) {
|
|
17623
17734
|
return new Token(index, end, TokenType.Character, code, String.fromCharCode(code));
|
|
17624
17735
|
}
|
|
@@ -17634,9 +17745,6 @@ function newKeywordToken(index, end, text) {
|
|
|
17634
17745
|
function newOperatorToken(index, end, text) {
|
|
17635
17746
|
return new Token(index, end, TokenType.Operator, 0, text);
|
|
17636
17747
|
}
|
|
17637
|
-
function newStringToken(index, end, text) {
|
|
17638
|
-
return new Token(index, end, TokenType.String, 0, text);
|
|
17639
|
-
}
|
|
17640
17748
|
function newNumberToken(index, end, n) {
|
|
17641
17749
|
return new Token(index, end, TokenType.Number, n, '');
|
|
17642
17750
|
}
|
|
@@ -17646,20 +17754,33 @@ function newErrorToken(index, end, message) {
|
|
|
17646
17754
|
const EOF = new Token(-1, -1, TokenType.Character, 0, '');
|
|
17647
17755
|
class _Scanner {
|
|
17648
17756
|
input;
|
|
17757
|
+
tokens = [];
|
|
17649
17758
|
length;
|
|
17650
17759
|
peek = 0;
|
|
17651
17760
|
index = -1;
|
|
17761
|
+
literalInterpolationDepth = 0;
|
|
17762
|
+
braceDepth = 0;
|
|
17652
17763
|
constructor(input) {
|
|
17653
17764
|
this.input = input;
|
|
17654
17765
|
this.length = input.length;
|
|
17655
17766
|
this.advance();
|
|
17656
17767
|
}
|
|
17768
|
+
scan() {
|
|
17769
|
+
let token = this.scanToken();
|
|
17770
|
+
while (token !== null) {
|
|
17771
|
+
this.tokens.push(token);
|
|
17772
|
+
token = this.scanToken();
|
|
17773
|
+
}
|
|
17774
|
+
return this.tokens;
|
|
17775
|
+
}
|
|
17657
17776
|
advance() {
|
|
17658
17777
|
this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);
|
|
17659
17778
|
}
|
|
17660
17779
|
scanToken() {
|
|
17661
|
-
const input = this.input
|
|
17662
|
-
|
|
17780
|
+
const input = this.input;
|
|
17781
|
+
const length = this.length;
|
|
17782
|
+
let peek = this.peek;
|
|
17783
|
+
let index = this.index;
|
|
17663
17784
|
// Skip whitespace.
|
|
17664
17785
|
while (peek <= $SPACE) {
|
|
17665
17786
|
if (++index >= length) {
|
|
@@ -17676,10 +17797,12 @@ class _Scanner {
|
|
|
17676
17797
|
return null;
|
|
17677
17798
|
}
|
|
17678
17799
|
// Handle identifiers and numbers.
|
|
17679
|
-
if (isIdentifierStart(peek))
|
|
17800
|
+
if (isIdentifierStart(peek)) {
|
|
17680
17801
|
return this.scanIdentifier();
|
|
17681
|
-
|
|
17802
|
+
}
|
|
17803
|
+
if (isDigit(peek)) {
|
|
17682
17804
|
return this.scanNumber(index);
|
|
17805
|
+
}
|
|
17683
17806
|
const start = index;
|
|
17684
17807
|
switch (peek) {
|
|
17685
17808
|
case $PERIOD:
|
|
@@ -17689,17 +17812,22 @@ class _Scanner {
|
|
|
17689
17812
|
: newCharacterToken(start, this.index, $PERIOD);
|
|
17690
17813
|
case $LPAREN:
|
|
17691
17814
|
case $RPAREN:
|
|
17692
|
-
case $LBRACE:
|
|
17693
|
-
case $RBRACE:
|
|
17694
17815
|
case $LBRACKET:
|
|
17695
17816
|
case $RBRACKET:
|
|
17696
17817
|
case $COMMA:
|
|
17697
17818
|
case $COLON:
|
|
17698
17819
|
case $SEMICOLON:
|
|
17699
17820
|
return this.scanCharacter(start, peek);
|
|
17821
|
+
case $LBRACE:
|
|
17822
|
+
return this.scanOpenBrace(start, peek);
|
|
17823
|
+
case $RBRACE:
|
|
17824
|
+
return this.scanCloseBrace(start, peek);
|
|
17700
17825
|
case $SQ:
|
|
17701
17826
|
case $DQ:
|
|
17702
17827
|
return this.scanString();
|
|
17828
|
+
case $BT:
|
|
17829
|
+
this.advance();
|
|
17830
|
+
return this.scanTemplateLiteralPart(start);
|
|
17703
17831
|
case $HASH:
|
|
17704
17832
|
return this.scanPrivateIdentifier();
|
|
17705
17833
|
case $PLUS:
|
|
@@ -17737,6 +17865,21 @@ class _Scanner {
|
|
|
17737
17865
|
this.advance();
|
|
17738
17866
|
return newOperatorToken(start, this.index, str);
|
|
17739
17867
|
}
|
|
17868
|
+
scanOpenBrace(start, code) {
|
|
17869
|
+
this.braceDepth++;
|
|
17870
|
+
this.advance();
|
|
17871
|
+
return newCharacterToken(start, this.index, code);
|
|
17872
|
+
}
|
|
17873
|
+
scanCloseBrace(start, code) {
|
|
17874
|
+
this.advance();
|
|
17875
|
+
if (this.braceDepth === 0 && this.literalInterpolationDepth > 0) {
|
|
17876
|
+
this.literalInterpolationDepth--;
|
|
17877
|
+
this.tokens.push(newOperatorToken(start, this.index, '}'));
|
|
17878
|
+
return this.scanTemplateLiteralPart(this.index);
|
|
17879
|
+
}
|
|
17880
|
+
this.braceDepth--;
|
|
17881
|
+
return newCharacterToken(start, this.index, code);
|
|
17882
|
+
}
|
|
17740
17883
|
/**
|
|
17741
17884
|
* Tokenize a 2/3 char long operator
|
|
17742
17885
|
*
|
|
@@ -17834,28 +17977,11 @@ class _Scanner {
|
|
|
17834
17977
|
const input = this.input;
|
|
17835
17978
|
while (this.peek != quote) {
|
|
17836
17979
|
if (this.peek == $BACKSLASH) {
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
// @ts-expect-error see microsoft/TypeScript#9998
|
|
17841
|
-
if (this.peek == $u) {
|
|
17842
|
-
// 4 character hex code for unicode character.
|
|
17843
|
-
const hex = input.substring(this.index + 1, this.index + 5);
|
|
17844
|
-
if (/^[0-9a-f]+$/i.test(hex)) {
|
|
17845
|
-
unescapedCode = parseInt(hex, 16);
|
|
17846
|
-
}
|
|
17847
|
-
else {
|
|
17848
|
-
return this.error(`Invalid unicode escape [\\u${hex}]`, 0);
|
|
17849
|
-
}
|
|
17850
|
-
for (let i = 0; i < 5; i++) {
|
|
17851
|
-
this.advance();
|
|
17852
|
-
}
|
|
17980
|
+
const result = this.scanStringBackslash(buffer, marker);
|
|
17981
|
+
if (typeof result !== 'string') {
|
|
17982
|
+
return result; // Error
|
|
17853
17983
|
}
|
|
17854
|
-
|
|
17855
|
-
unescapedCode = unescape(this.peek);
|
|
17856
|
-
this.advance();
|
|
17857
|
-
}
|
|
17858
|
-
buffer += String.fromCharCode(unescapedCode);
|
|
17984
|
+
buffer = result;
|
|
17859
17985
|
marker = this.index;
|
|
17860
17986
|
}
|
|
17861
17987
|
else if (this.peek == $EOF) {
|
|
@@ -17867,7 +17993,7 @@ class _Scanner {
|
|
|
17867
17993
|
}
|
|
17868
17994
|
const last = input.substring(marker, this.index);
|
|
17869
17995
|
this.advance(); // Skip terminating quote.
|
|
17870
|
-
return
|
|
17996
|
+
return new StringToken(start, this.index, buffer + last, StringTokenKind.Plain);
|
|
17871
17997
|
}
|
|
17872
17998
|
scanQuestion(start) {
|
|
17873
17999
|
this.advance();
|
|
@@ -17879,10 +18005,68 @@ class _Scanner {
|
|
|
17879
18005
|
}
|
|
17880
18006
|
return newOperatorToken(start, this.index, str);
|
|
17881
18007
|
}
|
|
18008
|
+
scanTemplateLiteralPart(start) {
|
|
18009
|
+
let buffer = '';
|
|
18010
|
+
let marker = this.index;
|
|
18011
|
+
while (this.peek !== $BT) {
|
|
18012
|
+
if (this.peek === $BACKSLASH) {
|
|
18013
|
+
const result = this.scanStringBackslash(buffer, marker);
|
|
18014
|
+
if (typeof result !== 'string') {
|
|
18015
|
+
return result; // Error
|
|
18016
|
+
}
|
|
18017
|
+
buffer = result;
|
|
18018
|
+
marker = this.index;
|
|
18019
|
+
}
|
|
18020
|
+
else if (this.peek === $$) {
|
|
18021
|
+
const dollar = this.index;
|
|
18022
|
+
this.advance();
|
|
18023
|
+
// @ts-expect-error
|
|
18024
|
+
if (this.peek === $LBRACE) {
|
|
18025
|
+
this.literalInterpolationDepth++;
|
|
18026
|
+
this.tokens.push(new StringToken(start, dollar, buffer + this.input.substring(marker, dollar), StringTokenKind.TemplateLiteralPart));
|
|
18027
|
+
this.advance();
|
|
18028
|
+
return newOperatorToken(dollar, this.index, this.input.substring(dollar, this.index));
|
|
18029
|
+
}
|
|
18030
|
+
}
|
|
18031
|
+
else if (this.peek === $EOF) {
|
|
18032
|
+
return this.error('Unterminated template literal', 0);
|
|
18033
|
+
}
|
|
18034
|
+
else {
|
|
18035
|
+
this.advance();
|
|
18036
|
+
}
|
|
18037
|
+
}
|
|
18038
|
+
const last = this.input.substring(marker, this.index);
|
|
18039
|
+
this.advance();
|
|
18040
|
+
return new StringToken(start, this.index, buffer + last, StringTokenKind.TemplateLiteralEnd);
|
|
18041
|
+
}
|
|
17882
18042
|
error(message, offset) {
|
|
17883
18043
|
const position = this.index + offset;
|
|
17884
18044
|
return newErrorToken(position, this.index, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`);
|
|
17885
18045
|
}
|
|
18046
|
+
scanStringBackslash(buffer, marker) {
|
|
18047
|
+
buffer += this.input.substring(marker, this.index);
|
|
18048
|
+
let unescapedCode;
|
|
18049
|
+
this.advance();
|
|
18050
|
+
if (this.peek === $u) {
|
|
18051
|
+
// 4 character hex code for unicode character.
|
|
18052
|
+
const hex = this.input.substring(this.index + 1, this.index + 5);
|
|
18053
|
+
if (/^[0-9a-f]+$/i.test(hex)) {
|
|
18054
|
+
unescapedCode = parseInt(hex, 16);
|
|
18055
|
+
}
|
|
18056
|
+
else {
|
|
18057
|
+
return this.error(`Invalid unicode escape [\\u${hex}]`, 0);
|
|
18058
|
+
}
|
|
18059
|
+
for (let i = 0; i < 5; i++) {
|
|
18060
|
+
this.advance();
|
|
18061
|
+
}
|
|
18062
|
+
}
|
|
18063
|
+
else {
|
|
18064
|
+
unescapedCode = unescape(this.peek);
|
|
18065
|
+
this.advance();
|
|
18066
|
+
}
|
|
18067
|
+
buffer += String.fromCharCode(unescapedCode);
|
|
18068
|
+
return buffer;
|
|
18069
|
+
}
|
|
17886
18070
|
}
|
|
17887
18071
|
function isIdentifierStart(code) {
|
|
17888
18072
|
return (($a <= code && code <= $z) ||
|
|
@@ -18710,7 +18894,13 @@ class _ParseAST {
|
|
|
18710
18894
|
this.advance();
|
|
18711
18895
|
return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);
|
|
18712
18896
|
}
|
|
18713
|
-
else if (this.next.
|
|
18897
|
+
else if (this.next.isTemplateLiteralEnd()) {
|
|
18898
|
+
return this.parseNoInterpolationTemplateLiteral(start);
|
|
18899
|
+
}
|
|
18900
|
+
else if (this.next.isTemplateLiteralPart()) {
|
|
18901
|
+
return this.parseTemplateLiteral();
|
|
18902
|
+
}
|
|
18903
|
+
else if (this.next.isString() && this.next.kind === StringTokenKind.Plain) {
|
|
18714
18904
|
const literalValue = this.next.toString();
|
|
18715
18905
|
this.advance();
|
|
18716
18906
|
return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);
|
|
@@ -19035,6 +19225,42 @@ class _ParseAST {
|
|
|
19035
19225
|
const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);
|
|
19036
19226
|
return new VariableBinding(sourceSpan, key, value);
|
|
19037
19227
|
}
|
|
19228
|
+
parseNoInterpolationTemplateLiteral(start) {
|
|
19229
|
+
const text = this.next.strValue;
|
|
19230
|
+
this.advance();
|
|
19231
|
+
const span = this.span(start);
|
|
19232
|
+
const sourceSpan = this.sourceSpan(start);
|
|
19233
|
+
return new TemplateLiteral(span, sourceSpan, [new TemplateLiteralElement(span, sourceSpan, text)], []);
|
|
19234
|
+
}
|
|
19235
|
+
parseTemplateLiteral() {
|
|
19236
|
+
const start = this.inputIndex;
|
|
19237
|
+
const elements = [];
|
|
19238
|
+
const expressions = [];
|
|
19239
|
+
while (this.next !== EOF) {
|
|
19240
|
+
const token = this.next;
|
|
19241
|
+
if (token.isTemplateLiteralPart() || token.isTemplateLiteralEnd()) {
|
|
19242
|
+
elements.push(new TemplateLiteralElement(this.span(this.inputIndex), this.sourceSpan(this.inputIndex), token.strValue));
|
|
19243
|
+
this.advance();
|
|
19244
|
+
if (token.isTemplateLiteralEnd()) {
|
|
19245
|
+
break;
|
|
19246
|
+
}
|
|
19247
|
+
}
|
|
19248
|
+
else if (token.isTemplateLiteralInterpolationStart()) {
|
|
19249
|
+
this.advance();
|
|
19250
|
+
const expression = this.parsePipe();
|
|
19251
|
+
if (expression instanceof EmptyExpr$1) {
|
|
19252
|
+
this.error('Template literal interpolation cannot be empty');
|
|
19253
|
+
}
|
|
19254
|
+
else {
|
|
19255
|
+
expressions.push(expression);
|
|
19256
|
+
}
|
|
19257
|
+
}
|
|
19258
|
+
else {
|
|
19259
|
+
this.advance();
|
|
19260
|
+
}
|
|
19261
|
+
}
|
|
19262
|
+
return new TemplateLiteral(this.span(start), this.sourceSpan(start), elements, expressions);
|
|
19263
|
+
}
|
|
19038
19264
|
/**
|
|
19039
19265
|
* Consume the optional statement terminator: semicolon or comma.
|
|
19040
19266
|
*/
|
|
@@ -19253,6 +19479,20 @@ class SerializeExpressionVisitor {
|
|
|
19253
19479
|
visitASTWithSource(ast, context) {
|
|
19254
19480
|
return ast.ast.visit(this, context);
|
|
19255
19481
|
}
|
|
19482
|
+
visitTemplateLiteral(ast, context) {
|
|
19483
|
+
let result = '';
|
|
19484
|
+
for (let i = 0; i < ast.elements.length; i++) {
|
|
19485
|
+
result += ast.elements[i].visit(this, context);
|
|
19486
|
+
const expression = i < ast.expressions.length ? ast.expressions[i] : null;
|
|
19487
|
+
if (expression !== null) {
|
|
19488
|
+
result += '${' + expression.visit(this, context) + '}';
|
|
19489
|
+
}
|
|
19490
|
+
}
|
|
19491
|
+
return '`' + result + '`';
|
|
19492
|
+
}
|
|
19493
|
+
visitTemplateLiteralElement(ast, context) {
|
|
19494
|
+
return ast.text;
|
|
19495
|
+
}
|
|
19256
19496
|
}
|
|
19257
19497
|
/** Zips the two input arrays into a single array of pairs of elements at the same index. */
|
|
19258
19498
|
function zip(left, right) {
|
|
@@ -25921,6 +26161,11 @@ function convertAst(ast, job, baseSourceSpan) {
|
|
|
25921
26161
|
else if (ast instanceof TypeofExpression) {
|
|
25922
26162
|
return typeofExpr(convertAst(ast.expression, job, baseSourceSpan));
|
|
25923
26163
|
}
|
|
26164
|
+
else if (ast instanceof TemplateLiteral) {
|
|
26165
|
+
return new TemplateLiteralExpr(ast.elements.map((el) => {
|
|
26166
|
+
return new TemplateLiteralElementExpr(el.text, convertSourceSpan(el.span, baseSourceSpan));
|
|
26167
|
+
}), ast.expressions.map((expr) => convertAst(expr, job, baseSourceSpan)), convertSourceSpan(ast.span, baseSourceSpan));
|
|
26168
|
+
}
|
|
25924
26169
|
else {
|
|
25925
26170
|
throw new Error(`Unhandled expression type "${ast.constructor.name}" in file "${baseSourceSpan?.start.file.url}"`);
|
|
25926
26171
|
}
|
|
@@ -30763,7 +31008,7 @@ function publishFacade(global) {
|
|
|
30763
31008
|
* @description
|
|
30764
31009
|
* Entry point for all public APIs of the compiler package.
|
|
30765
31010
|
*/
|
|
30766
|
-
const VERSION = new Version('19.
|
|
31011
|
+
const VERSION = new Version('19.2.0-next.0');
|
|
30767
31012
|
|
|
30768
31013
|
class CompilerConfig {
|
|
30769
31014
|
defaultEncapsulation;
|
|
@@ -32619,7 +32864,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
32619
32864
|
function compileDeclareClassMetadata(metadata) {
|
|
32620
32865
|
const definitionMap = new DefinitionMap();
|
|
32621
32866
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
32622
|
-
definitionMap.set('version', literal('19.
|
|
32867
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
32623
32868
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32624
32869
|
definitionMap.set('type', metadata.type);
|
|
32625
32870
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -32637,7 +32882,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
32637
32882
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
32638
32883
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
32639
32884
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
32640
|
-
definitionMap.set('version', literal('19.
|
|
32885
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
32641
32886
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
32642
32887
|
definitionMap.set('type', metadata.type);
|
|
32643
32888
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -32732,7 +32977,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
32732
32977
|
const definitionMap = new DefinitionMap();
|
|
32733
32978
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
32734
32979
|
definitionMap.set('minVersion', literal(minVersion));
|
|
32735
|
-
definitionMap.set('version', literal('19.
|
|
32980
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
32736
32981
|
// e.g. `type: MyDirective`
|
|
32737
32982
|
definitionMap.set('type', meta.type.value);
|
|
32738
32983
|
if (meta.isStandalone !== undefined) {
|
|
@@ -33151,7 +33396,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
33151
33396
|
function compileDeclareFactoryFunction(meta) {
|
|
33152
33397
|
const definitionMap = new DefinitionMap();
|
|
33153
33398
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
33154
|
-
definitionMap.set('version', literal('19.
|
|
33399
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
33155
33400
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33156
33401
|
definitionMap.set('type', meta.type.value);
|
|
33157
33402
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -33186,7 +33431,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
33186
33431
|
function createInjectableDefinitionMap(meta) {
|
|
33187
33432
|
const definitionMap = new DefinitionMap();
|
|
33188
33433
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
33189
|
-
definitionMap.set('version', literal('19.
|
|
33434
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
33190
33435
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33191
33436
|
definitionMap.set('type', meta.type.value);
|
|
33192
33437
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -33237,7 +33482,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
33237
33482
|
function createInjectorDefinitionMap(meta) {
|
|
33238
33483
|
const definitionMap = new DefinitionMap();
|
|
33239
33484
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
33240
|
-
definitionMap.set('version', literal('19.
|
|
33485
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
33241
33486
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33242
33487
|
definitionMap.set('type', meta.type.value);
|
|
33243
33488
|
definitionMap.set('providers', meta.providers);
|
|
@@ -33270,7 +33515,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
33270
33515
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
33271
33516
|
}
|
|
33272
33517
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
33273
|
-
definitionMap.set('version', literal('19.
|
|
33518
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
33274
33519
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33275
33520
|
definitionMap.set('type', meta.type.value);
|
|
33276
33521
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -33321,7 +33566,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
33321
33566
|
function createPipeDefinitionMap(meta) {
|
|
33322
33567
|
const definitionMap = new DefinitionMap();
|
|
33323
33568
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
33324
|
-
definitionMap.set('version', literal('19.
|
|
33569
|
+
definitionMap.set('version', literal('19.2.0-next.0'));
|
|
33325
33570
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
33326
33571
|
// e.g. `type: MyPipe`
|
|
33327
33572
|
definitionMap.set('type', meta.type.value);
|
|
@@ -33354,5 +33599,5 @@ publishFacade(_global);
|
|
|
33354
33599
|
|
|
33355
33600
|
// This file is not used to build this module. It is only used during editing
|
|
33356
33601
|
|
|
33357
|
-
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType,
|
|
33602
|
+
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, ArrowFunctionExpr, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BindingType, Block, BlockParameter, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, DynamicImportExpr, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr$1 as EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation$1 as Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, LetDeclaration, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedEventType, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, StringToken, StringTokenKind, TagContentType, TaggedTemplateLiteralExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, TemplateLiteralElementExpr, TemplateLiteralExpr, Text, ThisReceiver, BlockNode as TmplAstBlockNode, BoundAttribute as TmplAstBoundAttribute, BoundDeferredTrigger as TmplAstBoundDeferredTrigger, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, DeferredBlock as TmplAstDeferredBlock, DeferredBlockError as TmplAstDeferredBlockError, DeferredBlockLoading as TmplAstDeferredBlockLoading, DeferredBlockPlaceholder as TmplAstDeferredBlockPlaceholder, DeferredTrigger as TmplAstDeferredTrigger, Element$1 as TmplAstElement, ForLoopBlock as TmplAstForLoopBlock, ForLoopBlockEmpty as TmplAstForLoopBlockEmpty, HoverDeferredTrigger as TmplAstHoverDeferredTrigger, Icu$1 as TmplAstIcu, IdleDeferredTrigger as TmplAstIdleDeferredTrigger, IfBlock as TmplAstIfBlock, IfBlockBranch as TmplAstIfBlockBranch, ImmediateDeferredTrigger as TmplAstImmediateDeferredTrigger, InteractionDeferredTrigger as TmplAstInteractionDeferredTrigger, LetDeclaration$1 as TmplAstLetDeclaration, NeverDeferredTrigger as TmplAstNeverDeferredTrigger, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, SwitchBlock as TmplAstSwitchBlock, SwitchBlockCase as TmplAstSwitchBlockCase, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, TimerDeferredTrigger as TmplAstTimerDeferredTrigger, UnknownBlock as TmplAstUnknownBlock, Variable as TmplAstVariable, ViewportDeferredTrigger as TmplAstViewportDeferredTrigger, Token, TokenType, TransplantedType, TreeError, Type, TypeModifier, TypeofExpr, TypeofExpression, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, compileClassDebugInfo, compileClassMetadata, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDeferResolverFunction, compileDirectiveFromMetadata, compileFactoryFunction, compileHmrInitializer, compileHmrUpdateCallback, compileInjectable, compileInjector, compileNgModule, compileOpaqueAsyncClassMetadata, compilePipeFromMetadata, computeMsgId, core, createCssSelectorFromNode, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, encapsulateStyle, findMatchingDirectivesAndPipes, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literal, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, visitAll$1 as tmplAstVisitAll, verifyHostBindings, visitAll };
|
|
33358
33603
|
//# sourceMappingURL=compiler.mjs.map
|