wikiparser-node 1.11.0 → 1.11.1-b

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 (172) hide show
  1. package/bundle/bundle.min.js +38 -0
  2. package/config/enwiki.json +1 -814
  3. package/config/llwiki.json +1 -35
  4. package/config/moegirl.json +1 -44
  5. package/config/zhwiki.json +1 -466
  6. package/extensions/dist/base.js +64 -0
  7. package/extensions/dist/editor.js +159 -0
  8. package/extensions/dist/highlight.js +56 -0
  9. package/extensions/dist/lint.js +72 -0
  10. package/extensions/editor.css +64 -0
  11. package/extensions/ui.css +144 -0
  12. package/package.json +28 -35
  13. package/config/.schema.json +0 -186
  14. package/dist/addon/table.js +0 -486
  15. package/dist/addon/token.js +0 -304
  16. package/dist/addon/transclude.js +0 -184
  17. package/dist/base.d.ts +0 -81
  18. package/dist/base.js +0 -39
  19. package/dist/index.d.ts +0 -33
  20. package/dist/index.js +0 -235
  21. package/dist/internal.d.ts +0 -46
  22. package/dist/lib/element.d.ts +0 -125
  23. package/dist/lib/element.js +0 -375
  24. package/dist/lib/node.d.ts +0 -173
  25. package/dist/lib/node.js +0 -478
  26. package/dist/lib/range.d.ts +0 -105
  27. package/dist/lib/range.js +0 -406
  28. package/dist/lib/ranges.d.ts +0 -28
  29. package/dist/lib/ranges.js +0 -126
  30. package/dist/lib/rect.d.ts +0 -18
  31. package/dist/lib/rect.js +0 -34
  32. package/dist/lib/text.d.ts +0 -58
  33. package/dist/lib/text.js +0 -400
  34. package/dist/lib/title.d.ts +0 -42
  35. package/dist/lib/title.js +0 -208
  36. package/dist/mixin/attributesParent.d.ts +0 -49
  37. package/dist/mixin/attributesParent.js +0 -79
  38. package/dist/mixin/fixed.d.ts +0 -5
  39. package/dist/mixin/fixed.js +0 -32
  40. package/dist/mixin/flagsParent.d.ts +0 -43
  41. package/dist/mixin/flagsParent.js +0 -64
  42. package/dist/mixin/hidden.d.ts +0 -7
  43. package/dist/mixin/hidden.js +0 -37
  44. package/dist/mixin/magicLinkParent.d.ts +0 -19
  45. package/dist/mixin/magicLinkParent.js +0 -43
  46. package/dist/mixin/singleLine.d.ts +0 -5
  47. package/dist/mixin/singleLine.js +0 -25
  48. package/dist/mixin/sol.d.ts +0 -6
  49. package/dist/mixin/sol.js +0 -45
  50. package/dist/mixin/syntax.d.ts +0 -8
  51. package/dist/mixin/syntax.js +0 -46
  52. package/dist/parser/braces.js +0 -150
  53. package/dist/parser/commentAndExt.js +0 -79
  54. package/dist/parser/converter.js +0 -39
  55. package/dist/parser/externalLinks.js +0 -37
  56. package/dist/parser/hrAndDoubleUnderscore.js +0 -42
  57. package/dist/parser/html.js +0 -38
  58. package/dist/parser/links.js +0 -101
  59. package/dist/parser/list.js +0 -114
  60. package/dist/parser/magicLinks.js +0 -52
  61. package/dist/parser/quotes.js +0 -67
  62. package/dist/parser/redirect.js +0 -26
  63. package/dist/parser/selector.js +0 -394
  64. package/dist/parser/table.js +0 -123
  65. package/dist/src/arg.d.ts +0 -51
  66. package/dist/src/arg.js +0 -214
  67. package/dist/src/atom.d.ts +0 -14
  68. package/dist/src/atom.js +0 -52
  69. package/dist/src/attribute.d.ts +0 -64
  70. package/dist/src/attribute.js +0 -480
  71. package/dist/src/attributes.d.ts +0 -101
  72. package/dist/src/attributes.js +0 -381
  73. package/dist/src/converter.d.ts +0 -28
  74. package/dist/src/converter.js +0 -148
  75. package/dist/src/converterFlags.d.ts +0 -80
  76. package/dist/src/converterFlags.js +0 -239
  77. package/dist/src/converterRule.d.ts +0 -71
  78. package/dist/src/converterRule.js +0 -216
  79. package/dist/src/extLink.d.ts +0 -36
  80. package/dist/src/extLink.js +0 -218
  81. package/dist/src/gallery.d.ts +0 -47
  82. package/dist/src/gallery.js +0 -143
  83. package/dist/src/heading.d.ts +0 -40
  84. package/dist/src/heading.js +0 -192
  85. package/dist/src/hidden.d.ts +0 -9
  86. package/dist/src/hidden.js +0 -80
  87. package/dist/src/html.d.ts +0 -61
  88. package/dist/src/html.js +0 -343
  89. package/dist/src/imageParameter.d.ts +0 -60
  90. package/dist/src/imageParameter.js +0 -260
  91. package/dist/src/imagemap.d.ts +0 -47
  92. package/dist/src/imagemap.js +0 -146
  93. package/dist/src/imagemapLink.d.ts +0 -31
  94. package/dist/src/imagemapLink.js +0 -97
  95. package/dist/src/index.d.ts +0 -136
  96. package/dist/src/index.js +0 -834
  97. package/dist/src/link/base.d.ts +0 -52
  98. package/dist/src/link/base.js +0 -256
  99. package/dist/src/link/category.d.ts +0 -22
  100. package/dist/src/link/category.js +0 -34
  101. package/dist/src/link/file.d.ts +0 -102
  102. package/dist/src/link/file.js +0 -333
  103. package/dist/src/link/galleryImage.d.ts +0 -29
  104. package/dist/src/link/galleryImage.js +0 -132
  105. package/dist/src/link/index.d.ts +0 -39
  106. package/dist/src/link/index.js +0 -98
  107. package/dist/src/link/redirectTarget.d.ts +0 -27
  108. package/dist/src/link/redirectTarget.js +0 -69
  109. package/dist/src/magicLink.d.ts +0 -58
  110. package/dist/src/magicLink.js +0 -256
  111. package/dist/src/nested.d.ts +0 -40
  112. package/dist/src/nested.js +0 -106
  113. package/dist/src/nowiki/base.d.ts +0 -28
  114. package/dist/src/nowiki/base.js +0 -89
  115. package/dist/src/nowiki/comment.d.ts +0 -14
  116. package/dist/src/nowiki/comment.js +0 -121
  117. package/dist/src/nowiki/dd.d.ts +0 -8
  118. package/dist/src/nowiki/dd.js +0 -72
  119. package/dist/src/nowiki/doubleUnderscore.d.ts +0 -15
  120. package/dist/src/nowiki/doubleUnderscore.js +0 -97
  121. package/dist/src/nowiki/hr.d.ts +0 -5
  122. package/dist/src/nowiki/hr.js +0 -70
  123. package/dist/src/nowiki/index.d.ts +0 -14
  124. package/dist/src/nowiki/index.js +0 -28
  125. package/dist/src/nowiki/list.d.ts +0 -5
  126. package/dist/src/nowiki/list.js +0 -65
  127. package/dist/src/nowiki/listBase.d.ts +0 -23
  128. package/dist/src/nowiki/listBase.js +0 -99
  129. package/dist/src/nowiki/noinclude.d.ts +0 -6
  130. package/dist/src/nowiki/noinclude.js +0 -75
  131. package/dist/src/nowiki/quote.d.ts +0 -14
  132. package/dist/src/nowiki/quote.js +0 -140
  133. package/dist/src/onlyinclude.d.ts +0 -13
  134. package/dist/src/onlyinclude.js +0 -58
  135. package/dist/src/paramTag/index.d.ts +0 -28
  136. package/dist/src/paramTag/index.js +0 -78
  137. package/dist/src/paramTag/inputbox.d.ts +0 -8
  138. package/dist/src/paramTag/inputbox.js +0 -22
  139. package/dist/src/parameter.d.ts +0 -60
  140. package/dist/src/parameter.js +0 -264
  141. package/dist/src/pre.d.ts +0 -28
  142. package/dist/src/pre.js +0 -60
  143. package/dist/src/redirect.d.ts +0 -30
  144. package/dist/src/redirect.js +0 -126
  145. package/dist/src/syntax.d.ts +0 -17
  146. package/dist/src/syntax.js +0 -87
  147. package/dist/src/table/base.d.ts +0 -28
  148. package/dist/src/table/base.js +0 -81
  149. package/dist/src/table/index.d.ts +0 -230
  150. package/dist/src/table/index.js +0 -506
  151. package/dist/src/table/td.d.ts +0 -72
  152. package/dist/src/table/td.js +0 -370
  153. package/dist/src/table/tr.d.ts +0 -30
  154. package/dist/src/table/tr.js +0 -59
  155. package/dist/src/table/trBase.d.ts +0 -49
  156. package/dist/src/table/trBase.js +0 -164
  157. package/dist/src/tagPair/ext.d.ts +0 -29
  158. package/dist/src/tagPair/ext.js +0 -220
  159. package/dist/src/tagPair/include.d.ts +0 -33
  160. package/dist/src/tagPair/include.js +0 -130
  161. package/dist/src/tagPair/index.d.ts +0 -23
  162. package/dist/src/tagPair/index.js +0 -128
  163. package/dist/src/transclude.d.ts +0 -159
  164. package/dist/src/transclude.js +0 -587
  165. package/dist/util/constants.js +0 -25
  166. package/dist/util/debug.js +0 -95
  167. package/dist/util/diff.js +0 -83
  168. package/dist/util/html.js +0 -143
  169. package/dist/util/lint.js +0 -32
  170. package/dist/util/string.js +0 -87
  171. package/errors/README +0 -3
  172. package/printed/README +0 -3
package/dist/index.js DELETED
@@ -1,235 +0,0 @@
1
- "use strict";
2
- /* eslint n/exports-style: 0 */
3
- const fs = require("fs");
4
- const path = require("path");
5
- const chalk = require("chalk");
6
- const base_1 = require("./base");
7
- const debug_1 = require("./util/debug");
8
- const constants_1 = require("./util/constants");
9
- const string_1 = require("./util/string");
10
- const diff_1 = require("./util/diff");
11
- /**
12
- * 从根路径require
13
- * @param file 文件名
14
- * @param dir 子路径
15
- */
16
- const rootRequire = (file, dir) => require(path.isAbsolute(file) ? file : path.join('..', file.includes('/') ? '' : dir, file));
17
- /* NOT FOR BROWSER */
18
- const promises = [Promise.resolve()];
19
- let viewOnly = false;
20
- /* NOT FOR BROWSER END */
21
- const Parser = {
22
- config: 'default',
23
- i18n: undefined,
24
- rules: base_1.rules,
25
- /* NOT FOR BROWSER */
26
- /** @implements */
27
- get viewOnly() {
28
- return viewOnly;
29
- },
30
- set viewOnly(value) {
31
- if (viewOnly && !value) {
32
- debug_1.Shadow.rev++;
33
- }
34
- viewOnly = value;
35
- },
36
- conversionTable: new Map(),
37
- redirects: new Map(),
38
- templates: new Map(),
39
- warning: true,
40
- debugging: false,
41
- /* NOT FOR BROWSER END */
42
- /** @implements */
43
- getConfig() {
44
- if (typeof this.config === 'string') {
45
- this.config = rootRequire(this.config, 'config');
46
- /* NOT FOR BROWSER */
47
- const { config: { conversionTable, redirects } } = this;
48
- if (conversionTable) {
49
- this.conversionTable = new Map(conversionTable);
50
- }
51
- if (redirects) {
52
- this.redirects = new Map(redirects);
53
- }
54
- /* NOT FOR BROWSER END */
55
- return this.getConfig();
56
- }
57
- return {
58
- ...this.config,
59
- excludes: [],
60
- };
61
- },
62
- /** @implements */
63
- msg(msg, arg = '') {
64
- if (typeof this.i18n === 'string') {
65
- this.i18n = rootRequire(this.i18n, 'i18n');
66
- return this.msg(msg, arg);
67
- }
68
- return msg && (this.i18n?.[msg] ?? msg).replace('$1', this.msg(arg));
69
- },
70
- /** @implements */
71
- normalizeTitle(title, defaultNs = 0, include, config = Parser.getConfig(), halfParsed, decode = false, selfLink = false) {
72
- const { Title } = require('./lib/title');
73
- let titleObj;
74
- if (halfParsed) {
75
- titleObj = new Title(title, defaultNs, config, decode, selfLink);
76
- }
77
- else {
78
- const { Token } = require('./src/index');
79
- titleObj = debug_1.Shadow.run(() => {
80
- const root = new Token(title, config);
81
- root.type = 'root';
82
- root.parseOnce(0, include).parseOnce();
83
- const t = new Title(root.toString(), defaultNs, config, decode, selfLink);
84
- for (const key of ['main', 'fragment']) {
85
- const str = t[key];
86
- if (str?.includes('\0')) {
87
- t[key] = root.buildFromStr(str, constants_1.BuildMethod.Text);
88
- }
89
- }
90
- return t;
91
- });
92
- }
93
- /* NOT FOR BROWSER */
94
- titleObj.conversionTable = this.conversionTable;
95
- titleObj.redirects = this.redirects;
96
- /* NOT FOR BROWSER END */
97
- return titleObj;
98
- },
99
- /** @implements */
100
- parse(wikitext, include, maxStage = constants_1.MAX_STAGE, config = Parser.getConfig()) {
101
- wikitext = (0, string_1.tidy)(wikitext);
102
- const { Token } = require('./src/index');
103
- const root = debug_1.Shadow.run(() => {
104
- const token = new Token(wikitext, config);
105
- token.type = 'root';
106
- try {
107
- return token.parse(maxStage, include);
108
- }
109
- catch (e) {
110
- if (e instanceof Error) {
111
- const file = path.join(__dirname, '..', 'errors', new Date().toISOString()), stage = token.getAttribute('stage');
112
- fs.writeFileSync(file, stage === constants_1.MAX_STAGE ? wikitext : token.toString());
113
- fs.writeFileSync(`${file}.err`, e.stack);
114
- fs.writeFileSync(`${file}.json`, JSON.stringify({ stage, include, config }, null, '\t'));
115
- }
116
- throw e;
117
- }
118
- });
119
- /* NOT FOR BROWSER */
120
- if (this.debugging) {
121
- let restored = root.toString(), process = 'parsing';
122
- if (restored === wikitext) {
123
- const entities = { lt: '<', gt: '>', amp: '&' };
124
- restored = root.print().replace(/<[^<]+?>|&([lg]t|amp);/gu, (_, s) => s ? entities[s] : '');
125
- process = 'printing';
126
- }
127
- if (restored !== wikitext) {
128
- const { 0: cur, length } = promises;
129
- promises.unshift((async () => {
130
- await cur;
131
- this.error(`Original wikitext is altered when ${process}!`);
132
- return (0, diff_1.diff)(wikitext, restored, length);
133
- })());
134
- }
135
- }
136
- /* NOT FOR BROWSER END */
137
- return root;
138
- },
139
- /* NOT FOR BROWSER */
140
- /** @implements */
141
- warn(msg, ...args) {
142
- if (this.warning) {
143
- console.warn(chalk.yellow(msg), ...args);
144
- }
145
- },
146
- /** @implements */
147
- debug(msg, ...args) {
148
- if (this.debugging) {
149
- console.debug(chalk.blue(msg), ...args);
150
- }
151
- },
152
- error: diff_1.error,
153
- info: diff_1.info,
154
- /** @implements */
155
- log(f) {
156
- if (typeof f === 'function') {
157
- console.log(String(f));
158
- }
159
- },
160
- /** @implements */
161
- async clearCache() {
162
- const promise = (0, diff_1.cmd)('npm', ['run', 'build:core']), entries = [
163
- ...Object.entries(constants_1.classes),
164
- ...Object.entries(constants_1.mixins),
165
- ...Object.entries(constants_1.parsers),
166
- ];
167
- for (const [, filePath] of entries) {
168
- try {
169
- delete require.cache[require.resolve(filePath)];
170
- }
171
- catch { }
172
- }
173
- await promise;
174
- for (const [name, filePath] of entries) {
175
- if (name in global) {
176
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
177
- Object.assign(global, { [name]: require(filePath)[name] });
178
- }
179
- }
180
- this.info('已重新加载Parser');
181
- },
182
- /** @implements */
183
- isInterwiki(title, { interwiki } = Parser.getConfig()) {
184
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
185
- /^(zh|en)\s*:/diu;
186
- return interwiki.length > 0
187
- ? new RegExp(String.raw `^(${interwiki.join('|')})\s*:`, 'diu')
188
- .exec(title.replace(/_/gu, ' ').replace(/^\s*:?\s*/u, ''))
189
- : null;
190
- },
191
- /** @implements */
192
- reparse(date = '') {
193
- const main = fs.readdirSync(path.join(__dirname, '..', 'errors'))
194
- .find(name => name.startsWith(date) && name.endsWith('Z'));
195
- if (!main) {
196
- throw new RangeError(`找不到对应时间戳的错误记录:${date}`);
197
- }
198
- const file = path.join(__dirname, '..', 'errors', main), wikitext = fs.readFileSync(file, 'utf8');
199
- const { stage, include, config } = require(`${file}.json`), { Token } = require('./src/index');
200
- debug_1.Shadow.run(() => {
201
- const halfParsed = stage < constants_1.MAX_STAGE, token = new Token(halfParsed ? wikitext : (0, string_1.tidy)(wikitext), config);
202
- token.type = 'root';
203
- if (halfParsed) {
204
- token.setAttribute('stage', stage);
205
- token.parseOnce(stage, include);
206
- }
207
- else {
208
- token.parse(undefined, include);
209
- }
210
- fs.unlinkSync(file);
211
- fs.unlinkSync(`${file}.err`);
212
- fs.unlinkSync(`${file}.json`);
213
- });
214
- },
215
- };
216
- const def = {
217
- default: { value: Parser },
218
- }, enumerable = new Set([
219
- 'normalizeTitle',
220
- 'parse',
221
- /* NOT FOR BROWSER */
222
- 'conversionTable',
223
- 'redirects',
224
- 'warning',
225
- 'debugging',
226
- 'isInterwiki',
227
- ]);
228
- for (const key in Parser) {
229
- if (!enumerable.has(key)) {
230
- def[key] = { enumerable: false };
231
- }
232
- }
233
- Object.defineProperties(Parser, def);
234
- exports.default = Parser;
235
- module.exports = Parser;
@@ -1,46 +0,0 @@
1
- export type { AstNodes, } from './lib/node';
2
- export type * from './lib/text';
3
- export type { Token } from './src/index';
4
- export type * from './src/redirect';
5
- export type * from './src/link/redirectTarget';
6
- export type * from './src/onlyinclude';
7
- export type * from './src/nowiki/noinclude';
8
- export type * from './src/tagPair/include';
9
- export type * from './src/nowiki/comment';
10
- export type * from './src/atom';
11
- export type { AttributeToken } from './src/attribute';
12
- export type * from './src/attributes';
13
- export type * from './src/tagPair/ext';
14
- export type * from './src/hidden';
15
- export type * from './src/arg';
16
- export type * from './src/syntax';
17
- export type * from './src/parameter';
18
- export type * from './src/transclude';
19
- export type * from './src/heading';
20
- export type * from './src/html';
21
- export type { TdToken } from './src/table/td';
22
- export type * from './src/table/tr';
23
- export type { TableToken } from './src/table/index';
24
- export type * from './src/nowiki/hr';
25
- export type * from './src/nowiki/doubleUnderscore';
26
- export type * from './src/link/index';
27
- export type * from './src/link/category';
28
- export type { ImageParameterToken } from './src/imageParameter';
29
- export type * from './src/link/file';
30
- export type * from './src/link/galleryImage';
31
- export type * from './src/nowiki/quote';
32
- export type * from './src/magicLink';
33
- export type * from './src/extLink';
34
- export type * from './src/nowiki/dd';
35
- export type * from './src/nowiki/list';
36
- export type * from './src/converterFlags';
37
- export type * from './src/converterRule';
38
- export type * from './src/converter';
39
- export type * from './src/nowiki/index';
40
- export type * from './src/pre';
41
- export type * from './src/paramTag/index';
42
- export type * from './src/paramTag/inputbox';
43
- export type * from './src/nested';
44
- export type * from './src/gallery';
45
- export type * from './src/imagemapLink';
46
- export type * from './src/imagemap';
@@ -1,125 +0,0 @@
1
- import { AstNode } from './node';
2
- import type { LintError, AST } from '../base';
3
- import type { AstNodes, AstText, Token } from '../internal';
4
- /** 类似HTMLElement */
5
- export declare abstract class AstElement extends AstNode {
6
- #private;
7
- readonly name?: string;
8
- readonly data: undefined;
9
- /** 子节点总数 */
10
- get length(): number;
11
- set length(n: number);
12
- /** 全部非文本子节点 */
13
- get children(): Token[];
14
- /** 首位非文本子节点 */
15
- get firstElementChild(): Token | undefined;
16
- /** 末位非文本子节点 */
17
- get lastElementChild(): Token | undefined;
18
- /** 非文本子节点总数 */
19
- get childElementCount(): number;
20
- /** 父节点 */
21
- get parentElement(): Token | undefined;
22
- /** AstElement.prototype.text()的getter写法 */
23
- get outerText(): string;
24
- /** 不可见 */
25
- get hidden(): boolean;
26
- /** 内部高度 */
27
- get clientHeight(): number | undefined;
28
- /** 内部宽度 */
29
- get clientWidth(): number | undefined;
30
- constructor();
31
- /** 合并相邻的文本子节点 */
32
- normalize(): void;
33
- /**
34
- * 移除子节点
35
- * @param i 移除位置
36
- */
37
- removeAt(i: number): AstNodes;
38
- /**
39
- * 插入子节点
40
- * @param node 待插入的子节点
41
- * @param i 插入位置
42
- * @throws `RangeError` 不能插入祖先或子节点
43
- */
44
- insertAt<T extends AstNodes>(node: T, i?: number): T;
45
- /**
46
- * 最近的祖先节点
47
- * @param selector 选择器
48
- */
49
- closest<T = Token>(selector: string): T | undefined;
50
- /**
51
- * 符合选择器的第一个后代节点
52
- * @param selector 选择器
53
- */
54
- querySelector<T = Token>(selector: string): T | undefined;
55
- /**
56
- * 符合选择器的所有后代节点
57
- * @param selector 选择器
58
- */
59
- querySelectorAll<T = Token>(selector: string): T[];
60
- /**
61
- * 在末尾批量插入子节点
62
- * @param elements 插入节点
63
- */
64
- append(...elements: (AstNodes | string)[]): void;
65
- /**
66
- * 批量替换子节点
67
- * @param elements 新的子节点
68
- */
69
- replaceChildren(...elements: (AstNodes | string)[]): void;
70
- /**
71
- * 修改文本子节点
72
- * @param str 新文本
73
- * @param i 子节点位置
74
- * @throws `RangeError` 对应位置的子节点不是文本节点
75
- */
76
- setText(str: string, i?: number): string;
77
- /**
78
- * 保存为JSON
79
- * @param file 文件名
80
- * @param start
81
- */
82
- json(file?: string, start?: number): AST;
83
- /**
84
- * 检查是否符合选择器
85
- * @param selector 选择器
86
- */
87
- matches<T>(selector?: string): this is T;
88
- /**
89
- * 类型选择器
90
- * @param types
91
- */
92
- getElementByTypes<T = Token>(types: string): T | undefined;
93
- /**
94
- * id选择器
95
- * @param id id名
96
- */
97
- getElementById<T = Token>(id: string): T | undefined;
98
- /**
99
- * 类选择器
100
- * @param className 类名之一
101
- */
102
- getElementsByClassName<T = Token>(className: string): T[];
103
- /**
104
- * 标签名选择器
105
- * @param tag 标签名
106
- */
107
- getElementsByTagName<T = Token>(tag: string): T[];
108
- /**
109
- * 在开头批量插入子节点
110
- * @param elements 插入节点
111
- */
112
- prepend(...elements: (AstNodes | string)[]): void;
113
- /**
114
- * 移除子节点
115
- * @param node 子节点
116
- */
117
- removeChild<T extends AstNodes>(node: T): T;
118
- /**
119
- * 在指定位置前插入子节点
120
- * @param child 插入节点
121
- * @param reference 指定位置处的子节点
122
- */
123
- insertBefore(child: string, reference?: AstNodes): AstText;
124
- insertBefore<T extends AstNodes>(child: T, reference?: AstNodes): T;
125
- }