vscode-json-languageservice 4.2.0-next.3 → 5.0.0

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 (49) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/jsonContributions.d.ts +17 -17
  4. package/lib/esm/jsonContributions.js +1 -1
  5. package/lib/esm/jsonLanguageService.d.ts +29 -29
  6. package/lib/esm/jsonLanguageService.js +66 -66
  7. package/lib/esm/jsonLanguageTypes.d.ts +279 -278
  8. package/lib/esm/jsonLanguageTypes.js +46 -45
  9. package/lib/esm/jsonSchema.d.ts +89 -70
  10. package/lib/esm/jsonSchema.js +1 -1
  11. package/lib/esm/parser/jsonParser.js +1214 -1218
  12. package/lib/esm/services/configuration.js +528 -528
  13. package/lib/esm/services/jsonCompletion.js +918 -934
  14. package/lib/esm/services/jsonDocumentSymbols.js +267 -278
  15. package/lib/esm/services/jsonFolding.js +120 -121
  16. package/lib/esm/services/jsonHover.js +109 -112
  17. package/lib/esm/services/jsonLinks.js +72 -73
  18. package/lib/esm/services/jsonSchemaService.js +586 -605
  19. package/lib/esm/services/jsonSelectionRanges.js +61 -61
  20. package/lib/esm/services/jsonValidation.js +151 -149
  21. package/lib/esm/utils/colors.js +68 -69
  22. package/lib/esm/utils/glob.js +124 -124
  23. package/lib/esm/utils/json.js +42 -42
  24. package/lib/esm/utils/objects.js +68 -65
  25. package/lib/esm/utils/strings.js +64 -64
  26. package/lib/umd/jsonContributions.d.ts +17 -17
  27. package/lib/umd/jsonContributions.js +12 -12
  28. package/lib/umd/jsonLanguageService.d.ts +29 -29
  29. package/lib/umd/jsonLanguageService.js +90 -90
  30. package/lib/umd/jsonLanguageTypes.d.ts +279 -278
  31. package/lib/umd/jsonLanguageTypes.js +93 -92
  32. package/lib/umd/jsonSchema.d.ts +89 -70
  33. package/lib/umd/jsonSchema.js +12 -12
  34. package/lib/umd/parser/jsonParser.js +1243 -1237
  35. package/lib/umd/services/configuration.js +541 -541
  36. package/lib/umd/services/jsonCompletion.js +932 -947
  37. package/lib/umd/services/jsonDocumentSymbols.js +281 -291
  38. package/lib/umd/services/jsonFolding.js +134 -135
  39. package/lib/umd/services/jsonHover.js +123 -125
  40. package/lib/umd/services/jsonLinks.js +86 -87
  41. package/lib/umd/services/jsonSchemaService.js +602 -618
  42. package/lib/umd/services/jsonSelectionRanges.js +75 -75
  43. package/lib/umd/services/jsonValidation.js +165 -162
  44. package/lib/umd/utils/colors.js +84 -85
  45. package/lib/umd/utils/glob.js +138 -138
  46. package/lib/umd/utils/json.js +56 -56
  47. package/lib/umd/utils/objects.js +87 -83
  48. package/lib/umd/utils/strings.js +82 -82
  49. package/package.json +10 -10
@@ -1,278 +1,267 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for license information.
4
- *--------------------------------------------------------------------------------------------*/
5
- import * as Parser from '../parser/jsonParser';
6
- import * as Strings from '../utils/strings';
7
- import { colorFromHex } from '../utils/colors';
8
- import { Range, TextEdit, SymbolKind, Location } from "../jsonLanguageTypes";
9
- var JSONDocumentSymbols = /** @class */ (function () {
10
- function JSONDocumentSymbols(schemaService) {
11
- this.schemaService = schemaService;
12
- }
13
- JSONDocumentSymbols.prototype.findDocumentSymbols = function (document, doc, context) {
14
- var _this = this;
15
- if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }
16
- var root = doc.root;
17
- if (!root) {
18
- return [];
19
- }
20
- var limit = context.resultLimit || Number.MAX_VALUE;
21
- // special handling for key bindings
22
- var resourceString = document.uri;
23
- if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
24
- if (root.type === 'array') {
25
- var result_1 = [];
26
- for (var _i = 0, _a = root.items; _i < _a.length; _i++) {
27
- var item = _a[_i];
28
- if (item.type === 'object') {
29
- for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {
30
- var property = _c[_b];
31
- if (property.keyNode.value === 'key' && property.valueNode) {
32
- var location = Location.create(document.uri, getRange(document, item));
33
- result_1.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, location: location });
34
- limit--;
35
- if (limit <= 0) {
36
- if (context && context.onResultLimitExceeded) {
37
- context.onResultLimitExceeded(resourceString);
38
- }
39
- return result_1;
40
- }
41
- }
42
- }
43
- }
44
- }
45
- return result_1;
46
- }
47
- }
48
- var toVisit = [
49
- { node: root, containerName: '' }
50
- ];
51
- var nextToVisit = 0;
52
- var limitExceeded = false;
53
- var result = [];
54
- var collectOutlineEntries = function (node, containerName) {
55
- if (node.type === 'array') {
56
- node.items.forEach(function (node) {
57
- if (node) {
58
- toVisit.push({ node: node, containerName: containerName });
59
- }
60
- });
61
- }
62
- else if (node.type === 'object') {
63
- node.properties.forEach(function (property) {
64
- var valueNode = property.valueNode;
65
- if (valueNode) {
66
- if (limit > 0) {
67
- limit--;
68
- var location = Location.create(document.uri, getRange(document, property));
69
- var childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value;
70
- result.push({ name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), location: location, containerName: containerName });
71
- toVisit.push({ node: valueNode, containerName: childContainerName });
72
- }
73
- else {
74
- limitExceeded = true;
75
- }
76
- }
77
- });
78
- }
79
- };
80
- // breath first traversal
81
- while (nextToVisit < toVisit.length) {
82
- var next = toVisit[nextToVisit++];
83
- collectOutlineEntries(next.node, next.containerName);
84
- }
85
- if (limitExceeded && context && context.onResultLimitExceeded) {
86
- context.onResultLimitExceeded(resourceString);
87
- }
88
- return result;
89
- };
90
- JSONDocumentSymbols.prototype.findDocumentSymbols2 = function (document, doc, context) {
91
- var _this = this;
92
- if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }
93
- var root = doc.root;
94
- if (!root) {
95
- return [];
96
- }
97
- var limit = context.resultLimit || Number.MAX_VALUE;
98
- // special handling for key bindings
99
- var resourceString = document.uri;
100
- if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
101
- if (root.type === 'array') {
102
- var result_2 = [];
103
- for (var _i = 0, _a = root.items; _i < _a.length; _i++) {
104
- var item = _a[_i];
105
- if (item.type === 'object') {
106
- for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {
107
- var property = _c[_b];
108
- if (property.keyNode.value === 'key' && property.valueNode) {
109
- var range = getRange(document, item);
110
- var selectionRange = getRange(document, property.keyNode);
111
- result_2.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, range: range, selectionRange: selectionRange });
112
- limit--;
113
- if (limit <= 0) {
114
- if (context && context.onResultLimitExceeded) {
115
- context.onResultLimitExceeded(resourceString);
116
- }
117
- return result_2;
118
- }
119
- }
120
- }
121
- }
122
- }
123
- return result_2;
124
- }
125
- }
126
- var result = [];
127
- var toVisit = [
128
- { node: root, result: result }
129
- ];
130
- var nextToVisit = 0;
131
- var limitExceeded = false;
132
- var collectOutlineEntries = function (node, result) {
133
- if (node.type === 'array') {
134
- node.items.forEach(function (node, index) {
135
- if (node) {
136
- if (limit > 0) {
137
- limit--;
138
- var range = getRange(document, node);
139
- var selectionRange = range;
140
- var name = String(index);
141
- var symbol = { name: name, kind: _this.getSymbolKind(node.type), range: range, selectionRange: selectionRange, children: [] };
142
- result.push(symbol);
143
- toVisit.push({ result: symbol.children, node: node });
144
- }
145
- else {
146
- limitExceeded = true;
147
- }
148
- }
149
- });
150
- }
151
- else if (node.type === 'object') {
152
- node.properties.forEach(function (property) {
153
- var valueNode = property.valueNode;
154
- if (valueNode) {
155
- if (limit > 0) {
156
- limit--;
157
- var range = getRange(document, property);
158
- var selectionRange = getRange(document, property.keyNode);
159
- var children = [];
160
- var symbol = { name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), range: range, selectionRange: selectionRange, children: children, detail: _this.getDetail(valueNode) };
161
- result.push(symbol);
162
- toVisit.push({ result: children, node: valueNode });
163
- }
164
- else {
165
- limitExceeded = true;
166
- }
167
- }
168
- });
169
- }
170
- };
171
- // breath first traversal
172
- while (nextToVisit < toVisit.length) {
173
- var next = toVisit[nextToVisit++];
174
- collectOutlineEntries(next.node, next.result);
175
- }
176
- if (limitExceeded && context && context.onResultLimitExceeded) {
177
- context.onResultLimitExceeded(resourceString);
178
- }
179
- return result;
180
- };
181
- JSONDocumentSymbols.prototype.getSymbolKind = function (nodeType) {
182
- switch (nodeType) {
183
- case 'object':
184
- return SymbolKind.Module;
185
- case 'string':
186
- return SymbolKind.String;
187
- case 'number':
188
- return SymbolKind.Number;
189
- case 'array':
190
- return SymbolKind.Array;
191
- case 'boolean':
192
- return SymbolKind.Boolean;
193
- default: // 'null'
194
- return SymbolKind.Variable;
195
- }
196
- };
197
- JSONDocumentSymbols.prototype.getKeyLabel = function (property) {
198
- var name = property.keyNode.value;
199
- if (name) {
200
- name = name.replace(/[\n]/g, '↵');
201
- }
202
- if (name && name.trim()) {
203
- return name;
204
- }
205
- return "\"".concat(name, "\"");
206
- };
207
- JSONDocumentSymbols.prototype.getDetail = function (node) {
208
- if (!node) {
209
- return undefined;
210
- }
211
- if (node.type === 'boolean' || node.type === 'number' || node.type === 'null' || node.type === 'string') {
212
- return String(node.value);
213
- }
214
- else {
215
- if (node.type === 'array') {
216
- return node.children.length ? undefined : '[]';
217
- }
218
- else if (node.type === 'object') {
219
- return node.children.length ? undefined : '{}';
220
- }
221
- }
222
- return undefined;
223
- };
224
- JSONDocumentSymbols.prototype.findDocumentColors = function (document, doc, context) {
225
- return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {
226
- var result = [];
227
- if (schema) {
228
- var limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE;
229
- var matchingSchemas = doc.getMatchingSchemas(schema.schema);
230
- var visitedNode = {};
231
- for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {
232
- var s = matchingSchemas_1[_i];
233
- if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') {
234
- var nodeId = String(s.node.offset);
235
- if (!visitedNode[nodeId]) {
236
- var color = colorFromHex(Parser.getNodeValue(s.node));
237
- if (color) {
238
- var range = getRange(document, s.node);
239
- result.push({ color: color, range: range });
240
- }
241
- visitedNode[nodeId] = true;
242
- limit--;
243
- if (limit <= 0) {
244
- if (context && context.onResultLimitExceeded) {
245
- context.onResultLimitExceeded(document.uri);
246
- }
247
- return result;
248
- }
249
- }
250
- }
251
- }
252
- }
253
- return result;
254
- });
255
- };
256
- JSONDocumentSymbols.prototype.getColorPresentations = function (document, doc, color, range) {
257
- var result = [];
258
- var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
259
- function toTwoDigitHex(n) {
260
- var r = n.toString(16);
261
- return r.length !== 2 ? '0' + r : r;
262
- }
263
- var label;
264
- if (color.alpha === 1) {
265
- label = "#".concat(toTwoDigitHex(red256)).concat(toTwoDigitHex(green256)).concat(toTwoDigitHex(blue256));
266
- }
267
- else {
268
- label = "#".concat(toTwoDigitHex(red256)).concat(toTwoDigitHex(green256)).concat(toTwoDigitHex(blue256)).concat(toTwoDigitHex(Math.round(color.alpha * 255)));
269
- }
270
- result.push({ label: label, textEdit: TextEdit.replace(range, JSON.stringify(label)) });
271
- return result;
272
- };
273
- return JSONDocumentSymbols;
274
- }());
275
- export { JSONDocumentSymbols };
276
- function getRange(document, node) {
277
- return Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
278
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import * as Parser from '../parser/jsonParser';
6
+ import * as Strings from '../utils/strings';
7
+ import { colorFromHex } from '../utils/colors';
8
+ import { Range, TextEdit, SymbolKind, Location } from "../jsonLanguageTypes";
9
+ export class JSONDocumentSymbols {
10
+ constructor(schemaService) {
11
+ this.schemaService = schemaService;
12
+ }
13
+ findDocumentSymbols(document, doc, context = { resultLimit: Number.MAX_VALUE }) {
14
+ const root = doc.root;
15
+ if (!root) {
16
+ return [];
17
+ }
18
+ let limit = context.resultLimit || Number.MAX_VALUE;
19
+ // special handling for key bindings
20
+ const resourceString = document.uri;
21
+ if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
22
+ if (root.type === 'array') {
23
+ const result = [];
24
+ for (const item of root.items) {
25
+ if (item.type === 'object') {
26
+ for (const property of item.properties) {
27
+ if (property.keyNode.value === 'key' && property.valueNode) {
28
+ const location = Location.create(document.uri, getRange(document, item));
29
+ result.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, location: location });
30
+ limit--;
31
+ if (limit <= 0) {
32
+ if (context && context.onResultLimitExceeded) {
33
+ context.onResultLimitExceeded(resourceString);
34
+ }
35
+ return result;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ return result;
42
+ }
43
+ }
44
+ const toVisit = [
45
+ { node: root, containerName: '' }
46
+ ];
47
+ let nextToVisit = 0;
48
+ let limitExceeded = false;
49
+ const result = [];
50
+ const collectOutlineEntries = (node, containerName) => {
51
+ if (node.type === 'array') {
52
+ node.items.forEach(node => {
53
+ if (node) {
54
+ toVisit.push({ node, containerName });
55
+ }
56
+ });
57
+ }
58
+ else if (node.type === 'object') {
59
+ node.properties.forEach((property) => {
60
+ const valueNode = property.valueNode;
61
+ if (valueNode) {
62
+ if (limit > 0) {
63
+ limit--;
64
+ const location = Location.create(document.uri, getRange(document, property));
65
+ const childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value;
66
+ result.push({ name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), location: location, containerName: containerName });
67
+ toVisit.push({ node: valueNode, containerName: childContainerName });
68
+ }
69
+ else {
70
+ limitExceeded = true;
71
+ }
72
+ }
73
+ });
74
+ }
75
+ };
76
+ // breath first traversal
77
+ while (nextToVisit < toVisit.length) {
78
+ const next = toVisit[nextToVisit++];
79
+ collectOutlineEntries(next.node, next.containerName);
80
+ }
81
+ if (limitExceeded && context && context.onResultLimitExceeded) {
82
+ context.onResultLimitExceeded(resourceString);
83
+ }
84
+ return result;
85
+ }
86
+ findDocumentSymbols2(document, doc, context = { resultLimit: Number.MAX_VALUE }) {
87
+ const root = doc.root;
88
+ if (!root) {
89
+ return [];
90
+ }
91
+ let limit = context.resultLimit || Number.MAX_VALUE;
92
+ // special handling for key bindings
93
+ const resourceString = document.uri;
94
+ if ((resourceString === 'vscode://defaultsettings/keybindings.json') || Strings.endsWith(resourceString.toLowerCase(), '/user/keybindings.json')) {
95
+ if (root.type === 'array') {
96
+ const result = [];
97
+ for (const item of root.items) {
98
+ if (item.type === 'object') {
99
+ for (const property of item.properties) {
100
+ if (property.keyNode.value === 'key' && property.valueNode) {
101
+ const range = getRange(document, item);
102
+ const selectionRange = getRange(document, property.keyNode);
103
+ result.push({ name: Parser.getNodeValue(property.valueNode), kind: SymbolKind.Function, range, selectionRange });
104
+ limit--;
105
+ if (limit <= 0) {
106
+ if (context && context.onResultLimitExceeded) {
107
+ context.onResultLimitExceeded(resourceString);
108
+ }
109
+ return result;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ return result;
116
+ }
117
+ }
118
+ const result = [];
119
+ const toVisit = [
120
+ { node: root, result }
121
+ ];
122
+ let nextToVisit = 0;
123
+ let limitExceeded = false;
124
+ const collectOutlineEntries = (node, result) => {
125
+ if (node.type === 'array') {
126
+ node.items.forEach((node, index) => {
127
+ if (node) {
128
+ if (limit > 0) {
129
+ limit--;
130
+ const range = getRange(document, node);
131
+ const selectionRange = range;
132
+ const name = String(index);
133
+ const symbol = { name, kind: this.getSymbolKind(node.type), range, selectionRange, children: [] };
134
+ result.push(symbol);
135
+ toVisit.push({ result: symbol.children, node });
136
+ }
137
+ else {
138
+ limitExceeded = true;
139
+ }
140
+ }
141
+ });
142
+ }
143
+ else if (node.type === 'object') {
144
+ node.properties.forEach((property) => {
145
+ const valueNode = property.valueNode;
146
+ if (valueNode) {
147
+ if (limit > 0) {
148
+ limit--;
149
+ const range = getRange(document, property);
150
+ const selectionRange = getRange(document, property.keyNode);
151
+ const children = [];
152
+ const symbol = { name: this.getKeyLabel(property), kind: this.getSymbolKind(valueNode.type), range, selectionRange, children, detail: this.getDetail(valueNode) };
153
+ result.push(symbol);
154
+ toVisit.push({ result: children, node: valueNode });
155
+ }
156
+ else {
157
+ limitExceeded = true;
158
+ }
159
+ }
160
+ });
161
+ }
162
+ };
163
+ // breath first traversal
164
+ while (nextToVisit < toVisit.length) {
165
+ const next = toVisit[nextToVisit++];
166
+ collectOutlineEntries(next.node, next.result);
167
+ }
168
+ if (limitExceeded && context && context.onResultLimitExceeded) {
169
+ context.onResultLimitExceeded(resourceString);
170
+ }
171
+ return result;
172
+ }
173
+ getSymbolKind(nodeType) {
174
+ switch (nodeType) {
175
+ case 'object':
176
+ return SymbolKind.Module;
177
+ case 'string':
178
+ return SymbolKind.String;
179
+ case 'number':
180
+ return SymbolKind.Number;
181
+ case 'array':
182
+ return SymbolKind.Array;
183
+ case 'boolean':
184
+ return SymbolKind.Boolean;
185
+ default: // 'null'
186
+ return SymbolKind.Variable;
187
+ }
188
+ }
189
+ getKeyLabel(property) {
190
+ let name = property.keyNode.value;
191
+ if (name) {
192
+ name = name.replace(/[\n]/g, '↵');
193
+ }
194
+ if (name && name.trim()) {
195
+ return name;
196
+ }
197
+ return `"${name}"`;
198
+ }
199
+ getDetail(node) {
200
+ if (!node) {
201
+ return undefined;
202
+ }
203
+ if (node.type === 'boolean' || node.type === 'number' || node.type === 'null' || node.type === 'string') {
204
+ return String(node.value);
205
+ }
206
+ else {
207
+ if (node.type === 'array') {
208
+ return node.children.length ? undefined : '[]';
209
+ }
210
+ else if (node.type === 'object') {
211
+ return node.children.length ? undefined : '{}';
212
+ }
213
+ }
214
+ return undefined;
215
+ }
216
+ findDocumentColors(document, doc, context) {
217
+ return this.schemaService.getSchemaForResource(document.uri, doc).then(schema => {
218
+ const result = [];
219
+ if (schema) {
220
+ let limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE;
221
+ const matchingSchemas = doc.getMatchingSchemas(schema.schema);
222
+ const visitedNode = {};
223
+ for (const s of matchingSchemas) {
224
+ if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') {
225
+ const nodeId = String(s.node.offset);
226
+ if (!visitedNode[nodeId]) {
227
+ const color = colorFromHex(Parser.getNodeValue(s.node));
228
+ if (color) {
229
+ const range = getRange(document, s.node);
230
+ result.push({ color, range });
231
+ }
232
+ visitedNode[nodeId] = true;
233
+ limit--;
234
+ if (limit <= 0) {
235
+ if (context && context.onResultLimitExceeded) {
236
+ context.onResultLimitExceeded(document.uri);
237
+ }
238
+ return result;
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ return result;
245
+ });
246
+ }
247
+ getColorPresentations(document, doc, color, range) {
248
+ const result = [];
249
+ const red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
250
+ function toTwoDigitHex(n) {
251
+ const r = n.toString(16);
252
+ return r.length !== 2 ? '0' + r : r;
253
+ }
254
+ let label;
255
+ if (color.alpha === 1) {
256
+ label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}`;
257
+ }
258
+ else {
259
+ label = `#${toTwoDigitHex(red256)}${toTwoDigitHex(green256)}${toTwoDigitHex(blue256)}${toTwoDigitHex(Math.round(color.alpha * 255))}`;
260
+ }
261
+ result.push({ label: label, textEdit: TextEdit.replace(range, JSON.stringify(label)) });
262
+ return result;
263
+ }
264
+ }
265
+ function getRange(document, node) {
266
+ return Range.create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
267
+ }