svg-eslint-parser 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/index.cjs +1707 -0
- package/dist/index.d.cts +418 -0
- package/dist/index.d.ts +418 -0
- package/dist/index.js +1681 -0
- package/package.json +76 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import * as eslint from 'eslint';
|
|
2
|
+
import { SourceCode as SourceCode$1 } from 'eslint';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* parse error
|
|
11
|
+
*/
|
|
12
|
+
declare class ParseError extends SyntaxError {
|
|
13
|
+
index: number;
|
|
14
|
+
lineNumber: number;
|
|
15
|
+
column: number;
|
|
16
|
+
constructor(message: string, offset: number, line: number, column: number);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare enum NodeTypes {
|
|
20
|
+
Program = "Program",
|
|
21
|
+
Document = "Document",
|
|
22
|
+
Text = "Text",
|
|
23
|
+
Doctype = "Doctype",
|
|
24
|
+
DoctypeOpen = "DoctypeOpen",
|
|
25
|
+
DoctypeClose = "DoctypeClose",
|
|
26
|
+
DoctypeAttribute = "DoctypeAttribute",
|
|
27
|
+
DoctypeAttributeKey = "DoctypeAttributeKey",
|
|
28
|
+
DoctypeAttributeValue = "DoctypeAttributeValue",
|
|
29
|
+
DoctypeAttributeWrapperEnd = "DoctypeAttributeWrapperEnd",
|
|
30
|
+
DoctypeAttributeWrapperStart = "DoctypeAttributeWrapperStart",
|
|
31
|
+
Tag = "Tag",
|
|
32
|
+
OpenTagStart = "OpenTagStart",
|
|
33
|
+
OpenTagEnd = "OpenTagEnd",
|
|
34
|
+
CloseTag = "CloseTag",
|
|
35
|
+
Comment = "Comment",
|
|
36
|
+
CommentOpen = "CommentOpen",
|
|
37
|
+
CommentClose = "CommentClose",
|
|
38
|
+
CommentContent = "CommentContent",
|
|
39
|
+
Attribute = "Attribute",
|
|
40
|
+
AttributeKey = "AttributeKey",
|
|
41
|
+
AttributeValue = "AttributeValue",
|
|
42
|
+
AttributeValueWrapperStart = "AttributeValueWrapperStart",
|
|
43
|
+
AttributeValueWrapperEnd = "AttributeValueWrapperEnd"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare enum TokenTypes {
|
|
47
|
+
Program = "Program",
|
|
48
|
+
Document = "Document",
|
|
49
|
+
Text = "Text",
|
|
50
|
+
Doctype = "Doctype",
|
|
51
|
+
DoctypeOpen = "DoctypeOpen",
|
|
52
|
+
DoctypeClose = "DoctypeClose",
|
|
53
|
+
DoctypeAttributeValue = "DoctypeAttributeValue",
|
|
54
|
+
DoctypeAttributeWrapperStart = "DoctypeAttributeWrapperStart",
|
|
55
|
+
DoctypeAttributeWrapperEnd = "DoctypeAttributeWrapperEnd",
|
|
56
|
+
Tag = "Tag",
|
|
57
|
+
OpenTagStart = "OpenTagStart",
|
|
58
|
+
OpenTagEnd = "OpenTagEnd",
|
|
59
|
+
CloseTag = "CloseTag",
|
|
60
|
+
Comment = "Comment",
|
|
61
|
+
CommentOpen = "CommentOpen",
|
|
62
|
+
CommentClose = "CommentClose",
|
|
63
|
+
CommentContent = "CommentContent",
|
|
64
|
+
Attribute = "Attribute",
|
|
65
|
+
AttributeKey = "AttributeKey",
|
|
66
|
+
AttributeValue = "AttributeValue",
|
|
67
|
+
AttributeAssignment = "AttributeAssignment",
|
|
68
|
+
AttributeValueWrapperStart = "AttributeValueWrapperStart",
|
|
69
|
+
AttributeValueWrapperEnd = "AttributeValueWrapperEnd"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare enum TokenizerContextTypes {
|
|
73
|
+
Data = "Data",
|
|
74
|
+
OpenTagStart = "OpenTagStart",
|
|
75
|
+
OpenTagEnd = "OpenTagEnd",
|
|
76
|
+
CloseTag = "CloseTag",
|
|
77
|
+
Attributes = "Attributes",
|
|
78
|
+
AttributeKey = "AttributeKey",
|
|
79
|
+
AttributeValue = "AttributeValue",
|
|
80
|
+
AttributeValueBare = "AttributeValueBare",
|
|
81
|
+
AttributeValueWrapped = "AttributeValueWrapped",
|
|
82
|
+
CommentContent = "CommentContent",
|
|
83
|
+
CommentOpen = "CommentOpen",
|
|
84
|
+
CommentClose = "CommentClose",
|
|
85
|
+
DoctypeOpen = "DoctypeOpen",
|
|
86
|
+
DoctypeClose = "DoctypeClose",
|
|
87
|
+
DoctypeAttributes = "DoctypeAttributes",
|
|
88
|
+
DoctypeAttributeBare = "DoctypeAttributeBare",
|
|
89
|
+
DoctypeAttributeWrapped = "DoctypeAttributeWrapped"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare enum ConstructTreeContextTypes {
|
|
93
|
+
Tag = "Tag",
|
|
94
|
+
TagName = "TagName",
|
|
95
|
+
TagContent = "TagContent",
|
|
96
|
+
Attribute = "Attribute",
|
|
97
|
+
Attributes = "Attributes",
|
|
98
|
+
AttributeValue = "AttributeValue",
|
|
99
|
+
Doctype = "Doctype",
|
|
100
|
+
DoctypeAttribute = "DoctypeAttribute",
|
|
101
|
+
DoctypeAttributes = "DoctypeAttributes",
|
|
102
|
+
Comment = "Comment"
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface Locations {
|
|
106
|
+
loc: SourceLocation;
|
|
107
|
+
range: Range;
|
|
108
|
+
}
|
|
109
|
+
interface Position {
|
|
110
|
+
/**
|
|
111
|
+
* 0 based index (>= 0)
|
|
112
|
+
*/
|
|
113
|
+
column: number;
|
|
114
|
+
/**
|
|
115
|
+
* 1 based index (>= 1)
|
|
116
|
+
*/
|
|
117
|
+
line: number;
|
|
118
|
+
}
|
|
119
|
+
type Range = [number, number];
|
|
120
|
+
interface SourceLocation {
|
|
121
|
+
/**
|
|
122
|
+
* end position of source
|
|
123
|
+
*/
|
|
124
|
+
end: Position;
|
|
125
|
+
/**
|
|
126
|
+
* start position of source
|
|
127
|
+
*/
|
|
128
|
+
start: Position;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* token
|
|
133
|
+
*/
|
|
134
|
+
interface Token<T extends TokenTypes> extends Locations {
|
|
135
|
+
/**
|
|
136
|
+
* node type
|
|
137
|
+
*/
|
|
138
|
+
type: T;
|
|
139
|
+
/**
|
|
140
|
+
* token value
|
|
141
|
+
*/
|
|
142
|
+
value: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* any token
|
|
146
|
+
*/
|
|
147
|
+
type AnyToken = Token<TokenTypes.Attribute> | Token<TokenTypes.AttributeAssignment> | Token<TokenTypes.AttributeKey> | Token<TokenTypes.AttributeValue> | Token<TokenTypes.AttributeValueWrapperEnd> | Token<TokenTypes.AttributeValueWrapperStart> | Token<TokenTypes.CloseTag> | Token<TokenTypes.Comment> | Token<TokenTypes.CommentClose> | Token<TokenTypes.CommentContent> | Token<TokenTypes.CommentOpen> | Token<TokenTypes.Doctype> | Token<TokenTypes.DoctypeAttributeValue> | Token<TokenTypes.DoctypeAttributeWrapperEnd> | Token<TokenTypes.DoctypeAttributeWrapperStart> | Token<TokenTypes.DoctypeClose> | Token<TokenTypes.DoctypeOpen> | Token<TokenTypes.Document> | Token<TokenTypes.OpenTagEnd> | Token<TokenTypes.OpenTagStart> | Token<TokenTypes.Program> | Token<TokenTypes.Tag> | Token<TokenTypes.Text>;
|
|
148
|
+
|
|
149
|
+
interface BaseNode extends Locations {
|
|
150
|
+
type: NodeTypes;
|
|
151
|
+
}
|
|
152
|
+
interface SimpleNode<T extends NodeTypes> extends BaseNode {
|
|
153
|
+
type: T;
|
|
154
|
+
value: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* attribute
|
|
158
|
+
*/
|
|
159
|
+
type AttributeKeyNode = SimpleNode<NodeTypes.AttributeKey>;
|
|
160
|
+
interface AttributeNode extends BaseNode {
|
|
161
|
+
key: AttributeKeyNode;
|
|
162
|
+
type: NodeTypes.Attribute;
|
|
163
|
+
endWrapper?: AttributeValueWrapperEndNode;
|
|
164
|
+
startWrapper?: AttributeValueWrapperStartNode;
|
|
165
|
+
value?: AttributeValueNode;
|
|
166
|
+
}
|
|
167
|
+
type AttributeValueNode = SimpleNode<NodeTypes.AttributeValue>;
|
|
168
|
+
type AttributeValueWrapperEndNode = SimpleNode<NodeTypes.AttributeValueWrapperEnd>;
|
|
169
|
+
type AttributeValueWrapperStartNode = SimpleNode<NodeTypes.AttributeValueWrapperStart>;
|
|
170
|
+
/**
|
|
171
|
+
* comment
|
|
172
|
+
*/
|
|
173
|
+
type CommentCloseNode = SimpleNode<NodeTypes.CommentClose>;
|
|
174
|
+
type CommentContentNode = SimpleNode<NodeTypes.CommentContent>;
|
|
175
|
+
interface CommentNode extends BaseNode {
|
|
176
|
+
close: CommentCloseNode;
|
|
177
|
+
open: CommentOpenNode;
|
|
178
|
+
type: NodeTypes.Comment;
|
|
179
|
+
value: CommentContentNode;
|
|
180
|
+
}
|
|
181
|
+
type CommentOpenNode = SimpleNode<NodeTypes.CommentOpen>;
|
|
182
|
+
/**
|
|
183
|
+
* doctype
|
|
184
|
+
*/
|
|
185
|
+
type DoctypeAttributeKeyNode = SimpleNode<NodeTypes.DoctypeAttributeKey>;
|
|
186
|
+
interface DoctypeAttributeNode extends BaseNode {
|
|
187
|
+
key: DoctypeAttributeKeyNode;
|
|
188
|
+
type: NodeTypes.DoctypeAttribute;
|
|
189
|
+
endWrapper?: DoctypeAttributeWrapperEndNode;
|
|
190
|
+
startWrapper?: DoctypeAttributeWrapperStartNode;
|
|
191
|
+
value?: DoctypeAttributeValueNode;
|
|
192
|
+
}
|
|
193
|
+
type DoctypeAttributeValueNode = SimpleNode<NodeTypes.DoctypeAttributeValue>;
|
|
194
|
+
type DoctypeAttributeWrapperEndNode = SimpleNode<NodeTypes.DoctypeAttributeWrapperEnd>;
|
|
195
|
+
type DoctypeAttributeWrapperStartNode = SimpleNode<NodeTypes.DoctypeAttributeWrapperStart>;
|
|
196
|
+
type DoctypeCloseNode = SimpleNode<NodeTypes.DoctypeClose>;
|
|
197
|
+
interface DoctypeNode extends BaseNode {
|
|
198
|
+
attributes: DoctypeAttributeNode[];
|
|
199
|
+
close: DoctypeCloseNode;
|
|
200
|
+
open: DoctypeOpenNode;
|
|
201
|
+
type: NodeTypes.Doctype;
|
|
202
|
+
}
|
|
203
|
+
type DoctypeOpenNode = SimpleNode<NodeTypes.DoctypeOpen>;
|
|
204
|
+
interface DocumentNode extends BaseNode {
|
|
205
|
+
children: NestableNode[];
|
|
206
|
+
type: NodeTypes.Document;
|
|
207
|
+
}
|
|
208
|
+
type TextNode = SimpleNode<NodeTypes.Text>;
|
|
209
|
+
/**
|
|
210
|
+
* tag
|
|
211
|
+
*/
|
|
212
|
+
type CloseTagNode = SimpleNode<NodeTypes.CloseTag>;
|
|
213
|
+
type OpenTagEndNode = SimpleNode<NodeTypes.OpenTagEnd>;
|
|
214
|
+
type OpenTagStartNode = SimpleNode<NodeTypes.OpenTagStart>;
|
|
215
|
+
interface TagNode extends BaseNode {
|
|
216
|
+
attributes: AttributeNode[];
|
|
217
|
+
children: NestableNode[];
|
|
218
|
+
name: string;
|
|
219
|
+
openEnd: OpenTagEndNode;
|
|
220
|
+
openStart: OpenTagStartNode;
|
|
221
|
+
selfClosing: boolean;
|
|
222
|
+
type: NodeTypes.Tag;
|
|
223
|
+
close?: CloseTagNode;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* program
|
|
227
|
+
*/
|
|
228
|
+
interface Program extends BaseNode {
|
|
229
|
+
body: DocumentNode[];
|
|
230
|
+
comments: CommentContentNode[];
|
|
231
|
+
tokens: AnyToken[];
|
|
232
|
+
type: NodeTypes.Program;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* nestable node
|
|
236
|
+
*/
|
|
237
|
+
type NestableNode = CommentNode | TagNode | TextNode;
|
|
238
|
+
/**
|
|
239
|
+
* any node
|
|
240
|
+
*/
|
|
241
|
+
type AnyNode = AttributeKeyNode | AttributeNode | AttributeValueNode | AttributeValueWrapperEndNode | AttributeValueWrapperStartNode | CloseTagNode | CommentCloseNode | CommentContentNode | CommentNode | CommentOpenNode | DoctypeAttributeKeyNode | DoctypeAttributeNode | DoctypeAttributeValueNode | DoctypeAttributeWrapperEndNode | DoctypeAttributeWrapperStartNode | DoctypeCloseNode | DoctypeNode | DoctypeOpenNode | DocumentNode | OpenTagEndNode | OpenTagStartNode | Program | TagNode | TextNode;
|
|
242
|
+
|
|
243
|
+
interface Options {
|
|
244
|
+
}
|
|
245
|
+
interface ParseForESLintResult {
|
|
246
|
+
ast: Program;
|
|
247
|
+
services: {
|
|
248
|
+
isSVG: boolean;
|
|
249
|
+
};
|
|
250
|
+
visitorKeys: SourceCode$1.VisitorKeys;
|
|
251
|
+
}
|
|
252
|
+
interface ParseResult {
|
|
253
|
+
ast: DocumentNode;
|
|
254
|
+
tokens: AnyToken[];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
type AnyContextualNode = ContextualAttributeNode | ContextualCommentNode | ContextualDoctypeAttributeNode | ContextualDoctypeNode | ContextualDocumentNode | ContextualTagNode;
|
|
258
|
+
type ContextualAttributeNode = ContextualNode<AttributeNode, 'key' | 'value'>;
|
|
259
|
+
type ContextualCommentNode = ContextualNode<CommentNode, 'close' | 'open' | 'value'>;
|
|
260
|
+
type ContextualDoctypeAttributeNode = ContextualNode<DoctypeAttributeNode, 'key' | 'value'>;
|
|
261
|
+
type ContextualDoctypeNode = ContextualNode<DoctypeNode, 'close' | 'open'> & {
|
|
262
|
+
attributes: ContextualDoctypeAttributeNode[];
|
|
263
|
+
};
|
|
264
|
+
type ContextualDocumentNode = Omit<ContextualNode<DocumentNode, never>, 'children'> & {
|
|
265
|
+
children: Array<DocumentNode['children'][number] | Exclude<AnyContextualNode, ContextualDoctypeNode>>;
|
|
266
|
+
};
|
|
267
|
+
type ContextualNode<T extends AnyNode, K extends keyof T> = PartialBy<T, K> & {
|
|
268
|
+
parentRef?: any;
|
|
269
|
+
};
|
|
270
|
+
type ContextualTagNode = ContextualNode<TagNode, 'close' | 'name' | 'openEnd' | 'openStart' | 'selfClosing'> & {
|
|
271
|
+
attributes: ContextualAttributeNode[];
|
|
272
|
+
children: Array<ContextualCommentNode | ContextualDoctypeNode | ContextualTagNode | TagNode['children'][number]>;
|
|
273
|
+
};
|
|
274
|
+
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
275
|
+
|
|
276
|
+
declare class Chars {
|
|
277
|
+
value: string;
|
|
278
|
+
range: Range;
|
|
279
|
+
constructor(value: string, range: Range);
|
|
280
|
+
concat(chars: Chars): void;
|
|
281
|
+
equals(chars: string): boolean;
|
|
282
|
+
length(): number;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare class CharsBuffer {
|
|
286
|
+
charsBuffer: Chars[];
|
|
287
|
+
concat(chars: Chars): void;
|
|
288
|
+
concatBuffer(buffer: CharsBuffer): void;
|
|
289
|
+
length(): number;
|
|
290
|
+
clear(): void;
|
|
291
|
+
value(): string;
|
|
292
|
+
last(): Chars;
|
|
293
|
+
first(): Chars;
|
|
294
|
+
removeLast(): void;
|
|
295
|
+
removeFirst(): void;
|
|
296
|
+
replace(other: CharsBuffer): void;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare class SourceCode {
|
|
300
|
+
readonly source: string;
|
|
301
|
+
private charsList;
|
|
302
|
+
private charsIndex;
|
|
303
|
+
constructor(source: string);
|
|
304
|
+
getLocationOf(range: Range): SourceLocation;
|
|
305
|
+
current(): Chars;
|
|
306
|
+
next(): void;
|
|
307
|
+
prev(): void;
|
|
308
|
+
isEof(): boolean;
|
|
309
|
+
index(): number;
|
|
310
|
+
private createCharsList;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
type TokenizerState = {
|
|
314
|
+
accumulatedContent: CharsBuffer;
|
|
315
|
+
contextParams: ContextParams;
|
|
316
|
+
currentContext: TokenizerContextTypes;
|
|
317
|
+
decisionBuffer: CharsBuffer;
|
|
318
|
+
sourceCode: SourceCode;
|
|
319
|
+
tokens: {
|
|
320
|
+
push(token: AnyToken): void;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
type ContextParams = {
|
|
324
|
+
[TokenizerContextTypes.Attributes]?: {
|
|
325
|
+
tagName: string;
|
|
326
|
+
};
|
|
327
|
+
[TokenizerContextTypes.AttributeValueWrapped]?: {
|
|
328
|
+
wrapper: string;
|
|
329
|
+
};
|
|
330
|
+
[TokenizerContextTypes.DoctypeAttributeWrapped]?: {
|
|
331
|
+
wrapper: string;
|
|
332
|
+
};
|
|
333
|
+
[TokenizerContextTypes.OpenTagEnd]?: {
|
|
334
|
+
tagName: string;
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
type ConstructTreeState<N extends AnyContextualNode> = {
|
|
339
|
+
caretPosition: number;
|
|
340
|
+
currentNode: N;
|
|
341
|
+
rootNode: DocumentNode;
|
|
342
|
+
currentContext: {
|
|
343
|
+
type: ConstructTreeContextTypes;
|
|
344
|
+
content?: any[];
|
|
345
|
+
parentRef?: any;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
interface ConstructTreeHandler {
|
|
350
|
+
construct: (token: AnyToken, state: ConstructTreeState<any>) => ConstructTreeState<any>;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface TokenizeHandler {
|
|
354
|
+
parse: (chars: CharsBuffer, state: TokenizerState) => void;
|
|
355
|
+
handleContentEnd?: (state: TokenizerState) => void;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
type index_AnyContextualNode = AnyContextualNode;
|
|
359
|
+
type index_AnyNode = AnyNode;
|
|
360
|
+
type index_AnyToken = AnyToken;
|
|
361
|
+
type index_AttributeKeyNode = AttributeKeyNode;
|
|
362
|
+
type index_AttributeNode = AttributeNode;
|
|
363
|
+
type index_AttributeValueNode = AttributeValueNode;
|
|
364
|
+
type index_AttributeValueWrapperEndNode = AttributeValueWrapperEndNode;
|
|
365
|
+
type index_AttributeValueWrapperStartNode = AttributeValueWrapperStartNode;
|
|
366
|
+
type index_BaseNode = BaseNode;
|
|
367
|
+
type index_CloseTagNode = CloseTagNode;
|
|
368
|
+
type index_CommentCloseNode = CommentCloseNode;
|
|
369
|
+
type index_CommentContentNode = CommentContentNode;
|
|
370
|
+
type index_CommentNode = CommentNode;
|
|
371
|
+
type index_CommentOpenNode = CommentOpenNode;
|
|
372
|
+
type index_ConstructTreeHandler = ConstructTreeHandler;
|
|
373
|
+
type index_ConstructTreeState<N extends AnyContextualNode> = ConstructTreeState<N>;
|
|
374
|
+
type index_ContextualAttributeNode = ContextualAttributeNode;
|
|
375
|
+
type index_ContextualCommentNode = ContextualCommentNode;
|
|
376
|
+
type index_ContextualDoctypeAttributeNode = ContextualDoctypeAttributeNode;
|
|
377
|
+
type index_ContextualDoctypeNode = ContextualDoctypeNode;
|
|
378
|
+
type index_ContextualDocumentNode = ContextualDocumentNode;
|
|
379
|
+
type index_ContextualNode<T extends AnyNode, K extends keyof T> = ContextualNode<T, K>;
|
|
380
|
+
type index_ContextualTagNode = ContextualTagNode;
|
|
381
|
+
type index_DoctypeAttributeKeyNode = DoctypeAttributeKeyNode;
|
|
382
|
+
type index_DoctypeAttributeNode = DoctypeAttributeNode;
|
|
383
|
+
type index_DoctypeAttributeValueNode = DoctypeAttributeValueNode;
|
|
384
|
+
type index_DoctypeAttributeWrapperEndNode = DoctypeAttributeWrapperEndNode;
|
|
385
|
+
type index_DoctypeAttributeWrapperStartNode = DoctypeAttributeWrapperStartNode;
|
|
386
|
+
type index_DoctypeCloseNode = DoctypeCloseNode;
|
|
387
|
+
type index_DoctypeNode = DoctypeNode;
|
|
388
|
+
type index_DoctypeOpenNode = DoctypeOpenNode;
|
|
389
|
+
type index_DocumentNode = DocumentNode;
|
|
390
|
+
type index_Locations = Locations;
|
|
391
|
+
type index_NestableNode = NestableNode;
|
|
392
|
+
type index_OpenTagEndNode = OpenTagEndNode;
|
|
393
|
+
type index_OpenTagStartNode = OpenTagStartNode;
|
|
394
|
+
type index_Options = Options;
|
|
395
|
+
type index_ParseForESLintResult = ParseForESLintResult;
|
|
396
|
+
type index_ParseResult = ParseResult;
|
|
397
|
+
type index_PartialBy<T, K extends keyof T> = PartialBy<T, K>;
|
|
398
|
+
type index_Position = Position;
|
|
399
|
+
type index_Program = Program;
|
|
400
|
+
type index_Range = Range;
|
|
401
|
+
type index_SimpleNode<T extends NodeTypes> = SimpleNode<T>;
|
|
402
|
+
type index_SourceLocation = SourceLocation;
|
|
403
|
+
type index_TagNode = TagNode;
|
|
404
|
+
type index_TextNode = TextNode;
|
|
405
|
+
type index_Token<T extends TokenTypes> = Token<T>;
|
|
406
|
+
type index_TokenizeHandler = TokenizeHandler;
|
|
407
|
+
type index_TokenizerState = TokenizerState;
|
|
408
|
+
declare namespace index {
|
|
409
|
+
export type { index_AnyContextualNode as AnyContextualNode, index_AnyNode as AnyNode, index_AnyToken as AnyToken, index_AttributeKeyNode as AttributeKeyNode, index_AttributeNode as AttributeNode, index_AttributeValueNode as AttributeValueNode, index_AttributeValueWrapperEndNode as AttributeValueWrapperEndNode, index_AttributeValueWrapperStartNode as AttributeValueWrapperStartNode, index_BaseNode as BaseNode, index_CloseTagNode as CloseTagNode, index_CommentCloseNode as CommentCloseNode, index_CommentContentNode as CommentContentNode, index_CommentNode as CommentNode, index_CommentOpenNode as CommentOpenNode, index_ConstructTreeHandler as ConstructTreeHandler, index_ConstructTreeState as ConstructTreeState, index_ContextualAttributeNode as ContextualAttributeNode, index_ContextualCommentNode as ContextualCommentNode, index_ContextualDoctypeAttributeNode as ContextualDoctypeAttributeNode, index_ContextualDoctypeNode as ContextualDoctypeNode, index_ContextualDocumentNode as ContextualDocumentNode, index_ContextualNode as ContextualNode, index_ContextualTagNode as ContextualTagNode, index_DoctypeAttributeKeyNode as DoctypeAttributeKeyNode, index_DoctypeAttributeNode as DoctypeAttributeNode, index_DoctypeAttributeValueNode as DoctypeAttributeValueNode, index_DoctypeAttributeWrapperEndNode as DoctypeAttributeWrapperEndNode, index_DoctypeAttributeWrapperStartNode as DoctypeAttributeWrapperStartNode, index_DoctypeCloseNode as DoctypeCloseNode, index_DoctypeNode as DoctypeNode, index_DoctypeOpenNode as DoctypeOpenNode, index_DocumentNode as DocumentNode, index_Locations as Locations, index_NestableNode as NestableNode, index_OpenTagEndNode as OpenTagEndNode, index_OpenTagStartNode as OpenTagStartNode, index_Options as Options, index_ParseForESLintResult as ParseForESLintResult, index_ParseResult as ParseResult, index_PartialBy as PartialBy, index_Position as Position, index_Program as Program, index_Range as Range, index_SimpleNode as SimpleNode, index_SourceLocation as SourceLocation, index_TagNode as TagNode, index_TextNode as TextNode, index_Token as Token, index_TokenizeHandler as TokenizeHandler, index_TokenizerState as TokenizerState };
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare function parseForESLint(source: string, options?: Options): ParseForESLintResult;
|
|
413
|
+
|
|
414
|
+
declare function parseSVG(code: string, options?: Options): Program;
|
|
415
|
+
declare const name: string;
|
|
416
|
+
declare const VisitorKeys: eslint.SourceCode.VisitorKeys;
|
|
417
|
+
|
|
418
|
+
export { index as AST, ParseError, VisitorKeys, meta, name, parseForESLint, parseSVG };
|