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 | export const $EOF = 0;
|
---|
9 | export const $BSPACE = 8;
|
---|
10 | export const $TAB = 9;
|
---|
11 | export const $LF = 10;
|
---|
12 | export const $VTAB = 11;
|
---|
13 | export const $FF = 12;
|
---|
14 | export const $CR = 13;
|
---|
15 | export const $SPACE = 32;
|
---|
16 | export const $BANG = 33;
|
---|
17 | export const $DQ = 34;
|
---|
18 | export const $HASH = 35;
|
---|
19 | export const $$ = 36;
|
---|
20 | export const $PERCENT = 37;
|
---|
21 | export const $AMPERSAND = 38;
|
---|
22 | export const $SQ = 39;
|
---|
23 | export const $LPAREN = 40;
|
---|
24 | export const $RPAREN = 41;
|
---|
25 | export const $STAR = 42;
|
---|
26 | export const $PLUS = 43;
|
---|
27 | export const $COMMA = 44;
|
---|
28 | export const $MINUS = 45;
|
---|
29 | export const $PERIOD = 46;
|
---|
30 | export const $SLASH = 47;
|
---|
31 | export const $COLON = 58;
|
---|
32 | export const $SEMICOLON = 59;
|
---|
33 | export const $LT = 60;
|
---|
34 | export const $EQ = 61;
|
---|
35 | export const $GT = 62;
|
---|
36 | export const $QUESTION = 63;
|
---|
37 | export const $0 = 48;
|
---|
38 | export const $7 = 55;
|
---|
39 | export const $9 = 57;
|
---|
40 | export const $A = 65;
|
---|
41 | export const $E = 69;
|
---|
42 | export const $F = 70;
|
---|
43 | export const $X = 88;
|
---|
44 | export const $Z = 90;
|
---|
45 | export const $LBRACKET = 91;
|
---|
46 | export const $BACKSLASH = 92;
|
---|
47 | export const $RBRACKET = 93;
|
---|
48 | export const $CARET = 94;
|
---|
49 | export const $_ = 95;
|
---|
50 | export const $a = 97;
|
---|
51 | export const $b = 98;
|
---|
52 | export const $e = 101;
|
---|
53 | export const $f = 102;
|
---|
54 | export const $n = 110;
|
---|
55 | export const $r = 114;
|
---|
56 | export const $t = 116;
|
---|
57 | export const $u = 117;
|
---|
58 | export const $v = 118;
|
---|
59 | export const $x = 120;
|
---|
60 | export const $z = 122;
|
---|
61 | export const $LBRACE = 123;
|
---|
62 | export const $BAR = 124;
|
---|
63 | export const $RBRACE = 125;
|
---|
64 | export const $NBSP = 160;
|
---|
65 | export const $PIPE = 124;
|
---|
66 | export const $TILDA = 126;
|
---|
67 | export const $AT = 64;
|
---|
68 | export const $BT = 96;
|
---|
69 | export function isWhitespace(code) {
|
---|
70 | return (code >= $TAB && code <= $SPACE) || (code == $NBSP);
|
---|
71 | }
|
---|
72 | export function isDigit(code) {
|
---|
73 | return $0 <= code && code <= $9;
|
---|
74 | }
|
---|
75 | export function isAsciiLetter(code) {
|
---|
76 | return code >= $a && code <= $z || code >= $A && code <= $Z;
|
---|
77 | }
|
---|
78 | export function isAsciiHexDigit(code) {
|
---|
79 | return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);
|
---|
80 | }
|
---|
81 | export function isNewLine(code) {
|
---|
82 | return code === $LF || code === $CR;
|
---|
83 | }
|
---|
84 | export function isOctalDigit(code) {
|
---|
85 | return $0 <= code && code <= $7;
|
---|
86 | }
|
---|
87 | export function isQuote(code) {
|
---|
88 | return code === $SQ || code === $DQ || code === $BT;
|
---|
89 | }
|
---|
90 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci9zcmMvY2hhcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsTUFBTSxDQUFDLE1BQU0sSUFBSSxHQUFHLENBQUMsQ0FBQztBQUN0QixNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsQ0FBQyxDQUFDO0FBQ3pCLE1BQU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