source: trip-planner-front/node_modules/@angular/compiler/esm2015/src/expression_parser/parser.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 171.5 KB
Line 
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 */
8import * as chars from '../chars';
9import { DEFAULT_INTERPOLATION_CONFIG } from '../ml_parser/interpolation_config';
10import { AbsoluteSourceSpan, ASTWithSource, Binary, BindingPipe, Chain, Conditional, EmptyExpr, ExpressionBinding, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, NonNullAssert, ParserError, ParseSpan, PrefixNot, PropertyRead, PropertyWrite, Quote, RecursiveAstVisitor, SafeKeyedRead, SafeMethodCall, SafePropertyRead, ThisReceiver, Unary, VariableBinding } from './ast';
11import { EOF, isIdentifier, TokenType } from './lexer';
12export class SplitInterpolation {
13 constructor(strings, expressions, offsets) {
14 this.strings = strings;
15 this.expressions = expressions;
16 this.offsets = offsets;
17 }
18}
19export class TemplateBindingParseResult {
20 constructor(templateBindings, warnings, errors) {
21 this.templateBindings = templateBindings;
22 this.warnings = warnings;
23 this.errors = errors;
24 }
25}
26export class Parser {
27 constructor(_lexer) {
28 this._lexer = _lexer;
29 this.errors = [];
30 this.simpleExpressionChecker = SimpleExpressionChecker;
31 }
32 parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
33 this._checkNoInterpolation(input, location, interpolationConfig);
34 const sourceToLex = this._stripComments(input);
35 const tokens = this._lexer.tokenize(this._stripComments(input));
36 const ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)
37 .parseChain();
38 return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
39 }
40 parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
41 const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
42 return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
43 }
44 checkSimpleExpression(ast) {
45 const checker = new this.simpleExpressionChecker();
46 ast.visit(checker);
47 return checker.errors;
48 }
49 parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
50 const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig);
51 const errors = this.checkSimpleExpression(ast);
52 if (errors.length > 0) {
53 this._reportError(`Host binding expression cannot contain ${errors.join(' ')}`, input, location);
54 }
55 return new ASTWithSource(ast, input, location, absoluteOffset, this.errors);
56 }
57 _reportError(message, input, errLocation, ctxLocation) {
58 this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
59 }
60 _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
61 // Quotes expressions use 3rd-party expression language. We don't want to use
62 // our lexer or parser for that, so we check for that ahead of time.
63 const quote = this._parseQuote(input, location, absoluteOffset);
64 if (quote != null) {
65 return quote;
66 }
67 this._checkNoInterpolation(input, location, interpolationConfig);
68 const sourceToLex = this._stripComments(input);
69 const tokens = this._lexer.tokenize(sourceToLex);
70 return new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)
71 .parseChain();
72 }
73 _parseQuote(input, location, absoluteOffset) {
74 if (input == null)
75 return null;
76 const prefixSeparatorIndex = input.indexOf(':');
77 if (prefixSeparatorIndex == -1)
78 return null;
79 const prefix = input.substring(0, prefixSeparatorIndex).trim();
80 if (!isIdentifier(prefix))
81 return null;
82 const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
83 const span = new ParseSpan(0, input.length);
84 return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
85 }
86 /**
87 * Parse microsyntax template expression and return a list of bindings or
88 * parsing errors in case the given expression is invalid.
89 *
90 * For example,
91 * ```
92 * <div *ngFor="let item of items">
93 * ^ ^ absoluteValueOffset for `templateValue`
94 * absoluteKeyOffset for `templateKey`
95 * ```
96 * contains three bindings:
97 * 1. ngFor -> null
98 * 2. item -> NgForOfContext.$implicit
99 * 3. ngForOf -> items
100 *
101 * This is apparent from the de-sugared template:
102 * ```
103 * <ng-template ngFor let-item [ngForOf]="items">
104 * ```
105 *
106 * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor
107 * @param templateValue RHS of the microsyntax attribute
108 * @param templateUrl template filename if it's external, component filename if it's inline
109 * @param absoluteKeyOffset start of the `templateKey`
110 * @param absoluteValueOffset start of the `templateValue`
111 */
112 parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) {
113 const tokens = this._lexer.tokenize(templateValue);
114 const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, templateValue.length, false /* parseAction */, this.errors, 0 /* relative offset */);
115 return parser.parseTemplateBindings({
116 source: templateKey,
117 span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length),
118 });
119 }
120 parseInterpolation(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
121 const { strings, expressions, offsets } = this.splitInterpolation(input, location, interpolationConfig);
122 if (expressions.length === 0)
123 return null;
124 const expressionNodes = [];
125 for (let i = 0; i < expressions.length; ++i) {
126 const expressionText = expressions[i].text;
127 const sourceToLex = this._stripComments(expressionText);
128 const tokens = this._lexer.tokenize(sourceToLex);
129 const ast = new _ParseAST(input, location, absoluteOffset, tokens, sourceToLex.length, false, this.errors, offsets[i] + (expressionText.length - sourceToLex.length))
130 .parseChain();
131 expressionNodes.push(ast);
132 }
133 return this.createInterpolationAst(strings.map(s => s.text), expressionNodes, input, location, absoluteOffset);
134 }
135 /**
136 * Similar to `parseInterpolation`, but treats the provided string as a single expression
137 * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
138 * This is used for parsing the switch expression in ICUs.
139 */
140 parseInterpolationExpression(expression, location, absoluteOffset) {
141 const sourceToLex = this._stripComments(expression);
142 const tokens = this._lexer.tokenize(sourceToLex);
143 const ast = new _ParseAST(expression, location, absoluteOffset, tokens, sourceToLex.length,
144 /* parseAction */ false, this.errors, 0)
145 .parseChain();
146 const strings = ['', '']; // The prefix and suffix strings are both empty
147 return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset);
148 }
149 createInterpolationAst(strings, expressions, input, location, absoluteOffset) {
150 const span = new ParseSpan(0, input.length);
151 const interpolation = new Interpolation(span, span.toAbsolute(absoluteOffset), strings, expressions);
152 return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors);
153 }
154 /**
155 * Splits a string of text into "raw" text segments and expressions present in interpolations in
156 * the string.
157 * Returns `null` if there are no interpolations, otherwise a
158 * `SplitInterpolation` with splits that look like
159 * <raw text> <expression> <raw text> ... <raw text> <expression> <raw text>
160 */
161 splitInterpolation(input, location, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {
162 const strings = [];
163 const expressions = [];
164 const offsets = [];
165 let i = 0;
166 let atInterpolation = false;
167 let extendLastString = false;
168 let { start: interpStart, end: interpEnd } = interpolationConfig;
169 while (i < input.length) {
170 if (!atInterpolation) {
171 // parse until starting {{
172 const start = i;
173 i = input.indexOf(interpStart, i);
174 if (i === -1) {
175 i = input.length;
176 }
177 const text = input.substring(start, i);
178 strings.push({ text, start, end: i });
179 atInterpolation = true;
180 }
181 else {
182 // parse from starting {{ to ending }} while ignoring content inside quotes.
183 const fullStart = i;
184 const exprStart = fullStart + interpStart.length;
185 const exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart);
186 if (exprEnd === -1) {
187 // Could not find the end of the interpolation; do not parse an expression.
188 // Instead we should extend the content on the last raw string.
189 atInterpolation = false;
190 extendLastString = true;
191 break;
192 }
193 const fullEnd = exprEnd + interpEnd.length;
194 const text = input.substring(exprStart, exprEnd);
195 if (text.trim().length === 0) {
196 this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location);
197 }
198 expressions.push({ text, start: fullStart, end: fullEnd });
199 offsets.push(exprStart);
200 i = fullEnd;
201 atInterpolation = false;
202 }
203 }
204 if (!atInterpolation) {
205 // If we are now at a text section, add the remaining content as a raw string.
206 if (extendLastString) {
207 const piece = strings[strings.length - 1];
208 piece.text += input.substring(i);
209 piece.end = input.length;
210 }
211 else {
212 strings.push({ text: input.substring(i), start: i, end: input.length });
213 }
214 }
215 return new SplitInterpolation(strings, expressions, offsets);
216 }
217 wrapLiteralPrimitive(input, location, absoluteOffset) {
218 const span = new ParseSpan(0, input == null ? 0 : input.length);
219 return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors);
220 }
221 _stripComments(input) {
222 const i = this._commentStart(input);
223 return i != null ? input.substring(0, i).trim() : input;
224 }
225 _commentStart(input) {
226 let outerQuote = null;
227 for (let i = 0; i < input.length - 1; i++) {
228 const char = input.charCodeAt(i);
229 const nextChar = input.charCodeAt(i + 1);
230 if (char === chars.$SLASH && nextChar == chars.$SLASH && outerQuote == null)
231 return i;
232 if (outerQuote === char) {
233 outerQuote = null;
234 }
235 else if (outerQuote == null && chars.isQuote(char)) {
236 outerQuote = char;
237 }
238 }
239 return null;
240 }
241 _checkNoInterpolation(input, location, { start, end }) {
242 let startIndex = -1;
243 let endIndex = -1;
244 for (const charIndex of this._forEachUnquotedChar(input, 0)) {
245 if (startIndex === -1) {
246 if (input.startsWith(start)) {
247 startIndex = charIndex;
248 }
249 }
250 else {
251 endIndex = this._getInterpolationEndIndex(input, end, charIndex);
252 if (endIndex > -1) {
253 break;
254 }
255 }
256 }
257 if (startIndex > -1 && endIndex > -1) {
258 this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location);
259 }
260 }
261 /**
262 * Finds the index of the end of an interpolation expression
263 * while ignoring comments and quoted content.
264 */
265 _getInterpolationEndIndex(input, expressionEnd, start) {
266 for (const charIndex of this._forEachUnquotedChar(input, start)) {
267 if (input.startsWith(expressionEnd, charIndex)) {
268 return charIndex;
269 }
270 // Nothing else in the expression matters after we've
271 // hit a comment so look directly for the end token.
272 if (input.startsWith('//', charIndex)) {
273 return input.indexOf(expressionEnd, charIndex);
274 }
275 }
276 return -1;
277 }
278 /**
279 * Generator used to iterate over the character indexes of a string that are outside of quotes.
280 * @param input String to loop through.
281 * @param start Index within the string at which to start.
282 */
283 *_forEachUnquotedChar(input, start) {
284 let currentQuote = null;
285 let escapeCount = 0;
286 for (let i = start; i < input.length; i++) {
287 const char = input[i];
288 // Skip the characters inside quotes. Note that we only care about the outer-most
289 // quotes matching up and we need to account for escape characters.
290 if (chars.isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) &&
291 escapeCount % 2 === 0) {
292 currentQuote = currentQuote === null ? char : null;
293 }
294 else if (currentQuote === null) {
295 yield i;
296 }
297 escapeCount = char === '\\' ? escapeCount + 1 : 0;
298 }
299 }
300}
301export class IvyParser extends Parser {
302 constructor() {
303 super(...arguments);
304 this.simpleExpressionChecker = IvySimpleExpressionChecker;
305 }
306}
307/** Describes a stateful context an expression parser is in. */
308var ParseContextFlags;
309(function (ParseContextFlags) {
310 ParseContextFlags[ParseContextFlags["None"] = 0] = "None";
311 /**
312 * A Writable context is one in which a value may be written to an lvalue.
313 * For example, after we see a property access, we may expect a write to the
314 * property via the "=" operator.
315 * prop
316 * ^ possible "=" after
317 */
318 ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable";
319})(ParseContextFlags || (ParseContextFlags = {}));
320export class _ParseAST {
321 constructor(input, location, absoluteOffset, tokens, inputLength, parseAction, errors, offset) {
322 this.input = input;
323 this.location = location;
324 this.absoluteOffset = absoluteOffset;
325 this.tokens = tokens;
326 this.inputLength = inputLength;
327 this.parseAction = parseAction;
328 this.errors = errors;
329 this.offset = offset;
330 this.rparensExpected = 0;
331 this.rbracketsExpected = 0;
332 this.rbracesExpected = 0;
333 this.context = ParseContextFlags.None;
334 // Cache of expression start and input indeces to the absolute source span they map to, used to
335 // prevent creating superfluous source spans in `sourceSpan`.
336 // A serial of the expression start and input index is used for mapping because both are stateful
337 // and may change for subsequent expressions visited by the parser.
338 this.sourceSpanCache = new Map();
339 this.index = 0;
340 }
341 peek(offset) {
342 const i = this.index + offset;
343 return i < this.tokens.length ? this.tokens[i] : EOF;
344 }
345 get next() {
346 return this.peek(0);
347 }
348 /** Whether all the parser input has been processed. */
349 get atEOF() {
350 return this.index >= this.tokens.length;
351 }
352 /**
353 * Index of the next token to be processed, or the end of the last token if all have been
354 * processed.
355 */
356 get inputIndex() {
357 return this.atEOF ? this.currentEndIndex : this.next.index + this.offset;
358 }
359 /**
360 * End index of the last processed token, or the start of the first token if none have been
361 * processed.
362 */
363 get currentEndIndex() {
364 if (this.index > 0) {
365 const curToken = this.peek(-1);
366 return curToken.end + this.offset;
367 }
368 // No tokens have been processed yet; return the next token's start or the length of the input
369 // if there is no token.
370 if (this.tokens.length === 0) {
371 return this.inputLength + this.offset;
372 }
373 return this.next.index + this.offset;
374 }
375 /**
376 * Returns the absolute offset of the start of the current token.
377 */
378 get currentAbsoluteOffset() {
379 return this.absoluteOffset + this.inputIndex;
380 }
381 /**
382 * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if
383 * provided).
384 *
385 * @param start Position from which the `ParseSpan` will start.
386 * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the
387 * natural ending index)
388 */
389 span(start, artificialEndIndex) {
390 let endIndex = this.currentEndIndex;
391 if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) {
392 endIndex = artificialEndIndex;
393 }
394 // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is
395 // being created), the current token may already be advanced beyond the `currentEndIndex`. This
396 // appears to be a deep-seated parser bug.
397 //
398 // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`.
399 // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround.
400 if (start > endIndex) {
401 const tmp = endIndex;
402 endIndex = start;
403 start = tmp;
404 }
405 return new ParseSpan(start, endIndex);
406 }
407 sourceSpan(start, artificialEndIndex) {
408 const serial = `${start}@${this.inputIndex}:${artificialEndIndex}`;
409 if (!this.sourceSpanCache.has(serial)) {
410 this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset));
411 }
412 return this.sourceSpanCache.get(serial);
413 }
414 advance() {
415 this.index++;
416 }
417 /**
418 * Executes a callback in the provided context.
419 */
420 withContext(context, cb) {
421 this.context |= context;
422 const ret = cb();
423 this.context ^= context;
424 return ret;
425 }
426 consumeOptionalCharacter(code) {
427 if (this.next.isCharacter(code)) {
428 this.advance();
429 return true;
430 }
431 else {
432 return false;
433 }
434 }
435 peekKeywordLet() {
436 return this.next.isKeywordLet();
437 }
438 peekKeywordAs() {
439 return this.next.isKeywordAs();
440 }
441 /**
442 * Consumes an expected character, otherwise emits an error about the missing expected character
443 * and skips over the token stream until reaching a recoverable point.
444 *
445 * See `this.error` and `this.skip` for more details.
446 */
447 expectCharacter(code) {
448 if (this.consumeOptionalCharacter(code))
449 return;
450 this.error(`Missing expected ${String.fromCharCode(code)}`);
451 }
452 consumeOptionalOperator(op) {
453 if (this.next.isOperator(op)) {
454 this.advance();
455 return true;
456 }
457 else {
458 return false;
459 }
460 }
461 expectOperator(operator) {
462 if (this.consumeOptionalOperator(operator))
463 return;
464 this.error(`Missing expected operator ${operator}`);
465 }
466 prettyPrintToken(tok) {
467 return tok === EOF ? 'end of input' : `token ${tok}`;
468 }
469 expectIdentifierOrKeyword() {
470 const n = this.next;
471 if (!n.isIdentifier() && !n.isKeyword()) {
472 if (n.isPrivateIdentifier()) {
473 this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword');
474 }
475 else {
476 this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);
477 }
478 return null;
479 }
480 this.advance();
481 return n.toString();
482 }
483 expectIdentifierOrKeywordOrString() {
484 const n = this.next;
485 if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
486 if (n.isPrivateIdentifier()) {
487 this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string');
488 }
489 else {
490 this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);
491 }
492 return '';
493 }
494 this.advance();
495 return n.toString();
496 }
497 parseChain() {
498 const exprs = [];
499 const start = this.inputIndex;
500 while (this.index < this.tokens.length) {
501 const expr = this.parsePipe();
502 exprs.push(expr);
503 if (this.consumeOptionalCharacter(chars.$SEMICOLON)) {
504 if (!this.parseAction) {
505 this.error('Binding expression cannot contain chained expression');
506 }
507 while (this.consumeOptionalCharacter(chars.$SEMICOLON)) {
508 } // read all semicolons
509 }
510 else if (this.index < this.tokens.length) {
511 this.error(`Unexpected token '${this.next}'`);
512 }
513 }
514 if (exprs.length == 0) {
515 // We have no expressions so create an empty expression that spans the entire input length
516 const artificialStart = this.offset;
517 const artificialEnd = this.offset + this.inputLength;
518 return new EmptyExpr(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd));
519 }
520 if (exprs.length == 1)
521 return exprs[0];
522 return new Chain(this.span(start), this.sourceSpan(start), exprs);
523 }
524 parsePipe() {
525 const start = this.inputIndex;
526 let result = this.parseExpression();
527 if (this.consumeOptionalOperator('|')) {
528 if (this.parseAction) {
529 this.error('Cannot have a pipe in an action expression');
530 }
531 do {
532 const nameStart = this.inputIndex;
533 let nameId = this.expectIdentifierOrKeyword();
534 let nameSpan;
535 let fullSpanEnd = undefined;
536 if (nameId !== null) {
537 nameSpan = this.sourceSpan(nameStart);
538 }
539 else {
540 // No valid identifier was found, so we'll assume an empty pipe name ('').
541 nameId = '';
542 // However, there may have been whitespace present between the pipe character and the next
543 // token in the sequence (or the end of input). We want to track this whitespace so that
544 // the `BindingPipe` we produce covers not just the pipe character, but any trailing
545 // whitespace beyond it. Another way of thinking about this is that the zero-length name
546 // is assumed to be at the end of any whitespace beyond the pipe character.
547 //
548 // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the
549 // beginning of the next token, or until the end of input if the next token is EOF.
550 fullSpanEnd = this.next.index !== -1 ? this.next.index : this.inputLength + this.offset;
551 // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace
552 // beyond the pipe character.
553 nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset);
554 }
555 const args = [];
556 while (this.consumeOptionalCharacter(chars.$COLON)) {
557 args.push(this.parseExpression());
558 // If there are additional expressions beyond the name, then the artificial end for the
559 // name is no longer relevant.
560 }
561 result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan);
562 } while (this.consumeOptionalOperator('|'));
563 }
564 return result;
565 }
566 parseExpression() {
567 return this.parseConditional();
568 }
569 parseConditional() {
570 const start = this.inputIndex;
571 const result = this.parseLogicalOr();
572 if (this.consumeOptionalOperator('?')) {
573 const yes = this.parsePipe();
574 let no;
575 if (!this.consumeOptionalCharacter(chars.$COLON)) {
576 const end = this.inputIndex;
577 const expression = this.input.substring(start, end);
578 this.error(`Conditional expression ${expression} requires all 3 expressions`);
579 no = new EmptyExpr(this.span(start), this.sourceSpan(start));
580 }
581 else {
582 no = this.parsePipe();
583 }
584 return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no);
585 }
586 else {
587 return result;
588 }
589 }
590 parseLogicalOr() {
591 // '||'
592 const start = this.inputIndex;
593 let result = this.parseLogicalAnd();
594 while (this.consumeOptionalOperator('||')) {
595 const right = this.parseLogicalAnd();
596 result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right);
597 }
598 return result;
599 }
600 parseLogicalAnd() {
601 // '&&'
602 const start = this.inputIndex;
603 let result = this.parseNullishCoalescing();
604 while (this.consumeOptionalOperator('&&')) {
605 const right = this.parseNullishCoalescing();
606 result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right);
607 }
608 return result;
609 }
610 parseNullishCoalescing() {
611 // '??'
612 const start = this.inputIndex;
613 let result = this.parseEquality();
614 while (this.consumeOptionalOperator('??')) {
615 const right = this.parseEquality();
616 result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right);
617 }
618 return result;
619 }
620 parseEquality() {
621 // '==','!=','===','!=='
622 const start = this.inputIndex;
623 let result = this.parseRelational();
624 while (this.next.type == TokenType.Operator) {
625 const operator = this.next.strValue;
626 switch (operator) {
627 case '==':
628 case '===':
629 case '!=':
630 case '!==':
631 this.advance();
632 const right = this.parseRelational();
633 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
634 continue;
635 }
636 break;
637 }
638 return result;
639 }
640 parseRelational() {
641 // '<', '>', '<=', '>='
642 const start = this.inputIndex;
643 let result = this.parseAdditive();
644 while (this.next.type == TokenType.Operator) {
645 const operator = this.next.strValue;
646 switch (operator) {
647 case '<':
648 case '>':
649 case '<=':
650 case '>=':
651 this.advance();
652 const right = this.parseAdditive();
653 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
654 continue;
655 }
656 break;
657 }
658 return result;
659 }
660 parseAdditive() {
661 // '+', '-'
662 const start = this.inputIndex;
663 let result = this.parseMultiplicative();
664 while (this.next.type == TokenType.Operator) {
665 const operator = this.next.strValue;
666 switch (operator) {
667 case '+':
668 case '-':
669 this.advance();
670 let right = this.parseMultiplicative();
671 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
672 continue;
673 }
674 break;
675 }
676 return result;
677 }
678 parseMultiplicative() {
679 // '*', '%', '/'
680 const start = this.inputIndex;
681 let result = this.parsePrefix();
682 while (this.next.type == TokenType.Operator) {
683 const operator = this.next.strValue;
684 switch (operator) {
685 case '*':
686 case '%':
687 case '/':
688 this.advance();
689 let right = this.parsePrefix();
690 result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
691 continue;
692 }
693 break;
694 }
695 return result;
696 }
697 parsePrefix() {
698 if (this.next.type == TokenType.Operator) {
699 const start = this.inputIndex;
700 const operator = this.next.strValue;
701 let result;
702 switch (operator) {
703 case '+':
704 this.advance();
705 result = this.parsePrefix();
706 return Unary.createPlus(this.span(start), this.sourceSpan(start), result);
707 case '-':
708 this.advance();
709 result = this.parsePrefix();
710 return Unary.createMinus(this.span(start), this.sourceSpan(start), result);
711 case '!':
712 this.advance();
713 result = this.parsePrefix();
714 return new PrefixNot(this.span(start), this.sourceSpan(start), result);
715 }
716 }
717 return this.parseCallChain();
718 }
719 parseCallChain() {
720 const start = this.inputIndex;
721 let result = this.parsePrimary();
722 while (true) {
723 if (this.consumeOptionalCharacter(chars.$PERIOD)) {
724 result = this.parseAccessMemberOrMethodCall(result, start, false);
725 }
726 else if (this.consumeOptionalOperator('?.')) {
727 result = this.consumeOptionalCharacter(chars.$LBRACKET) ?
728 this.parseKeyedReadOrWrite(result, start, true) :
729 this.parseAccessMemberOrMethodCall(result, start, true);
730 }
731 else if (this.consumeOptionalCharacter(chars.$LBRACKET)) {
732 result = this.parseKeyedReadOrWrite(result, start, false);
733 }
734 else if (this.consumeOptionalCharacter(chars.$LPAREN)) {
735 this.rparensExpected++;
736 const args = this.parseCallArguments();
737 this.rparensExpected--;
738 this.expectCharacter(chars.$RPAREN);
739 result = new FunctionCall(this.span(start), this.sourceSpan(start), result, args);
740 }
741 else if (this.consumeOptionalOperator('!')) {
742 result = new NonNullAssert(this.span(start), this.sourceSpan(start), result);
743 }
744 else {
745 return result;
746 }
747 }
748 }
749 parsePrimary() {
750 const start = this.inputIndex;
751 if (this.consumeOptionalCharacter(chars.$LPAREN)) {
752 this.rparensExpected++;
753 const result = this.parsePipe();
754 this.rparensExpected--;
755 this.expectCharacter(chars.$RPAREN);
756 return result;
757 }
758 else if (this.next.isKeywordNull()) {
759 this.advance();
760 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null);
761 }
762 else if (this.next.isKeywordUndefined()) {
763 this.advance();
764 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0);
765 }
766 else if (this.next.isKeywordTrue()) {
767 this.advance();
768 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true);
769 }
770 else if (this.next.isKeywordFalse()) {
771 this.advance();
772 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);
773 }
774 else if (this.next.isKeywordThis()) {
775 this.advance();
776 return new ThisReceiver(this.span(start), this.sourceSpan(start));
777 }
778 else if (this.consumeOptionalCharacter(chars.$LBRACKET)) {
779 this.rbracketsExpected++;
780 const elements = this.parseExpressionList(chars.$RBRACKET);
781 this.rbracketsExpected--;
782 this.expectCharacter(chars.$RBRACKET);
783 return new LiteralArray(this.span(start), this.sourceSpan(start), elements);
784 }
785 else if (this.next.isCharacter(chars.$LBRACE)) {
786 return this.parseLiteralMap();
787 }
788 else if (this.next.isIdentifier()) {
789 return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false);
790 }
791 else if (this.next.isNumber()) {
792 const value = this.next.toNumber();
793 this.advance();
794 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value);
795 }
796 else if (this.next.isString()) {
797 const literalValue = this.next.toString();
798 this.advance();
799 return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue);
800 }
801 else if (this.next.isPrivateIdentifier()) {
802 this._reportErrorForPrivateIdentifier(this.next, null);
803 return new EmptyExpr(this.span(start), this.sourceSpan(start));
804 }
805 else if (this.index >= this.tokens.length) {
806 this.error(`Unexpected end of expression: ${this.input}`);
807 return new EmptyExpr(this.span(start), this.sourceSpan(start));
808 }
809 else {
810 this.error(`Unexpected token ${this.next}`);
811 return new EmptyExpr(this.span(start), this.sourceSpan(start));
812 }
813 }
814 parseExpressionList(terminator) {
815 const result = [];
816 do {
817 if (!this.next.isCharacter(terminator)) {
818 result.push(this.parsePipe());
819 }
820 else {
821 break;
822 }
823 } while (this.consumeOptionalCharacter(chars.$COMMA));
824 return result;
825 }
826 parseLiteralMap() {
827 const keys = [];
828 const values = [];
829 const start = this.inputIndex;
830 this.expectCharacter(chars.$LBRACE);
831 if (!this.consumeOptionalCharacter(chars.$RBRACE)) {
832 this.rbracesExpected++;
833 do {
834 const keyStart = this.inputIndex;
835 const quoted = this.next.isString();
836 const key = this.expectIdentifierOrKeywordOrString();
837 keys.push({ key, quoted });
838 // Properties with quoted keys can't use the shorthand syntax.
839 if (quoted) {
840 this.expectCharacter(chars.$COLON);
841 values.push(this.parsePipe());
842 }
843 else if (this.consumeOptionalCharacter(chars.$COLON)) {
844 values.push(this.parsePipe());
845 }
846 else {
847 const span = this.span(keyStart);
848 const sourceSpan = this.sourceSpan(keyStart);
849 values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key));
850 }
851 } while (this.consumeOptionalCharacter(chars.$COMMA));
852 this.rbracesExpected--;
853 this.expectCharacter(chars.$RBRACE);
854 }
855 return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values);
856 }
857 parseAccessMemberOrMethodCall(receiver, start, isSafe) {
858 const nameStart = this.inputIndex;
859 const id = this.withContext(ParseContextFlags.Writable, () => {
860 var _a;
861 const id = (_a = this.expectIdentifierOrKeyword()) !== null && _a !== void 0 ? _a : '';
862 if (id.length === 0) {
863 this.error(`Expected identifier for property access`, receiver.span.end);
864 }
865 return id;
866 });
867 const nameSpan = this.sourceSpan(nameStart);
868 if (this.consumeOptionalCharacter(chars.$LPAREN)) {
869 const argumentStart = this.inputIndex;
870 this.rparensExpected++;
871 const args = this.parseCallArguments();
872 const argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset);
873 this.expectCharacter(chars.$RPAREN);
874 this.rparensExpected--;
875 const span = this.span(start);
876 const sourceSpan = this.sourceSpan(start);
877 return isSafe ?
878 new SafeMethodCall(span, sourceSpan, nameSpan, receiver, id, args, argumentSpan) :
879 new MethodCall(span, sourceSpan, nameSpan, receiver, id, args, argumentSpan);
880 }
881 else {
882 if (isSafe) {
883 if (this.consumeOptionalOperator('=')) {
884 this.error('The \'?.\' operator cannot be used in the assignment');
885 return new EmptyExpr(this.span(start), this.sourceSpan(start));
886 }
887 else {
888 return new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);
889 }
890 }
891 else {
892 if (this.consumeOptionalOperator('=')) {
893 if (!this.parseAction) {
894 this.error('Bindings cannot contain assignments');
895 return new EmptyExpr(this.span(start), this.sourceSpan(start));
896 }
897 const value = this.parseConditional();
898 return new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, receiver, id, value);
899 }
900 else {
901 return new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, receiver, id);
902 }
903 }
904 }
905 }
906 parseCallArguments() {
907 if (this.next.isCharacter(chars.$RPAREN))
908 return [];
909 const positionals = [];
910 do {
911 positionals.push(this.parsePipe());
912 } while (this.consumeOptionalCharacter(chars.$COMMA));
913 return positionals;
914 }
915 /**
916 * Parses an identifier, a keyword, a string with an optional `-` in between,
917 * and returns the string along with its absolute source span.
918 */
919 expectTemplateBindingKey() {
920 let result = '';
921 let operatorFound = false;
922 const start = this.currentAbsoluteOffset;
923 do {
924 result += this.expectIdentifierOrKeywordOrString();
925 operatorFound = this.consumeOptionalOperator('-');
926 if (operatorFound) {
927 result += '-';
928 }
929 } while (operatorFound);
930 return {
931 source: result,
932 span: new AbsoluteSourceSpan(start, start + result.length),
933 };
934 }
935 /**
936 * Parse microsyntax template expression and return a list of bindings or
937 * parsing errors in case the given expression is invalid.
938 *
939 * For example,
940 * ```
941 * <div *ngFor="let item of items; index as i; trackBy: func">
942 * ```
943 * contains five bindings:
944 * 1. ngFor -> null
945 * 2. item -> NgForOfContext.$implicit
946 * 3. ngForOf -> items
947 * 4. i -> NgForOfContext.index
948 * 5. ngForTrackBy -> func
949 *
950 * For a full description of the microsyntax grammar, see
951 * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855
952 *
953 * @param templateKey name of the microsyntax directive, like ngIf, ngFor,
954 * without the *, along with its absolute span.
955 */
956 parseTemplateBindings(templateKey) {
957 const bindings = [];
958 // The first binding is for the template key itself
959 // In *ngFor="let item of items", key = "ngFor", value = null
960 // In *ngIf="cond | pipe", key = "ngIf", value = "cond | pipe"
961 bindings.push(...this.parseDirectiveKeywordBindings(templateKey));
962 while (this.index < this.tokens.length) {
963 // If it starts with 'let', then this must be variable declaration
964 const letBinding = this.parseLetBinding();
965 if (letBinding) {
966 bindings.push(letBinding);
967 }
968 else {
969 // Two possible cases here, either `value "as" key` or
970 // "directive-keyword expression". We don't know which case, but both
971 // "value" and "directive-keyword" are template binding key, so consume
972 // the key first.
973 const key = this.expectTemplateBindingKey();
974 // Peek at the next token, if it is "as" then this must be variable
975 // declaration.
976 const binding = this.parseAsBinding(key);
977 if (binding) {
978 bindings.push(binding);
979 }
980 else {
981 // Otherwise the key must be a directive keyword, like "of". Transform
982 // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy
983 key.source =
984 templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1);
985 bindings.push(...this.parseDirectiveKeywordBindings(key));
986 }
987 }
988 this.consumeStatementTerminator();
989 }
990 return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors);
991 }
992 parseKeyedReadOrWrite(receiver, start, isSafe) {
993 return this.withContext(ParseContextFlags.Writable, () => {
994 this.rbracketsExpected++;
995 const key = this.parsePipe();
996 if (key instanceof EmptyExpr) {
997 this.error(`Key access cannot be empty`);
998 }
999 this.rbracketsExpected--;
1000 this.expectCharacter(chars.$RBRACKET);
1001 if (this.consumeOptionalOperator('=')) {
1002 if (isSafe) {
1003 this.error('The \'?.\' operator cannot be used in the assignment');
1004 }
1005 else {
1006 const value = this.parseConditional();
1007 return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value);
1008 }
1009 }
1010 else {
1011 return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) :
1012 new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key);
1013 }
1014 return new EmptyExpr(this.span(start), this.sourceSpan(start));
1015 });
1016 }
1017 /**
1018 * Parse a directive keyword, followed by a mandatory expression.
1019 * For example, "of items", "trackBy: func".
1020 * The bindings are: ngForOf -> items, ngForTrackBy -> func
1021 * There could be an optional "as" binding that follows the expression.
1022 * For example,
1023 * ```
1024 * *ngFor="let item of items | slice:0:1 as collection".
1025 * ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
1026 * keyword bound target optional 'as' binding
1027 * ```
1028 *
1029 * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its
1030 * absolute span.
1031 */
1032 parseDirectiveKeywordBindings(key) {
1033 const bindings = [];
1034 this.consumeOptionalCharacter(chars.$COLON); // trackBy: trackByFunction
1035 const value = this.getDirectiveBoundTarget();
1036 let spanEnd = this.currentAbsoluteOffset;
1037 // The binding could optionally be followed by "as". For example,
1038 // *ngIf="cond | pipe as x". In this case, the key in the "as" binding
1039 // is "x" and the value is the template key itself ("ngIf"). Note that the
1040 // 'key' in the current context now becomes the "value" in the next binding.
1041 const asBinding = this.parseAsBinding(key);
1042 if (!asBinding) {
1043 this.consumeStatementTerminator();
1044 spanEnd = this.currentAbsoluteOffset;
1045 }
1046 const sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd);
1047 bindings.push(new ExpressionBinding(sourceSpan, key, value));
1048 if (asBinding) {
1049 bindings.push(asBinding);
1050 }
1051 return bindings;
1052 }
1053 /**
1054 * Return the expression AST for the bound target of a directive keyword
1055 * binding. For example,
1056 * ```
1057 * *ngIf="condition | pipe"
1058 * ^^^^^^^^^^^^^^^^ bound target for "ngIf"
1059 * *ngFor="let item of items"
1060 * ^^^^^ bound target for "ngForOf"
1061 * ```
1062 */
1063 getDirectiveBoundTarget() {
1064 if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) {
1065 return null;
1066 }
1067 const ast = this.parsePipe(); // example: "condition | async"
1068 const { start, end } = ast.span;
1069 const value = this.input.substring(start, end);
1070 return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors);
1071 }
1072 /**
1073 * Return the binding for a variable declared using `as`. Note that the order
1074 * of the key-value pair in this declaration is reversed. For example,
1075 * ```
1076 * *ngFor="let item of items; index as i"
1077 * ^^^^^ ^
1078 * value key
1079 * ```
1080 *
1081 * @param value name of the value in the declaration, "ngIf" in the example
1082 * above, along with its absolute span.
1083 */
1084 parseAsBinding(value) {
1085 if (!this.peekKeywordAs()) {
1086 return null;
1087 }
1088 this.advance(); // consume the 'as' keyword
1089 const key = this.expectTemplateBindingKey();
1090 this.consumeStatementTerminator();
1091 const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset);
1092 return new VariableBinding(sourceSpan, key, value);
1093 }
1094 /**
1095 * Return the binding for a variable declared using `let`. For example,
1096 * ```
1097 * *ngFor="let item of items; let i=index;"
1098 * ^^^^^^^^ ^^^^^^^^^^^
1099 * ```
1100 * In the first binding, `item` is bound to `NgForOfContext.$implicit`.
1101 * In the second binding, `i` is bound to `NgForOfContext.index`.
1102 */
1103 parseLetBinding() {
1104 if (!this.peekKeywordLet()) {
1105 return null;
1106 }
1107 const spanStart = this.currentAbsoluteOffset;
1108 this.advance(); // consume the 'let' keyword
1109 const key = this.expectTemplateBindingKey();
1110 let value = null;
1111 if (this.consumeOptionalOperator('=')) {
1112 value = this.expectTemplateBindingKey();
1113 }
1114 this.consumeStatementTerminator();
1115 const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset);
1116 return new VariableBinding(sourceSpan, key, value);
1117 }
1118 /**
1119 * Consume the optional statement terminator: semicolon or comma.
1120 */
1121 consumeStatementTerminator() {
1122 this.consumeOptionalCharacter(chars.$SEMICOLON) || this.consumeOptionalCharacter(chars.$COMMA);
1123 }
1124 /**
1125 * Records an error and skips over the token stream until reaching a recoverable point. See
1126 * `this.skip` for more details on token skipping.
1127 */
1128 error(message, index = null) {
1129 this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));
1130 this.skip();
1131 }
1132 locationText(index = null) {
1133 if (index == null)
1134 index = this.index;
1135 return (index < this.tokens.length) ? `at column ${this.tokens[index].index + 1} in` :
1136 `at the end of the expression`;
1137 }
1138 /**
1139 * Records an error for an unexpected private identifier being discovered.
1140 * @param token Token representing a private identifier.
1141 * @param extraMessage Optional additional message being appended to the error.
1142 */
1143 _reportErrorForPrivateIdentifier(token, extraMessage) {
1144 let errorMessage = `Private identifiers are not supported. Unexpected private identifier: ${token}`;
1145 if (extraMessage !== null) {
1146 errorMessage += `, ${extraMessage}`;
1147 }
1148 this.error(errorMessage);
1149 }
1150 /**
1151 * Error recovery should skip tokens until it encounters a recovery point.
1152 *
1153 * The following are treated as unconditional recovery points:
1154 * - end of input
1155 * - ';' (parseChain() is always the root production, and it expects a ';')
1156 * - '|' (since pipes may be chained and each pipe expression may be treated independently)
1157 *
1158 * The following are conditional recovery points:
1159 * - ')', '}', ']' if one of calling productions is expecting one of these symbols
1160 * - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to
1161 * be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins
1162 * an '(' <expr> ')' production).
1163 * The recovery points of grouping symbols must be conditional as they must be skipped if
1164 * none of the calling productions are not expecting the closing token else we will never
1165 * make progress in the case of an extraneous group closing symbol (such as a stray ')').
1166 * That is, we skip a closing symbol if we are not in a grouping production.
1167 * - '=' in a `Writable` context
1168 * - In this context, we are able to recover after seeing the `=` operator, which
1169 * signals the presence of an independent rvalue expression following the `=` operator.
1170 *
1171 * If a production expects one of these token it increments the corresponding nesting count,
1172 * and then decrements it just prior to checking if the token is in the input.
1173 */
1174 skip() {
1175 let n = this.next;
1176 while (this.index < this.tokens.length && !n.isCharacter(chars.$SEMICOLON) &&
1177 !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter(chars.$RPAREN)) &&
1178 (this.rbracesExpected <= 0 || !n.isCharacter(chars.$RBRACE)) &&
1179 (this.rbracketsExpected <= 0 || !n.isCharacter(chars.$RBRACKET)) &&
1180 (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) {
1181 if (this.next.isError()) {
1182 this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));
1183 }
1184 this.advance();
1185 n = this.next;
1186 }
1187 }
1188}
1189class SimpleExpressionChecker {
1190 constructor() {
1191 this.errors = [];
1192 }
1193 visitImplicitReceiver(ast, context) { }
1194 visitThisReceiver(ast, context) { }
1195 visitInterpolation(ast, context) { }
1196 visitLiteralPrimitive(ast, context) { }
1197 visitPropertyRead(ast, context) { }
1198 visitPropertyWrite(ast, context) { }
1199 visitSafePropertyRead(ast, context) { }
1200 visitMethodCall(ast, context) { }
1201 visitSafeMethodCall(ast, context) { }
1202 visitFunctionCall(ast, context) { }
1203 visitLiteralArray(ast, context) {
1204 this.visitAll(ast.expressions, context);
1205 }
1206 visitLiteralMap(ast, context) {
1207 this.visitAll(ast.values, context);
1208 }
1209 visitUnary(ast, context) { }
1210 visitBinary(ast, context) { }
1211 visitPrefixNot(ast, context) { }
1212 visitNonNullAssert(ast, context) { }
1213 visitConditional(ast, context) { }
1214 visitPipe(ast, context) {
1215 this.errors.push('pipes');
1216 }
1217 visitKeyedRead(ast, context) { }
1218 visitKeyedWrite(ast, context) { }
1219 visitAll(asts, context) {
1220 return asts.map(node => node.visit(this, context));
1221 }
1222 visitChain(ast, context) { }
1223 visitQuote(ast, context) { }
1224 visitSafeKeyedRead(ast, context) { }
1225}
1226/**
1227 * This class implements SimpleExpressionChecker used in View Engine and performs more strict checks
1228 * to make sure host bindings do not contain pipes. In View Engine, having pipes in host bindings is
1229 * not supported as well, but in some cases (like `!(value | async)`) the error is not triggered at
1230 * compile time. In order to preserve View Engine behavior, more strict checks are introduced for
1231 * Ivy mode only.
1232 */
1233class IvySimpleExpressionChecker extends RecursiveAstVisitor {
1234 constructor() {
1235 super(...arguments);
1236 this.errors = [];
1237 }
1238 visitPipe() {
1239 this.errors.push('pipes');
1240 }
1241}
1242//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4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