source: trip-planner-front/node_modules/@angular/compiler/src/ml_parser/lexer.js@ 59329aa

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

initial commit

  • Property mode set to 100644
File size: 151.2 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 */
8(function (factory) {
9 if (typeof module === "object" && typeof module.exports === "object") {
10 var v = factory(require, exports);
11 if (v !== undefined) module.exports = v;
12 }
13 else if (typeof define === "function" && define.amd) {
14 define("@angular/compiler/src/ml_parser/lexer", ["require", "exports", "tslib", "@angular/compiler/src/chars", "@angular/compiler/src/parse_util", "@angular/compiler/src/ml_parser/entities", "@angular/compiler/src/ml_parser/interpolation_config", "@angular/compiler/src/ml_parser/tags"], factory);
15 }
16})(function (require, exports) {
17 "use strict";
18 Object.defineProperty(exports, "__esModule", { value: true });
19 exports.CursorError = exports.tokenize = exports.TokenizeResult = exports.TokenError = void 0;
20 var tslib_1 = require("tslib");
21 var chars = require("@angular/compiler/src/chars");
22 var parse_util_1 = require("@angular/compiler/src/parse_util");
23 var entities_1 = require("@angular/compiler/src/ml_parser/entities");
24 var interpolation_config_1 = require("@angular/compiler/src/ml_parser/interpolation_config");
25 var tags_1 = require("@angular/compiler/src/ml_parser/tags");
26 var TokenError = /** @class */ (function (_super) {
27 tslib_1.__extends(TokenError, _super);
28 function TokenError(errorMsg, tokenType, span) {
29 var _this = _super.call(this, span, errorMsg) || this;
30 _this.tokenType = tokenType;
31 return _this;
32 }
33 return TokenError;
34 }(parse_util_1.ParseError));
35 exports.TokenError = TokenError;
36 var TokenizeResult = /** @class */ (function () {
37 function TokenizeResult(tokens, errors, nonNormalizedIcuExpressions) {
38 this.tokens = tokens;
39 this.errors = errors;
40 this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions;
41 }
42 return TokenizeResult;
43 }());
44 exports.TokenizeResult = TokenizeResult;
45 function tokenize(source, url, getTagDefinition, options) {
46 if (options === void 0) { options = {}; }
47 var tokenizer = new _Tokenizer(new parse_util_1.ParseSourceFile(source, url), getTagDefinition, options);
48 tokenizer.tokenize();
49 return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions);
50 }
51 exports.tokenize = tokenize;
52 var _CR_OR_CRLF_REGEXP = /\r\n?/g;
53 function _unexpectedCharacterErrorMsg(charCode) {
54 var char = charCode === chars.$EOF ? 'EOF' : String.fromCharCode(charCode);
55 return "Unexpected character \"" + char + "\"";
56 }
57 function _unknownEntityErrorMsg(entitySrc) {
58 return "Unknown entity \"" + entitySrc + "\" - use the \"&#<decimal>;\" or \"&#x<hex>;\" syntax";
59 }
60 function _unparsableEntityErrorMsg(type, entityStr) {
61 return "Unable to parse entity \"" + entityStr + "\" - " + type + " character reference entities must end with \";\"";
62 }
63 var CharacterReferenceType;
64 (function (CharacterReferenceType) {
65 CharacterReferenceType["HEX"] = "hexadecimal";
66 CharacterReferenceType["DEC"] = "decimal";
67 })(CharacterReferenceType || (CharacterReferenceType = {}));
68 var _ControlFlowError = /** @class */ (function () {
69 function _ControlFlowError(error) {
70 this.error = error;
71 }
72 return _ControlFlowError;
73 }());
74 // See https://www.w3.org/TR/html51/syntax.html#writing-html-documents
75 var _Tokenizer = /** @class */ (function () {
76 /**
77 * @param _file The html source file being tokenized.
78 * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name.
79 * @param options Configuration of the tokenization.
80 */
81 function _Tokenizer(_file, _getTagDefinition, options) {
82 this._getTagDefinition = _getTagDefinition;
83 this._currentTokenStart = null;
84 this._currentTokenType = null;
85 this._expansionCaseStack = [];
86 this._inInterpolation = false;
87 this.tokens = [];
88 this.errors = [];
89 this.nonNormalizedIcuExpressions = [];
90 this._tokenizeIcu = options.tokenizeExpansionForms || false;
91 this._interpolationConfig = options.interpolationConfig || interpolation_config_1.DEFAULT_INTERPOLATION_CONFIG;
92 this._leadingTriviaCodePoints =
93 options.leadingTriviaChars && options.leadingTriviaChars.map(function (c) { return c.codePointAt(0) || 0; });
94 var range = options.range || { endPos: _file.content.length, startPos: 0, startLine: 0, startCol: 0 };
95 this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) :
96 new PlainCharacterCursor(_file, range);
97 this._preserveLineEndings = options.preserveLineEndings || false;
98 this._escapedString = options.escapedString || false;
99 this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;
100 try {
101 this._cursor.init();
102 }
103 catch (e) {
104 this.handleError(e);
105 }
106 }
107 _Tokenizer.prototype._processCarriageReturns = function (content) {
108 if (this._preserveLineEndings) {
109 return content;
110 }
111 // https://www.w3.org/TR/html51/syntax.html#preprocessing-the-input-stream
112 // In order to keep the original position in the source, we can not
113 // pre-process it.
114 // Instead CRs are processed right before instantiating the tokens.
115 return content.replace(_CR_OR_CRLF_REGEXP, '\n');
116 };
117 _Tokenizer.prototype.tokenize = function () {
118 var _this = this;
119 while (this._cursor.peek() !== chars.$EOF) {
120 var start = this._cursor.clone();
121 try {
122 if (this._attemptCharCode(chars.$LT)) {
123 if (this._attemptCharCode(chars.$BANG)) {
124 if (this._attemptCharCode(chars.$LBRACKET)) {
125 this._consumeCdata(start);
126 }
127 else if (this._attemptCharCode(chars.$MINUS)) {
128 this._consumeComment(start);
129 }
130 else {
131 this._consumeDocType(start);
132 }
133 }
134 else if (this._attemptCharCode(chars.$SLASH)) {
135 this._consumeTagClose(start);
136 }
137 else {
138 this._consumeTagOpen(start);
139 }
140 }
141 else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {
142 // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while
143 // the premature end of an interpolation is given by the start of a new HTML element.
144 this._consumeWithInterpolation(5 /* TEXT */, 8 /* INTERPOLATION */, function () { return _this._isTextEnd(); }, function () { return _this._isTagStart(); });
145 }
146 }
147 catch (e) {
148 this.handleError(e);
149 }
150 }
151 this._beginToken(24 /* EOF */);
152 this._endToken([]);
153 };
154 /**
155 * @returns whether an ICU token has been created
156 * @internal
157 */
158 _Tokenizer.prototype._tokenizeExpansionForm = function () {
159 if (this.isExpansionFormStart()) {
160 this._consumeExpansionFormStart();
161 return true;
162 }
163 if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) {
164 this._consumeExpansionCaseStart();
165 return true;
166 }
167 if (this._cursor.peek() === chars.$RBRACE) {
168 if (this._isInExpansionCase()) {
169 this._consumeExpansionCaseEnd();
170 return true;
171 }
172 if (this._isInExpansionForm()) {
173 this._consumeExpansionFormEnd();
174 return true;
175 }
176 }
177 return false;
178 };
179 _Tokenizer.prototype._beginToken = function (type, start) {
180 if (start === void 0) { start = this._cursor.clone(); }
181 this._currentTokenStart = start;
182 this._currentTokenType = type;
183 };
184 _Tokenizer.prototype._endToken = function (parts, end) {
185 if (this._currentTokenStart === null) {
186 throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end));
187 }
188 if (this._currentTokenType === null) {
189 throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart));
190 }
191 var token = {
192 type: this._currentTokenType,
193 parts: parts,
194 sourceSpan: (end !== null && end !== void 0 ? end : this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints),
195 };
196 this.tokens.push(token);
197 this._currentTokenStart = null;
198 this._currentTokenType = null;
199 return token;
200 };
201 _Tokenizer.prototype._createError = function (msg, span) {
202 if (this._isInExpansionForm()) {
203 msg += " (Do you have an unescaped \"{\" in your template? Use \"{{ '{' }}\") to escape it.)";
204 }
205 var error = new TokenError(msg, this._currentTokenType, span);
206 this._currentTokenStart = null;
207 this._currentTokenType = null;
208 return new _ControlFlowError(error);
209 };
210 _Tokenizer.prototype.handleError = function (e) {
211 if (e instanceof CursorError) {
212 e = this._createError(e.msg, this._cursor.getSpan(e.cursor));
213 }
214 if (e instanceof _ControlFlowError) {
215 this.errors.push(e.error);
216 }
217 else {
218 throw e;
219 }
220 };
221 _Tokenizer.prototype._attemptCharCode = function (charCode) {
222 if (this._cursor.peek() === charCode) {
223 this._cursor.advance();
224 return true;
225 }
226 return false;
227 };
228 _Tokenizer.prototype._attemptCharCodeCaseInsensitive = function (charCode) {
229 if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) {
230 this._cursor.advance();
231 return true;
232 }
233 return false;
234 };
235 _Tokenizer.prototype._requireCharCode = function (charCode) {
236 var location = this._cursor.clone();
237 if (!this._attemptCharCode(charCode)) {
238 throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));
239 }
240 };
241 _Tokenizer.prototype._attemptStr = function (chars) {
242 var len = chars.length;
243 if (this._cursor.charsLeft() < len) {
244 return false;
245 }
246 var initialPosition = this._cursor.clone();
247 for (var i = 0; i < len; i++) {
248 if (!this._attemptCharCode(chars.charCodeAt(i))) {
249 // If attempting to parse the string fails, we want to reset the parser
250 // to where it was before the attempt
251 this._cursor = initialPosition;
252 return false;
253 }
254 }
255 return true;
256 };
257 _Tokenizer.prototype._attemptStrCaseInsensitive = function (chars) {
258 for (var i = 0; i < chars.length; i++) {
259 if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {
260 return false;
261 }
262 }
263 return true;
264 };
265 _Tokenizer.prototype._requireStr = function (chars) {
266 var location = this._cursor.clone();
267 if (!this._attemptStr(chars)) {
268 throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location));
269 }
270 };
271 _Tokenizer.prototype._attemptCharCodeUntilFn = function (predicate) {
272 while (!predicate(this._cursor.peek())) {
273 this._cursor.advance();
274 }
275 };
276 _Tokenizer.prototype._requireCharCodeUntilFn = function (predicate, len) {
277 var start = this._cursor.clone();
278 this._attemptCharCodeUntilFn(predicate);
279 if (this._cursor.diff(start) < len) {
280 throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
281 }
282 };
283 _Tokenizer.prototype._attemptUntilChar = function (char) {
284 while (this._cursor.peek() !== char) {
285 this._cursor.advance();
286 }
287 };
288 _Tokenizer.prototype._readChar = function () {
289 // Don't rely upon reading directly from `_input` as the actual char value
290 // may have been generated from an escape sequence.
291 var char = String.fromCodePoint(this._cursor.peek());
292 this._cursor.advance();
293 return char;
294 };
295 _Tokenizer.prototype._consumeEntity = function (textTokenType) {
296 this._beginToken(9 /* ENCODED_ENTITY */);
297 var start = this._cursor.clone();
298 this._cursor.advance();
299 if (this._attemptCharCode(chars.$HASH)) {
300 var isHex = this._attemptCharCode(chars.$x) || this._attemptCharCode(chars.$X);
301 var codeStart = this._cursor.clone();
302 this._attemptCharCodeUntilFn(isDigitEntityEnd);
303 if (this._cursor.peek() != chars.$SEMICOLON) {
304 // Advance cursor to include the peeked character in the string provided to the error
305 // message.
306 this._cursor.advance();
307 var entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC;
308 throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan());
309 }
310 var strNum = this._cursor.getChars(codeStart);
311 this._cursor.advance();
312 try {
313 var charCode = parseInt(strNum, isHex ? 16 : 10);
314 this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]);
315 }
316 catch (_a) {
317 throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan());
318 }
319 }
320 else {
321 var nameStart = this._cursor.clone();
322 this._attemptCharCodeUntilFn(isNamedEntityEnd);
323 if (this._cursor.peek() != chars.$SEMICOLON) {
324 // No semicolon was found so abort the encoded entity token that was in progress, and treat
325 // this as a text token
326 this._beginToken(textTokenType, start);
327 this._cursor = nameStart;
328 this._endToken(['&']);
329 }
330 else {
331 var name_1 = this._cursor.getChars(nameStart);
332 this._cursor.advance();
333 var char = entities_1.NAMED_ENTITIES[name_1];
334 if (!char) {
335 throw this._createError(_unknownEntityErrorMsg(name_1), this._cursor.getSpan(start));
336 }
337 this._endToken([char, "&" + name_1 + ";"]);
338 }
339 }
340 };
341 _Tokenizer.prototype._consumeRawText = function (consumeEntities, endMarkerPredicate) {
342 this._beginToken(consumeEntities ? 6 /* ESCAPABLE_RAW_TEXT */ : 7 /* RAW_TEXT */);
343 var parts = [];
344 while (true) {
345 var tagCloseStart = this._cursor.clone();
346 var foundEndMarker = endMarkerPredicate();
347 this._cursor = tagCloseStart;
348 if (foundEndMarker) {
349 break;
350 }
351 if (consumeEntities && this._cursor.peek() === chars.$AMPERSAND) {
352 this._endToken([this._processCarriageReturns(parts.join(''))]);
353 parts.length = 0;
354 this._consumeEntity(6 /* ESCAPABLE_RAW_TEXT */);
355 this._beginToken(6 /* ESCAPABLE_RAW_TEXT */);
356 }
357 else {
358 parts.push(this._readChar());
359 }
360 }
361 this._endToken([this._processCarriageReturns(parts.join(''))]);
362 };
363 _Tokenizer.prototype._consumeComment = function (start) {
364 var _this = this;
365 this._beginToken(10 /* COMMENT_START */, start);
366 this._requireCharCode(chars.$MINUS);
367 this._endToken([]);
368 this._consumeRawText(false, function () { return _this._attemptStr('-->'); });
369 this._beginToken(11 /* COMMENT_END */);
370 this._requireStr('-->');
371 this._endToken([]);
372 };
373 _Tokenizer.prototype._consumeCdata = function (start) {
374 var _this = this;
375 this._beginToken(12 /* CDATA_START */, start);
376 this._requireStr('CDATA[');
377 this._endToken([]);
378 this._consumeRawText(false, function () { return _this._attemptStr(']]>'); });
379 this._beginToken(13 /* CDATA_END */);
380 this._requireStr(']]>');
381 this._endToken([]);
382 };
383 _Tokenizer.prototype._consumeDocType = function (start) {
384 this._beginToken(18 /* DOC_TYPE */, start);
385 var contentStart = this._cursor.clone();
386 this._attemptUntilChar(chars.$GT);
387 var content = this._cursor.getChars(contentStart);
388 this._cursor.advance();
389 this._endToken([content]);
390 };
391 _Tokenizer.prototype._consumePrefixAndName = function () {
392 var nameOrPrefixStart = this._cursor.clone();
393 var prefix = '';
394 while (this._cursor.peek() !== chars.$COLON && !isPrefixEnd(this._cursor.peek())) {
395 this._cursor.advance();
396 }
397 var nameStart;
398 if (this._cursor.peek() === chars.$COLON) {
399 prefix = this._cursor.getChars(nameOrPrefixStart);
400 this._cursor.advance();
401 nameStart = this._cursor.clone();
402 }
403 else {
404 nameStart = nameOrPrefixStart;
405 }
406 this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1);
407 var name = this._cursor.getChars(nameStart);
408 return [prefix, name];
409 };
410 _Tokenizer.prototype._consumeTagOpen = function (start) {
411 var tagName;
412 var prefix;
413 var openTagToken;
414 try {
415 if (!chars.isAsciiLetter(this._cursor.peek())) {
416 throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start));
417 }
418 openTagToken = this._consumeTagOpenStart(start);
419 prefix = openTagToken.parts[0];
420 tagName = openTagToken.parts[1];
421 this._attemptCharCodeUntilFn(isNotWhitespace);
422 while (this._cursor.peek() !== chars.$SLASH && this._cursor.peek() !== chars.$GT &&
423 this._cursor.peek() !== chars.$LT && this._cursor.peek() !== chars.$EOF) {
424 this._consumeAttributeName();
425 this._attemptCharCodeUntilFn(isNotWhitespace);
426 if (this._attemptCharCode(chars.$EQ)) {
427 this._attemptCharCodeUntilFn(isNotWhitespace);
428 this._consumeAttributeValue();
429 }
430 this._attemptCharCodeUntilFn(isNotWhitespace);
431 }
432 this._consumeTagOpenEnd();
433 }
434 catch (e) {
435 if (e instanceof _ControlFlowError) {
436 if (openTagToken) {
437 // We errored before we could close the opening tag, so it is incomplete.
438 openTagToken.type = 4 /* INCOMPLETE_TAG_OPEN */;
439 }
440 else {
441 // When the start tag is invalid, assume we want a "<" as text.
442 // Back to back text tokens are merged at the end.
443 this._beginToken(5 /* TEXT */, start);
444 this._endToken(['<']);
445 }
446 return;
447 }
448 throw e;
449 }
450 var contentTokenType = this._getTagDefinition(tagName).getContentType(prefix);
451 if (contentTokenType === tags_1.TagContentType.RAW_TEXT) {
452 this._consumeRawTextWithTagClose(prefix, tagName, false);
453 }
454 else if (contentTokenType === tags_1.TagContentType.ESCAPABLE_RAW_TEXT) {
455 this._consumeRawTextWithTagClose(prefix, tagName, true);
456 }
457 };
458 _Tokenizer.prototype._consumeRawTextWithTagClose = function (prefix, tagName, consumeEntities) {
459 var _this = this;
460 this._consumeRawText(consumeEntities, function () {
461 if (!_this._attemptCharCode(chars.$LT))
462 return false;
463 if (!_this._attemptCharCode(chars.$SLASH))
464 return false;
465 _this._attemptCharCodeUntilFn(isNotWhitespace);
466 if (!_this._attemptStrCaseInsensitive(tagName))
467 return false;
468 _this._attemptCharCodeUntilFn(isNotWhitespace);
469 return _this._attemptCharCode(chars.$GT);
470 });
471 this._beginToken(3 /* TAG_CLOSE */);
472 this._requireCharCodeUntilFn(function (code) { return code === chars.$GT; }, 3);
473 this._cursor.advance(); // Consume the `>`
474 this._endToken([prefix, tagName]);
475 };
476 _Tokenizer.prototype._consumeTagOpenStart = function (start) {
477 this._beginToken(0 /* TAG_OPEN_START */, start);
478 var parts = this._consumePrefixAndName();
479 return this._endToken(parts);
480 };
481 _Tokenizer.prototype._consumeAttributeName = function () {
482 var attrNameStart = this._cursor.peek();
483 if (attrNameStart === chars.$SQ || attrNameStart === chars.$DQ) {
484 throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan());
485 }
486 this._beginToken(14 /* ATTR_NAME */);
487 var prefixAndName = this._consumePrefixAndName();
488 this._endToken(prefixAndName);
489 };
490 _Tokenizer.prototype._consumeAttributeValue = function () {
491 var _this = this;
492 var value;
493 if (this._cursor.peek() === chars.$SQ || this._cursor.peek() === chars.$DQ) {
494 var quoteChar_1 = this._cursor.peek();
495 this._consumeQuote(quoteChar_1);
496 // In an attribute then end of the attribute value and the premature end to an interpolation
497 // are both triggered by the `quoteChar`.
498 var endPredicate = function () { return _this._cursor.peek() === quoteChar_1; };
499 this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
500 this._consumeQuote(quoteChar_1);
501 }
502 else {
503 var endPredicate = function () { return isNameEnd(_this._cursor.peek()); };
504 this._consumeWithInterpolation(16 /* ATTR_VALUE_TEXT */, 17 /* ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate);
505 }
506 };
507 _Tokenizer.prototype._consumeQuote = function (quoteChar) {
508 this._beginToken(15 /* ATTR_QUOTE */);
509 this._requireCharCode(quoteChar);
510 this._endToken([String.fromCodePoint(quoteChar)]);
511 };
512 _Tokenizer.prototype._consumeTagOpenEnd = function () {
513 var tokenType = this._attemptCharCode(chars.$SLASH) ? 2 /* TAG_OPEN_END_VOID */ : 1 /* TAG_OPEN_END */;
514 this._beginToken(tokenType);
515 this._requireCharCode(chars.$GT);
516 this._endToken([]);
517 };
518 _Tokenizer.prototype._consumeTagClose = function (start) {
519 this._beginToken(3 /* TAG_CLOSE */, start);
520 this._attemptCharCodeUntilFn(isNotWhitespace);
521 var prefixAndName = this._consumePrefixAndName();
522 this._attemptCharCodeUntilFn(isNotWhitespace);
523 this._requireCharCode(chars.$GT);
524 this._endToken(prefixAndName);
525 };
526 _Tokenizer.prototype._consumeExpansionFormStart = function () {
527 this._beginToken(19 /* EXPANSION_FORM_START */);
528 this._requireCharCode(chars.$LBRACE);
529 this._endToken([]);
530 this._expansionCaseStack.push(19 /* EXPANSION_FORM_START */);
531 this._beginToken(7 /* RAW_TEXT */);
532 var condition = this._readUntil(chars.$COMMA);
533 var normalizedCondition = this._processCarriageReturns(condition);
534 if (this._i18nNormalizeLineEndingsInICUs) {
535 // We explicitly want to normalize line endings for this text.
536 this._endToken([normalizedCondition]);
537 }
538 else {
539 // We are not normalizing line endings.
540 var conditionToken = this._endToken([condition]);
541 if (normalizedCondition !== condition) {
542 this.nonNormalizedIcuExpressions.push(conditionToken);
543 }
544 }
545 this._requireCharCode(chars.$COMMA);
546 this._attemptCharCodeUntilFn(isNotWhitespace);
547 this._beginToken(7 /* RAW_TEXT */);
548 var type = this._readUntil(chars.$COMMA);
549 this._endToken([type]);
550 this._requireCharCode(chars.$COMMA);
551 this._attemptCharCodeUntilFn(isNotWhitespace);
552 };
553 _Tokenizer.prototype._consumeExpansionCaseStart = function () {
554 this._beginToken(20 /* EXPANSION_CASE_VALUE */);
555 var value = this._readUntil(chars.$LBRACE).trim();
556 this._endToken([value]);
557 this._attemptCharCodeUntilFn(isNotWhitespace);
558 this._beginToken(21 /* EXPANSION_CASE_EXP_START */);
559 this._requireCharCode(chars.$LBRACE);
560 this._endToken([]);
561 this._attemptCharCodeUntilFn(isNotWhitespace);
562 this._expansionCaseStack.push(21 /* EXPANSION_CASE_EXP_START */);
563 };
564 _Tokenizer.prototype._consumeExpansionCaseEnd = function () {
565 this._beginToken(22 /* EXPANSION_CASE_EXP_END */);
566 this._requireCharCode(chars.$RBRACE);
567 this._endToken([]);
568 this._attemptCharCodeUntilFn(isNotWhitespace);
569 this._expansionCaseStack.pop();
570 };
571 _Tokenizer.prototype._consumeExpansionFormEnd = function () {
572 this._beginToken(23 /* EXPANSION_FORM_END */);
573 this._requireCharCode(chars.$RBRACE);
574 this._endToken([]);
575 this._expansionCaseStack.pop();
576 };
577 /**
578 * Consume a string that may contain interpolation expressions.
579 *
580 * The first token consumed will be of `tokenType` and then there will be alternating
581 * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true.
582 *
583 * If an interpolation token ends prematurely it will have no end marker in its `parts` array.
584 *
585 * @param textTokenType the kind of tokens to interleave around interpolation tokens.
586 * @param interpolationTokenType the kind of tokens that contain interpolation.
587 * @param endPredicate a function that should return true when we should stop consuming.
588 * @param endInterpolation a function that should return true if there is a premature end to an
589 * interpolation expression - i.e. before we get to the normal interpolation closing marker.
590 */
591 _Tokenizer.prototype._consumeWithInterpolation = function (textTokenType, interpolationTokenType, endPredicate, endInterpolation) {
592 this._beginToken(textTokenType);
593 var parts = [];
594 while (!endPredicate()) {
595 var current = this._cursor.clone();
596 if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {
597 this._endToken([this._processCarriageReturns(parts.join(''))], current);
598 parts.length = 0;
599 this._consumeInterpolation(interpolationTokenType, current, endInterpolation);
600 this._beginToken(textTokenType);
601 }
602 else if (this._cursor.peek() === chars.$AMPERSAND) {
603 this._endToken([this._processCarriageReturns(parts.join(''))]);
604 parts.length = 0;
605 this._consumeEntity(textTokenType);
606 this._beginToken(textTokenType);
607 }
608 else {
609 parts.push(this._readChar());
610 }
611 }
612 // It is possible that an interpolation was started but not ended inside this text token.
613 // Make sure that we reset the state of the lexer correctly.
614 this._inInterpolation = false;
615 this._endToken([this._processCarriageReturns(parts.join(''))]);
616 };
617 /**
618 * Consume a block of text that has been interpreted as an Angular interpolation.
619 *
620 * @param interpolationTokenType the type of the interpolation token to generate.
621 * @param interpolationStart a cursor that points to the start of this interpolation.
622 * @param prematureEndPredicate a function that should return true if the next characters indicate
623 * an end to the interpolation before its normal closing marker.
624 */
625 _Tokenizer.prototype._consumeInterpolation = function (interpolationTokenType, interpolationStart, prematureEndPredicate) {
626 var parts = [];
627 this._beginToken(interpolationTokenType, interpolationStart);
628 parts.push(this._interpolationConfig.start);
629 // Find the end of the interpolation, ignoring content inside quotes.
630 var expressionStart = this._cursor.clone();
631 var inQuote = null;
632 var inComment = false;
633 while (this._cursor.peek() !== chars.$EOF &&
634 (prematureEndPredicate === null || !prematureEndPredicate())) {
635 var current = this._cursor.clone();
636 if (this._isTagStart()) {
637 // We are starting what looks like an HTML element in the middle of this interpolation.
638 // Reset the cursor to before the `<` character and end the interpolation token.
639 // (This is actually wrong but here for backward compatibility).
640 this._cursor = current;
641 parts.push(this._getProcessedChars(expressionStart, current));
642 this._endToken(parts);
643 return;
644 }
645 if (inQuote === null) {
646 if (this._attemptStr(this._interpolationConfig.end)) {
647 // We are not in a string, and we hit the end interpolation marker
648 parts.push(this._getProcessedChars(expressionStart, current));
649 parts.push(this._interpolationConfig.end);
650 this._endToken(parts);
651 return;
652 }
653 else if (this._attemptStr('//')) {
654 // Once we are in a comment we ignore any quotes
655 inComment = true;
656 }
657 }
658 var char = this._cursor.peek();
659 this._cursor.advance();
660 if (char === chars.$BACKSLASH) {
661 // Skip the next character because it was escaped.
662 this._cursor.advance();
663 }
664 else if (char === inQuote) {
665 // Exiting the current quoted string
666 inQuote = null;
667 }
668 else if (!inComment && inQuote === null && chars.isQuote(char)) {
669 // Entering a new quoted string
670 inQuote = char;
671 }
672 }
673 // We hit EOF without finding a closing interpolation marker
674 parts.push(this._getProcessedChars(expressionStart, this._cursor));
675 this._endToken(parts);
676 };
677 _Tokenizer.prototype._getProcessedChars = function (start, end) {
678 return this._processCarriageReturns(end.getChars(start));
679 };
680 _Tokenizer.prototype._isTextEnd = function () {
681 if (this._isTagStart() || this._cursor.peek() === chars.$EOF) {
682 return true;
683 }
684 if (this._tokenizeIcu && !this._inInterpolation) {
685 if (this.isExpansionFormStart()) {
686 // start of an expansion form
687 return true;
688 }
689 if (this._cursor.peek() === chars.$RBRACE && this._isInExpansionCase()) {
690 // end of and expansion case
691 return true;
692 }
693 }
694 return false;
695 };
696 /**
697 * Returns true if the current cursor is pointing to the start of a tag
698 * (opening/closing/comments/cdata/etc).
699 */
700 _Tokenizer.prototype._isTagStart = function () {
701 if (this._cursor.peek() === chars.$LT) {
702 // We assume that `<` followed by whitespace is not the start of an HTML element.
703 var tmp = this._cursor.clone();
704 tmp.advance();
705 // If the next character is alphabetic, ! nor / then it is a tag start
706 var code = tmp.peek();
707 if ((chars.$a <= code && code <= chars.$z) || (chars.$A <= code && code <= chars.$Z) ||
708 code === chars.$SLASH || code === chars.$BANG) {
709 return true;
710 }
711 }
712 return false;
713 };
714 _Tokenizer.prototype._readUntil = function (char) {
715 var start = this._cursor.clone();
716 this._attemptUntilChar(char);
717 return this._cursor.getChars(start);
718 };
719 _Tokenizer.prototype._isInExpansionCase = function () {
720 return this._expansionCaseStack.length > 0 &&
721 this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
722 21 /* EXPANSION_CASE_EXP_START */;
723 };
724 _Tokenizer.prototype._isInExpansionForm = function () {
725 return this._expansionCaseStack.length > 0 &&
726 this._expansionCaseStack[this._expansionCaseStack.length - 1] ===
727 19 /* EXPANSION_FORM_START */;
728 };
729 _Tokenizer.prototype.isExpansionFormStart = function () {
730 if (this._cursor.peek() !== chars.$LBRACE) {
731 return false;
732 }
733 if (this._interpolationConfig) {
734 var start = this._cursor.clone();
735 var isInterpolation = this._attemptStr(this._interpolationConfig.start);
736 this._cursor = start;
737 return !isInterpolation;
738 }
739 return true;
740 };
741 return _Tokenizer;
742 }());
743 function isNotWhitespace(code) {
744 return !chars.isWhitespace(code) || code === chars.$EOF;
745 }
746 function isNameEnd(code) {
747 return chars.isWhitespace(code) || code === chars.$GT || code === chars.$LT ||
748 code === chars.$SLASH || code === chars.$SQ || code === chars.$DQ || code === chars.$EQ ||
749 code === chars.$EOF;
750 }
751 function isPrefixEnd(code) {
752 return (code < chars.$a || chars.$z < code) && (code < chars.$A || chars.$Z < code) &&
753 (code < chars.$0 || code > chars.$9);
754 }
755 function isDigitEntityEnd(code) {
756 return code === chars.$SEMICOLON || code === chars.$EOF || !chars.isAsciiHexDigit(code);
757 }
758 function isNamedEntityEnd(code) {
759 return code === chars.$SEMICOLON || code === chars.$EOF || !chars.isAsciiLetter(code);
760 }
761 function isExpansionCaseStart(peek) {
762 return peek !== chars.$RBRACE;
763 }
764 function compareCharCodeCaseInsensitive(code1, code2) {
765 return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2);
766 }
767 function toUpperCaseCharCode(code) {
768 return code >= chars.$a && code <= chars.$z ? code - chars.$a + chars.$A : code;
769 }
770 function mergeTextTokens(srcTokens) {
771 var dstTokens = [];
772 var lastDstToken = undefined;
773 for (var i = 0; i < srcTokens.length; i++) {
774 var token = srcTokens[i];
775 if ((lastDstToken && lastDstToken.type === 5 /* TEXT */ && token.type === 5 /* TEXT */) ||
776 (lastDstToken && lastDstToken.type === 16 /* ATTR_VALUE_TEXT */ &&
777 token.type === 16 /* ATTR_VALUE_TEXT */)) {
778 lastDstToken.parts[0] += token.parts[0];
779 lastDstToken.sourceSpan.end = token.sourceSpan.end;
780 }
781 else {
782 lastDstToken = token;
783 dstTokens.push(lastDstToken);
784 }
785 }
786 return dstTokens;
787 }
788 var PlainCharacterCursor = /** @class */ (function () {
789 function PlainCharacterCursor(fileOrCursor, range) {
790 if (fileOrCursor instanceof PlainCharacterCursor) {
791 this.file = fileOrCursor.file;
792 this.input = fileOrCursor.input;
793 this.end = fileOrCursor.end;
794 var state = fileOrCursor.state;
795 // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty.
796 // In ES5 bundles the object spread operator is translated into the `__assign` helper, which
797 // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is
798 // called in tight loops, this difference matters.
799 this.state = {
800 peek: state.peek,
801 offset: state.offset,
802 line: state.line,
803 column: state.column,
804 };
805 }
806 else {
807 if (!range) {
808 throw new Error('Programming error: the range argument must be provided with a file argument.');
809 }
810 this.file = fileOrCursor;
811 this.input = fileOrCursor.content;
812 this.end = range.endPos;
813 this.state = {
814 peek: -1,
815 offset: range.startPos,
816 line: range.startLine,
817 column: range.startCol,
818 };
819 }
820 }
821 PlainCharacterCursor.prototype.clone = function () {
822 return new PlainCharacterCursor(this);
823 };
824 PlainCharacterCursor.prototype.peek = function () {
825 return this.state.peek;
826 };
827 PlainCharacterCursor.prototype.charsLeft = function () {
828 return this.end - this.state.offset;
829 };
830 PlainCharacterCursor.prototype.diff = function (other) {
831 return this.state.offset - other.state.offset;
832 };
833 PlainCharacterCursor.prototype.advance = function () {
834 this.advanceState(this.state);
835 };
836 PlainCharacterCursor.prototype.init = function () {
837 this.updatePeek(this.state);
838 };
839 PlainCharacterCursor.prototype.getSpan = function (start, leadingTriviaCodePoints) {
840 start = start || this;
841 var fullStart = start;
842 if (leadingTriviaCodePoints) {
843 while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) {
844 if (fullStart === start) {
845 start = start.clone();
846 }
847 start.advance();
848 }
849 }
850 var startLocation = this.locationFromCursor(start);
851 var endLocation = this.locationFromCursor(this);
852 var fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation;
853 return new parse_util_1.ParseSourceSpan(startLocation, endLocation, fullStartLocation);
854 };
855 PlainCharacterCursor.prototype.getChars = function (start) {
856 return this.input.substring(start.state.offset, this.state.offset);
857 };
858 PlainCharacterCursor.prototype.charAt = function (pos) {
859 return this.input.charCodeAt(pos);
860 };
861 PlainCharacterCursor.prototype.advanceState = function (state) {
862 if (state.offset >= this.end) {
863 this.state = state;
864 throw new CursorError('Unexpected character "EOF"', this);
865 }
866 var currentChar = this.charAt(state.offset);
867 if (currentChar === chars.$LF) {
868 state.line++;
869 state.column = 0;
870 }
871 else if (!chars.isNewLine(currentChar)) {
872 state.column++;
873 }
874 state.offset++;
875 this.updatePeek(state);
876 };
877 PlainCharacterCursor.prototype.updatePeek = function (state) {
878 state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset);
879 };
880 PlainCharacterCursor.prototype.locationFromCursor = function (cursor) {
881 return new parse_util_1.ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column);
882 };
883 return PlainCharacterCursor;
884 }());
885 var EscapedCharacterCursor = /** @class */ (function (_super) {
886 tslib_1.__extends(EscapedCharacterCursor, _super);
887 function EscapedCharacterCursor(fileOrCursor, range) {
888 var _this = this;
889 if (fileOrCursor instanceof EscapedCharacterCursor) {
890 _this = _super.call(this, fileOrCursor) || this;
891 _this.internalState = tslib_1.__assign({}, fileOrCursor.internalState);
892 }
893 else {
894 _this = _super.call(this, fileOrCursor, range) || this;
895 _this.internalState = _this.state;
896 }
897 return _this;
898 }
899 EscapedCharacterCursor.prototype.advance = function () {
900 this.state = this.internalState;
901 _super.prototype.advance.call(this);
902 this.processEscapeSequence();
903 };
904 EscapedCharacterCursor.prototype.init = function () {
905 _super.prototype.init.call(this);
906 this.processEscapeSequence();
907 };
908 EscapedCharacterCursor.prototype.clone = function () {
909 return new EscapedCharacterCursor(this);
910 };
911 EscapedCharacterCursor.prototype.getChars = function (start) {
912 var cursor = start.clone();
913 var chars = '';
914 while (cursor.internalState.offset < this.internalState.offset) {
915 chars += String.fromCodePoint(cursor.peek());
916 cursor.advance();
917 }
918 return chars;
919 };
920 /**
921 * Process the escape sequence that starts at the current position in the text.
922 *
923 * This method is called to ensure that `peek` has the unescaped value of escape sequences.
924 */
925 EscapedCharacterCursor.prototype.processEscapeSequence = function () {
926 var _this = this;
927 var peek = function () { return _this.internalState.peek; };
928 if (peek() === chars.$BACKSLASH) {
929 // We have hit an escape sequence so we need the internal state to become independent
930 // of the external state.
931 this.internalState = tslib_1.__assign({}, this.state);
932 // Move past the backslash
933 this.advanceState(this.internalState);
934 // First check for standard control char sequences
935 if (peek() === chars.$n) {
936 this.state.peek = chars.$LF;
937 }
938 else if (peek() === chars.$r) {
939 this.state.peek = chars.$CR;
940 }
941 else if (peek() === chars.$v) {
942 this.state.peek = chars.$VTAB;
943 }
944 else if (peek() === chars.$t) {
945 this.state.peek = chars.$TAB;
946 }
947 else if (peek() === chars.$b) {
948 this.state.peek = chars.$BSPACE;
949 }
950 else if (peek() === chars.$f) {
951 this.state.peek = chars.$FF;
952 }
953 // Now consider more complex sequences
954 else if (peek() === chars.$u) {
955 // Unicode code-point sequence
956 this.advanceState(this.internalState); // advance past the `u` char
957 if (peek() === chars.$LBRACE) {
958 // Variable length Unicode, e.g. `\x{123}`
959 this.advanceState(this.internalState); // advance past the `{` char
960 // Advance past the variable number of hex digits until we hit a `}` char
961 var digitStart = this.clone();
962 var length_1 = 0;
963 while (peek() !== chars.$RBRACE) {
964 this.advanceState(this.internalState);
965 length_1++;
966 }
967 this.state.peek = this.decodeHexDigits(digitStart, length_1);
968 }
969 else {
970 // Fixed length Unicode, e.g. `\u1234`
971 var digitStart = this.clone();
972 this.advanceState(this.internalState);
973 this.advanceState(this.internalState);
974 this.advanceState(this.internalState);
975 this.state.peek = this.decodeHexDigits(digitStart, 4);
976 }
977 }
978 else if (peek() === chars.$x) {
979 // Hex char code, e.g. `\x2F`
980 this.advanceState(this.internalState); // advance past the `x` char
981 var digitStart = this.clone();
982 this.advanceState(this.internalState);
983 this.state.peek = this.decodeHexDigits(digitStart, 2);
984 }
985 else if (chars.isOctalDigit(peek())) {
986 // Octal char code, e.g. `\012`,
987 var octal = '';
988 var length_2 = 0;
989 var previous = this.clone();
990 while (chars.isOctalDigit(peek()) && length_2 < 3) {
991 previous = this.clone();
992 octal += String.fromCodePoint(peek());
993 this.advanceState(this.internalState);
994 length_2++;
995 }
996 this.state.peek = parseInt(octal, 8);
997 // Backup one char
998 this.internalState = previous.internalState;
999 }
1000 else if (chars.isNewLine(this.internalState.peek)) {
1001 // Line continuation `\` followed by a new line
1002 this.advanceState(this.internalState); // advance over the newline
1003 this.state = this.internalState;
1004 }
1005 else {
1006 // If none of the `if` blocks were executed then we just have an escaped normal character.
1007 // In that case we just, effectively, skip the backslash from the character.
1008 this.state.peek = this.internalState.peek;
1009 }
1010 }
1011 };
1012 EscapedCharacterCursor.prototype.decodeHexDigits = function (start, length) {
1013 var hex = this.input.substr(start.internalState.offset, length);
1014 var charCode = parseInt(hex, 16);
1015 if (!isNaN(charCode)) {
1016 return charCode;
1017 }
1018 else {
1019 start.state = start.internalState;
1020 throw new CursorError('Invalid hexadecimal escape sequence', start);
1021 }
1022 };
1023 return EscapedCharacterCursor;
1024 }(PlainCharacterCursor));
1025 var CursorError = /** @class */ (function () {
1026 function CursorError(msg, cursor) {
1027 this.msg = msg;
1028 this.cursor = cursor;
1029 }
1030 return CursorError;
1031 }());
1032 exports.CursorError = CursorError;
1033});
1034//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGV4ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci9zcmMvbWxfcGFyc2VyL2xleGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO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