wikilint 2.4.0 → 2.4.2

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.
Files changed (121) hide show
  1. package/config/default.json +18 -3
  2. package/config/enwiki.json +411 -0
  3. package/dist/index.js +6 -7
  4. package/dist/lib/element.d.ts +1 -0
  5. package/dist/lib/element.js +2 -2
  6. package/dist/lib/node.d.ts +1 -0
  7. package/dist/lib/text.d.ts +1 -0
  8. package/dist/lib/text.js +81 -38
  9. package/dist/lib/title.d.ts +1 -1
  10. package/dist/lib/title.js +14 -3
  11. package/dist/parser/braces.js +5 -2
  12. package/dist/parser/commentAndExt.js +7 -2
  13. package/dist/parser/converter.js +3 -2
  14. package/dist/parser/externalLinks.js +3 -2
  15. package/dist/parser/hrAndDoubleUnderscore.js +5 -2
  16. package/dist/parser/html.js +6 -3
  17. package/dist/parser/links.js +6 -5
  18. package/dist/parser/list.js +4 -2
  19. package/dist/parser/magicLinks.js +3 -2
  20. package/dist/parser/quotes.js +4 -3
  21. package/dist/parser/table.js +11 -7
  22. package/dist/src/arg.d.ts +2 -2
  23. package/dist/src/arg.js +7 -7
  24. package/dist/src/atom.d.ts +1 -1
  25. package/dist/src/atom.js +4 -4
  26. package/dist/src/attribute.d.ts +3 -2
  27. package/dist/src/attribute.js +41 -12
  28. package/dist/src/attributes.d.ts +2 -2
  29. package/dist/src/attributes.js +8 -6
  30. package/dist/src/converter.d.ts +2 -2
  31. package/dist/src/converter.js +14 -8
  32. package/dist/src/converterFlags.d.ts +3 -2
  33. package/dist/src/converterFlags.js +7 -7
  34. package/dist/src/converterRule.d.ts +2 -2
  35. package/dist/src/converterRule.js +7 -7
  36. package/dist/src/extLink.d.ts +6 -2
  37. package/dist/src/extLink.js +18 -8
  38. package/dist/src/gallery.d.ts +3 -2
  39. package/dist/src/gallery.js +10 -7
  40. package/dist/src/heading.d.ts +3 -2
  41. package/dist/src/heading.js +10 -10
  42. package/dist/src/hidden.d.ts +0 -2
  43. package/dist/src/html.d.ts +3 -2
  44. package/dist/src/html.js +10 -10
  45. package/dist/src/imageParameter.d.ts +3 -2
  46. package/dist/src/imageParameter.js +8 -10
  47. package/dist/src/imagemap.d.ts +2 -2
  48. package/dist/src/imagemap.js +10 -6
  49. package/dist/src/imagemapLink.d.ts +2 -2
  50. package/dist/src/imagemapLink.js +11 -7
  51. package/dist/src/index.d.ts +2 -1
  52. package/dist/src/index.js +15 -15
  53. package/dist/src/link/base.d.ts +2 -1
  54. package/dist/src/link/base.js +10 -11
  55. package/dist/src/link/category.d.ts +1 -1
  56. package/dist/src/link/category.js +0 -1
  57. package/dist/src/link/file.d.ts +3 -2
  58. package/dist/src/link/file.js +6 -5
  59. package/dist/src/link/galleryImage.d.ts +7 -4
  60. package/dist/src/link/galleryImage.js +4 -5
  61. package/dist/src/link/index.d.ts +1 -1
  62. package/dist/src/link/index.js +0 -1
  63. package/dist/src/magicLink.d.ts +2 -2
  64. package/dist/src/magicLink.js +6 -6
  65. package/dist/src/nested.d.ts +2 -2
  66. package/dist/src/nested.js +9 -6
  67. package/dist/src/nowiki/base.d.ts +1 -1
  68. package/dist/src/nowiki/base.js +4 -4
  69. package/dist/src/nowiki/comment.d.ts +2 -4
  70. package/dist/src/nowiki/comment.js +4 -5
  71. package/dist/src/nowiki/dd.d.ts +1 -1
  72. package/dist/src/nowiki/dd.js +0 -1
  73. package/dist/src/nowiki/doubleUnderscore.d.ts +2 -4
  74. package/dist/src/nowiki/doubleUnderscore.js +3 -4
  75. package/dist/src/nowiki/hr.d.ts +1 -1
  76. package/dist/src/nowiki/hr.js +0 -1
  77. package/dist/src/nowiki/index.d.ts +1 -1
  78. package/dist/src/nowiki/index.js +2 -3
  79. package/dist/src/nowiki/list.d.ts +1 -1
  80. package/dist/src/nowiki/list.js +0 -1
  81. package/dist/src/nowiki/listBase.d.ts +1 -1
  82. package/dist/src/nowiki/listBase.js +0 -1
  83. package/dist/src/nowiki/noinclude.d.ts +1 -3
  84. package/dist/src/nowiki/noinclude.js +0 -1
  85. package/dist/src/nowiki/quote.d.ts +1 -1
  86. package/dist/src/nowiki/quote.js +3 -4
  87. package/dist/src/onlyinclude.js +1 -1
  88. package/dist/src/paramTag/index.d.ts +2 -2
  89. package/dist/src/paramTag/index.js +7 -7
  90. package/dist/src/paramTag/inputbox.d.ts +2 -2
  91. package/dist/src/paramTag/inputbox.js +4 -5
  92. package/dist/src/parameter.d.ts +2 -2
  93. package/dist/src/parameter.js +9 -13
  94. package/dist/src/pre.d.ts +2 -2
  95. package/dist/src/pre.js +6 -4
  96. package/dist/src/syntax.d.ts +1 -1
  97. package/dist/src/syntax.js +4 -4
  98. package/dist/src/table/base.d.ts +1 -1
  99. package/dist/src/table/base.js +7 -5
  100. package/dist/src/table/index.d.ts +2 -2
  101. package/dist/src/table/index.js +3 -4
  102. package/dist/src/table/td.d.ts +3 -2
  103. package/dist/src/table/td.js +6 -7
  104. package/dist/src/table/tr.d.ts +2 -2
  105. package/dist/src/table/tr.js +2 -3
  106. package/dist/src/table/trBase.js +1 -0
  107. package/dist/src/tagPair/ext.d.ts +2 -2
  108. package/dist/src/tagPair/ext.js +24 -8
  109. package/dist/src/tagPair/include.d.ts +2 -4
  110. package/dist/src/tagPair/include.js +5 -5
  111. package/dist/src/tagPair/index.d.ts +4 -1
  112. package/dist/src/tagPair/index.js +12 -7
  113. package/dist/src/transclude.d.ts +3 -2
  114. package/dist/src/transclude.js +8 -7
  115. package/dist/util/diff.js +11 -1
  116. package/dist/util/lint.js +2 -2
  117. package/dist/util/string.js +3 -1
  118. package/i18n/zh-hans.json +4 -3
  119. package/i18n/zh-hant.json +5 -4
  120. package/package.json +14 -13
  121. package/dist/bin/declaration.js +0 -27
@@ -31,6 +31,7 @@
31
31
  "mapframe",
32
32
  "maplink",
33
33
  "math",
34
+ "phonos",
34
35
  "quiz",
35
36
  "section",
36
37
  "source",
@@ -139,6 +140,10 @@
139
140
  "711": "TimedText talk",
140
141
  "828": "Module",
141
142
  "829": "Module talk",
143
+ "2300": "Gadget",
144
+ "2301": "Gadget talk",
145
+ "2302": "Gadget definition",
146
+ "2303": "Gadget definition talk",
142
147
  "2600": "Topic"
143
148
  },
144
149
  "nsid": {
@@ -295,7 +300,11 @@
295
300
  "模組討論": 829,
296
301
  "模组对话": 829,
297
302
  "模组讨论": 829,
298
- "モジュール・トーク": 829
303
+ "モジュール・トーク": 829,
304
+ "gadget": 2300,
305
+ "gadget talk": 2301,
306
+ "gadget definition": 2302,
307
+ "gadget definition talk": 2303
299
308
  },
300
309
  "parserFunction": [
301
310
  {
@@ -414,6 +423,7 @@
414
423
  "#rel2abs": "rel2abs",
415
424
  "#标题组成部分": "titleparts",
416
425
  "#titleparts": "titleparts",
426
+ "pendingchangelevel": "pendingchangelevel",
417
427
  "#categorytree": "categorytree",
418
428
  "#分類樹": "categorytree",
419
429
  "#分类树": "categorytree",
@@ -463,6 +473,7 @@
463
473
  "#lst": "lst",
464
474
  "#lsth": "lsth",
465
475
  "#lstx": "lstx",
476
+ "#assessment": "assessment",
466
477
  "#mentor": "mentor",
467
478
  "#property": "property",
468
479
  "#屬性": "property",
@@ -606,6 +617,7 @@
606
617
  "显示标题",
607
618
  "顯示標題",
608
619
  "DISPLAYTITLE",
620
+ "SHORTDESC",
609
621
  "!",
610
622
  "本月",
611
623
  "本月2",
@@ -729,7 +741,9 @@
729
741
  "無目錄",
730
742
  "toc",
731
743
  "目录",
732
- "目錄"
744
+ "目錄",
745
+ "archivedtalk",
746
+ "notalk"
733
747
  ],
734
748
  [
735
749
  "EXPECTUNUSEDCATEGORY",
@@ -816,7 +830,8 @@
816
830
  "page=$1": "page",
817
831
  "page $1": "page",
818
832
  "页数=$1": "page",
819
- "$1页": "page"
833
+ "$1页": "page",
834
+ "lossy=$1": "lossy"
820
835
  },
821
836
  "variants": [
822
837
  "zh",
@@ -0,0 +1,411 @@
1
+ {
2
+ "ext": [
3
+ "nowiki",
4
+ "pre",
5
+ "gallery",
6
+ "indicator",
7
+ "poem",
8
+ "ref",
9
+ "references",
10
+ "categorytree",
11
+ "charinsert",
12
+ "imagemap",
13
+ "inputbox",
14
+ "templatestyles",
15
+ "score",
16
+ "ce",
17
+ "chem",
18
+ "graph",
19
+ "hiero",
20
+ "langconvert",
21
+ "mapframe",
22
+ "maplink",
23
+ "math",
24
+ "phonos",
25
+ "section",
26
+ "source",
27
+ "syntaxhighlight",
28
+ "templatedata",
29
+ "timeline"
30
+ ],
31
+ "html": [
32
+ [
33
+ "b",
34
+ "bdi",
35
+ "del",
36
+ "i",
37
+ "ins",
38
+ "u",
39
+ "font",
40
+ "big",
41
+ "small",
42
+ "sub",
43
+ "sup",
44
+ "h1",
45
+ "h2",
46
+ "h3",
47
+ "h4",
48
+ "h5",
49
+ "h6",
50
+ "cite",
51
+ "code",
52
+ "em",
53
+ "s",
54
+ "strike",
55
+ "strong",
56
+ "tt",
57
+ "var",
58
+ "div",
59
+ "center",
60
+ "blockquote",
61
+ "ol",
62
+ "ul",
63
+ "dl",
64
+ "table",
65
+ "caption",
66
+ "pre",
67
+ "ruby",
68
+ "rb",
69
+ "rp",
70
+ "rt",
71
+ "rtc",
72
+ "p",
73
+ "span",
74
+ "abbr",
75
+ "dfn",
76
+ "kbd",
77
+ "samp",
78
+ "data",
79
+ "time",
80
+ "mark",
81
+ "tr",
82
+ "td",
83
+ "th",
84
+ "q",
85
+ "bdo"
86
+ ],
87
+ [
88
+ "li",
89
+ "dt",
90
+ "dd"
91
+ ],
92
+ [
93
+ "br",
94
+ "wbr",
95
+ "hr",
96
+ "meta",
97
+ "link"
98
+ ]
99
+ ],
100
+ "namespaces": {
101
+ "-2": "Media",
102
+ "-1": "Special",
103
+ "0": "",
104
+ "1": "Talk",
105
+ "2": "User",
106
+ "3": "User talk",
107
+ "4": "Project",
108
+ "5": "Project talk",
109
+ "6": "File",
110
+ "7": "File talk",
111
+ "8": "MediaWiki",
112
+ "9": "MediaWiki talk",
113
+ "10": "Template",
114
+ "11": "Template talk",
115
+ "12": "Help",
116
+ "13": "Help talk",
117
+ "14": "Category",
118
+ "15": "Category talk",
119
+ "100": "Portal",
120
+ "101": "Portal talk",
121
+ "118": "Draft",
122
+ "119": "Draft talk",
123
+ "710": "TimedText",
124
+ "711": "TimedText talk",
125
+ "828": "Module",
126
+ "829": "Module talk",
127
+ "2300": "Gadget",
128
+ "2301": "Gadget talk",
129
+ "2302": "Gadget definition",
130
+ "2303": "Gadget definition talk"
131
+ },
132
+ "nsid": {
133
+ "": 0,
134
+ "media": -2,
135
+ "special": -1,
136
+ "talk": 1,
137
+ "user": 2,
138
+ "user talk": 3,
139
+ "wp": 4,
140
+ "wikipedia": 4,
141
+ "project": 4,
142
+ "wt": 5,
143
+ "wikipedia talk": 5,
144
+ "project talk": 5,
145
+ "file": 6,
146
+ "image": 6,
147
+ "file talk": 7,
148
+ "image talk": 7,
149
+ "mediawiki": 8,
150
+ "mediawiki talk": 9,
151
+ "template": 10,
152
+ "template talk": 11,
153
+ "help": 12,
154
+ "help talk": 13,
155
+ "category": 14,
156
+ "category talk": 15,
157
+ "portal": 100,
158
+ "portal talk": 101,
159
+ "draft": 118,
160
+ "draft talk": 119,
161
+ "timedtext": 710,
162
+ "timedtext talk": 711,
163
+ "module": 828,
164
+ "module talk": 829,
165
+ "gadget": 2300,
166
+ "gadget talk": 2301,
167
+ "gadget definition": 2302,
168
+ "gadget definition talk": 2303
169
+ },
170
+ "parserFunction": [
171
+ {
172
+ "ns": "ns",
173
+ "nse": "nse",
174
+ "urlencode": "urlencode",
175
+ "lcfirst": "lcfirst",
176
+ "ucfirst": "ucfirst",
177
+ "lc": "lc",
178
+ "uc": "uc",
179
+ "localurl": "localurl",
180
+ "localurle": "localurle",
181
+ "fullurl": "fullurl",
182
+ "fullurle": "fullurle",
183
+ "canonicalurl": "canonicalurl",
184
+ "canonicalurle": "canonicalurle",
185
+ "formatnum": "formatnum",
186
+ "grammar": "grammar",
187
+ "gender": "gender",
188
+ "plural": "plural",
189
+ "bidi": "bidi",
190
+ "#language": "language",
191
+ "padleft": "padleft",
192
+ "padright": "padright",
193
+ "anchorencode": "anchorencode",
194
+ "filepath": "filepath",
195
+ "pageid": "pageid",
196
+ "int": "int",
197
+ "#special": "special",
198
+ "#speciale": "speciale",
199
+ "#tag": "tag",
200
+ "#formatdate": "formatdate",
201
+ "#dateformat": "formatdate",
202
+ "#invoke": "invoke",
203
+ "#if": "if",
204
+ "#ifeq": "ifeq",
205
+ "#switch": "switch",
206
+ "#ifexist": "ifexist",
207
+ "#ifexpr": "ifexpr",
208
+ "#iferror": "iferror",
209
+ "#time": "time",
210
+ "#timel": "timel",
211
+ "#expr": "expr",
212
+ "#rel2abs": "rel2abs",
213
+ "#titleparts": "titleparts",
214
+ "pendingchangelevel": "pendingchangelevel",
215
+ "#categorytree": "categorytree",
216
+ "articlepath": "articlepath",
217
+ "server": "server",
218
+ "servername": "servername",
219
+ "scriptpath": "scriptpath",
220
+ "stylepath": "stylepath",
221
+ "msgnw": "msgnw",
222
+ "#related": "related",
223
+ "#babel": "babel",
224
+ "#commaseparatedlist": "commaseparatedlist",
225
+ "#coordinates": "coordinates",
226
+ "#lst": "lst",
227
+ "#lsth": "lsth",
228
+ "#lstx": "lstx",
229
+ "#assessment": "assessment",
230
+ "#mentor": "mentor",
231
+ "#property": "property",
232
+ "#target": "target",
233
+ "#section": "section",
234
+ "#section-x": "section-x",
235
+ "#section-h": "section-h",
236
+ "noexternallanglinks": "noexternallanglinks",
237
+ "#statements": "statements",
238
+ "numberofwikis": "numberofwikis",
239
+ "wbreponame": "wbreponame"
240
+ },
241
+ [
242
+ "NUMBEROFPAGES",
243
+ "NUMBEROFUSERS",
244
+ "NUMBEROFACTIVEUSERS",
245
+ "NUMBEROFARTICLES",
246
+ "NUMBEROFFILES",
247
+ "NUMBEROFADMINS",
248
+ "NUMBERINGROUP",
249
+ "NUMINGROUP",
250
+ "NUMBEROFEDITS",
251
+ "DEFAULTSORT",
252
+ "DEFAULTSORTKEY",
253
+ "DEFAULTCATEGORYSORT",
254
+ "PAGESINCATEGORY",
255
+ "PAGESINCAT",
256
+ "PAGESIZE",
257
+ "PROTECTIONLEVEL",
258
+ "PROTECTIONEXPIRY",
259
+ "NAMESPACEE",
260
+ "NAMESPACENUMBER",
261
+ "TALKSPACE",
262
+ "TALKSPACEE",
263
+ "SUBJECTSPACE",
264
+ "ARTICLESPACE",
265
+ "SUBJECTSPACEE",
266
+ "ARTICLESPACEE",
267
+ "PAGENAME",
268
+ "PAGENAMEE",
269
+ "FULLPAGENAME",
270
+ "FULLPAGENAMEE",
271
+ "ROOTPAGENAME",
272
+ "ROOTPAGENAMEE",
273
+ "BASEPAGENAME",
274
+ "BASEPAGENAMEE",
275
+ "SUBPAGENAME",
276
+ "SUBPAGENAMEE",
277
+ "TALKPAGENAME",
278
+ "TALKPAGENAMEE",
279
+ "SUBJECTPAGENAME",
280
+ "ARTICLEPAGENAME",
281
+ "SUBJECTPAGENAMEE",
282
+ "ARTICLEPAGENAMEE",
283
+ "REVISIONID",
284
+ "REVISIONDAY",
285
+ "REVISIONDAY2",
286
+ "REVISIONMONTH",
287
+ "REVISIONMONTH1",
288
+ "REVISIONYEAR",
289
+ "REVISIONTIMESTAMP",
290
+ "REVISIONUSER",
291
+ "CASCADINGSOURCES",
292
+ "NAMESPACE",
293
+ "DISPLAYTITLE",
294
+ "SHORTDESC",
295
+ "!",
296
+ "CURRENTMONTH",
297
+ "CURRENTMONTH2",
298
+ "CURRENTMONTH1",
299
+ "CURRENTMONTHNAME",
300
+ "CURRENTMONTHNAMEGEN",
301
+ "CURRENTMONTHABBREV",
302
+ "CURRENTDAY",
303
+ "CURRENTDAY2",
304
+ "CURRENTDAYNAME",
305
+ "CURRENTYEAR",
306
+ "CURRENTTIME",
307
+ "CURRENTHOUR",
308
+ "LOCALMONTH",
309
+ "LOCALMONTH2",
310
+ "LOCALMONTH1",
311
+ "LOCALMONTHNAME",
312
+ "LOCALMONTHNAMEGEN",
313
+ "LOCALMONTHABBREV",
314
+ "LOCALDAY",
315
+ "LOCALDAY2",
316
+ "LOCALDAYNAME",
317
+ "LOCALYEAR",
318
+ "LOCALTIME",
319
+ "LOCALHOUR",
320
+ "SITENAME",
321
+ "CURRENTWEEK",
322
+ "CURRENTDOW",
323
+ "LOCALWEEK",
324
+ "LOCALDOW",
325
+ "REVISIONSIZE",
326
+ "CURRENTVERSION",
327
+ "CURRENTTIMESTAMP",
328
+ "LOCALTIMESTAMP",
329
+ "DIRECTIONMARK",
330
+ "DIRMARK",
331
+ "CONTENTLANGUAGE",
332
+ "CONTENTLANG",
333
+ "PAGELANGUAGE",
334
+ "="
335
+ ],
336
+ [
337
+ "msg",
338
+ "raw"
339
+ ],
340
+ [
341
+ "subst",
342
+ "safesubst"
343
+ ]
344
+ ],
345
+ "doubleUnderscore": [
346
+ [
347
+ "forcetoc",
348
+ "nocc",
349
+ "nocontentconvert",
350
+ "noeditsection",
351
+ "nogallery",
352
+ "notc",
353
+ "notitleconvert",
354
+ "notoc",
355
+ "toc",
356
+ "archivedtalk",
357
+ "notalk"
358
+ ],
359
+ [
360
+ "EXPECTUNUSEDCATEGORY",
361
+ "DISAMBIG",
362
+ "HIDDENCAT",
363
+ "INDEX",
364
+ "NEWSECTIONLINK",
365
+ "NOINDEX",
366
+ "NONEWSECTIONLINK",
367
+ "STATICREDIRECT",
368
+ "NOGLOBAL",
369
+ "EXPECTED_UNCONNECTED_PAGE"
370
+ ]
371
+ ],
372
+ "protocol": "bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|worldwind://|xmpp:",
373
+ "interwiki": [],
374
+ "img": {
375
+ "thumbnail": "thumbnail",
376
+ "thumb": "thumbnail",
377
+ "thumbnail=$1": "manualthumb",
378
+ "thumb=$1": "manualthumb",
379
+ "left": "left",
380
+ "right": "right",
381
+ "none": "none",
382
+ "$1px": "width",
383
+ "center": "center",
384
+ "centre": "center",
385
+ "framed": "framed",
386
+ "enframed": "framed",
387
+ "frame": "framed",
388
+ "frameless": "frameless",
389
+ "upright": "upright",
390
+ "upright=$1": "manual-upright",
391
+ "upright $1": "manual-upright",
392
+ "border": "border",
393
+ "alt=$1": "alt",
394
+ "class=$1": "class",
395
+ "link=$1": "link",
396
+ "baseline": "baseline",
397
+ "sub": "sub",
398
+ "super": "super",
399
+ "sup": "super",
400
+ "top": "top",
401
+ "text-top": "text-top",
402
+ "middle": "middle",
403
+ "bottom": "bottom",
404
+ "text-bottom": "text-bottom",
405
+ "lang=$1": "lang",
406
+ "page=$1": "page",
407
+ "page $1": "page",
408
+ "lossy=$1": "lossy"
409
+ },
410
+ "variants": []
411
+ }
package/dist/index.js CHANGED
@@ -4,17 +4,13 @@ const fs = require("fs");
4
4
  const path = require("path");
5
5
  const debug_1 = require("./util/debug");
6
6
  const constants_1 = require("./util/constants");
7
+ const string_1 = require("./util/string");
7
8
  /**
8
9
  * 从根路径require
9
10
  * @param file 文件名
10
11
  * @param dir 子路径
11
12
  */
12
13
  const rootRequire = (file, dir) => require(file.startsWith('/') ? file : `../${file.includes('/') ? '' : dir}${file}`);
13
- /**
14
- * 清理解析专用的不可见字符
15
- * @param text 源文本
16
- */
17
- const tidy = (text) => text.replace(/[\0\x7F]/gu, '');
18
14
  // eslint-disable-next-line @typescript-eslint/no-redeclare
19
15
  const Parser = {
20
16
  config: 'default',
@@ -50,9 +46,10 @@ const Parser = {
50
46
  },
51
47
  /** @implements */
52
48
  parse(wikitext, include, maxStage = constants_1.MAX_STAGE, config = Parser.getConfig()) {
49
+ wikitext = (0, string_1.tidy)(wikitext);
53
50
  const { Token } = require('./src/index');
54
51
  const root = debug_1.Shadow.run(() => {
55
- const token = new Token(tidy(wikitext), config);
52
+ const token = new Token(wikitext, config);
56
53
  try {
57
54
  return token.parse(maxStage, include);
58
55
  }
@@ -71,7 +68,9 @@ const Parser = {
71
68
  return root;
72
69
  },
73
70
  };
74
- const def = {}, enumerable = new Set([
71
+ const def = {
72
+ default: { value: Parser },
73
+ }, enumerable = new Set([
75
74
  'normalizeTitle',
76
75
  'parse',
77
76
  ]);
@@ -3,6 +3,7 @@ import type { LintError } from '../base';
3
3
  import type { AstNodes, Token } from '../internal';
4
4
  /** 类似HTMLElement */
5
5
  export declare abstract class AstElement extends AstNode {
6
+ #private;
6
7
  readonly name?: string;
7
8
  readonly data: undefined;
8
9
  /** 子节点总数 */
@@ -109,8 +109,8 @@ class AstElement extends node_1.AstNode {
109
109
  return data;
110
110
  }
111
111
  /** @private */
112
- toString(omit, separator = '') {
113
- return this.childNodes.map(child => child.toString()).join(separator);
112
+ toString(separator = '') {
113
+ return this.childNodes.map(String).join(separator);
114
114
  }
115
115
  /**
116
116
  * @override
@@ -16,6 +16,7 @@ export interface CaretPosition {
16
16
  }
17
17
  /** 类似Node */
18
18
  export declare abstract class AstNode implements AstNodeBase {
19
+ #private;
19
20
  type: TokenTypes | 'text';
20
21
  data?: string | undefined;
21
22
  readonly childNodes: readonly AstNodes[];
@@ -2,6 +2,7 @@ import { AstNode } from './node';
2
2
  import type { LintError } from '../base';
3
3
  /** 文本节点 */
4
4
  export declare class AstText extends AstNode {
5
+ #private;
5
6
  readonly type = "text";
6
7
  readonly name: undefined;
7
8
  readonly data: string;