@herb-tools/core 0.8.10 → 0.9.1
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/dist/herb-core.browser.js +22728 -320
- package/dist/herb-core.browser.js.map +1 -1
- package/dist/herb-core.cjs +22815 -321
- package/dist/herb-core.cjs.map +1 -1
- package/dist/herb-core.esm.js +22728 -320
- package/dist/herb-core.esm.js.map +1 -1
- package/dist/herb-core.umd.js +22815 -321
- package/dist/herb-core.umd.js.map +1 -1
- package/dist/types/ast-utils.d.ts +185 -4
- package/dist/types/backend.d.ts +6 -6
- package/dist/types/diagnostic.d.ts +6 -0
- package/dist/types/errors.d.ts +390 -25
- package/dist/types/extract-ruby-options.d.ts +6 -0
- package/dist/types/herb-backend.d.ts +15 -7
- package/dist/types/index.d.ts +2 -0
- package/dist/types/node-type-guards.d.ts +113 -32
- package/dist/types/nodes.d.ts +465 -49
- package/dist/types/parse-result.d.ts +7 -1
- package/dist/types/parser-options.d.ts +33 -2
- package/dist/types/prism/index.d.ts +28 -0
- package/dist/types/prism/inspect.d.ts +3 -0
- package/dist/types/util.d.ts +0 -1
- package/dist/types/visitor.d.ts +19 -1
- package/package.json +4 -1
- package/src/ast-utils.ts +564 -8
- package/src/backend.ts +7 -7
- package/src/diagnostic.ts +7 -0
- package/src/errors.ts +1221 -76
- package/src/extract-ruby-options.ts +11 -0
- package/src/herb-backend.ts +30 -15
- package/src/index.ts +2 -0
- package/src/node-type-guards.ts +281 -33
- package/src/nodes.ts +1309 -100
- package/src/parse-result.ts +11 -0
- package/src/parser-options.ts +62 -2
- package/src/prism/index.ts +44 -0
- package/src/prism/inspect.ts +118 -0
- package/src/util.ts +0 -12
- package/src/visitor.ts +66 -1
package/dist/types/nodes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Location } from "./location.js";
|
|
2
2
|
import { Token, SerializedToken } from "./token.js";
|
|
3
3
|
import { HerbError } from "./errors.js";
|
|
4
|
+
import type { PrismNode } from "./prism/index.js";
|
|
4
5
|
import type { SerializedLocation } from "./location.js";
|
|
5
6
|
import type { SerializedHerbError } from "./errors.js";
|
|
6
7
|
import type { Visitor } from "./visitor.js";
|
|
@@ -19,9 +20,11 @@ export declare abstract class Node implements BaseNodeProps {
|
|
|
19
20
|
readonly type: NodeType;
|
|
20
21
|
readonly location: Location;
|
|
21
22
|
readonly errors: HerbError[];
|
|
23
|
+
source: string | null;
|
|
22
24
|
static from(node: SerializedNode): Node;
|
|
23
25
|
static get type(): NodeType;
|
|
24
26
|
constructor(type: NodeType, location: Location, errors: HerbError[]);
|
|
27
|
+
setSource(source: string): void;
|
|
25
28
|
toJSON(): SerializedNode;
|
|
26
29
|
inspect(): string;
|
|
27
30
|
is<T extends Node>(nodeClass: {
|
|
@@ -42,18 +45,24 @@ export declare abstract class Node implements BaseNodeProps {
|
|
|
42
45
|
export interface SerializedDocumentNode extends SerializedNode {
|
|
43
46
|
type: "AST_DOCUMENT_NODE";
|
|
44
47
|
children: SerializedNode[];
|
|
48
|
+
prism_node: number[] | null;
|
|
45
49
|
}
|
|
46
|
-
export interface DocumentNodeProps extends BaseNodeProps {
|
|
50
|
+
export interface DocumentNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
51
|
+
type: "AST_DOCUMENT_NODE";
|
|
47
52
|
children: Node[];
|
|
53
|
+
prism_node: Uint8Array | null;
|
|
48
54
|
}
|
|
49
55
|
export declare class DocumentNode extends Node {
|
|
56
|
+
readonly type: "AST_DOCUMENT_NODE";
|
|
50
57
|
readonly children: Node[];
|
|
58
|
+
readonly prism_node: Uint8Array | null;
|
|
51
59
|
static get type(): NodeType;
|
|
52
60
|
static from(data: SerializedDocumentNode): DocumentNode;
|
|
53
61
|
constructor(props: DocumentNodeProps);
|
|
54
62
|
accept(visitor: Visitor): void;
|
|
55
63
|
childNodes(): (Node | null | undefined)[];
|
|
56
64
|
compactChildNodes(): Node[];
|
|
65
|
+
get prismNode(): PrismNode | null;
|
|
57
66
|
recursiveErrors(): HerbError[];
|
|
58
67
|
toJSON(): SerializedDocumentNode;
|
|
59
68
|
treeInspect(): string;
|
|
@@ -62,10 +71,12 @@ export interface SerializedLiteralNode extends SerializedNode {
|
|
|
62
71
|
type: "AST_LITERAL_NODE";
|
|
63
72
|
content: string;
|
|
64
73
|
}
|
|
65
|
-
export interface LiteralNodeProps extends BaseNodeProps {
|
|
74
|
+
export interface LiteralNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
75
|
+
type: "AST_LITERAL_NODE";
|
|
66
76
|
content: string;
|
|
67
77
|
}
|
|
68
78
|
export declare class LiteralNode extends Node {
|
|
79
|
+
readonly type: "AST_LITERAL_NODE";
|
|
69
80
|
readonly content: string;
|
|
70
81
|
static get type(): NodeType;
|
|
71
82
|
static from(data: SerializedLiteralNode): LiteralNode;
|
|
@@ -85,7 +96,8 @@ export interface SerializedHTMLOpenTagNode extends SerializedNode {
|
|
|
85
96
|
children: SerializedNode[];
|
|
86
97
|
is_void: boolean;
|
|
87
98
|
}
|
|
88
|
-
export interface HTMLOpenTagNodeProps extends BaseNodeProps {
|
|
99
|
+
export interface HTMLOpenTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
100
|
+
type: "AST_HTML_OPEN_TAG_NODE";
|
|
89
101
|
tag_opening: Token | null;
|
|
90
102
|
tag_name: Token | null;
|
|
91
103
|
tag_closing: Token | null;
|
|
@@ -93,6 +105,7 @@ export interface HTMLOpenTagNodeProps extends BaseNodeProps {
|
|
|
93
105
|
is_void: boolean;
|
|
94
106
|
}
|
|
95
107
|
export declare class HTMLOpenTagNode extends Node {
|
|
108
|
+
readonly type: "AST_HTML_OPEN_TAG_NODE";
|
|
96
109
|
readonly tag_opening: Token | null;
|
|
97
110
|
readonly tag_name: Token | null;
|
|
98
111
|
readonly tag_closing: Token | null;
|
|
@@ -108,6 +121,33 @@ export declare class HTMLOpenTagNode extends Node {
|
|
|
108
121
|
toJSON(): SerializedHTMLOpenTagNode;
|
|
109
122
|
treeInspect(): string;
|
|
110
123
|
}
|
|
124
|
+
export interface SerializedHTMLConditionalOpenTagNode extends SerializedNode {
|
|
125
|
+
type: "AST_HTML_CONDITIONAL_OPEN_TAG_NODE";
|
|
126
|
+
conditional: SerializedERBIfNode | SerializedERBUnlessNode | null;
|
|
127
|
+
tag_name: SerializedToken | null;
|
|
128
|
+
is_void: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface HTMLConditionalOpenTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
131
|
+
type: "AST_HTML_CONDITIONAL_OPEN_TAG_NODE";
|
|
132
|
+
conditional: ERBIfNode | ERBUnlessNode | null;
|
|
133
|
+
tag_name: Token | null;
|
|
134
|
+
is_void: boolean;
|
|
135
|
+
}
|
|
136
|
+
export declare class HTMLConditionalOpenTagNode extends Node {
|
|
137
|
+
readonly type: "AST_HTML_CONDITIONAL_OPEN_TAG_NODE";
|
|
138
|
+
readonly conditional: ERBIfNode | ERBUnlessNode | null;
|
|
139
|
+
readonly tag_name: Token | null;
|
|
140
|
+
readonly is_void: boolean;
|
|
141
|
+
static get type(): NodeType;
|
|
142
|
+
static from(data: SerializedHTMLConditionalOpenTagNode): HTMLConditionalOpenTagNode;
|
|
143
|
+
constructor(props: HTMLConditionalOpenTagNodeProps);
|
|
144
|
+
accept(visitor: Visitor): void;
|
|
145
|
+
childNodes(): (Node | null | undefined)[];
|
|
146
|
+
compactChildNodes(): Node[];
|
|
147
|
+
recursiveErrors(): HerbError[];
|
|
148
|
+
toJSON(): SerializedHTMLConditionalOpenTagNode;
|
|
149
|
+
treeInspect(): string;
|
|
150
|
+
}
|
|
111
151
|
export interface SerializedHTMLCloseTagNode extends SerializedNode {
|
|
112
152
|
type: "AST_HTML_CLOSE_TAG_NODE";
|
|
113
153
|
tag_opening: SerializedToken | null;
|
|
@@ -115,13 +155,15 @@ export interface SerializedHTMLCloseTagNode extends SerializedNode {
|
|
|
115
155
|
children: SerializedNode[];
|
|
116
156
|
tag_closing: SerializedToken | null;
|
|
117
157
|
}
|
|
118
|
-
export interface HTMLCloseTagNodeProps extends BaseNodeProps {
|
|
158
|
+
export interface HTMLCloseTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
159
|
+
type: "AST_HTML_CLOSE_TAG_NODE";
|
|
119
160
|
tag_opening: Token | null;
|
|
120
161
|
tag_name: Token | null;
|
|
121
|
-
children:
|
|
162
|
+
children: any[];
|
|
122
163
|
tag_closing: Token | null;
|
|
123
164
|
}
|
|
124
165
|
export declare class HTMLCloseTagNode extends Node {
|
|
166
|
+
readonly type: "AST_HTML_CLOSE_TAG_NODE";
|
|
125
167
|
readonly tag_opening: Token | null;
|
|
126
168
|
readonly tag_name: Token | null;
|
|
127
169
|
readonly children: Node[];
|
|
@@ -136,30 +178,74 @@ export declare class HTMLCloseTagNode extends Node {
|
|
|
136
178
|
toJSON(): SerializedHTMLCloseTagNode;
|
|
137
179
|
treeInspect(): string;
|
|
138
180
|
}
|
|
181
|
+
export interface SerializedHTMLOmittedCloseTagNode extends SerializedNode {
|
|
182
|
+
type: "AST_HTML_OMITTED_CLOSE_TAG_NODE";
|
|
183
|
+
tag_name: SerializedToken | null;
|
|
184
|
+
}
|
|
185
|
+
export interface HTMLOmittedCloseTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
186
|
+
type: "AST_HTML_OMITTED_CLOSE_TAG_NODE";
|
|
187
|
+
tag_name: Token | null;
|
|
188
|
+
}
|
|
189
|
+
export declare class HTMLOmittedCloseTagNode extends Node {
|
|
190
|
+
readonly type: "AST_HTML_OMITTED_CLOSE_TAG_NODE";
|
|
191
|
+
readonly tag_name: Token | null;
|
|
192
|
+
static get type(): NodeType;
|
|
193
|
+
static from(data: SerializedHTMLOmittedCloseTagNode): HTMLOmittedCloseTagNode;
|
|
194
|
+
constructor(props: HTMLOmittedCloseTagNodeProps);
|
|
195
|
+
accept(visitor: Visitor): void;
|
|
196
|
+
childNodes(): (Node | null | undefined)[];
|
|
197
|
+
compactChildNodes(): Node[];
|
|
198
|
+
recursiveErrors(): HerbError[];
|
|
199
|
+
toJSON(): SerializedHTMLOmittedCloseTagNode;
|
|
200
|
+
treeInspect(): string;
|
|
201
|
+
}
|
|
202
|
+
export interface SerializedHTMLVirtualCloseTagNode extends SerializedNode {
|
|
203
|
+
type: "AST_HTML_VIRTUAL_CLOSE_TAG_NODE";
|
|
204
|
+
tag_name: SerializedToken | null;
|
|
205
|
+
}
|
|
206
|
+
export interface HTMLVirtualCloseTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
207
|
+
type: "AST_HTML_VIRTUAL_CLOSE_TAG_NODE";
|
|
208
|
+
tag_name: Token | null;
|
|
209
|
+
}
|
|
210
|
+
export declare class HTMLVirtualCloseTagNode extends Node {
|
|
211
|
+
readonly type: "AST_HTML_VIRTUAL_CLOSE_TAG_NODE";
|
|
212
|
+
readonly tag_name: Token | null;
|
|
213
|
+
static get type(): NodeType;
|
|
214
|
+
static from(data: SerializedHTMLVirtualCloseTagNode): HTMLVirtualCloseTagNode;
|
|
215
|
+
constructor(props: HTMLVirtualCloseTagNodeProps);
|
|
216
|
+
accept(visitor: Visitor): void;
|
|
217
|
+
childNodes(): (Node | null | undefined)[];
|
|
218
|
+
compactChildNodes(): Node[];
|
|
219
|
+
recursiveErrors(): HerbError[];
|
|
220
|
+
toJSON(): SerializedHTMLVirtualCloseTagNode;
|
|
221
|
+
treeInspect(): string;
|
|
222
|
+
}
|
|
139
223
|
export interface SerializedHTMLElementNode extends SerializedNode {
|
|
140
224
|
type: "AST_HTML_ELEMENT_NODE";
|
|
141
|
-
open_tag: SerializedHTMLOpenTagNode | null;
|
|
225
|
+
open_tag: SerializedHTMLOpenTagNode | SerializedHTMLConditionalOpenTagNode | SerializedERBOpenTagNode | null;
|
|
142
226
|
tag_name: SerializedToken | null;
|
|
143
227
|
body: SerializedNode[];
|
|
144
|
-
close_tag: SerializedHTMLCloseTagNode | null;
|
|
228
|
+
close_tag: SerializedHTMLCloseTagNode | SerializedHTMLOmittedCloseTagNode | SerializedHTMLVirtualCloseTagNode | SerializedERBEndNode | null;
|
|
145
229
|
is_void: boolean;
|
|
146
|
-
|
|
230
|
+
element_source: string;
|
|
147
231
|
}
|
|
148
|
-
export interface HTMLElementNodeProps extends BaseNodeProps {
|
|
149
|
-
|
|
232
|
+
export interface HTMLElementNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
233
|
+
type: "AST_HTML_ELEMENT_NODE";
|
|
234
|
+
open_tag: HTMLOpenTagNode | HTMLConditionalOpenTagNode | ERBOpenTagNode | null;
|
|
150
235
|
tag_name: Token | null;
|
|
151
236
|
body: Node[];
|
|
152
|
-
close_tag: HTMLCloseTagNode | null;
|
|
237
|
+
close_tag: HTMLCloseTagNode | HTMLOmittedCloseTagNode | HTMLVirtualCloseTagNode | ERBEndNode | null;
|
|
153
238
|
is_void: boolean;
|
|
154
|
-
|
|
239
|
+
element_source: string;
|
|
155
240
|
}
|
|
156
241
|
export declare class HTMLElementNode extends Node {
|
|
157
|
-
readonly
|
|
242
|
+
readonly type: "AST_HTML_ELEMENT_NODE";
|
|
243
|
+
readonly open_tag: HTMLOpenTagNode | HTMLConditionalOpenTagNode | ERBOpenTagNode | null;
|
|
158
244
|
readonly tag_name: Token | null;
|
|
159
245
|
readonly body: Node[];
|
|
160
|
-
readonly close_tag: HTMLCloseTagNode | null;
|
|
246
|
+
readonly close_tag: HTMLCloseTagNode | HTMLOmittedCloseTagNode | HTMLVirtualCloseTagNode | ERBEndNode | null;
|
|
161
247
|
readonly is_void: boolean;
|
|
162
|
-
readonly
|
|
248
|
+
readonly element_source: string;
|
|
163
249
|
static get type(): NodeType;
|
|
164
250
|
static from(data: SerializedHTMLElementNode): HTMLElementNode;
|
|
165
251
|
constructor(props: HTMLElementNodeProps);
|
|
@@ -170,6 +256,48 @@ export declare class HTMLElementNode extends Node {
|
|
|
170
256
|
toJSON(): SerializedHTMLElementNode;
|
|
171
257
|
treeInspect(): string;
|
|
172
258
|
}
|
|
259
|
+
export interface SerializedHTMLConditionalElementNode extends SerializedNode {
|
|
260
|
+
type: "AST_HTML_CONDITIONAL_ELEMENT_NODE";
|
|
261
|
+
condition: string;
|
|
262
|
+
open_conditional: SerializedERBIfNode | SerializedERBUnlessNode | null;
|
|
263
|
+
open_tag: SerializedHTMLOpenTagNode | null;
|
|
264
|
+
body: SerializedNode[];
|
|
265
|
+
close_tag: SerializedHTMLCloseTagNode | SerializedHTMLOmittedCloseTagNode | null;
|
|
266
|
+
close_conditional: SerializedERBIfNode | SerializedERBUnlessNode | null;
|
|
267
|
+
tag_name: SerializedToken | null;
|
|
268
|
+
element_source: string;
|
|
269
|
+
}
|
|
270
|
+
export interface HTMLConditionalElementNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
271
|
+
type: "AST_HTML_CONDITIONAL_ELEMENT_NODE";
|
|
272
|
+
condition: string;
|
|
273
|
+
open_conditional: ERBIfNode | ERBUnlessNode | null;
|
|
274
|
+
open_tag: HTMLOpenTagNode | null;
|
|
275
|
+
body: Node[];
|
|
276
|
+
close_tag: HTMLCloseTagNode | HTMLOmittedCloseTagNode | null;
|
|
277
|
+
close_conditional: ERBIfNode | ERBUnlessNode | null;
|
|
278
|
+
tag_name: Token | null;
|
|
279
|
+
element_source: string;
|
|
280
|
+
}
|
|
281
|
+
export declare class HTMLConditionalElementNode extends Node {
|
|
282
|
+
readonly type: "AST_HTML_CONDITIONAL_ELEMENT_NODE";
|
|
283
|
+
readonly condition: string;
|
|
284
|
+
readonly open_conditional: ERBIfNode | ERBUnlessNode | null;
|
|
285
|
+
readonly open_tag: HTMLOpenTagNode | null;
|
|
286
|
+
readonly body: Node[];
|
|
287
|
+
readonly close_tag: HTMLCloseTagNode | HTMLOmittedCloseTagNode | null;
|
|
288
|
+
readonly close_conditional: ERBIfNode | ERBUnlessNode | null;
|
|
289
|
+
readonly tag_name: Token | null;
|
|
290
|
+
readonly element_source: string;
|
|
291
|
+
static get type(): NodeType;
|
|
292
|
+
static from(data: SerializedHTMLConditionalElementNode): HTMLConditionalElementNode;
|
|
293
|
+
constructor(props: HTMLConditionalElementNodeProps);
|
|
294
|
+
accept(visitor: Visitor): void;
|
|
295
|
+
childNodes(): (Node | null | undefined)[];
|
|
296
|
+
compactChildNodes(): Node[];
|
|
297
|
+
recursiveErrors(): HerbError[];
|
|
298
|
+
toJSON(): SerializedHTMLConditionalElementNode;
|
|
299
|
+
treeInspect(): string;
|
|
300
|
+
}
|
|
173
301
|
export interface SerializedHTMLAttributeValueNode extends SerializedNode {
|
|
174
302
|
type: "AST_HTML_ATTRIBUTE_VALUE_NODE";
|
|
175
303
|
open_quote: SerializedToken | null;
|
|
@@ -177,13 +305,15 @@ export interface SerializedHTMLAttributeValueNode extends SerializedNode {
|
|
|
177
305
|
close_quote: SerializedToken | null;
|
|
178
306
|
quoted: boolean;
|
|
179
307
|
}
|
|
180
|
-
export interface HTMLAttributeValueNodeProps extends BaseNodeProps {
|
|
308
|
+
export interface HTMLAttributeValueNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
309
|
+
type: "AST_HTML_ATTRIBUTE_VALUE_NODE";
|
|
181
310
|
open_quote: Token | null;
|
|
182
311
|
children: Node[];
|
|
183
312
|
close_quote: Token | null;
|
|
184
313
|
quoted: boolean;
|
|
185
314
|
}
|
|
186
315
|
export declare class HTMLAttributeValueNode extends Node {
|
|
316
|
+
readonly type: "AST_HTML_ATTRIBUTE_VALUE_NODE";
|
|
187
317
|
readonly open_quote: Token | null;
|
|
188
318
|
readonly children: Node[];
|
|
189
319
|
readonly close_quote: Token | null;
|
|
@@ -202,10 +332,12 @@ export interface SerializedHTMLAttributeNameNode extends SerializedNode {
|
|
|
202
332
|
type: "AST_HTML_ATTRIBUTE_NAME_NODE";
|
|
203
333
|
children: SerializedNode[];
|
|
204
334
|
}
|
|
205
|
-
export interface HTMLAttributeNameNodeProps extends BaseNodeProps {
|
|
206
|
-
|
|
335
|
+
export interface HTMLAttributeNameNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
336
|
+
type: "AST_HTML_ATTRIBUTE_NAME_NODE";
|
|
337
|
+
children: any[];
|
|
207
338
|
}
|
|
208
339
|
export declare class HTMLAttributeNameNode extends Node {
|
|
340
|
+
readonly type: "AST_HTML_ATTRIBUTE_NAME_NODE";
|
|
209
341
|
readonly children: Node[];
|
|
210
342
|
static get type(): NodeType;
|
|
211
343
|
static from(data: SerializedHTMLAttributeNameNode): HTMLAttributeNameNode;
|
|
@@ -223,12 +355,14 @@ export interface SerializedHTMLAttributeNode extends SerializedNode {
|
|
|
223
355
|
equals: SerializedToken | null;
|
|
224
356
|
value: SerializedHTMLAttributeValueNode | null;
|
|
225
357
|
}
|
|
226
|
-
export interface HTMLAttributeNodeProps extends BaseNodeProps {
|
|
358
|
+
export interface HTMLAttributeNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
359
|
+
type: "AST_HTML_ATTRIBUTE_NODE";
|
|
227
360
|
name: HTMLAttributeNameNode | null;
|
|
228
361
|
equals: Token | null;
|
|
229
362
|
value: HTMLAttributeValueNode | null;
|
|
230
363
|
}
|
|
231
364
|
export declare class HTMLAttributeNode extends Node {
|
|
365
|
+
readonly type: "AST_HTML_ATTRIBUTE_NODE";
|
|
232
366
|
readonly name: HTMLAttributeNameNode | null;
|
|
233
367
|
readonly equals: Token | null;
|
|
234
368
|
readonly value: HTMLAttributeValueNode | null;
|
|
@@ -242,14 +376,94 @@ export declare class HTMLAttributeNode extends Node {
|
|
|
242
376
|
toJSON(): SerializedHTMLAttributeNode;
|
|
243
377
|
treeInspect(): string;
|
|
244
378
|
}
|
|
379
|
+
export interface SerializedRubyLiteralNode extends SerializedNode {
|
|
380
|
+
type: "AST_RUBY_LITERAL_NODE";
|
|
381
|
+
content: string;
|
|
382
|
+
}
|
|
383
|
+
export interface RubyLiteralNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
384
|
+
type: "AST_RUBY_LITERAL_NODE";
|
|
385
|
+
content: string;
|
|
386
|
+
}
|
|
387
|
+
export declare class RubyLiteralNode extends Node {
|
|
388
|
+
readonly type: "AST_RUBY_LITERAL_NODE";
|
|
389
|
+
readonly content: string;
|
|
390
|
+
static get type(): NodeType;
|
|
391
|
+
static from(data: SerializedRubyLiteralNode): RubyLiteralNode;
|
|
392
|
+
constructor(props: RubyLiteralNodeProps);
|
|
393
|
+
accept(visitor: Visitor): void;
|
|
394
|
+
childNodes(): (Node | null | undefined)[];
|
|
395
|
+
compactChildNodes(): Node[];
|
|
396
|
+
recursiveErrors(): HerbError[];
|
|
397
|
+
toJSON(): SerializedRubyLiteralNode;
|
|
398
|
+
treeInspect(): string;
|
|
399
|
+
}
|
|
400
|
+
export interface SerializedRubyHTMLAttributesSplatNode extends SerializedNode {
|
|
401
|
+
type: "AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE";
|
|
402
|
+
content: string;
|
|
403
|
+
prefix: string;
|
|
404
|
+
}
|
|
405
|
+
export interface RubyHTMLAttributesSplatNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
406
|
+
type: "AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE";
|
|
407
|
+
content: string;
|
|
408
|
+
prefix: string;
|
|
409
|
+
}
|
|
410
|
+
export declare class RubyHTMLAttributesSplatNode extends Node {
|
|
411
|
+
readonly type: "AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE";
|
|
412
|
+
readonly content: string;
|
|
413
|
+
readonly prefix: string;
|
|
414
|
+
static get type(): NodeType;
|
|
415
|
+
static from(data: SerializedRubyHTMLAttributesSplatNode): RubyHTMLAttributesSplatNode;
|
|
416
|
+
constructor(props: RubyHTMLAttributesSplatNodeProps);
|
|
417
|
+
accept(visitor: Visitor): void;
|
|
418
|
+
childNodes(): (Node | null | undefined)[];
|
|
419
|
+
compactChildNodes(): Node[];
|
|
420
|
+
recursiveErrors(): HerbError[];
|
|
421
|
+
toJSON(): SerializedRubyHTMLAttributesSplatNode;
|
|
422
|
+
treeInspect(): string;
|
|
423
|
+
}
|
|
424
|
+
export interface SerializedERBOpenTagNode extends SerializedNode {
|
|
425
|
+
type: "AST_ERB_OPEN_TAG_NODE";
|
|
426
|
+
tag_opening: SerializedToken | null;
|
|
427
|
+
content: SerializedToken | null;
|
|
428
|
+
tag_closing: SerializedToken | null;
|
|
429
|
+
tag_name: SerializedToken | null;
|
|
430
|
+
children: SerializedNode[];
|
|
431
|
+
}
|
|
432
|
+
export interface ERBOpenTagNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
433
|
+
type: "AST_ERB_OPEN_TAG_NODE";
|
|
434
|
+
tag_opening: Token | null;
|
|
435
|
+
content: Token | null;
|
|
436
|
+
tag_closing: Token | null;
|
|
437
|
+
tag_name: Token | null;
|
|
438
|
+
children: Node[];
|
|
439
|
+
}
|
|
440
|
+
export declare class ERBOpenTagNode extends Node {
|
|
441
|
+
readonly type: "AST_ERB_OPEN_TAG_NODE";
|
|
442
|
+
readonly tag_opening: Token | null;
|
|
443
|
+
readonly content: Token | null;
|
|
444
|
+
readonly tag_closing: Token | null;
|
|
445
|
+
readonly tag_name: Token | null;
|
|
446
|
+
readonly children: Node[];
|
|
447
|
+
static get type(): NodeType;
|
|
448
|
+
static from(data: SerializedERBOpenTagNode): ERBOpenTagNode;
|
|
449
|
+
constructor(props: ERBOpenTagNodeProps);
|
|
450
|
+
accept(visitor: Visitor): void;
|
|
451
|
+
childNodes(): (Node | null | undefined)[];
|
|
452
|
+
compactChildNodes(): Node[];
|
|
453
|
+
recursiveErrors(): HerbError[];
|
|
454
|
+
toJSON(): SerializedERBOpenTagNode;
|
|
455
|
+
treeInspect(): string;
|
|
456
|
+
}
|
|
245
457
|
export interface SerializedHTMLTextNode extends SerializedNode {
|
|
246
458
|
type: "AST_HTML_TEXT_NODE";
|
|
247
459
|
content: string;
|
|
248
460
|
}
|
|
249
|
-
export interface HTMLTextNodeProps extends BaseNodeProps {
|
|
461
|
+
export interface HTMLTextNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
462
|
+
type: "AST_HTML_TEXT_NODE";
|
|
250
463
|
content: string;
|
|
251
464
|
}
|
|
252
465
|
export declare class HTMLTextNode extends Node {
|
|
466
|
+
readonly type: "AST_HTML_TEXT_NODE";
|
|
253
467
|
readonly content: string;
|
|
254
468
|
static get type(): NodeType;
|
|
255
469
|
static from(data: SerializedHTMLTextNode): HTMLTextNode;
|
|
@@ -267,12 +481,14 @@ export interface SerializedHTMLCommentNode extends SerializedNode {
|
|
|
267
481
|
children: SerializedNode[];
|
|
268
482
|
comment_end: SerializedToken | null;
|
|
269
483
|
}
|
|
270
|
-
export interface HTMLCommentNodeProps extends BaseNodeProps {
|
|
484
|
+
export interface HTMLCommentNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
485
|
+
type: "AST_HTML_COMMENT_NODE";
|
|
271
486
|
comment_start: Token | null;
|
|
272
487
|
children: Node[];
|
|
273
488
|
comment_end: Token | null;
|
|
274
489
|
}
|
|
275
490
|
export declare class HTMLCommentNode extends Node {
|
|
491
|
+
readonly type: "AST_HTML_COMMENT_NODE";
|
|
276
492
|
readonly comment_start: Token | null;
|
|
277
493
|
readonly children: Node[];
|
|
278
494
|
readonly comment_end: Token | null;
|
|
@@ -292,12 +508,14 @@ export interface SerializedHTMLDoctypeNode extends SerializedNode {
|
|
|
292
508
|
children: SerializedNode[];
|
|
293
509
|
tag_closing: SerializedToken | null;
|
|
294
510
|
}
|
|
295
|
-
export interface HTMLDoctypeNodeProps extends BaseNodeProps {
|
|
511
|
+
export interface HTMLDoctypeNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
512
|
+
type: "AST_HTML_DOCTYPE_NODE";
|
|
296
513
|
tag_opening: Token | null;
|
|
297
514
|
children: Node[];
|
|
298
515
|
tag_closing: Token | null;
|
|
299
516
|
}
|
|
300
517
|
export declare class HTMLDoctypeNode extends Node {
|
|
518
|
+
readonly type: "AST_HTML_DOCTYPE_NODE";
|
|
301
519
|
readonly tag_opening: Token | null;
|
|
302
520
|
readonly children: Node[];
|
|
303
521
|
readonly tag_closing: Token | null;
|
|
@@ -317,12 +535,14 @@ export interface SerializedXMLDeclarationNode extends SerializedNode {
|
|
|
317
535
|
children: SerializedNode[];
|
|
318
536
|
tag_closing: SerializedToken | null;
|
|
319
537
|
}
|
|
320
|
-
export interface XMLDeclarationNodeProps extends BaseNodeProps {
|
|
538
|
+
export interface XMLDeclarationNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
539
|
+
type: "AST_XML_DECLARATION_NODE";
|
|
321
540
|
tag_opening: Token | null;
|
|
322
541
|
children: Node[];
|
|
323
542
|
tag_closing: Token | null;
|
|
324
543
|
}
|
|
325
544
|
export declare class XMLDeclarationNode extends Node {
|
|
545
|
+
readonly type: "AST_XML_DECLARATION_NODE";
|
|
326
546
|
readonly tag_opening: Token | null;
|
|
327
547
|
readonly children: Node[];
|
|
328
548
|
readonly tag_closing: Token | null;
|
|
@@ -342,12 +562,14 @@ export interface SerializedCDATANode extends SerializedNode {
|
|
|
342
562
|
children: SerializedNode[];
|
|
343
563
|
tag_closing: SerializedToken | null;
|
|
344
564
|
}
|
|
345
|
-
export interface CDATANodeProps extends BaseNodeProps {
|
|
565
|
+
export interface CDATANodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
566
|
+
type: "AST_CDATA_NODE";
|
|
346
567
|
tag_opening: Token | null;
|
|
347
568
|
children: Node[];
|
|
348
569
|
tag_closing: Token | null;
|
|
349
570
|
}
|
|
350
571
|
export declare class CDATANode extends Node {
|
|
572
|
+
readonly type: "AST_CDATA_NODE";
|
|
351
573
|
readonly tag_opening: Token | null;
|
|
352
574
|
readonly children: Node[];
|
|
353
575
|
readonly tag_closing: Token | null;
|
|
@@ -365,10 +587,12 @@ export interface SerializedWhitespaceNode extends SerializedNode {
|
|
|
365
587
|
type: "AST_WHITESPACE_NODE";
|
|
366
588
|
value: SerializedToken | null;
|
|
367
589
|
}
|
|
368
|
-
export interface WhitespaceNodeProps extends BaseNodeProps {
|
|
590
|
+
export interface WhitespaceNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
591
|
+
type: "AST_WHITESPACE_NODE";
|
|
369
592
|
value: Token | null;
|
|
370
593
|
}
|
|
371
594
|
export declare class WhitespaceNode extends Node {
|
|
595
|
+
readonly type: "AST_WHITESPACE_NODE";
|
|
372
596
|
readonly value: Token | null;
|
|
373
597
|
static get type(): NodeType;
|
|
374
598
|
static from(data: SerializedWhitespaceNode): WhitespaceNode;
|
|
@@ -387,26 +611,32 @@ export interface SerializedERBContentNode extends SerializedNode {
|
|
|
387
611
|
tag_closing: SerializedToken | null;
|
|
388
612
|
parsed: boolean;
|
|
389
613
|
valid: boolean;
|
|
614
|
+
prism_node: number[] | null;
|
|
390
615
|
}
|
|
391
|
-
export interface ERBContentNodeProps extends BaseNodeProps {
|
|
616
|
+
export interface ERBContentNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
617
|
+
type: "AST_ERB_CONTENT_NODE";
|
|
392
618
|
tag_opening: Token | null;
|
|
393
619
|
content: Token | null;
|
|
394
620
|
tag_closing: Token | null;
|
|
395
621
|
parsed: boolean;
|
|
396
622
|
valid: boolean;
|
|
623
|
+
prism_node: Uint8Array | null;
|
|
397
624
|
}
|
|
398
625
|
export declare class ERBContentNode extends Node {
|
|
626
|
+
readonly type: "AST_ERB_CONTENT_NODE";
|
|
399
627
|
readonly tag_opening: Token | null;
|
|
400
628
|
readonly content: Token | null;
|
|
401
629
|
readonly tag_closing: Token | null;
|
|
402
630
|
readonly parsed: boolean;
|
|
403
631
|
readonly valid: boolean;
|
|
632
|
+
readonly prism_node: Uint8Array | null;
|
|
404
633
|
static get type(): NodeType;
|
|
405
634
|
static from(data: SerializedERBContentNode): ERBContentNode;
|
|
406
635
|
constructor(props: ERBContentNodeProps);
|
|
407
636
|
accept(visitor: Visitor): void;
|
|
408
637
|
childNodes(): (Node | null | undefined)[];
|
|
409
638
|
compactChildNodes(): Node[];
|
|
639
|
+
get prismNode(): PrismNode | null;
|
|
410
640
|
recursiveErrors(): HerbError[];
|
|
411
641
|
toJSON(): SerializedERBContentNode;
|
|
412
642
|
treeInspect(): string;
|
|
@@ -417,12 +647,14 @@ export interface SerializedERBEndNode extends SerializedNode {
|
|
|
417
647
|
content: SerializedToken | null;
|
|
418
648
|
tag_closing: SerializedToken | null;
|
|
419
649
|
}
|
|
420
|
-
export interface ERBEndNodeProps extends BaseNodeProps {
|
|
650
|
+
export interface ERBEndNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
651
|
+
type: "AST_ERB_END_NODE";
|
|
421
652
|
tag_opening: Token | null;
|
|
422
653
|
content: Token | null;
|
|
423
654
|
tag_closing: Token | null;
|
|
424
655
|
}
|
|
425
656
|
export declare class ERBEndNode extends Node {
|
|
657
|
+
readonly type: "AST_ERB_END_NODE";
|
|
426
658
|
readonly tag_opening: Token | null;
|
|
427
659
|
readonly content: Token | null;
|
|
428
660
|
readonly tag_closing: Token | null;
|
|
@@ -443,13 +675,15 @@ export interface SerializedERBElseNode extends SerializedNode {
|
|
|
443
675
|
tag_closing: SerializedToken | null;
|
|
444
676
|
statements: SerializedNode[];
|
|
445
677
|
}
|
|
446
|
-
export interface ERBElseNodeProps extends BaseNodeProps {
|
|
678
|
+
export interface ERBElseNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
679
|
+
type: "AST_ERB_ELSE_NODE";
|
|
447
680
|
tag_opening: Token | null;
|
|
448
681
|
content: Token | null;
|
|
449
682
|
tag_closing: Token | null;
|
|
450
683
|
statements: Node[];
|
|
451
684
|
}
|
|
452
685
|
export declare class ERBElseNode extends Node {
|
|
686
|
+
readonly type: "AST_ERB_ELSE_NODE";
|
|
453
687
|
readonly tag_opening: Token | null;
|
|
454
688
|
readonly content: Token | null;
|
|
455
689
|
readonly tag_closing: Token | null;
|
|
@@ -470,26 +704,31 @@ export interface SerializedERBIfNode extends SerializedNode {
|
|
|
470
704
|
content: SerializedToken | null;
|
|
471
705
|
tag_closing: SerializedToken | null;
|
|
472
706
|
then_keyword: SerializedLocation | null;
|
|
707
|
+
prism_node: number[] | null;
|
|
473
708
|
statements: SerializedNode[];
|
|
474
|
-
subsequent:
|
|
709
|
+
subsequent: SerializedERBIfNode | SerializedERBElseNode | null;
|
|
475
710
|
end_node: SerializedERBEndNode | null;
|
|
476
711
|
}
|
|
477
|
-
export interface ERBIfNodeProps extends BaseNodeProps {
|
|
712
|
+
export interface ERBIfNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
713
|
+
type: "AST_ERB_IF_NODE";
|
|
478
714
|
tag_opening: Token | null;
|
|
479
715
|
content: Token | null;
|
|
480
716
|
tag_closing: Token | null;
|
|
481
717
|
then_keyword: Location | null;
|
|
718
|
+
prism_node: Uint8Array | null;
|
|
482
719
|
statements: Node[];
|
|
483
|
-
subsequent:
|
|
720
|
+
subsequent: ERBIfNode | ERBElseNode | null;
|
|
484
721
|
end_node: ERBEndNode | null;
|
|
485
722
|
}
|
|
486
723
|
export declare class ERBIfNode extends Node {
|
|
724
|
+
readonly type: "AST_ERB_IF_NODE";
|
|
487
725
|
readonly tag_opening: Token | null;
|
|
488
726
|
readonly content: Token | null;
|
|
489
727
|
readonly tag_closing: Token | null;
|
|
490
728
|
readonly then_keyword: Location | null;
|
|
729
|
+
readonly prism_node: Uint8Array | null;
|
|
491
730
|
readonly statements: Node[];
|
|
492
|
-
readonly subsequent:
|
|
731
|
+
readonly subsequent: ERBIfNode | ERBElseNode | null;
|
|
493
732
|
readonly end_node: ERBEndNode | null;
|
|
494
733
|
static get type(): NodeType;
|
|
495
734
|
static from(data: SerializedERBIfNode): ERBIfNode;
|
|
@@ -497,6 +736,7 @@ export declare class ERBIfNode extends Node {
|
|
|
497
736
|
accept(visitor: Visitor): void;
|
|
498
737
|
childNodes(): (Node | null | undefined)[];
|
|
499
738
|
compactChildNodes(): Node[];
|
|
739
|
+
get prismNode(): PrismNode | null;
|
|
500
740
|
recursiveErrors(): HerbError[];
|
|
501
741
|
toJSON(): SerializedERBIfNode;
|
|
502
742
|
treeInspect(): string;
|
|
@@ -506,20 +746,25 @@ export interface SerializedERBBlockNode extends SerializedNode {
|
|
|
506
746
|
tag_opening: SerializedToken | null;
|
|
507
747
|
content: SerializedToken | null;
|
|
508
748
|
tag_closing: SerializedToken | null;
|
|
749
|
+
prism_node: number[] | null;
|
|
509
750
|
body: SerializedNode[];
|
|
510
751
|
end_node: SerializedERBEndNode | null;
|
|
511
752
|
}
|
|
512
|
-
export interface ERBBlockNodeProps extends BaseNodeProps {
|
|
753
|
+
export interface ERBBlockNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
754
|
+
type: "AST_ERB_BLOCK_NODE";
|
|
513
755
|
tag_opening: Token | null;
|
|
514
756
|
content: Token | null;
|
|
515
757
|
tag_closing: Token | null;
|
|
758
|
+
prism_node: Uint8Array | null;
|
|
516
759
|
body: Node[];
|
|
517
760
|
end_node: ERBEndNode | null;
|
|
518
761
|
}
|
|
519
762
|
export declare class ERBBlockNode extends Node {
|
|
763
|
+
readonly type: "AST_ERB_BLOCK_NODE";
|
|
520
764
|
readonly tag_opening: Token | null;
|
|
521
765
|
readonly content: Token | null;
|
|
522
766
|
readonly tag_closing: Token | null;
|
|
767
|
+
readonly prism_node: Uint8Array | null;
|
|
523
768
|
readonly body: Node[];
|
|
524
769
|
readonly end_node: ERBEndNode | null;
|
|
525
770
|
static get type(): NodeType;
|
|
@@ -528,6 +773,7 @@ export declare class ERBBlockNode extends Node {
|
|
|
528
773
|
accept(visitor: Visitor): void;
|
|
529
774
|
childNodes(): (Node | null | undefined)[];
|
|
530
775
|
compactChildNodes(): Node[];
|
|
776
|
+
get prismNode(): PrismNode | null;
|
|
531
777
|
recursiveErrors(): HerbError[];
|
|
532
778
|
toJSON(): SerializedERBBlockNode;
|
|
533
779
|
treeInspect(): string;
|
|
@@ -540,7 +786,8 @@ export interface SerializedERBWhenNode extends SerializedNode {
|
|
|
540
786
|
then_keyword: SerializedLocation | null;
|
|
541
787
|
statements: SerializedNode[];
|
|
542
788
|
}
|
|
543
|
-
export interface ERBWhenNodeProps extends BaseNodeProps {
|
|
789
|
+
export interface ERBWhenNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
790
|
+
type: "AST_ERB_WHEN_NODE";
|
|
544
791
|
tag_opening: Token | null;
|
|
545
792
|
content: Token | null;
|
|
546
793
|
tag_closing: Token | null;
|
|
@@ -548,6 +795,7 @@ export interface ERBWhenNodeProps extends BaseNodeProps {
|
|
|
548
795
|
statements: Node[];
|
|
549
796
|
}
|
|
550
797
|
export declare class ERBWhenNode extends Node {
|
|
798
|
+
readonly type: "AST_ERB_WHEN_NODE";
|
|
551
799
|
readonly tag_opening: Token | null;
|
|
552
800
|
readonly content: Token | null;
|
|
553
801
|
readonly tag_closing: Token | null;
|
|
@@ -569,24 +817,29 @@ export interface SerializedERBCaseNode extends SerializedNode {
|
|
|
569
817
|
content: SerializedToken | null;
|
|
570
818
|
tag_closing: SerializedToken | null;
|
|
571
819
|
children: SerializedNode[];
|
|
820
|
+
prism_node: number[] | null;
|
|
572
821
|
conditions: SerializedNode[];
|
|
573
822
|
else_clause: SerializedERBElseNode | null;
|
|
574
823
|
end_node: SerializedERBEndNode | null;
|
|
575
824
|
}
|
|
576
|
-
export interface ERBCaseNodeProps extends BaseNodeProps {
|
|
825
|
+
export interface ERBCaseNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
826
|
+
type: "AST_ERB_CASE_NODE";
|
|
577
827
|
tag_opening: Token | null;
|
|
578
828
|
content: Token | null;
|
|
579
829
|
tag_closing: Token | null;
|
|
580
830
|
children: Node[];
|
|
831
|
+
prism_node: Uint8Array | null;
|
|
581
832
|
conditions: any[];
|
|
582
833
|
else_clause: ERBElseNode | null;
|
|
583
834
|
end_node: ERBEndNode | null;
|
|
584
835
|
}
|
|
585
836
|
export declare class ERBCaseNode extends Node {
|
|
837
|
+
readonly type: "AST_ERB_CASE_NODE";
|
|
586
838
|
readonly tag_opening: Token | null;
|
|
587
839
|
readonly content: Token | null;
|
|
588
840
|
readonly tag_closing: Token | null;
|
|
589
841
|
readonly children: Node[];
|
|
842
|
+
readonly prism_node: Uint8Array | null;
|
|
590
843
|
readonly conditions: Node[];
|
|
591
844
|
readonly else_clause: ERBElseNode | null;
|
|
592
845
|
readonly end_node: ERBEndNode | null;
|
|
@@ -596,6 +849,7 @@ export declare class ERBCaseNode extends Node {
|
|
|
596
849
|
accept(visitor: Visitor): void;
|
|
597
850
|
childNodes(): (Node | null | undefined)[];
|
|
598
851
|
compactChildNodes(): Node[];
|
|
852
|
+
get prismNode(): PrismNode | null;
|
|
599
853
|
recursiveErrors(): HerbError[];
|
|
600
854
|
toJSON(): SerializedERBCaseNode;
|
|
601
855
|
treeInspect(): string;
|
|
@@ -606,24 +860,29 @@ export interface SerializedERBCaseMatchNode extends SerializedNode {
|
|
|
606
860
|
content: SerializedToken | null;
|
|
607
861
|
tag_closing: SerializedToken | null;
|
|
608
862
|
children: SerializedNode[];
|
|
863
|
+
prism_node: number[] | null;
|
|
609
864
|
conditions: SerializedNode[];
|
|
610
865
|
else_clause: SerializedERBElseNode | null;
|
|
611
866
|
end_node: SerializedERBEndNode | null;
|
|
612
867
|
}
|
|
613
|
-
export interface ERBCaseMatchNodeProps extends BaseNodeProps {
|
|
868
|
+
export interface ERBCaseMatchNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
869
|
+
type: "AST_ERB_CASE_MATCH_NODE";
|
|
614
870
|
tag_opening: Token | null;
|
|
615
871
|
content: Token | null;
|
|
616
872
|
tag_closing: Token | null;
|
|
617
873
|
children: Node[];
|
|
874
|
+
prism_node: Uint8Array | null;
|
|
618
875
|
conditions: any[];
|
|
619
876
|
else_clause: ERBElseNode | null;
|
|
620
877
|
end_node: ERBEndNode | null;
|
|
621
878
|
}
|
|
622
879
|
export declare class ERBCaseMatchNode extends Node {
|
|
880
|
+
readonly type: "AST_ERB_CASE_MATCH_NODE";
|
|
623
881
|
readonly tag_opening: Token | null;
|
|
624
882
|
readonly content: Token | null;
|
|
625
883
|
readonly tag_closing: Token | null;
|
|
626
884
|
readonly children: Node[];
|
|
885
|
+
readonly prism_node: Uint8Array | null;
|
|
627
886
|
readonly conditions: Node[];
|
|
628
887
|
readonly else_clause: ERBElseNode | null;
|
|
629
888
|
readonly end_node: ERBEndNode | null;
|
|
@@ -633,6 +892,7 @@ export declare class ERBCaseMatchNode extends Node {
|
|
|
633
892
|
accept(visitor: Visitor): void;
|
|
634
893
|
childNodes(): (Node | null | undefined)[];
|
|
635
894
|
compactChildNodes(): Node[];
|
|
895
|
+
get prismNode(): PrismNode | null;
|
|
636
896
|
recursiveErrors(): HerbError[];
|
|
637
897
|
toJSON(): SerializedERBCaseMatchNode;
|
|
638
898
|
treeInspect(): string;
|
|
@@ -642,20 +902,25 @@ export interface SerializedERBWhileNode extends SerializedNode {
|
|
|
642
902
|
tag_opening: SerializedToken | null;
|
|
643
903
|
content: SerializedToken | null;
|
|
644
904
|
tag_closing: SerializedToken | null;
|
|
905
|
+
prism_node: number[] | null;
|
|
645
906
|
statements: SerializedNode[];
|
|
646
907
|
end_node: SerializedERBEndNode | null;
|
|
647
908
|
}
|
|
648
|
-
export interface ERBWhileNodeProps extends BaseNodeProps {
|
|
909
|
+
export interface ERBWhileNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
910
|
+
type: "AST_ERB_WHILE_NODE";
|
|
649
911
|
tag_opening: Token | null;
|
|
650
912
|
content: Token | null;
|
|
651
913
|
tag_closing: Token | null;
|
|
914
|
+
prism_node: Uint8Array | null;
|
|
652
915
|
statements: Node[];
|
|
653
916
|
end_node: ERBEndNode | null;
|
|
654
917
|
}
|
|
655
918
|
export declare class ERBWhileNode extends Node {
|
|
919
|
+
readonly type: "AST_ERB_WHILE_NODE";
|
|
656
920
|
readonly tag_opening: Token | null;
|
|
657
921
|
readonly content: Token | null;
|
|
658
922
|
readonly tag_closing: Token | null;
|
|
923
|
+
readonly prism_node: Uint8Array | null;
|
|
659
924
|
readonly statements: Node[];
|
|
660
925
|
readonly end_node: ERBEndNode | null;
|
|
661
926
|
static get type(): NodeType;
|
|
@@ -664,6 +929,7 @@ export declare class ERBWhileNode extends Node {
|
|
|
664
929
|
accept(visitor: Visitor): void;
|
|
665
930
|
childNodes(): (Node | null | undefined)[];
|
|
666
931
|
compactChildNodes(): Node[];
|
|
932
|
+
get prismNode(): PrismNode | null;
|
|
667
933
|
recursiveErrors(): HerbError[];
|
|
668
934
|
toJSON(): SerializedERBWhileNode;
|
|
669
935
|
treeInspect(): string;
|
|
@@ -673,20 +939,25 @@ export interface SerializedERBUntilNode extends SerializedNode {
|
|
|
673
939
|
tag_opening: SerializedToken | null;
|
|
674
940
|
content: SerializedToken | null;
|
|
675
941
|
tag_closing: SerializedToken | null;
|
|
942
|
+
prism_node: number[] | null;
|
|
676
943
|
statements: SerializedNode[];
|
|
677
944
|
end_node: SerializedERBEndNode | null;
|
|
678
945
|
}
|
|
679
|
-
export interface ERBUntilNodeProps extends BaseNodeProps {
|
|
946
|
+
export interface ERBUntilNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
947
|
+
type: "AST_ERB_UNTIL_NODE";
|
|
680
948
|
tag_opening: Token | null;
|
|
681
949
|
content: Token | null;
|
|
682
950
|
tag_closing: Token | null;
|
|
951
|
+
prism_node: Uint8Array | null;
|
|
683
952
|
statements: Node[];
|
|
684
953
|
end_node: ERBEndNode | null;
|
|
685
954
|
}
|
|
686
955
|
export declare class ERBUntilNode extends Node {
|
|
956
|
+
readonly type: "AST_ERB_UNTIL_NODE";
|
|
687
957
|
readonly tag_opening: Token | null;
|
|
688
958
|
readonly content: Token | null;
|
|
689
959
|
readonly tag_closing: Token | null;
|
|
960
|
+
readonly prism_node: Uint8Array | null;
|
|
690
961
|
readonly statements: Node[];
|
|
691
962
|
readonly end_node: ERBEndNode | null;
|
|
692
963
|
static get type(): NodeType;
|
|
@@ -695,6 +966,7 @@ export declare class ERBUntilNode extends Node {
|
|
|
695
966
|
accept(visitor: Visitor): void;
|
|
696
967
|
childNodes(): (Node | null | undefined)[];
|
|
697
968
|
compactChildNodes(): Node[];
|
|
969
|
+
get prismNode(): PrismNode | null;
|
|
698
970
|
recursiveErrors(): HerbError[];
|
|
699
971
|
toJSON(): SerializedERBUntilNode;
|
|
700
972
|
treeInspect(): string;
|
|
@@ -704,20 +976,25 @@ export interface SerializedERBForNode extends SerializedNode {
|
|
|
704
976
|
tag_opening: SerializedToken | null;
|
|
705
977
|
content: SerializedToken | null;
|
|
706
978
|
tag_closing: SerializedToken | null;
|
|
979
|
+
prism_node: number[] | null;
|
|
707
980
|
statements: SerializedNode[];
|
|
708
981
|
end_node: SerializedERBEndNode | null;
|
|
709
982
|
}
|
|
710
|
-
export interface ERBForNodeProps extends BaseNodeProps {
|
|
983
|
+
export interface ERBForNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
984
|
+
type: "AST_ERB_FOR_NODE";
|
|
711
985
|
tag_opening: Token | null;
|
|
712
986
|
content: Token | null;
|
|
713
987
|
tag_closing: Token | null;
|
|
988
|
+
prism_node: Uint8Array | null;
|
|
714
989
|
statements: Node[];
|
|
715
990
|
end_node: ERBEndNode | null;
|
|
716
991
|
}
|
|
717
992
|
export declare class ERBForNode extends Node {
|
|
993
|
+
readonly type: "AST_ERB_FOR_NODE";
|
|
718
994
|
readonly tag_opening: Token | null;
|
|
719
995
|
readonly content: Token | null;
|
|
720
996
|
readonly tag_closing: Token | null;
|
|
997
|
+
readonly prism_node: Uint8Array | null;
|
|
721
998
|
readonly statements: Node[];
|
|
722
999
|
readonly end_node: ERBEndNode | null;
|
|
723
1000
|
static get type(): NodeType;
|
|
@@ -726,6 +1003,7 @@ export declare class ERBForNode extends Node {
|
|
|
726
1003
|
accept(visitor: Visitor): void;
|
|
727
1004
|
childNodes(): (Node | null | undefined)[];
|
|
728
1005
|
compactChildNodes(): Node[];
|
|
1006
|
+
get prismNode(): PrismNode | null;
|
|
729
1007
|
recursiveErrors(): HerbError[];
|
|
730
1008
|
toJSON(): SerializedERBForNode;
|
|
731
1009
|
treeInspect(): string;
|
|
@@ -738,7 +1016,8 @@ export interface SerializedERBRescueNode extends SerializedNode {
|
|
|
738
1016
|
statements: SerializedNode[];
|
|
739
1017
|
subsequent: SerializedERBRescueNode | null;
|
|
740
1018
|
}
|
|
741
|
-
export interface ERBRescueNodeProps extends BaseNodeProps {
|
|
1019
|
+
export interface ERBRescueNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1020
|
+
type: "AST_ERB_RESCUE_NODE";
|
|
742
1021
|
tag_opening: Token | null;
|
|
743
1022
|
content: Token | null;
|
|
744
1023
|
tag_closing: Token | null;
|
|
@@ -746,6 +1025,7 @@ export interface ERBRescueNodeProps extends BaseNodeProps {
|
|
|
746
1025
|
subsequent: ERBRescueNode | null;
|
|
747
1026
|
}
|
|
748
1027
|
export declare class ERBRescueNode extends Node {
|
|
1028
|
+
readonly type: "AST_ERB_RESCUE_NODE";
|
|
749
1029
|
readonly tag_opening: Token | null;
|
|
750
1030
|
readonly content: Token | null;
|
|
751
1031
|
readonly tag_closing: Token | null;
|
|
@@ -768,13 +1048,15 @@ export interface SerializedERBEnsureNode extends SerializedNode {
|
|
|
768
1048
|
tag_closing: SerializedToken | null;
|
|
769
1049
|
statements: SerializedNode[];
|
|
770
1050
|
}
|
|
771
|
-
export interface ERBEnsureNodeProps extends BaseNodeProps {
|
|
1051
|
+
export interface ERBEnsureNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1052
|
+
type: "AST_ERB_ENSURE_NODE";
|
|
772
1053
|
tag_opening: Token | null;
|
|
773
1054
|
content: Token | null;
|
|
774
1055
|
tag_closing: Token | null;
|
|
775
1056
|
statements: Node[];
|
|
776
1057
|
}
|
|
777
1058
|
export declare class ERBEnsureNode extends Node {
|
|
1059
|
+
readonly type: "AST_ERB_ENSURE_NODE";
|
|
778
1060
|
readonly tag_opening: Token | null;
|
|
779
1061
|
readonly content: Token | null;
|
|
780
1062
|
readonly tag_closing: Token | null;
|
|
@@ -794,16 +1076,19 @@ export interface SerializedERBBeginNode extends SerializedNode {
|
|
|
794
1076
|
tag_opening: SerializedToken | null;
|
|
795
1077
|
content: SerializedToken | null;
|
|
796
1078
|
tag_closing: SerializedToken | null;
|
|
1079
|
+
prism_node: number[] | null;
|
|
797
1080
|
statements: SerializedNode[];
|
|
798
1081
|
rescue_clause: SerializedERBRescueNode | null;
|
|
799
1082
|
else_clause: SerializedERBElseNode | null;
|
|
800
1083
|
ensure_clause: SerializedERBEnsureNode | null;
|
|
801
1084
|
end_node: SerializedERBEndNode | null;
|
|
802
1085
|
}
|
|
803
|
-
export interface ERBBeginNodeProps extends BaseNodeProps {
|
|
1086
|
+
export interface ERBBeginNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1087
|
+
type: "AST_ERB_BEGIN_NODE";
|
|
804
1088
|
tag_opening: Token | null;
|
|
805
1089
|
content: Token | null;
|
|
806
1090
|
tag_closing: Token | null;
|
|
1091
|
+
prism_node: Uint8Array | null;
|
|
807
1092
|
statements: Node[];
|
|
808
1093
|
rescue_clause: ERBRescueNode | null;
|
|
809
1094
|
else_clause: ERBElseNode | null;
|
|
@@ -811,9 +1096,11 @@ export interface ERBBeginNodeProps extends BaseNodeProps {
|
|
|
811
1096
|
end_node: ERBEndNode | null;
|
|
812
1097
|
}
|
|
813
1098
|
export declare class ERBBeginNode extends Node {
|
|
1099
|
+
readonly type: "AST_ERB_BEGIN_NODE";
|
|
814
1100
|
readonly tag_opening: Token | null;
|
|
815
1101
|
readonly content: Token | null;
|
|
816
1102
|
readonly tag_closing: Token | null;
|
|
1103
|
+
readonly prism_node: Uint8Array | null;
|
|
817
1104
|
readonly statements: Node[];
|
|
818
1105
|
readonly rescue_clause: ERBRescueNode | null;
|
|
819
1106
|
readonly else_clause: ERBElseNode | null;
|
|
@@ -825,6 +1112,7 @@ export declare class ERBBeginNode extends Node {
|
|
|
825
1112
|
accept(visitor: Visitor): void;
|
|
826
1113
|
childNodes(): (Node | null | undefined)[];
|
|
827
1114
|
compactChildNodes(): Node[];
|
|
1115
|
+
get prismNode(): PrismNode | null;
|
|
828
1116
|
recursiveErrors(): HerbError[];
|
|
829
1117
|
toJSON(): SerializedERBBeginNode;
|
|
830
1118
|
treeInspect(): string;
|
|
@@ -835,24 +1123,29 @@ export interface SerializedERBUnlessNode extends SerializedNode {
|
|
|
835
1123
|
content: SerializedToken | null;
|
|
836
1124
|
tag_closing: SerializedToken | null;
|
|
837
1125
|
then_keyword: SerializedLocation | null;
|
|
1126
|
+
prism_node: number[] | null;
|
|
838
1127
|
statements: SerializedNode[];
|
|
839
1128
|
else_clause: SerializedERBElseNode | null;
|
|
840
1129
|
end_node: SerializedERBEndNode | null;
|
|
841
1130
|
}
|
|
842
|
-
export interface ERBUnlessNodeProps extends BaseNodeProps {
|
|
1131
|
+
export interface ERBUnlessNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1132
|
+
type: "AST_ERB_UNLESS_NODE";
|
|
843
1133
|
tag_opening: Token | null;
|
|
844
1134
|
content: Token | null;
|
|
845
1135
|
tag_closing: Token | null;
|
|
846
1136
|
then_keyword: Location | null;
|
|
1137
|
+
prism_node: Uint8Array | null;
|
|
847
1138
|
statements: Node[];
|
|
848
1139
|
else_clause: ERBElseNode | null;
|
|
849
1140
|
end_node: ERBEndNode | null;
|
|
850
1141
|
}
|
|
851
1142
|
export declare class ERBUnlessNode extends Node {
|
|
1143
|
+
readonly type: "AST_ERB_UNLESS_NODE";
|
|
852
1144
|
readonly tag_opening: Token | null;
|
|
853
1145
|
readonly content: Token | null;
|
|
854
1146
|
readonly tag_closing: Token | null;
|
|
855
1147
|
readonly then_keyword: Location | null;
|
|
1148
|
+
readonly prism_node: Uint8Array | null;
|
|
856
1149
|
readonly statements: Node[];
|
|
857
1150
|
readonly else_clause: ERBElseNode | null;
|
|
858
1151
|
readonly end_node: ERBEndNode | null;
|
|
@@ -862,22 +1155,134 @@ export declare class ERBUnlessNode extends Node {
|
|
|
862
1155
|
accept(visitor: Visitor): void;
|
|
863
1156
|
childNodes(): (Node | null | undefined)[];
|
|
864
1157
|
compactChildNodes(): Node[];
|
|
1158
|
+
get prismNode(): PrismNode | null;
|
|
865
1159
|
recursiveErrors(): HerbError[];
|
|
866
1160
|
toJSON(): SerializedERBUnlessNode;
|
|
867
1161
|
treeInspect(): string;
|
|
868
1162
|
}
|
|
1163
|
+
export interface SerializedRubyRenderLocalNode extends SerializedNode {
|
|
1164
|
+
type: "AST_RUBY_RENDER_LOCAL_NODE";
|
|
1165
|
+
name: SerializedToken | null;
|
|
1166
|
+
value: SerializedRubyLiteralNode | null;
|
|
1167
|
+
}
|
|
1168
|
+
export interface RubyRenderLocalNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1169
|
+
type: "AST_RUBY_RENDER_LOCAL_NODE";
|
|
1170
|
+
name: Token | null;
|
|
1171
|
+
value: RubyLiteralNode | null;
|
|
1172
|
+
}
|
|
1173
|
+
export declare class RubyRenderLocalNode extends Node {
|
|
1174
|
+
readonly type: "AST_RUBY_RENDER_LOCAL_NODE";
|
|
1175
|
+
readonly name: Token | null;
|
|
1176
|
+
readonly value: RubyLiteralNode | null;
|
|
1177
|
+
static get type(): NodeType;
|
|
1178
|
+
static from(data: SerializedRubyRenderLocalNode): RubyRenderLocalNode;
|
|
1179
|
+
constructor(props: RubyRenderLocalNodeProps);
|
|
1180
|
+
accept(visitor: Visitor): void;
|
|
1181
|
+
childNodes(): (Node | null | undefined)[];
|
|
1182
|
+
compactChildNodes(): Node[];
|
|
1183
|
+
recursiveErrors(): HerbError[];
|
|
1184
|
+
toJSON(): SerializedRubyRenderLocalNode;
|
|
1185
|
+
treeInspect(): string;
|
|
1186
|
+
}
|
|
1187
|
+
export interface SerializedERBRenderNode extends SerializedNode {
|
|
1188
|
+
type: "AST_ERB_RENDER_NODE";
|
|
1189
|
+
tag_opening: SerializedToken | null;
|
|
1190
|
+
content: SerializedToken | null;
|
|
1191
|
+
tag_closing: SerializedToken | null;
|
|
1192
|
+
prism_node: number[] | null;
|
|
1193
|
+
partial: SerializedToken | null;
|
|
1194
|
+
template_path: SerializedToken | null;
|
|
1195
|
+
layout: SerializedToken | null;
|
|
1196
|
+
file: SerializedToken | null;
|
|
1197
|
+
inline_template: SerializedToken | null;
|
|
1198
|
+
body: SerializedToken | null;
|
|
1199
|
+
plain: SerializedToken | null;
|
|
1200
|
+
html: SerializedToken | null;
|
|
1201
|
+
renderable: SerializedToken | null;
|
|
1202
|
+
collection: SerializedToken | null;
|
|
1203
|
+
object: SerializedToken | null;
|
|
1204
|
+
as_name: SerializedToken | null;
|
|
1205
|
+
spacer_template: SerializedToken | null;
|
|
1206
|
+
formats: SerializedToken | null;
|
|
1207
|
+
variants: SerializedToken | null;
|
|
1208
|
+
handlers: SerializedToken | null;
|
|
1209
|
+
content_type: SerializedToken | null;
|
|
1210
|
+
locals: SerializedNode[];
|
|
1211
|
+
}
|
|
1212
|
+
export interface ERBRenderNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1213
|
+
type: "AST_ERB_RENDER_NODE";
|
|
1214
|
+
tag_opening: Token | null;
|
|
1215
|
+
content: Token | null;
|
|
1216
|
+
tag_closing: Token | null;
|
|
1217
|
+
prism_node: Uint8Array | null;
|
|
1218
|
+
partial: Token | null;
|
|
1219
|
+
template_path: Token | null;
|
|
1220
|
+
layout: Token | null;
|
|
1221
|
+
file: Token | null;
|
|
1222
|
+
inline_template: Token | null;
|
|
1223
|
+
body: Token | null;
|
|
1224
|
+
plain: Token | null;
|
|
1225
|
+
html: Token | null;
|
|
1226
|
+
renderable: Token | null;
|
|
1227
|
+
collection: Token | null;
|
|
1228
|
+
object: Token | null;
|
|
1229
|
+
as_name: Token | null;
|
|
1230
|
+
spacer_template: Token | null;
|
|
1231
|
+
formats: Token | null;
|
|
1232
|
+
variants: Token | null;
|
|
1233
|
+
handlers: Token | null;
|
|
1234
|
+
content_type: Token | null;
|
|
1235
|
+
locals: any[];
|
|
1236
|
+
}
|
|
1237
|
+
export declare class ERBRenderNode extends Node {
|
|
1238
|
+
readonly type: "AST_ERB_RENDER_NODE";
|
|
1239
|
+
readonly tag_opening: Token | null;
|
|
1240
|
+
readonly content: Token | null;
|
|
1241
|
+
readonly tag_closing: Token | null;
|
|
1242
|
+
readonly prism_node: Uint8Array | null;
|
|
1243
|
+
readonly partial: Token | null;
|
|
1244
|
+
readonly template_path: Token | null;
|
|
1245
|
+
readonly layout: Token | null;
|
|
1246
|
+
readonly file: Token | null;
|
|
1247
|
+
readonly inline_template: Token | null;
|
|
1248
|
+
readonly body: Token | null;
|
|
1249
|
+
readonly plain: Token | null;
|
|
1250
|
+
readonly html: Token | null;
|
|
1251
|
+
readonly renderable: Token | null;
|
|
1252
|
+
readonly collection: Token | null;
|
|
1253
|
+
readonly object: Token | null;
|
|
1254
|
+
readonly as_name: Token | null;
|
|
1255
|
+
readonly spacer_template: Token | null;
|
|
1256
|
+
readonly formats: Token | null;
|
|
1257
|
+
readonly variants: Token | null;
|
|
1258
|
+
readonly handlers: Token | null;
|
|
1259
|
+
readonly content_type: Token | null;
|
|
1260
|
+
readonly locals: Node[];
|
|
1261
|
+
static get type(): NodeType;
|
|
1262
|
+
static from(data: SerializedERBRenderNode): ERBRenderNode;
|
|
1263
|
+
constructor(props: ERBRenderNodeProps);
|
|
1264
|
+
accept(visitor: Visitor): void;
|
|
1265
|
+
childNodes(): (Node | null | undefined)[];
|
|
1266
|
+
compactChildNodes(): Node[];
|
|
1267
|
+
get prismNode(): PrismNode | null;
|
|
1268
|
+
recursiveErrors(): HerbError[];
|
|
1269
|
+
toJSON(): SerializedERBRenderNode;
|
|
1270
|
+
treeInspect(): string;
|
|
1271
|
+
}
|
|
869
1272
|
export interface SerializedERBYieldNode extends SerializedNode {
|
|
870
1273
|
type: "AST_ERB_YIELD_NODE";
|
|
871
1274
|
tag_opening: SerializedToken | null;
|
|
872
1275
|
content: SerializedToken | null;
|
|
873
1276
|
tag_closing: SerializedToken | null;
|
|
874
1277
|
}
|
|
875
|
-
export interface ERBYieldNodeProps extends BaseNodeProps {
|
|
1278
|
+
export interface ERBYieldNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1279
|
+
type: "AST_ERB_YIELD_NODE";
|
|
876
1280
|
tag_opening: Token | null;
|
|
877
1281
|
content: Token | null;
|
|
878
1282
|
tag_closing: Token | null;
|
|
879
1283
|
}
|
|
880
1284
|
export declare class ERBYieldNode extends Node {
|
|
1285
|
+
readonly type: "AST_ERB_YIELD_NODE";
|
|
881
1286
|
readonly tag_opening: Token | null;
|
|
882
1287
|
readonly content: Token | null;
|
|
883
1288
|
readonly tag_closing: Token | null;
|
|
@@ -899,7 +1304,8 @@ export interface SerializedERBInNode extends SerializedNode {
|
|
|
899
1304
|
then_keyword: SerializedLocation | null;
|
|
900
1305
|
statements: SerializedNode[];
|
|
901
1306
|
}
|
|
902
|
-
export interface ERBInNodeProps extends BaseNodeProps {
|
|
1307
|
+
export interface ERBInNodeProps extends Omit<BaseNodeProps, 'type'> {
|
|
1308
|
+
type: "AST_ERB_IN_NODE";
|
|
903
1309
|
tag_opening: Token | null;
|
|
904
1310
|
content: Token | null;
|
|
905
1311
|
tag_closing: Token | null;
|
|
@@ -907,6 +1313,7 @@ export interface ERBInNodeProps extends BaseNodeProps {
|
|
|
907
1313
|
statements: Node[];
|
|
908
1314
|
}
|
|
909
1315
|
export declare class ERBInNode extends Node {
|
|
1316
|
+
readonly type: "AST_ERB_IN_NODE";
|
|
910
1317
|
readonly tag_opening: Token | null;
|
|
911
1318
|
readonly content: Token | null;
|
|
912
1319
|
readonly tag_closing: Token | null;
|
|
@@ -922,15 +1329,22 @@ export declare class ERBInNode extends Node {
|
|
|
922
1329
|
toJSON(): SerializedERBInNode;
|
|
923
1330
|
treeInspect(): string;
|
|
924
1331
|
}
|
|
925
|
-
export type ConcreteNode = DocumentNode | LiteralNode | HTMLOpenTagNode | HTMLCloseTagNode | HTMLElementNode | HTMLAttributeValueNode | HTMLAttributeNameNode | HTMLAttributeNode | HTMLTextNode | HTMLCommentNode | HTMLDoctypeNode | XMLDeclarationNode | CDATANode | WhitespaceNode | ERBContentNode | ERBEndNode | ERBElseNode | ERBIfNode | ERBBlockNode | ERBWhenNode | ERBCaseNode | ERBCaseMatchNode | ERBWhileNode | ERBUntilNode | ERBForNode | ERBRescueNode | ERBEnsureNode | ERBBeginNode | ERBUnlessNode | ERBYieldNode | ERBInNode;
|
|
1332
|
+
export type ConcreteNode = DocumentNode | LiteralNode | HTMLOpenTagNode | HTMLConditionalOpenTagNode | HTMLCloseTagNode | HTMLOmittedCloseTagNode | HTMLVirtualCloseTagNode | HTMLElementNode | HTMLConditionalElementNode | HTMLAttributeValueNode | HTMLAttributeNameNode | HTMLAttributeNode | RubyLiteralNode | RubyHTMLAttributesSplatNode | ERBOpenTagNode | HTMLTextNode | HTMLCommentNode | HTMLDoctypeNode | XMLDeclarationNode | CDATANode | WhitespaceNode | ERBContentNode | ERBEndNode | ERBElseNode | ERBIfNode | ERBBlockNode | ERBWhenNode | ERBCaseNode | ERBCaseMatchNode | ERBWhileNode | ERBUntilNode | ERBForNode | ERBRescueNode | ERBEnsureNode | ERBBeginNode | ERBUnlessNode | RubyRenderLocalNode | ERBRenderNode | ERBYieldNode | ERBInNode;
|
|
926
1333
|
export declare function fromSerializedNode(node: SerializedDocumentNode): DocumentNode;
|
|
927
1334
|
export declare function fromSerializedNode(node: SerializedLiteralNode): LiteralNode;
|
|
928
1335
|
export declare function fromSerializedNode(node: SerializedHTMLOpenTagNode): HTMLOpenTagNode;
|
|
1336
|
+
export declare function fromSerializedNode(node: SerializedHTMLConditionalOpenTagNode): HTMLConditionalOpenTagNode;
|
|
929
1337
|
export declare function fromSerializedNode(node: SerializedHTMLCloseTagNode): HTMLCloseTagNode;
|
|
1338
|
+
export declare function fromSerializedNode(node: SerializedHTMLOmittedCloseTagNode): HTMLOmittedCloseTagNode;
|
|
1339
|
+
export declare function fromSerializedNode(node: SerializedHTMLVirtualCloseTagNode): HTMLVirtualCloseTagNode;
|
|
930
1340
|
export declare function fromSerializedNode(node: SerializedHTMLElementNode): HTMLElementNode;
|
|
1341
|
+
export declare function fromSerializedNode(node: SerializedHTMLConditionalElementNode): HTMLConditionalElementNode;
|
|
931
1342
|
export declare function fromSerializedNode(node: SerializedHTMLAttributeValueNode): HTMLAttributeValueNode;
|
|
932
1343
|
export declare function fromSerializedNode(node: SerializedHTMLAttributeNameNode): HTMLAttributeNameNode;
|
|
933
1344
|
export declare function fromSerializedNode(node: SerializedHTMLAttributeNode): HTMLAttributeNode;
|
|
1345
|
+
export declare function fromSerializedNode(node: SerializedRubyLiteralNode): RubyLiteralNode;
|
|
1346
|
+
export declare function fromSerializedNode(node: SerializedRubyHTMLAttributesSplatNode): RubyHTMLAttributesSplatNode;
|
|
1347
|
+
export declare function fromSerializedNode(node: SerializedERBOpenTagNode): ERBOpenTagNode;
|
|
934
1348
|
export declare function fromSerializedNode(node: SerializedHTMLTextNode): HTMLTextNode;
|
|
935
1349
|
export declare function fromSerializedNode(node: SerializedHTMLCommentNode): HTMLCommentNode;
|
|
936
1350
|
export declare function fromSerializedNode(node: SerializedHTMLDoctypeNode): HTMLDoctypeNode;
|
|
@@ -952,10 +1366,12 @@ export declare function fromSerializedNode(node: SerializedERBRescueNode): ERBRe
|
|
|
952
1366
|
export declare function fromSerializedNode(node: SerializedERBEnsureNode): ERBEnsureNode;
|
|
953
1367
|
export declare function fromSerializedNode(node: SerializedERBBeginNode): ERBBeginNode;
|
|
954
1368
|
export declare function fromSerializedNode(node: SerializedERBUnlessNode): ERBUnlessNode;
|
|
1369
|
+
export declare function fromSerializedNode(node: SerializedRubyRenderLocalNode): RubyRenderLocalNode;
|
|
1370
|
+
export declare function fromSerializedNode(node: SerializedERBRenderNode): ERBRenderNode;
|
|
955
1371
|
export declare function fromSerializedNode(node: SerializedERBYieldNode): ERBYieldNode;
|
|
956
1372
|
export declare function fromSerializedNode(node: SerializedERBInNode): ERBInNode;
|
|
957
1373
|
export declare function fromSerializedNode(node: SerializedNode): Node;
|
|
958
|
-
export type NodeType = "AST_DOCUMENT_NODE" | "AST_LITERAL_NODE" | "AST_HTML_OPEN_TAG_NODE" | "AST_HTML_CLOSE_TAG_NODE" | "AST_HTML_ELEMENT_NODE" | "AST_HTML_ATTRIBUTE_VALUE_NODE" | "AST_HTML_ATTRIBUTE_NAME_NODE" | "AST_HTML_ATTRIBUTE_NODE" | "AST_HTML_TEXT_NODE" | "AST_HTML_COMMENT_NODE" | "AST_HTML_DOCTYPE_NODE" | "AST_XML_DECLARATION_NODE" | "AST_CDATA_NODE" | "AST_WHITESPACE_NODE" | "AST_ERB_CONTENT_NODE" | "AST_ERB_END_NODE" | "AST_ERB_ELSE_NODE" | "AST_ERB_IF_NODE" | "AST_ERB_BLOCK_NODE" | "AST_ERB_WHEN_NODE" | "AST_ERB_CASE_NODE" | "AST_ERB_CASE_MATCH_NODE" | "AST_ERB_WHILE_NODE" | "AST_ERB_UNTIL_NODE" | "AST_ERB_FOR_NODE" | "AST_ERB_RESCUE_NODE" | "AST_ERB_ENSURE_NODE" | "AST_ERB_BEGIN_NODE" | "AST_ERB_UNLESS_NODE" | "AST_ERB_YIELD_NODE" | "AST_ERB_IN_NODE";
|
|
1374
|
+
export type NodeType = "AST_DOCUMENT_NODE" | "AST_LITERAL_NODE" | "AST_HTML_OPEN_TAG_NODE" | "AST_HTML_CONDITIONAL_OPEN_TAG_NODE" | "AST_HTML_CLOSE_TAG_NODE" | "AST_HTML_OMITTED_CLOSE_TAG_NODE" | "AST_HTML_VIRTUAL_CLOSE_TAG_NODE" | "AST_HTML_ELEMENT_NODE" | "AST_HTML_CONDITIONAL_ELEMENT_NODE" | "AST_HTML_ATTRIBUTE_VALUE_NODE" | "AST_HTML_ATTRIBUTE_NAME_NODE" | "AST_HTML_ATTRIBUTE_NODE" | "AST_RUBY_LITERAL_NODE" | "AST_RUBY_HTML_ATTRIBUTES_SPLAT_NODE" | "AST_ERB_OPEN_TAG_NODE" | "AST_HTML_TEXT_NODE" | "AST_HTML_COMMENT_NODE" | "AST_HTML_DOCTYPE_NODE" | "AST_XML_DECLARATION_NODE" | "AST_CDATA_NODE" | "AST_WHITESPACE_NODE" | "AST_ERB_CONTENT_NODE" | "AST_ERB_END_NODE" | "AST_ERB_ELSE_NODE" | "AST_ERB_IF_NODE" | "AST_ERB_BLOCK_NODE" | "AST_ERB_WHEN_NODE" | "AST_ERB_CASE_NODE" | "AST_ERB_CASE_MATCH_NODE" | "AST_ERB_WHILE_NODE" | "AST_ERB_UNTIL_NODE" | "AST_ERB_FOR_NODE" | "AST_ERB_RESCUE_NODE" | "AST_ERB_ENSURE_NODE" | "AST_ERB_BEGIN_NODE" | "AST_ERB_UNLESS_NODE" | "AST_RUBY_RENDER_LOCAL_NODE" | "AST_ERB_RENDER_NODE" | "AST_ERB_YIELD_NODE" | "AST_ERB_IN_NODE";
|
|
959
1375
|
export type ERBNodeType = Extract<NodeType, `AST_ERB_${string}`>;
|
|
960
|
-
export type ERBNode = ERBContentNode | ERBEndNode | ERBElseNode | ERBIfNode | ERBBlockNode | ERBWhenNode | ERBCaseNode | ERBCaseMatchNode | ERBWhileNode | ERBUntilNode | ERBForNode | ERBRescueNode | ERBEnsureNode | ERBBeginNode | ERBUnlessNode | ERBYieldNode | ERBInNode;
|
|
961
|
-
export declare const ERBNodeClasses: (typeof ERBContentNode | typeof ERBEndNode | typeof ERBElseNode | typeof ERBIfNode | typeof ERBBlockNode | typeof ERBWhenNode | typeof ERBCaseNode | typeof ERBCaseMatchNode | typeof ERBWhileNode | typeof ERBUntilNode | typeof ERBForNode | typeof ERBRescueNode | typeof ERBEnsureNode | typeof ERBBeginNode | typeof ERBUnlessNode | typeof ERBYieldNode | typeof ERBInNode)[];
|
|
1376
|
+
export type ERBNode = ERBOpenTagNode | ERBContentNode | ERBEndNode | ERBElseNode | ERBIfNode | ERBBlockNode | ERBWhenNode | ERBCaseNode | ERBCaseMatchNode | ERBWhileNode | ERBUntilNode | ERBForNode | ERBRescueNode | ERBEnsureNode | ERBBeginNode | ERBUnlessNode | ERBRenderNode | ERBYieldNode | ERBInNode;
|
|
1377
|
+
export declare const ERBNodeClasses: (typeof ERBOpenTagNode | typeof ERBContentNode | typeof ERBEndNode | typeof ERBElseNode | typeof ERBIfNode | typeof ERBBlockNode | typeof ERBWhenNode | typeof ERBCaseNode | typeof ERBCaseMatchNode | typeof ERBWhileNode | typeof ERBUntilNode | typeof ERBForNode | typeof ERBRescueNode | typeof ERBEnsureNode | typeof ERBBeginNode | typeof ERBUnlessNode | typeof ERBRenderNode | typeof ERBYieldNode | typeof ERBInNode)[];
|