wikiparser-node 0.6.1 → 0.6.5-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 (82) hide show
  1. package/bundle/bundle.min.js +40 -0
  2. package/package.json +9 -11
  3. package/README.md +0 -39
  4. package/config/default.json +0 -832
  5. package/config/llwiki.json +0 -630
  6. package/config/moegirl.json +0 -727
  7. package/config/zhwiki.json +0 -1269
  8. package/index.js +0 -277
  9. package/lib/element.js +0 -612
  10. package/lib/node.js +0 -771
  11. package/lib/ranges.js +0 -130
  12. package/lib/text.js +0 -175
  13. package/lib/title.js +0 -70
  14. package/mixin/attributeParent.js +0 -113
  15. package/mixin/fixedToken.js +0 -40
  16. package/mixin/hidden.js +0 -21
  17. package/mixin/sol.js +0 -68
  18. package/parser/brackets.js +0 -118
  19. package/parser/commentAndExt.js +0 -63
  20. package/parser/converter.js +0 -45
  21. package/parser/externalLinks.js +0 -31
  22. package/parser/hrAndDoubleUnderscore.js +0 -36
  23. package/parser/html.js +0 -42
  24. package/parser/links.js +0 -97
  25. package/parser/list.js +0 -59
  26. package/parser/magicLinks.js +0 -41
  27. package/parser/quotes.js +0 -64
  28. package/parser/selector.js +0 -175
  29. package/parser/table.js +0 -114
  30. package/src/arg.js +0 -198
  31. package/src/atom/hidden.js +0 -13
  32. package/src/atom/index.js +0 -43
  33. package/src/attribute.js +0 -460
  34. package/src/charinsert.js +0 -91
  35. package/src/converter.js +0 -176
  36. package/src/converterFlags.js +0 -279
  37. package/src/converterRule.js +0 -259
  38. package/src/extLink.js +0 -175
  39. package/src/gallery.js +0 -146
  40. package/src/hasNowiki/index.js +0 -42
  41. package/src/hasNowiki/pre.js +0 -40
  42. package/src/heading.js +0 -123
  43. package/src/html.js +0 -230
  44. package/src/imageParameter.js +0 -276
  45. package/src/imagemap.js +0 -205
  46. package/src/imagemapLink.js +0 -43
  47. package/src/index.js +0 -842
  48. package/src/link/category.js +0 -49
  49. package/src/link/file.js +0 -321
  50. package/src/link/galleryImage.js +0 -125
  51. package/src/link/index.js +0 -347
  52. package/src/magicLink.js +0 -135
  53. package/src/nested/choose.js +0 -24
  54. package/src/nested/combobox.js +0 -23
  55. package/src/nested/index.js +0 -88
  56. package/src/nested/references.js +0 -23
  57. package/src/nowiki/comment.js +0 -71
  58. package/src/nowiki/dd.js +0 -59
  59. package/src/nowiki/doubleUnderscore.js +0 -56
  60. package/src/nowiki/hr.js +0 -41
  61. package/src/nowiki/index.js +0 -56
  62. package/src/nowiki/list.js +0 -16
  63. package/src/nowiki/noinclude.js +0 -28
  64. package/src/nowiki/quote.js +0 -63
  65. package/src/onlyinclude.js +0 -61
  66. package/src/paramTag/index.js +0 -83
  67. package/src/paramTag/inputbox.js +0 -42
  68. package/src/parameter.js +0 -214
  69. package/src/syntax.js +0 -91
  70. package/src/table/index.js +0 -981
  71. package/src/table/td.js +0 -308
  72. package/src/table/tr.js +0 -299
  73. package/src/tagPair/ext.js +0 -122
  74. package/src/tagPair/include.js +0 -60
  75. package/src/tagPair/index.js +0 -126
  76. package/src/transclude.js +0 -751
  77. package/tool/index.js +0 -1199
  78. package/util/base.js +0 -17
  79. package/util/debug.js +0 -73
  80. package/util/diff.js +0 -76
  81. package/util/lint.js +0 -40
  82. package/util/string.js +0 -105
package/src/table/td.js DELETED
@@ -1,308 +0,0 @@
1
- 'use strict';
2
-
3
- const fixedToken = require('../../mixin/fixedToken'),
4
- {typeError} = require('../../util/debug'),
5
- {isPlainObject} = require('../../util/base'),
6
- Parser = require('../..'),
7
- Token = require('..'),
8
- TrToken = require('./tr');
9
-
10
- const aliases = {td: '\n|', th: '\n!', caption: '\n|+'},
11
- openingPattern = /^(?:\n[\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u;
12
-
13
- /**
14
- * `<td>`、`<th>`和`<caption>`
15
- * @classdesc `{childNodes: [SyntaxToken, AttributeToken, Token]}`
16
- */
17
- class TdToken extends fixedToken(TrToken) {
18
- type = 'td';
19
- #innerSyntax = '';
20
-
21
- /**
22
- * 单元格类型
23
- * @complexity `n`
24
- */
25
- get subtype() {
26
- return this.getSyntax().subtype;
27
- }
28
-
29
- set subtype(subtype) {
30
- this.setSyntax(subtype);
31
- }
32
-
33
- /** rowspan */
34
- get rowspan() {
35
- return this.getAttr('rowspan');
36
- }
37
-
38
- set rowspan(rowspan) {
39
- this.setAttr('rowspan', rowspan);
40
- }
41
-
42
- /** colspan */
43
- get colspan() {
44
- return this.getAttr('colspan');
45
- }
46
-
47
- set colspan(colspan) {
48
- this.setAttr('colspan', colspan);
49
- }
50
-
51
- /** 内部wikitext */
52
- get innerText() {
53
- return this.lastChild.text();
54
- }
55
-
56
- /** 是否位于行首 */
57
- isIndependent() {
58
- return this.firstChild.text()[0] === '\n';
59
- }
60
-
61
- /**
62
- * 获取单元格语法信息
63
- * @returns {{subtype: 'td'|'th'|'caption', escape: boolean, correction: boolean}}
64
- * @complexity `n`
65
- */
66
- getSyntax() {
67
- const syntax = this.firstChild.text(),
68
- esc = syntax.includes('{{'),
69
- char = syntax.at(-1);
70
- let subtype = 'td';
71
- if (char === '!') {
72
- subtype = 'th';
73
- } else if (char === '+') {
74
- subtype = 'caption';
75
- }
76
- if (this.isIndependent()) {
77
- return {subtype, escape: esc, correction: false};
78
- }
79
- const {previousSibling} = this;
80
- if (previousSibling?.type !== 'td') {
81
- return {subtype, escape: esc, correction: true};
82
- }
83
- const result = previousSibling.getSyntax();
84
- result.escape ||= esc;
85
- result.correction = previousSibling.lastChild
86
- .toString('comment, ext, include, noinclude, arg, template, magic-word')
87
- .includes('\n');
88
- if (subtype === 'th' && result.subtype !== 'th') {
89
- result.subtype = 'th';
90
- result.correction = true;
91
- }
92
- return result;
93
- }
94
-
95
- /**
96
- * @param {string} syntax 单元格语法
97
- * @param {string} inner 内部wikitext
98
- * @param {accum} accum
99
- */
100
- constructor(syntax, inner, config = Parser.getConfig(), accum = []) {
101
- let innerSyntax = inner?.match(/\||\0\d+!\x7F/u),
102
- attr = innerSyntax ? inner.slice(0, innerSyntax.index) : '';
103
- if (/\[\[|-\{/u.test(attr)) {
104
- innerSyntax = null;
105
- attr = '';
106
- }
107
- super(syntax, attr, config, accum, openingPattern);
108
- if (innerSyntax) {
109
- [this.#innerSyntax] = innerSyntax;
110
- }
111
- // eslint-disable-next-line no-unsafe-optional-chaining
112
- const innerToken = new Token(inner?.slice(innerSyntax?.index + this.#innerSyntax.length), config, true, accum);
113
- innerToken.type = 'td-inner';
114
- this.insertAt(innerToken.setAttribute('stage', 4));
115
- this.setAttribute('acceptable', {SyntaxToken: 0, AttributeToken: 1, Token: 2})
116
- .seal(['getRowCount', 'getNthCol', 'insertTableCell'], true);
117
- }
118
-
119
- /** @override */
120
- afterBuild() {
121
- if (this.#innerSyntax.includes('\0')) {
122
- this.#innerSyntax = this.getAttribute('buildFromStr')(this.#innerSyntax).map(String).join('');
123
- }
124
- return this;
125
- }
126
-
127
- /**
128
- * @override
129
- * @param {string} selector
130
- * @returns {string}
131
- * @complexity `n`
132
- */
133
- toString(selector) {
134
- this.#correct();
135
- const {childNodes: [syntax, attr, inner]} = this;
136
- return selector && this.matches(selector)
137
- ? ''
138
- : `${syntax.toString(selector)}${attr.toString(selector)}${this.#innerSyntax}${inner.toString(selector)}`;
139
- }
140
-
141
- /**
142
- * @override
143
- * @param {number} i 子节点位置
144
- */
145
- getGaps(i = 0) {
146
- i = i < 0 ? i + this.childNodes.length : i;
147
- if (i === 1) {
148
- this.#correct();
149
- return this.#innerSyntax.length;
150
- }
151
- return 0;
152
- }
153
-
154
- /** @override */
155
- print() {
156
- const {childNodes: [syntax, attr, inner]} = this;
157
- return `<span class="wpb-td">${syntax.print()}${attr.print()}${this.#innerSyntax}${inner.print()}</span>`;
158
- }
159
-
160
- /** @override */
161
- cloneNode() {
162
- const /** @type {TdToken} */ token = super.cloneNode();
163
- token.setAttribute('innerSyntax', this.#innerSyntax);
164
- return token;
165
- }
166
-
167
- /**
168
- * 创建新的单元格
169
- * @param {string|Token} inner 内部wikitext
170
- * @param {'td'|'th'|'caption'} subtype 单元格类型
171
- * @param {Record<string, string>} attr 单元格属性
172
- * @param {boolean} include 是否嵌入
173
- * @throws `RangeError` 非法的单元格类型
174
- */
175
- static create(inner, subtype = 'td', attr = {}, include = false, config = Parser.getConfig()) {
176
- if (typeof inner !== 'string' && inner?.constructor !== Token || !isPlainObject(attr)) {
177
- typeError(this, 'create', 'String', 'Token', 'Object');
178
- } else if (subtype !== 'td' && subtype !== 'th' && subtype !== 'caption') {
179
- throw new RangeError('单元格的子类型只能为 "td"、"th" 或 "caption"!');
180
- } else if (typeof inner === 'string') {
181
- inner = Parser.parse(inner, include, undefined, config);
182
- }
183
- const token = Parser.run(() => new TdToken('\n|', undefined, config));
184
- token.setSyntax(subtype);
185
- token.lastChild.safeReplaceWith(inner);
186
- for (const [k, v] of Object.entries(attr)) {
187
- token.setAttr(k, v);
188
- }
189
- return token;
190
- }
191
-
192
- /**
193
- * @override
194
- * @template {string} T
195
- * @param {T} key 属性键
196
- * @returns {TokenAttribute<T>}
197
- */
198
- getAttribute(key) {
199
- return key === 'innerSyntax' ? this.#innerSyntax : super.getAttribute(key);
200
- }
201
-
202
- /**
203
- * @override
204
- * @template {string} T
205
- * @param {T} key 属性键
206
- * @param {TokenAttribute<T>} value 属性值
207
- * @returns {this}
208
- */
209
- setAttribute(key, value) {
210
- if (key === 'innerSyntax') {
211
- this.#innerSyntax = String(value);
212
- return this;
213
- }
214
- return super.setAttribute(key, value);
215
- }
216
-
217
- /**
218
- * @override
219
- * @param {string} syntax 表格语法
220
- * @param {boolean} esc 是否需要转义
221
- */
222
- setSyntax(syntax, esc) {
223
- super.setSyntax(aliases[syntax] ?? syntax, esc);
224
- }
225
-
226
- /**
227
- * 修复\<td\>语法
228
- * @complexity `n`
229
- */
230
- #correct() {
231
- if (String(this.childNodes[1])) {
232
- this.#innerSyntax ||= '|';
233
- }
234
- const {subtype, escape, correction} = this.getSyntax();
235
- if (correction) {
236
- this.setSyntax(subtype, escape);
237
- }
238
- }
239
-
240
- /**
241
- * 改为独占一行
242
- * @complexity `n`
243
- */
244
- independence() {
245
- if (!this.isIndependent()) {
246
- const {subtype, escape} = this.getSyntax();
247
- this.setSyntax(subtype, escape);
248
- }
249
- }
250
-
251
- /**
252
- * @override
253
- * @returns {string}
254
- * @complexity `n`
255
- */
256
- text() {
257
- this.#correct();
258
- const {childNodes: [syntax, attr, inner]} = this;
259
- return `${syntax.text()}${attr.text()}${this.#innerSyntax}${inner.text()}`;
260
- }
261
-
262
- /**
263
- * 获取单元格属性
264
- * @template {string} T
265
- * @param {T} key 属性键
266
- * @returns {T extends 'rowspan'|'colspan' ? number : Record<string, string|true>}
267
- */
268
- getAttr(key) {
269
- const /** @type {string|true} */ value = super.getAttr(key);
270
- key = key?.toLowerCase()?.trim();
271
- return key === 'rowspan' || key === 'colspan' ? Number(value) || 1 : value;
272
- }
273
-
274
- /**
275
- * 设置单元格属性
276
- * @template {string} T
277
- * @param {T} key 属性键
278
- * @param {T extends 'rowspan'|'colspan' ? number : string|boolean} value 属性值
279
- */
280
- setAttr(key, value) {
281
- if (typeof key !== 'string') {
282
- this.typeError('setAttr', 'String');
283
- }
284
- key = key.toLowerCase().trim();
285
- if (typeof value === 'number' && (key === 'rowspan' || key === 'colspan')) {
286
- value = value === 1 ? false : String(value);
287
- }
288
- const /** @type {boolean} */ result = super.setAttr(key, value);
289
- if (!String(this.childNodes[1])) {
290
- this.#innerSyntax = '';
291
- }
292
- return result;
293
- }
294
-
295
- /** @override */
296
- escape() {
297
- super.escape();
298
- if (String(this.childNodes[1])) {
299
- this.#innerSyntax ||= '{{!}}';
300
- }
301
- if (this.#innerSyntax === '|') {
302
- this.#innerSyntax = '{{!}}';
303
- }
304
- }
305
- }
306
-
307
- Parser.classes.TdToken = __filename;
308
- module.exports = TdToken;
package/src/table/tr.js DELETED
@@ -1,299 +0,0 @@
1
- 'use strict';
2
-
3
- const {generateForChild} = require('../../util/lint'),
4
- attributeParent = require('../../mixin/attributeParent'),
5
- Parser = require('../..'),
6
- AstText = require('../../lib/text'),
7
- Token = require('..'),
8
- SyntaxToken = require('../syntax');
9
-
10
- const openingPattern = /^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u;
11
-
12
- /**
13
- * 转义表格语法
14
- * @param {SyntaxToken} syntax 表格语法节点
15
- */
16
- const escapeTable = syntax => {
17
- const templates = {'{|': '(!', '|}': '!)', '||': '!!', '|': '!'},
18
- wikitext = syntax.childNodes.map(
19
- child => child.type === 'text'
20
- ? String(child).replaceAll(/\{\||\|\}|\|{2}|\|/gu, p => `{{${templates[p]}}}`)
21
- : String(child),
22
- ).join(''),
23
- token = Parser.parse(wikitext, syntax.getAttribute('include'), 2, syntax.getAttribute('config'));
24
- syntax.replaceChildren(...token.childNodes);
25
- };
26
-
27
- /**
28
- * 表格行,含开头的换行,不含结尾的换行
29
- * @classdesc `{childNodes: [SyntaxToken, AttributeToken, ?Token, ...TdToken]}`
30
- */
31
- class TrToken extends attributeParent(Token, 1) {
32
- type = 'tr';
33
-
34
- /**
35
- * @param {string} syntax 表格语法
36
- * @param {string} attr 表格属性
37
- * @param {accum} accum
38
- * @param {RegExp} pattern 表格语法正则
39
- */
40
- constructor(syntax, attr = '', config = Parser.getConfig(), accum = [], pattern = openingPattern) {
41
- super(undefined, config, true, accum, {Token: 2, SyntaxToken: 0, AttributeToken: 1, TdToken: '2:'});
42
- const AttributeToken = require('../attribute');
43
- this.append(
44
- new SyntaxToken(syntax, pattern, 'table-syntax', config, accum, {
45
- 'Stage-1': ':', '!ExtToken': '', TranscludeToken: ':',
46
- }),
47
- new AttributeToken(attr, 'table-attr', 'tr', config, accum),
48
- );
49
- this.getAttribute('protectChildren')(0, 1);
50
- }
51
-
52
- /**
53
- * @override
54
- * @param {number} start 起始位置
55
- */
56
- lint(start = 0) {
57
- const errors = super.lint(start),
58
- inter = this.childNodes.find(({type}) => type === 'table-inter'),
59
- str = String(inter).trim();
60
- if (inter && str && !/^<!--.*-->$/su.test(str)) {
61
- const error = generateForChild(inter, this.getRootNode().posFromIndex(start), '将被移出表格的内容');
62
- error.startLine++;
63
- error.startCol = 0;
64
- errors.push(error);
65
- }
66
- return errors;
67
- }
68
-
69
- /**
70
- * @override
71
- * @this {TrToken & {constructor: typeof TrToken}}
72
- */
73
- cloneNode() {
74
- const [syntax, attr, inner, ...cloned] = this.cloneChildNodes();
75
- return Parser.run(() => {
76
- const token = new this.constructor(undefined, undefined, this.getAttribute('config'));
77
- token.firstChild.safeReplaceWith(syntax);
78
- token.childNodes[1].safeReplaceWith(attr);
79
- if (token.type === 'td') { // TdToken
80
- token.childNodes[2].safeReplaceWith(inner);
81
- } else if (inner !== undefined) {
82
- token.insertAt(inner);
83
- }
84
- token.append(...cloned);
85
- return token;
86
- });
87
- }
88
-
89
- /** 修复简单的表格语法错误 */
90
- #correct() {
91
- const {childNodes: [,, child]} = this;
92
- if (child?.constructor === Token) {
93
- const /** @type {{firstChild: AstText}} */ {firstChild} = child;
94
- if (firstChild.type !== 'text') {
95
- child.prepend('\n');
96
- } else if (firstChild.data[0] !== '\n') {
97
- firstChild.insertData(0, '\n');
98
- }
99
- }
100
- }
101
-
102
- /**
103
- * @override
104
- * @param {string} selector
105
- */
106
- toString(selector) {
107
- this.#correct();
108
- return super.toString(selector);
109
- }
110
-
111
- /** @override */
112
- text() {
113
- this.#correct();
114
- const str = super.text();
115
- return this.type === 'tr' && !str.trim().includes('\n') ? '' : str;
116
- }
117
-
118
- /**
119
- * 转义表格语法
120
- * @complexity `n`
121
- */
122
- escape() {
123
- for (const child of this.childNodes) {
124
- if (child instanceof SyntaxToken) {
125
- escapeTable(child);
126
- } else if (child instanceof TrToken) {
127
- child.escape();
128
- }
129
- }
130
- }
131
-
132
- /**
133
- * 设置表格语法
134
- * @param {string} syntax 表格语法
135
- * @param {boolean} esc 是否需要转义
136
- */
137
- setSyntax(syntax, esc) {
138
- const {firstChild} = this;
139
- firstChild.replaceChildren(syntax);
140
- if (esc) {
141
- escapeTable(firstChild);
142
- }
143
- }
144
-
145
- /**
146
- * @override
147
- * @param {number} i 移除位置
148
- * @complexity `n`
149
- */
150
- removeAt(i) {
151
- const TdToken = require('./td');
152
- const child = this.childNodes.at(i);
153
- if (child instanceof TdToken && child.isIndependent()) {
154
- const {nextSibling} = child;
155
- if (nextSibling?.type === 'td') {
156
- nextSibling.independence();
157
- }
158
- }
159
- return super.removeAt(i);
160
- }
161
-
162
- /**
163
- * @override
164
- * @template {AstText|Token} T
165
- * @param {T} token 待插入的子节点
166
- * @param {number} i 插入位置
167
- * @returns {T}
168
- * @complexity `n`
169
- */
170
- insertAt(token, i = this.childNodes.length) {
171
- if (!Parser.running && !(token instanceof TrToken)) {
172
- this.typeError('insertAt', 'TrToken');
173
- }
174
- const TdToken = require('./td');
175
- const child = this.childNodes.at(i);
176
- if (token instanceof TdToken && token.isIndependent() && child instanceof TdToken) {
177
- child.independence();
178
- }
179
- return super.insertAt(token, i);
180
- }
181
-
182
- /**
183
- * 获取行数
184
- * @returns {0|1}
185
- * @complexity `n`
186
- */
187
- getRowCount() {
188
- const TdToken = require('./td');
189
- return Number(this.childNodes.some(
190
- child => child instanceof TdToken && child.isIndependent() && child.firstChild.text().at(-1) !== '+',
191
- ));
192
- }
193
-
194
- /**
195
- * 获取相邻行
196
- * @param {(childNodes: Token[], index: number) => Token[]} subset 筛选兄弟节点的方法
197
- * @complexity `n`
198
- */
199
- #getSiblingRow(subset) {
200
- const {parentNode} = this;
201
- if (!parentNode) {
202
- return undefined;
203
- }
204
- const {childNodes} = parentNode,
205
- index = childNodes.indexOf(this);
206
- for (const child of subset(childNodes, index)) {
207
- if (child instanceof TrToken && child.getRowCount()) {
208
- return child;
209
- }
210
- }
211
- return undefined;
212
- }
213
-
214
- /**
215
- * 获取下一行
216
- * @complexity `n`
217
- */
218
- getNextRow() {
219
- return this.#getSiblingRow((childNodes, index) => childNodes.slice(index + 1));
220
- }
221
-
222
- /**
223
- * 获取前一行
224
- * @complexity `n`
225
- */
226
- getPreviousRow() {
227
- return this.#getSiblingRow((childNodes, index) => childNodes.slice(0, index).reverse());
228
- }
229
-
230
- /**
231
- * 获取列数
232
- * @complexity `n`
233
- */
234
- getColCount() {
235
- const TdToken = require('./td');
236
- let count = 0,
237
- last = 0;
238
- for (const child of this.childNodes) {
239
- if (child instanceof TdToken) {
240
- last = child.isIndependent() ? Number(child.subtype !== 'caption') : last;
241
- count += last;
242
- }
243
- }
244
- return count;
245
- }
246
-
247
- /**
248
- * 获取第n列
249
- * @param {number} n 列号
250
- * @param {boolean} insert 是否用于判断插入新列的位置
251
- * @returns {TdToken}
252
- * @complexity `n`
253
- * @throws `RangeError` 不存在对应单元格
254
- */
255
- getNthCol(n, insert) {
256
- if (!Number.isInteger(n)) {
257
- this.typeError('getNthCol', 'Number');
258
- }
259
- const nCols = this.getColCount();
260
- n = n < 0 ? n + nCols : n;
261
- if (n < 0 || n > nCols || n === nCols && !insert) {
262
- throw new RangeError(`不存在第 ${n} 个单元格!`);
263
- }
264
- const TdToken = require('./td');
265
- let last = 0;
266
- for (const child of this.childNodes.slice(2)) {
267
- if (child instanceof TdToken) {
268
- if (child.isIndependent()) {
269
- last = Number(child.subtype !== 'caption');
270
- }
271
- n -= last;
272
- if (n < 0) {
273
- return child;
274
- }
275
- } else if (child.type === 'tr' || child.type === 'table-syntax') {
276
- return child;
277
- }
278
- }
279
- return undefined;
280
- }
281
-
282
- /**
283
- * 插入新的单元格
284
- * @param {string|Token} inner 单元格内部wikitext
285
- * @param {TableCoords} coord 单元格坐标
286
- * @param {'td'|'th'|'caption'} subtype 单元格类型
287
- * @param {Record<string, string|boolean>} attr 单元格属性
288
- * @returns {TdToken}
289
- * @complexity `n`
290
- */
291
- insertTableCell(inner, {column}, subtype = 'td', attr = {}) {
292
- const TdToken = require('./td');
293
- const token = TdToken.create(inner, subtype, attr, this.getAttribute('include'), this.getAttribute('config'));
294
- return this.insertBefore(token, this.getNthCol(column, true));
295
- }
296
- }
297
-
298
- Parser.classes.TrToken = __filename;
299
- module.exports = TrToken;