ether-code 0.1.6 → 0.1.8
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/cli/compiler.js +9 -53
- package/cli/ether.js +1 -1
- package/generators/css-generator.js +42 -55
- package/generators/graphql-generator.js +19 -22
- package/generators/html-generator.js +51 -220
- package/generators/js-generator.js +76 -157
- package/generators/node-generator.js +49 -93
- package/generators/php-generator.js +46 -68
- package/generators/python-generator.js +35 -54
- package/generators/react-generator.js +37 -47
- package/generators/ruby-generator.js +59 -119
- package/generators/sql-generator.js +42 -63
- package/generators/ts-generator.js +59 -133
- package/i18n/i18n-css.json +147 -147
- package/i18n/i18n-graphql.json +6 -6
- package/i18n/i18n-html.json +135 -135
- package/i18n/i18n-js.json +107 -107
- package/i18n/i18n-node.json +14 -14
- package/i18n/i18n-php.json +177 -177
- package/i18n/i18n-python.json +16 -16
- package/i18n/i18n-react.json +97 -97
- package/i18n/i18n-ruby.json +22 -22
- package/i18n/i18n-sql.json +153 -153
- package/i18n/i18n-ts.json +10 -10
- package/lexer/ether-lexer.js +175 -34
- package/lexer/tokens.js +6 -6
- package/package.json +1 -1
- package/parsers/ast-css.js +0 -545
- package/parsers/ast-graphql.js +0 -424
- package/parsers/ast-html.js +0 -886
- package/parsers/ast-js.js +0 -750
- package/parsers/ast-node.js +0 -2440
- package/parsers/ast-php.js +0 -957
- package/parsers/ast-react.js +0 -580
- package/parsers/ast-ruby.js +0 -895
- package/parsers/ast-ts.js +0 -1352
- package/parsers/css-parser.js +0 -1981
- package/parsers/graphql-parser.js +0 -2011
- package/parsers/html-parser.js +0 -1182
- package/parsers/js-parser.js +0 -2564
- package/parsers/node-parser.js +0 -2644
- package/parsers/php-parser.js +0 -3037
- package/parsers/react-parser.js +0 -1035
- package/parsers/ruby-parser.js +0 -2680
- package/parsers/ts-parser.js +0 -3881
package/parsers/ast-html.js
DELETED
|
@@ -1,886 +0,0 @@
|
|
|
1
|
-
class ASTNode {
|
|
2
|
-
constructor(type, loc = null) {
|
|
3
|
-
this.type = type
|
|
4
|
-
this.loc = loc
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
class Document extends ASTNode {
|
|
9
|
-
constructor(doctype = null, html = null, loc = null) {
|
|
10
|
-
super('Document', loc)
|
|
11
|
-
this.doctype = doctype
|
|
12
|
-
this.html = html
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
class Doctype extends ASTNode {
|
|
17
|
-
constructor(name = 'html', publicId = null, systemId = null, loc = null) {
|
|
18
|
-
super('Doctype', loc)
|
|
19
|
-
this.name = name
|
|
20
|
-
this.publicId = publicId
|
|
21
|
-
this.systemId = systemId
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
class Element extends ASTNode {
|
|
26
|
-
constructor(tagName, htmlTag, attributes = [], children = [], selfClosing = false, loc = null) {
|
|
27
|
-
super('Element', loc)
|
|
28
|
-
this.tagName = tagName
|
|
29
|
-
this.htmlTag = htmlTag
|
|
30
|
-
this.attributes = attributes
|
|
31
|
-
this.children = children
|
|
32
|
-
this.selfClosing = selfClosing
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
class Attribute extends ASTNode {
|
|
37
|
-
constructor(name, htmlName, value = null, loc = null) {
|
|
38
|
-
super('Attribute', loc)
|
|
39
|
-
this.name = name
|
|
40
|
-
this.htmlName = htmlName
|
|
41
|
-
this.value = value
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
class BooleanAttribute extends ASTNode {
|
|
46
|
-
constructor(name, htmlName, loc = null) {
|
|
47
|
-
super('BooleanAttribute', loc)
|
|
48
|
-
this.name = name
|
|
49
|
-
this.htmlName = htmlName
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
class TextNode extends ASTNode {
|
|
54
|
-
constructor(content, loc = null) {
|
|
55
|
-
super('TextNode', loc)
|
|
56
|
-
this.content = content
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
class Comment extends ASTNode {
|
|
61
|
-
constructor(content, loc = null) {
|
|
62
|
-
super('Comment', loc)
|
|
63
|
-
this.content = content
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
class Fragment extends ASTNode {
|
|
68
|
-
constructor(children = [], loc = null) {
|
|
69
|
-
super('Fragment', loc)
|
|
70
|
-
this.children = children
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
class HeadElement extends ASTNode {
|
|
75
|
-
constructor(children = [], loc = null) {
|
|
76
|
-
super('HeadElement', loc)
|
|
77
|
-
this.children = children
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
class BodyElement extends ASTNode {
|
|
82
|
-
constructor(children = [], loc = null) {
|
|
83
|
-
super('BodyElement', loc)
|
|
84
|
-
this.children = children
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
class TitleElement extends ASTNode {
|
|
89
|
-
constructor(content, loc = null) {
|
|
90
|
-
super('TitleElement', loc)
|
|
91
|
-
this.content = content
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
class MetaElement extends ASTNode {
|
|
96
|
-
constructor(attributes = [], loc = null) {
|
|
97
|
-
super('MetaElement', loc)
|
|
98
|
-
this.attributes = attributes
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
class LinkElement extends ASTNode {
|
|
103
|
-
constructor(rel, href, attributes = [], loc = null) {
|
|
104
|
-
super('LinkElement', loc)
|
|
105
|
-
this.rel = rel
|
|
106
|
-
this.href = href
|
|
107
|
-
this.attributes = attributes
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
class StyleElement extends ASTNode {
|
|
112
|
-
constructor(content, attributes = [], loc = null) {
|
|
113
|
-
super('StyleElement', loc)
|
|
114
|
-
this.content = content
|
|
115
|
-
this.attributes = attributes
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
class ScriptElement extends ASTNode {
|
|
120
|
-
constructor(content = null, src = null, attributes = [], loc = null) {
|
|
121
|
-
super('ScriptElement', loc)
|
|
122
|
-
this.content = content
|
|
123
|
-
this.src = src
|
|
124
|
-
this.attributes = attributes
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
class BaseElement extends ASTNode {
|
|
129
|
-
constructor(href = null, target = null, loc = null) {
|
|
130
|
-
super('BaseElement', loc)
|
|
131
|
-
this.href = href
|
|
132
|
-
this.target = target
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
class HeadingElement extends ASTNode {
|
|
137
|
-
constructor(level, content, attributes = [], loc = null) {
|
|
138
|
-
super('HeadingElement', loc)
|
|
139
|
-
this.level = level
|
|
140
|
-
this.content = content
|
|
141
|
-
this.attributes = attributes
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
class ParagraphElement extends ASTNode {
|
|
146
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
147
|
-
super('ParagraphElement', loc)
|
|
148
|
-
this.children = children
|
|
149
|
-
this.attributes = attributes
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
class DivElement extends ASTNode {
|
|
154
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
155
|
-
super('DivElement', loc)
|
|
156
|
-
this.children = children
|
|
157
|
-
this.attributes = attributes
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
class SpanElement extends ASTNode {
|
|
162
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
163
|
-
super('SpanElement', loc)
|
|
164
|
-
this.children = children
|
|
165
|
-
this.attributes = attributes
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
class AnchorElement extends ASTNode {
|
|
170
|
-
constructor(href, children = [], attributes = [], loc = null) {
|
|
171
|
-
super('AnchorElement', loc)
|
|
172
|
-
this.href = href
|
|
173
|
-
this.children = children
|
|
174
|
-
this.attributes = attributes
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
class ImageElement extends ASTNode {
|
|
179
|
-
constructor(src, alt = '', attributes = [], loc = null) {
|
|
180
|
-
super('ImageElement', loc)
|
|
181
|
-
this.src = src
|
|
182
|
-
this.alt = alt
|
|
183
|
-
this.attributes = attributes
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
class PictureElement extends ASTNode {
|
|
188
|
-
constructor(sources = [], img = null, loc = null) {
|
|
189
|
-
super('PictureElement', loc)
|
|
190
|
-
this.sources = sources
|
|
191
|
-
this.img = img
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
class SourceElement extends ASTNode {
|
|
196
|
-
constructor(srcset = null, media = null, type = null, attributes = [], loc = null) {
|
|
197
|
-
super('SourceElement', loc)
|
|
198
|
-
this.srcset = srcset
|
|
199
|
-
this.media = media
|
|
200
|
-
this.type = type
|
|
201
|
-
this.attributes = attributes
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
class VideoElement extends ASTNode {
|
|
206
|
-
constructor(src = null, sources = [], attributes = [], children = [], loc = null) {
|
|
207
|
-
super('VideoElement', loc)
|
|
208
|
-
this.src = src
|
|
209
|
-
this.sources = sources
|
|
210
|
-
this.attributes = attributes
|
|
211
|
-
this.children = children
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
class AudioElement extends ASTNode {
|
|
216
|
-
constructor(src = null, sources = [], attributes = [], children = [], loc = null) {
|
|
217
|
-
super('AudioElement', loc)
|
|
218
|
-
this.src = src
|
|
219
|
-
this.sources = sources
|
|
220
|
-
this.attributes = attributes
|
|
221
|
-
this.children = children
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
class TrackElement extends ASTNode {
|
|
226
|
-
constructor(src, kind = 'subtitles', srclang = null, label = null, loc = null) {
|
|
227
|
-
super('TrackElement', loc)
|
|
228
|
-
this.src = src
|
|
229
|
-
this.kind = kind
|
|
230
|
-
this.srclang = srclang
|
|
231
|
-
this.label = label
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
class IframeElement extends ASTNode {
|
|
236
|
-
constructor(src, attributes = [], loc = null) {
|
|
237
|
-
super('IframeElement', loc)
|
|
238
|
-
this.src = src
|
|
239
|
-
this.attributes = attributes
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
class EmbedElement extends ASTNode {
|
|
244
|
-
constructor(src, type = null, attributes = [], loc = null) {
|
|
245
|
-
super('EmbedElement', loc)
|
|
246
|
-
this.src = src
|
|
247
|
-
this.type = type
|
|
248
|
-
this.attributes = attributes
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
class ObjectElement extends ASTNode {
|
|
253
|
-
constructor(data = null, type = null, children = [], attributes = [], loc = null) {
|
|
254
|
-
super('ObjectElement', loc)
|
|
255
|
-
this.data = data
|
|
256
|
-
this.type = type
|
|
257
|
-
this.children = children
|
|
258
|
-
this.attributes = attributes
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
class CanvasElement extends ASTNode {
|
|
263
|
-
constructor(width = null, height = null, attributes = [], loc = null) {
|
|
264
|
-
super('CanvasElement', loc)
|
|
265
|
-
this.width = width
|
|
266
|
-
this.height = height
|
|
267
|
-
this.attributes = attributes
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
class SvgElement extends ASTNode {
|
|
272
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
273
|
-
super('SvgElement', loc)
|
|
274
|
-
this.children = children
|
|
275
|
-
this.attributes = attributes
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
class MathElement extends ASTNode {
|
|
280
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
281
|
-
super('MathElement', loc)
|
|
282
|
-
this.children = children
|
|
283
|
-
this.attributes = attributes
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
class ListElement extends ASTNode {
|
|
288
|
-
constructor(listType, items = [], attributes = [], loc = null) {
|
|
289
|
-
super('ListElement', loc)
|
|
290
|
-
this.listType = listType
|
|
291
|
-
this.items = items
|
|
292
|
-
this.attributes = attributes
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
class ListItemElement extends ASTNode {
|
|
297
|
-
constructor(children = [], value = null, attributes = [], loc = null) {
|
|
298
|
-
super('ListItemElement', loc)
|
|
299
|
-
this.children = children
|
|
300
|
-
this.value = value
|
|
301
|
-
this.attributes = attributes
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
class DescriptionListElement extends ASTNode {
|
|
306
|
-
constructor(items = [], attributes = [], loc = null) {
|
|
307
|
-
super('DescriptionListElement', loc)
|
|
308
|
-
this.items = items
|
|
309
|
-
this.attributes = attributes
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
class DescriptionTermElement extends ASTNode {
|
|
314
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
315
|
-
super('DescriptionTermElement', loc)
|
|
316
|
-
this.children = children
|
|
317
|
-
this.attributes = attributes
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
class DescriptionDetailsElement extends ASTNode {
|
|
322
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
323
|
-
super('DescriptionDetailsElement', loc)
|
|
324
|
-
this.children = children
|
|
325
|
-
this.attributes = attributes
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
class TableElement extends ASTNode {
|
|
330
|
-
constructor(caption = null, colgroups = [], thead = null, tbodies = [], tfoot = null, attributes = [], loc = null) {
|
|
331
|
-
super('TableElement', loc)
|
|
332
|
-
this.caption = caption
|
|
333
|
-
this.colgroups = colgroups
|
|
334
|
-
this.thead = thead
|
|
335
|
-
this.tbodies = tbodies
|
|
336
|
-
this.tfoot = tfoot
|
|
337
|
-
this.attributes = attributes
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
class TableCaptionElement extends ASTNode {
|
|
342
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
343
|
-
super('TableCaptionElement', loc)
|
|
344
|
-
this.children = children
|
|
345
|
-
this.attributes = attributes
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
class TableHeadElement extends ASTNode {
|
|
350
|
-
constructor(rows = [], attributes = [], loc = null) {
|
|
351
|
-
super('TableHeadElement', loc)
|
|
352
|
-
this.rows = rows
|
|
353
|
-
this.attributes = attributes
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
class TableBodyElement extends ASTNode {
|
|
358
|
-
constructor(rows = [], attributes = [], loc = null) {
|
|
359
|
-
super('TableBodyElement', loc)
|
|
360
|
-
this.rows = rows
|
|
361
|
-
this.attributes = attributes
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
class TableFootElement extends ASTNode {
|
|
366
|
-
constructor(rows = [], attributes = [], loc = null) {
|
|
367
|
-
super('TableFootElement', loc)
|
|
368
|
-
this.rows = rows
|
|
369
|
-
this.attributes = attributes
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
class TableRowElement extends ASTNode {
|
|
374
|
-
constructor(cells = [], attributes = [], loc = null) {
|
|
375
|
-
super('TableRowElement', loc)
|
|
376
|
-
this.cells = cells
|
|
377
|
-
this.attributes = attributes
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
class TableCellElement extends ASTNode {
|
|
382
|
-
constructor(cellType, children = [], colspan = null, rowspan = null, attributes = [], loc = null) {
|
|
383
|
-
super('TableCellElement', loc)
|
|
384
|
-
this.cellType = cellType
|
|
385
|
-
this.children = children
|
|
386
|
-
this.colspan = colspan
|
|
387
|
-
this.rowspan = rowspan
|
|
388
|
-
this.attributes = attributes
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
class ColGroupElement extends ASTNode {
|
|
393
|
-
constructor(cols = [], span = null, attributes = [], loc = null) {
|
|
394
|
-
super('ColGroupElement', loc)
|
|
395
|
-
this.cols = cols
|
|
396
|
-
this.span = span
|
|
397
|
-
this.attributes = attributes
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
class ColElement extends ASTNode {
|
|
402
|
-
constructor(span = null, attributes = [], loc = null) {
|
|
403
|
-
super('ColElement', loc)
|
|
404
|
-
this.span = span
|
|
405
|
-
this.attributes = attributes
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
class FormElement extends ASTNode {
|
|
410
|
-
constructor(action = null, method = 'get', children = [], attributes = [], loc = null) {
|
|
411
|
-
super('FormElement', loc)
|
|
412
|
-
this.action = action
|
|
413
|
-
this.method = method
|
|
414
|
-
this.children = children
|
|
415
|
-
this.attributes = attributes
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
class InputElement extends ASTNode {
|
|
420
|
-
constructor(inputType = 'text', name = null, value = null, attributes = [], loc = null) {
|
|
421
|
-
super('InputElement', loc)
|
|
422
|
-
this.inputType = inputType
|
|
423
|
-
this.name = name
|
|
424
|
-
this.value = value
|
|
425
|
-
this.attributes = attributes
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
class TextareaElement extends ASTNode {
|
|
430
|
-
constructor(name = null, content = '', attributes = [], loc = null) {
|
|
431
|
-
super('TextareaElement', loc)
|
|
432
|
-
this.name = name
|
|
433
|
-
this.content = content
|
|
434
|
-
this.attributes = attributes
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
class SelectElement extends ASTNode {
|
|
439
|
-
constructor(name = null, options = [], attributes = [], loc = null) {
|
|
440
|
-
super('SelectElement', loc)
|
|
441
|
-
this.name = name
|
|
442
|
-
this.options = options
|
|
443
|
-
this.attributes = attributes
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
class OptionElement extends ASTNode {
|
|
448
|
-
constructor(value = null, content = '', selected = false, attributes = [], loc = null) {
|
|
449
|
-
super('OptionElement', loc)
|
|
450
|
-
this.value = value
|
|
451
|
-
this.content = content
|
|
452
|
-
this.selected = selected
|
|
453
|
-
this.attributes = attributes
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
class OptGroupElement extends ASTNode {
|
|
458
|
-
constructor(label, options = [], attributes = [], loc = null) {
|
|
459
|
-
super('OptGroupElement', loc)
|
|
460
|
-
this.label = label
|
|
461
|
-
this.options = options
|
|
462
|
-
this.attributes = attributes
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
class ButtonElement extends ASTNode {
|
|
467
|
-
constructor(buttonType = 'submit', children = [], attributes = [], loc = null) {
|
|
468
|
-
super('ButtonElement', loc)
|
|
469
|
-
this.buttonType = buttonType
|
|
470
|
-
this.children = children
|
|
471
|
-
this.attributes = attributes
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
class LabelElement extends ASTNode {
|
|
476
|
-
constructor(forAttr = null, children = [], attributes = [], loc = null) {
|
|
477
|
-
super('LabelElement', loc)
|
|
478
|
-
this.forAttr = forAttr
|
|
479
|
-
this.children = children
|
|
480
|
-
this.attributes = attributes
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
class FieldsetElement extends ASTNode {
|
|
485
|
-
constructor(legend = null, children = [], attributes = [], loc = null) {
|
|
486
|
-
super('FieldsetElement', loc)
|
|
487
|
-
this.legend = legend
|
|
488
|
-
this.children = children
|
|
489
|
-
this.attributes = attributes
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
class LegendElement extends ASTNode {
|
|
494
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
495
|
-
super('LegendElement', loc)
|
|
496
|
-
this.children = children
|
|
497
|
-
this.attributes = attributes
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
class DatalistElement extends ASTNode {
|
|
502
|
-
constructor(options = [], attributes = [], loc = null) {
|
|
503
|
-
super('DatalistElement', loc)
|
|
504
|
-
this.options = options
|
|
505
|
-
this.attributes = attributes
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
class OutputElement extends ASTNode {
|
|
510
|
-
constructor(forAttr = null, name = null, children = [], attributes = [], loc = null) {
|
|
511
|
-
super('OutputElement', loc)
|
|
512
|
-
this.forAttr = forAttr
|
|
513
|
-
this.name = name
|
|
514
|
-
this.children = children
|
|
515
|
-
this.attributes = attributes
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
class ProgressElement extends ASTNode {
|
|
520
|
-
constructor(value = null, max = null, children = [], attributes = [], loc = null) {
|
|
521
|
-
super('ProgressElement', loc)
|
|
522
|
-
this.value = value
|
|
523
|
-
this.max = max
|
|
524
|
-
this.children = children
|
|
525
|
-
this.attributes = attributes
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
class MeterElement extends ASTNode {
|
|
530
|
-
constructor(value = null, min = null, max = null, attributes = [], loc = null) {
|
|
531
|
-
super('MeterElement', loc)
|
|
532
|
-
this.value = value
|
|
533
|
-
this.min = min
|
|
534
|
-
this.max = max
|
|
535
|
-
this.attributes = attributes
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
class DetailsElement extends ASTNode {
|
|
540
|
-
constructor(summary = null, children = [], open = false, attributes = [], loc = null) {
|
|
541
|
-
super('DetailsElement', loc)
|
|
542
|
-
this.summary = summary
|
|
543
|
-
this.children = children
|
|
544
|
-
this.open = open
|
|
545
|
-
this.attributes = attributes
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
class SummaryElement extends ASTNode {
|
|
550
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
551
|
-
super('SummaryElement', loc)
|
|
552
|
-
this.children = children
|
|
553
|
-
this.attributes = attributes
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
class DialogElement extends ASTNode {
|
|
558
|
-
constructor(children = [], open = false, attributes = [], loc = null) {
|
|
559
|
-
super('DialogElement', loc)
|
|
560
|
-
this.children = children
|
|
561
|
-
this.open = open
|
|
562
|
-
this.attributes = attributes
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
class TemplateElement extends ASTNode {
|
|
567
|
-
constructor(content = null, attributes = [], loc = null) {
|
|
568
|
-
super('TemplateElement', loc)
|
|
569
|
-
this.content = content
|
|
570
|
-
this.attributes = attributes
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
class SlotElement extends ASTNode {
|
|
575
|
-
constructor(name = null, children = [], attributes = [], loc = null) {
|
|
576
|
-
super('SlotElement', loc)
|
|
577
|
-
this.name = name
|
|
578
|
-
this.children = children
|
|
579
|
-
this.attributes = attributes
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
class SectionElement extends ASTNode {
|
|
584
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
585
|
-
super('SectionElement', loc)
|
|
586
|
-
this.children = children
|
|
587
|
-
this.attributes = attributes
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
class ArticleElement extends ASTNode {
|
|
592
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
593
|
-
super('ArticleElement', loc)
|
|
594
|
-
this.children = children
|
|
595
|
-
this.attributes = attributes
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
class AsideElement extends ASTNode {
|
|
600
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
601
|
-
super('AsideElement', loc)
|
|
602
|
-
this.children = children
|
|
603
|
-
this.attributes = attributes
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
class HeaderElement extends ASTNode {
|
|
608
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
609
|
-
super('HeaderElement', loc)
|
|
610
|
-
this.children = children
|
|
611
|
-
this.attributes = attributes
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
class FooterElement extends ASTNode {
|
|
616
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
617
|
-
super('FooterElement', loc)
|
|
618
|
-
this.children = children
|
|
619
|
-
this.attributes = attributes
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
class NavElement extends ASTNode {
|
|
624
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
625
|
-
super('NavElement', loc)
|
|
626
|
-
this.children = children
|
|
627
|
-
this.attributes = attributes
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
class MainElement extends ASTNode {
|
|
632
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
633
|
-
super('MainElement', loc)
|
|
634
|
-
this.children = children
|
|
635
|
-
this.attributes = attributes
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
class SearchElement extends ASTNode {
|
|
640
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
641
|
-
super('SearchElement', loc)
|
|
642
|
-
this.children = children
|
|
643
|
-
this.attributes = attributes
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
class AddressElement extends ASTNode {
|
|
648
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
649
|
-
super('AddressElement', loc)
|
|
650
|
-
this.children = children
|
|
651
|
-
this.attributes = attributes
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
class FigureElement extends ASTNode {
|
|
656
|
-
constructor(children = [], figcaption = null, attributes = [], loc = null) {
|
|
657
|
-
super('FigureElement', loc)
|
|
658
|
-
this.children = children
|
|
659
|
-
this.figcaption = figcaption
|
|
660
|
-
this.attributes = attributes
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
class FigcaptionElement extends ASTNode {
|
|
665
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
666
|
-
super('FigcaptionElement', loc)
|
|
667
|
-
this.children = children
|
|
668
|
-
this.attributes = attributes
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
class BlockquoteElement extends ASTNode {
|
|
673
|
-
constructor(children = [], cite = null, attributes = [], loc = null) {
|
|
674
|
-
super('BlockquoteElement', loc)
|
|
675
|
-
this.children = children
|
|
676
|
-
this.cite = cite
|
|
677
|
-
this.attributes = attributes
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
class PreElement extends ASTNode {
|
|
682
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
683
|
-
super('PreElement', loc)
|
|
684
|
-
this.children = children
|
|
685
|
-
this.attributes = attributes
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
class HrElement extends ASTNode {
|
|
690
|
-
constructor(attributes = [], loc = null) {
|
|
691
|
-
super('HrElement', loc)
|
|
692
|
-
this.attributes = attributes
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
class BrElement extends ASTNode {
|
|
697
|
-
constructor(loc = null) {
|
|
698
|
-
super('BrElement', loc)
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
class WbrElement extends ASTNode {
|
|
703
|
-
constructor(loc = null) {
|
|
704
|
-
super('WbrElement', loc)
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
class TimeElement extends ASTNode {
|
|
709
|
-
constructor(datetime = null, children = [], attributes = [], loc = null) {
|
|
710
|
-
super('TimeElement', loc)
|
|
711
|
-
this.datetime = datetime
|
|
712
|
-
this.children = children
|
|
713
|
-
this.attributes = attributes
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
class DataElement extends ASTNode {
|
|
718
|
-
constructor(value = null, children = [], attributes = [], loc = null) {
|
|
719
|
-
super('DataElement', loc)
|
|
720
|
-
this.value = value
|
|
721
|
-
this.children = children
|
|
722
|
-
this.attributes = attributes
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
class AbbrElement extends ASTNode {
|
|
727
|
-
constructor(title = null, children = [], attributes = [], loc = null) {
|
|
728
|
-
super('AbbrElement', loc)
|
|
729
|
-
this.title = title
|
|
730
|
-
this.children = children
|
|
731
|
-
this.attributes = attributes
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
class RubyElement extends ASTNode {
|
|
736
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
737
|
-
super('RubyElement', loc)
|
|
738
|
-
this.children = children
|
|
739
|
-
this.attributes = attributes
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
class RtElement extends ASTNode {
|
|
744
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
745
|
-
super('RtElement', loc)
|
|
746
|
-
this.children = children
|
|
747
|
-
this.attributes = attributes
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
class RpElement extends ASTNode {
|
|
752
|
-
constructor(children = [], attributes = [], loc = null) {
|
|
753
|
-
super('RpElement', loc)
|
|
754
|
-
this.children = children
|
|
755
|
-
this.attributes = attributes
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
class EtherDirective extends ASTNode {
|
|
760
|
-
constructor(name, value = null, loc = null) {
|
|
761
|
-
super('EtherDirective', loc)
|
|
762
|
-
this.name = name
|
|
763
|
-
this.value = value
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
class EtherLoop extends ASTNode {
|
|
768
|
-
constructor(variable, iterable, children = [], loc = null) {
|
|
769
|
-
super('EtherLoop', loc)
|
|
770
|
-
this.variable = variable
|
|
771
|
-
this.iterable = iterable
|
|
772
|
-
this.children = children
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
class EtherConditional extends ASTNode {
|
|
777
|
-
constructor(condition, thenBranch = [], elseBranch = null, loc = null) {
|
|
778
|
-
super('EtherConditional', loc)
|
|
779
|
-
this.condition = condition
|
|
780
|
-
this.thenBranch = thenBranch
|
|
781
|
-
this.elseBranch = elseBranch
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
class EtherExpression extends ASTNode {
|
|
786
|
-
constructor(expression, loc = null) {
|
|
787
|
-
super('EtherExpression', loc)
|
|
788
|
-
this.expression = expression
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
module.exports = {
|
|
793
|
-
ASTNode,
|
|
794
|
-
Document,
|
|
795
|
-
Doctype,
|
|
796
|
-
Element,
|
|
797
|
-
Attribute,
|
|
798
|
-
BooleanAttribute,
|
|
799
|
-
TextNode,
|
|
800
|
-
Comment,
|
|
801
|
-
Fragment,
|
|
802
|
-
HeadElement,
|
|
803
|
-
BodyElement,
|
|
804
|
-
TitleElement,
|
|
805
|
-
MetaElement,
|
|
806
|
-
LinkElement,
|
|
807
|
-
StyleElement,
|
|
808
|
-
ScriptElement,
|
|
809
|
-
BaseElement,
|
|
810
|
-
HeadingElement,
|
|
811
|
-
ParagraphElement,
|
|
812
|
-
DivElement,
|
|
813
|
-
SpanElement,
|
|
814
|
-
AnchorElement,
|
|
815
|
-
ImageElement,
|
|
816
|
-
PictureElement,
|
|
817
|
-
SourceElement,
|
|
818
|
-
VideoElement,
|
|
819
|
-
AudioElement,
|
|
820
|
-
TrackElement,
|
|
821
|
-
IframeElement,
|
|
822
|
-
EmbedElement,
|
|
823
|
-
ObjectElement,
|
|
824
|
-
CanvasElement,
|
|
825
|
-
SvgElement,
|
|
826
|
-
MathElement,
|
|
827
|
-
ListElement,
|
|
828
|
-
ListItemElement,
|
|
829
|
-
DescriptionListElement,
|
|
830
|
-
DescriptionTermElement,
|
|
831
|
-
DescriptionDetailsElement,
|
|
832
|
-
TableElement,
|
|
833
|
-
TableCaptionElement,
|
|
834
|
-
TableHeadElement,
|
|
835
|
-
TableBodyElement,
|
|
836
|
-
TableFootElement,
|
|
837
|
-
TableRowElement,
|
|
838
|
-
TableCellElement,
|
|
839
|
-
ColGroupElement,
|
|
840
|
-
ColElement,
|
|
841
|
-
FormElement,
|
|
842
|
-
InputElement,
|
|
843
|
-
TextareaElement,
|
|
844
|
-
SelectElement,
|
|
845
|
-
OptionElement,
|
|
846
|
-
OptGroupElement,
|
|
847
|
-
ButtonElement,
|
|
848
|
-
LabelElement,
|
|
849
|
-
FieldsetElement,
|
|
850
|
-
LegendElement,
|
|
851
|
-
DatalistElement,
|
|
852
|
-
OutputElement,
|
|
853
|
-
ProgressElement,
|
|
854
|
-
MeterElement,
|
|
855
|
-
DetailsElement,
|
|
856
|
-
SummaryElement,
|
|
857
|
-
DialogElement,
|
|
858
|
-
TemplateElement,
|
|
859
|
-
SlotElement,
|
|
860
|
-
SectionElement,
|
|
861
|
-
ArticleElement,
|
|
862
|
-
AsideElement,
|
|
863
|
-
HeaderElement,
|
|
864
|
-
FooterElement,
|
|
865
|
-
NavElement,
|
|
866
|
-
MainElement,
|
|
867
|
-
SearchElement,
|
|
868
|
-
AddressElement,
|
|
869
|
-
FigureElement,
|
|
870
|
-
FigcaptionElement,
|
|
871
|
-
BlockquoteElement,
|
|
872
|
-
PreElement,
|
|
873
|
-
HrElement,
|
|
874
|
-
BrElement,
|
|
875
|
-
WbrElement,
|
|
876
|
-
TimeElement,
|
|
877
|
-
DataElement,
|
|
878
|
-
AbbrElement,
|
|
879
|
-
RubyElement,
|
|
880
|
-
RtElement,
|
|
881
|
-
RpElement,
|
|
882
|
-
EtherDirective,
|
|
883
|
-
EtherLoop,
|
|
884
|
-
EtherConditional,
|
|
885
|
-
EtherExpression
|
|
886
|
-
}
|