source: trip-planner-front/node_modules/@angular/compiler/src/ml_parser/tokens.d.ts

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: 4.7 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 { ParseSourceSpan } from '../parse_util';
9export declare const enum TokenType {
10 TAG_OPEN_START = 0,
11 TAG_OPEN_END = 1,
12 TAG_OPEN_END_VOID = 2,
13 TAG_CLOSE = 3,
14 INCOMPLETE_TAG_OPEN = 4,
15 TEXT = 5,
16 ESCAPABLE_RAW_TEXT = 6,
17 RAW_TEXT = 7,
18 INTERPOLATION = 8,
19 ENCODED_ENTITY = 9,
20 COMMENT_START = 10,
21 COMMENT_END = 11,
22 CDATA_START = 12,
23 CDATA_END = 13,
24 ATTR_NAME = 14,
25 ATTR_QUOTE = 15,
26 ATTR_VALUE_TEXT = 16,
27 ATTR_VALUE_INTERPOLATION = 17,
28 DOC_TYPE = 18,
29 EXPANSION_FORM_START = 19,
30 EXPANSION_CASE_VALUE = 20,
31 EXPANSION_CASE_EXP_START = 21,
32 EXPANSION_CASE_EXP_END = 22,
33 EXPANSION_FORM_END = 23,
34 EOF = 24
35}
36export declare type Token = TagOpenStartToken | TagOpenEndToken | TagOpenEndVoidToken | TagCloseToken | IncompleteTagOpenToken | TextToken | InterpolationToken | EncodedEntityToken | CommentStartToken | CommentEndToken | CdataStartToken | CdataEndToken | AttributeNameToken | AttributeQuoteToken | AttributeValueTextToken | AttributeValueInterpolationToken | DocTypeToken | ExpansionFormStartToken | ExpansionCaseValueToken | ExpansionCaseExpressionStartToken | ExpansionCaseExpressionEndToken | ExpansionFormEndToken | EndOfFileToken;
37export declare type InterpolatedTextToken = TextToken | InterpolationToken | EncodedEntityToken;
38export declare type InterpolatedAttributeToken = AttributeValueTextToken | AttributeValueInterpolationToken | EncodedEntityToken;
39export interface TokenBase {
40 type: TokenType;
41 parts: string[];
42 sourceSpan: ParseSourceSpan;
43}
44export interface TagOpenStartToken extends TokenBase {
45 type: TokenType.TAG_OPEN_START;
46 parts: [prefix: string, name: string];
47}
48export interface TagOpenEndToken extends TokenBase {
49 type: TokenType.TAG_OPEN_END;
50 parts: [];
51}
52export interface TagOpenEndVoidToken extends TokenBase {
53 type: TokenType.TAG_OPEN_END_VOID;
54 parts: [];
55}
56export interface TagCloseToken extends TokenBase {
57 type: TokenType.TAG_CLOSE;
58 parts: [prefix: string, name: string];
59}
60export interface IncompleteTagOpenToken extends TokenBase {
61 type: TokenType.INCOMPLETE_TAG_OPEN;
62 parts: [prefix: string, name: string];
63}
64export interface TextToken extends TokenBase {
65 type: TokenType.TEXT | TokenType.ESCAPABLE_RAW_TEXT | TokenType.RAW_TEXT;
66 parts: [text: string];
67}
68export interface InterpolationToken extends TokenBase {
69 type: TokenType.INTERPOLATION;
70 parts: [startMarker: string, expression: string, endMarker: string] | [
71 startMarker: string,
72 expression: string
73 ];
74}
75export interface EncodedEntityToken extends TokenBase {
76 type: TokenType.ENCODED_ENTITY;
77 parts: [decoded: string, encoded: string];
78}
79export interface CommentStartToken extends TokenBase {
80 type: TokenType.COMMENT_START;
81 parts: [];
82}
83export interface CommentEndToken extends TokenBase {
84 type: TokenType.COMMENT_END;
85 parts: [];
86}
87export interface CdataStartToken extends TokenBase {
88 type: TokenType.CDATA_START;
89 parts: [];
90}
91export interface CdataEndToken extends TokenBase {
92 type: TokenType.CDATA_END;
93 parts: [];
94}
95export interface AttributeNameToken extends TokenBase {
96 type: TokenType.ATTR_NAME;
97 parts: [prefix: string, name: string];
98}
99export interface AttributeQuoteToken extends TokenBase {
100 type: TokenType.ATTR_QUOTE;
101 parts: [quote: '\'' | '"'];
102}
103export interface AttributeValueTextToken extends TokenBase {
104 type: TokenType.ATTR_VALUE_TEXT;
105 parts: [value: string];
106}
107export interface AttributeValueInterpolationToken extends TokenBase {
108 type: TokenType.ATTR_VALUE_INTERPOLATION;
109 parts: [startMarker: string, expression: string, endMarker: string] | [
110 startMarker: string,
111 expression: string
112 ];
113}
114export interface DocTypeToken extends TokenBase {
115 type: TokenType.DOC_TYPE;
116 parts: [content: string];
117}
118export interface ExpansionFormStartToken extends TokenBase {
119 type: TokenType.EXPANSION_FORM_START;
120 parts: [];
121}
122export interface ExpansionCaseValueToken extends TokenBase {
123 type: TokenType.EXPANSION_CASE_VALUE;
124 parts: [value: string];
125}
126export interface ExpansionCaseExpressionStartToken extends TokenBase {
127 type: TokenType.EXPANSION_CASE_EXP_START;
128 parts: [];
129}
130export interface ExpansionCaseExpressionEndToken extends TokenBase {
131 type: TokenType.EXPANSION_CASE_EXP_END;
132 parts: [];
133}
134export interface ExpansionFormEndToken extends TokenBase {
135 type: TokenType.EXPANSION_FORM_END;
136 parts: [];
137}
138export interface EndOfFileToken extends TokenBase {
139 type: TokenType.EOF;
140 parts: [];
141}
Note: See TracBrowser for help on using the repository browser.