vscode-css-languageservice 5.4.2 → 6.1.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 (83) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/beautify/beautify-css.js +11 -4
  4. package/lib/esm/cssLanguageService.d.ts +2 -1
  5. package/lib/esm/cssLanguageService.js +15 -17
  6. package/lib/esm/cssLanguageTypes.js +2 -2
  7. package/lib/esm/data/webCustomData.js +356 -232
  8. package/lib/esm/languageFacts/builtinData.js +15 -15
  9. package/lib/esm/languageFacts/colors.js +66 -69
  10. package/lib/esm/languageFacts/dataManager.js +38 -42
  11. package/lib/esm/languageFacts/dataProvider.js +17 -23
  12. package/lib/esm/languageFacts/entry.js +22 -23
  13. package/lib/esm/parser/cssErrors.js +5 -7
  14. package/lib/esm/parser/cssNodes.js +869 -1377
  15. package/lib/esm/parser/cssParser.js +419 -376
  16. package/lib/esm/parser/cssScanner.js +168 -175
  17. package/lib/esm/parser/cssSymbolScope.js +107 -137
  18. package/lib/esm/parser/lessParser.js +177 -202
  19. package/lib/esm/parser/lessScanner.js +22 -43
  20. package/lib/esm/parser/scssErrors.js +5 -7
  21. package/lib/esm/parser/scssParser.js +196 -208
  22. package/lib/esm/parser/scssScanner.js +33 -54
  23. package/lib/esm/services/cssCodeActions.js +36 -40
  24. package/lib/esm/services/cssCompletion.js +300 -395
  25. package/lib/esm/services/cssFolding.js +32 -35
  26. package/lib/esm/services/cssFormatter.js +22 -22
  27. package/lib/esm/services/cssHover.js +30 -33
  28. package/lib/esm/services/cssNavigation.js +260 -289
  29. package/lib/esm/services/cssSelectionRange.js +6 -6
  30. package/lib/esm/services/cssValidation.js +13 -16
  31. package/lib/esm/services/lessCompletion.js +351 -370
  32. package/lib/esm/services/lint.js +161 -175
  33. package/lib/esm/services/lintRules.js +20 -27
  34. package/lib/esm/services/lintUtil.js +19 -28
  35. package/lib/esm/services/pathCompletion.js +84 -158
  36. package/lib/esm/services/scssCompletion.js +283 -307
  37. package/lib/esm/services/scssNavigation.js +65 -137
  38. package/lib/esm/services/selectorPrinting.js +131 -175
  39. package/lib/esm/utils/arrays.js +6 -12
  40. package/lib/esm/utils/objects.js +1 -1
  41. package/lib/esm/utils/resources.js +3 -16
  42. package/lib/esm/utils/strings.js +10 -12
  43. package/lib/umd/beautify/beautify-css.js +11 -4
  44. package/lib/umd/cssLanguageService.d.ts +2 -1
  45. package/lib/umd/cssLanguageService.js +34 -32
  46. package/lib/umd/cssLanguageTypes.js +4 -3
  47. package/lib/umd/data/webCustomData.js +355 -231
  48. package/lib/umd/languageFacts/colors.js +65 -68
  49. package/lib/umd/languageFacts/dataManager.js +41 -44
  50. package/lib/umd/languageFacts/dataProvider.js +17 -22
  51. package/lib/umd/languageFacts/entry.js +22 -23
  52. package/lib/umd/languageFacts/facts.js +5 -1
  53. package/lib/umd/parser/cssErrors.js +5 -6
  54. package/lib/umd/parser/cssNodes.js +870 -1307
  55. package/lib/umd/parser/cssParser.js +424 -380
  56. package/lib/umd/parser/cssScanner.js +168 -173
  57. package/lib/umd/parser/cssSymbolScope.js +109 -134
  58. package/lib/umd/parser/lessParser.js +182 -206
  59. package/lib/umd/parser/lessScanner.js +22 -42
  60. package/lib/umd/parser/scssErrors.js +5 -6
  61. package/lib/umd/parser/scssParser.js +202 -213
  62. package/lib/umd/parser/scssScanner.js +25 -45
  63. package/lib/umd/services/cssCodeActions.js +41 -44
  64. package/lib/umd/services/cssCompletion.js +308 -402
  65. package/lib/umd/services/cssFolding.js +35 -38
  66. package/lib/umd/services/cssFormatter.js +25 -25
  67. package/lib/umd/services/cssHover.js +36 -38
  68. package/lib/umd/services/cssNavigation.js +267 -295
  69. package/lib/umd/services/cssSelectionRange.js +8 -8
  70. package/lib/umd/services/cssValidation.js +17 -19
  71. package/lib/umd/services/lessCompletion.js +354 -372
  72. package/lib/umd/services/lint.js +167 -180
  73. package/lib/umd/services/lintRules.js +20 -24
  74. package/lib/umd/services/lintUtil.js +20 -28
  75. package/lib/umd/services/pathCompletion.js +87 -160
  76. package/lib/umd/services/scssCompletion.js +287 -310
  77. package/lib/umd/services/scssNavigation.js +69 -140
  78. package/lib/umd/services/selectorPrinting.js +134 -174
  79. package/lib/umd/utils/arrays.js +6 -12
  80. package/lib/umd/utils/objects.js +1 -1
  81. package/lib/umd/utils/resources.js +4 -17
  82. package/lib/umd/utils/strings.js +10 -12
  83. package/package.json +16 -15
@@ -1,18 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
1
  (function (factory) {
17
2
  if (typeof module === "object" && typeof module.exports === "object") {
18
3
  var v = factory(require, exports);
@@ -28,8 +13,8 @@ var __extends = (this && this.__extends) || (function () {
28
13
  *--------------------------------------------------------------------------------------------*/
29
14
  'use strict';
30
15
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.ParseErrorCollector = exports.Marker = exports.Level = exports.Module = exports.GuardCondition = exports.LessGuard = exports.ListEntry = exports.UnknownAtRule = exports.MixinDeclaration = exports.MixinReference = exports.MixinContentDeclaration = exports.MixinContentReference = exports.ExtendsReference = exports.Variable = exports.Interpolation = exports.VariableDeclaration = exports.NumericValue = exports.RatioValue = exports.HexColorValue = exports.Operator = exports.AttributeSelector = exports.Term = exports.BinaryExpression = exports.Expression = exports.PageBoxMarginBox = exports.Page = exports.SupportsCondition = exports.MediaFeature = exports.MediaCondition = exports.MediaQuery = exports.Medialist = exports.Document = exports.Supports = exports.Media = exports.Namespace = exports.ForwardVisibility = exports.Forward = exports.ModuleConfiguration = exports.Use = exports.Import = exports.KeyframeSelector = exports.Keyframe = exports.NestedProperties = exports.FontFace = exports.ViewPort = exports.FunctionDeclaration = exports.ElseStatement = exports.WhileStatement = exports.EachStatement = exports.ForStatement = exports.IfStatement = exports.FunctionArgument = exports.FunctionParameter = exports.Function = exports.Invocation = exports.Property = exports.CustomPropertyDeclaration = exports.Declaration = exports.CustomPropertySet = exports.AbstractDeclaration = exports.AtApplyRule = exports.SimpleSelector = exports.Selector = exports.RuleSet = exports.BodyDeclaration = exports.Declarations = exports.Stylesheet = exports.Identifier = exports.UnicodeRange = exports.Nodelist = exports.Node = exports.getParentDeclaration = exports.getNodePath = exports.getNodeAtOffset = exports.ReferenceType = exports.NodeType = void 0;
32
- var strings_1 = require("../utils/strings");
16
+ exports.ParseErrorCollector = exports.Marker = exports.Level = exports.Module = exports.GuardCondition = exports.LessGuard = exports.ListEntry = exports.UnknownAtRule = exports.MixinDeclaration = exports.MixinReference = exports.MixinContentDeclaration = exports.MixinContentReference = exports.ExtendsReference = exports.Variable = exports.Interpolation = exports.VariableDeclaration = exports.NumericValue = exports.RatioValue = exports.HexColorValue = exports.Operator = exports.AttributeSelector = exports.Term = exports.BinaryExpression = exports.Expression = exports.PageBoxMarginBox = exports.Page = exports.SupportsCondition = exports.MediaFeature = exports.MediaCondition = exports.MediaQuery = exports.Medialist = exports.Document = exports.Layer = exports.Supports = exports.Media = exports.Namespace = exports.ForwardVisibility = exports.Forward = exports.ModuleConfiguration = exports.Use = exports.Import = exports.KeyframeSelector = exports.Keyframe = exports.NestedProperties = exports.FontFace = exports.ViewPort = exports.FunctionDeclaration = exports.ElseStatement = exports.WhileStatement = exports.EachStatement = exports.ForStatement = exports.IfStatement = exports.FunctionArgument = exports.FunctionParameter = exports.Function = exports.Invocation = exports.Property = exports.CustomPropertyDeclaration = exports.Declaration = exports.CustomPropertySet = exports.AbstractDeclaration = exports.AtApplyRule = exports.SimpleSelector = exports.Selector = exports.RuleSet = exports.BodyDeclaration = exports.Declarations = exports.Stylesheet = exports.Identifier = exports.UnicodeRange = exports.Nodelist = exports.Node = exports.getParentDeclaration = exports.getNodePath = exports.getNodeAtOffset = exports.ReferenceType = exports.NodeType = void 0;
17
+ const strings_1 = require("../utils/strings");
33
18
  /// <summary>
34
19
  /// Nodes for the css 2.1 specification. See for reference:
35
20
  /// http://www.w3.org/TR/CSS21/grammar.html#grammar
@@ -119,6 +104,9 @@ var __extends = (this && this.__extends) || (function () {
119
104
  NodeType[NodeType["ForwardVisibility"] = 80] = "ForwardVisibility";
120
105
  NodeType[NodeType["Module"] = 81] = "Module";
121
106
  NodeType[NodeType["UnicodeRange"] = 82] = "UnicodeRange";
107
+ NodeType[NodeType["Layer"] = 83] = "Layer";
108
+ NodeType[NodeType["LayerNameList"] = 84] = "LayerNameList";
109
+ NodeType[NodeType["LayerName"] = 85] = "LayerName";
122
110
  })(NodeType = exports.NodeType || (exports.NodeType = {}));
123
111
  var ReferenceType;
124
112
  (function (ReferenceType) {
@@ -133,12 +121,12 @@ var __extends = (this && this.__extends) || (function () {
133
121
  ReferenceType[ReferenceType["ForwardVisibility"] = 8] = "ForwardVisibility";
134
122
  })(ReferenceType = exports.ReferenceType || (exports.ReferenceType = {}));
135
123
  function getNodeAtOffset(node, offset) {
136
- var candidate = null;
124
+ let candidate = null;
137
125
  if (!node || offset < node.offset || offset > node.end) {
138
126
  return null;
139
127
  }
140
128
  // Find the shortest node at the position
141
- node.accept(function (node) {
129
+ node.accept((node) => {
142
130
  if (node.offset === -1 && node.length === -1) {
143
131
  return true;
144
132
  }
@@ -157,8 +145,8 @@ var __extends = (this && this.__extends) || (function () {
157
145
  }
158
146
  exports.getNodeAtOffset = getNodeAtOffset;
159
147
  function getNodePath(node, offset) {
160
- var candidate = getNodeAtOffset(node, offset);
161
- var path = [];
148
+ let candidate = getNodeAtOffset(node, offset);
149
+ const path = [];
162
150
  while (candidate) {
163
151
  path.unshift(candidate);
164
152
  candidate = candidate.parent;
@@ -167,18 +155,16 @@ var __extends = (this && this.__extends) || (function () {
167
155
  }
168
156
  exports.getNodePath = getNodePath;
169
157
  function getParentDeclaration(node) {
170
- var decl = node.findParent(NodeType.Declaration);
171
- var value = decl && decl.getValue();
158
+ const decl = node.findParent(NodeType.Declaration);
159
+ const value = decl && decl.getValue();
172
160
  if (value && value.encloses(node)) {
173
161
  return decl;
174
162
  }
175
163
  return null;
176
164
  }
177
165
  exports.getParentDeclaration = getParentDeclaration;
178
- var Node = /** @class */ (function () {
179
- function Node(offset, len, nodeType) {
180
- if (offset === void 0) { offset = -1; }
181
- if (len === void 0) { len = -1; }
166
+ class Node {
167
+ constructor(offset = -1, len = -1, nodeType) {
182
168
  this.parent = null;
183
169
  this.offset = offset;
184
170
  this.length = len;
@@ -186,64 +172,54 @@ var __extends = (this && this.__extends) || (function () {
186
172
  this.nodeType = nodeType;
187
173
  }
188
174
  }
189
- Object.defineProperty(Node.prototype, "end", {
190
- get: function () { return this.offset + this.length; },
191
- enumerable: false,
192
- configurable: true
193
- });
194
- Object.defineProperty(Node.prototype, "type", {
195
- get: function () {
196
- return this.nodeType || NodeType.Undefined;
197
- },
198
- set: function (type) {
199
- this.nodeType = type;
200
- },
201
- enumerable: false,
202
- configurable: true
203
- });
204
- Node.prototype.getTextProvider = function () {
205
- var node = this;
175
+ get end() { return this.offset + this.length; }
176
+ set type(type) {
177
+ this.nodeType = type;
178
+ }
179
+ get type() {
180
+ return this.nodeType || NodeType.Undefined;
181
+ }
182
+ getTextProvider() {
183
+ let node = this;
206
184
  while (node && !node.textProvider) {
207
185
  node = node.parent;
208
186
  }
209
187
  if (node) {
210
188
  return node.textProvider;
211
189
  }
212
- return function () { return 'unknown'; };
213
- };
214
- Node.prototype.getText = function () {
190
+ return () => { return 'unknown'; };
191
+ }
192
+ getText() {
215
193
  return this.getTextProvider()(this.offset, this.length);
216
- };
217
- Node.prototype.matches = function (str) {
194
+ }
195
+ matches(str) {
218
196
  return this.length === str.length && this.getTextProvider()(this.offset, this.length) === str;
219
- };
220
- Node.prototype.startsWith = function (str) {
197
+ }
198
+ startsWith(str) {
221
199
  return this.length >= str.length && this.getTextProvider()(this.offset, str.length) === str;
222
- };
223
- Node.prototype.endsWith = function (str) {
200
+ }
201
+ endsWith(str) {
224
202
  return this.length >= str.length && this.getTextProvider()(this.end - str.length, str.length) === str;
225
- };
226
- Node.prototype.accept = function (visitor) {
203
+ }
204
+ accept(visitor) {
227
205
  if (visitor(this) && this.children) {
228
- for (var _i = 0, _a = this.children; _i < _a.length; _i++) {
229
- var child = _a[_i];
206
+ for (const child of this.children) {
230
207
  child.accept(visitor);
231
208
  }
232
209
  }
233
- };
234
- Node.prototype.acceptVisitor = function (visitor) {
210
+ }
211
+ acceptVisitor(visitor) {
235
212
  this.accept(visitor.visitNode.bind(visitor));
236
- };
237
- Node.prototype.adoptChild = function (node, index) {
238
- if (index === void 0) { index = -1; }
213
+ }
214
+ adoptChild(node, index = -1) {
239
215
  if (node.parent && node.parent.children) {
240
- var idx = node.parent.children.indexOf(node);
216
+ const idx = node.parent.children.indexOf(node);
241
217
  if (idx >= 0) {
242
218
  node.parent.children.splice(idx, 1);
243
219
  }
244
220
  }
245
221
  node.parent = this;
246
- var children = this.children;
222
+ let children = this.children;
247
223
  if (!children) {
248
224
  children = this.children = [];
249
225
  }
@@ -254,45 +230,42 @@ var __extends = (this && this.__extends) || (function () {
254
230
  children.push(node);
255
231
  }
256
232
  return node;
257
- };
258
- Node.prototype.attachTo = function (parent, index) {
259
- if (index === void 0) { index = -1; }
233
+ }
234
+ attachTo(parent, index = -1) {
260
235
  if (parent) {
261
236
  parent.adoptChild(this, index);
262
237
  }
263
238
  return this;
264
- };
265
- Node.prototype.collectIssues = function (results) {
239
+ }
240
+ collectIssues(results) {
266
241
  if (this.issues) {
267
242
  results.push.apply(results, this.issues);
268
243
  }
269
- };
270
- Node.prototype.addIssue = function (issue) {
244
+ }
245
+ addIssue(issue) {
271
246
  if (!this.issues) {
272
247
  this.issues = [];
273
248
  }
274
249
  this.issues.push(issue);
275
- };
276
- Node.prototype.hasIssue = function (rule) {
277
- return Array.isArray(this.issues) && this.issues.some(function (i) { return i.getRule() === rule; });
278
- };
279
- Node.prototype.isErroneous = function (recursive) {
280
- if (recursive === void 0) { recursive = false; }
250
+ }
251
+ hasIssue(rule) {
252
+ return Array.isArray(this.issues) && this.issues.some(i => i.getRule() === rule);
253
+ }
254
+ isErroneous(recursive = false) {
281
255
  if (this.issues && this.issues.length > 0) {
282
256
  return true;
283
257
  }
284
- return recursive && Array.isArray(this.children) && this.children.some(function (c) { return c.isErroneous(true); });
285
- };
286
- Node.prototype.setNode = function (field, node, index) {
287
- if (index === void 0) { index = -1; }
258
+ return recursive && Array.isArray(this.children) && this.children.some(c => c.isErroneous(true));
259
+ }
260
+ setNode(field, node, index = -1) {
288
261
  if (node) {
289
262
  node.attachTo(this, index);
290
263
  this[field] = node;
291
264
  return true;
292
265
  }
293
266
  return false;
294
- };
295
- Node.prototype.addChild = function (node) {
267
+ }
268
+ addChild(node) {
296
269
  if (node) {
297
270
  if (!this.children) {
298
271
  this.children = [];
@@ -302,38 +275,37 @@ var __extends = (this && this.__extends) || (function () {
302
275
  return true;
303
276
  }
304
277
  return false;
305
- };
306
- Node.prototype.updateOffsetAndLength = function (node) {
278
+ }
279
+ updateOffsetAndLength(node) {
307
280
  if (node.offset < this.offset || this.offset === -1) {
308
281
  this.offset = node.offset;
309
282
  }
310
- var nodeEnd = node.end;
283
+ const nodeEnd = node.end;
311
284
  if ((nodeEnd > this.end) || this.length === -1) {
312
285
  this.length = nodeEnd - this.offset;
313
286
  }
314
- };
315
- Node.prototype.hasChildren = function () {
287
+ }
288
+ hasChildren() {
316
289
  return !!this.children && this.children.length > 0;
317
- };
318
- Node.prototype.getChildren = function () {
290
+ }
291
+ getChildren() {
319
292
  return this.children ? this.children.slice(0) : [];
320
- };
321
- Node.prototype.getChild = function (index) {
293
+ }
294
+ getChild(index) {
322
295
  if (this.children && index < this.children.length) {
323
296
  return this.children[index];
324
297
  }
325
298
  return null;
326
- };
327
- Node.prototype.addChildren = function (nodes) {
328
- for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {
329
- var node = nodes_1[_i];
299
+ }
300
+ addChildren(nodes) {
301
+ for (const node of nodes) {
330
302
  this.addChild(node);
331
303
  }
332
- };
333
- Node.prototype.findFirstChildBeforeOffset = function (offset) {
304
+ }
305
+ findFirstChildBeforeOffset(offset) {
334
306
  if (this.children) {
335
- var current = null;
336
- for (var i = this.children.length - 1; i >= 0; i--) {
307
+ let current = null;
308
+ for (let i = this.children.length - 1; i >= 0; i--) {
337
309
  // iterate until we find a child that has a start offset smaller than the input offset
338
310
  current = this.children[i];
339
311
  if (current.offset <= offset) {
@@ -342,9 +314,9 @@ var __extends = (this && this.__extends) || (function () {
342
314
  }
343
315
  }
344
316
  return null;
345
- };
346
- Node.prototype.findChildAtOffset = function (offset, goDeep) {
347
- var current = this.findFirstChildBeforeOffset(offset);
317
+ }
318
+ findChildAtOffset(offset, goDeep) {
319
+ const current = this.findFirstChildBeforeOffset(offset);
348
320
  if (current && current.end >= offset) {
349
321
  if (goDeep) {
350
322
  return current.findChildAtOffset(offset, true) || current;
@@ -352,1147 +324,828 @@ var __extends = (this && this.__extends) || (function () {
352
324
  return current;
353
325
  }
354
326
  return null;
355
- };
356
- Node.prototype.encloses = function (candidate) {
327
+ }
328
+ encloses(candidate) {
357
329
  return this.offset <= candidate.offset && this.offset + this.length >= candidate.offset + candidate.length;
358
- };
359
- Node.prototype.getParent = function () {
360
- var result = this.parent;
330
+ }
331
+ getParent() {
332
+ let result = this.parent;
361
333
  while (result instanceof Nodelist) {
362
334
  result = result.parent;
363
335
  }
364
336
  return result;
365
- };
366
- Node.prototype.findParent = function (type) {
367
- var result = this;
337
+ }
338
+ findParent(type) {
339
+ let result = this;
368
340
  while (result && result.type !== type) {
369
341
  result = result.parent;
370
342
  }
371
343
  return result;
372
- };
373
- Node.prototype.findAParent = function () {
374
- var types = [];
375
- for (var _i = 0; _i < arguments.length; _i++) {
376
- types[_i] = arguments[_i];
377
- }
378
- var result = this;
379
- while (result && !types.some(function (t) { return result.type === t; })) {
344
+ }
345
+ findAParent(...types) {
346
+ let result = this;
347
+ while (result && !types.some(t => result.type === t)) {
380
348
  result = result.parent;
381
349
  }
382
350
  return result;
383
- };
384
- Node.prototype.setData = function (key, value) {
351
+ }
352
+ setData(key, value) {
385
353
  if (!this.options) {
386
354
  this.options = {};
387
355
  }
388
356
  this.options[key] = value;
389
- };
390
- Node.prototype.getData = function (key) {
357
+ }
358
+ getData(key) {
391
359
  if (!this.options || !this.options.hasOwnProperty(key)) {
392
360
  return null;
393
361
  }
394
362
  return this.options[key];
395
- };
396
- return Node;
397
- }());
363
+ }
364
+ }
398
365
  exports.Node = Node;
399
- var Nodelist = /** @class */ (function (_super) {
400
- __extends(Nodelist, _super);
401
- function Nodelist(parent, index) {
402
- if (index === void 0) { index = -1; }
403
- var _this = _super.call(this, -1, -1) || this;
404
- _this.attachTo(parent, index);
405
- _this.offset = -1;
406
- _this.length = -1;
407
- return _this;
408
- }
409
- return Nodelist;
410
- }(Node));
366
+ class Nodelist extends Node {
367
+ constructor(parent, index = -1) {
368
+ super(-1, -1);
369
+ this.attachTo(parent, index);
370
+ this.offset = -1;
371
+ this.length = -1;
372
+ }
373
+ }
411
374
  exports.Nodelist = Nodelist;
412
- var UnicodeRange = /** @class */ (function (_super) {
413
- __extends(UnicodeRange, _super);
414
- function UnicodeRange(offset, length) {
415
- return _super.call(this, offset, length) || this;
416
- }
417
- Object.defineProperty(UnicodeRange.prototype, "type", {
418
- get: function () {
419
- return NodeType.UnicodeRange;
420
- },
421
- enumerable: false,
422
- configurable: true
423
- });
424
- UnicodeRange.prototype.setRangeStart = function (rangeStart) {
375
+ class UnicodeRange extends Node {
376
+ constructor(offset, length) {
377
+ super(offset, length);
378
+ }
379
+ get type() {
380
+ return NodeType.UnicodeRange;
381
+ }
382
+ setRangeStart(rangeStart) {
425
383
  return this.setNode('rangeStart', rangeStart);
426
- };
427
- UnicodeRange.prototype.getRangeStart = function () {
384
+ }
385
+ getRangeStart() {
428
386
  return this.rangeStart;
429
- };
430
- UnicodeRange.prototype.setRangeEnd = function (rangeEnd) {
387
+ }
388
+ setRangeEnd(rangeEnd) {
431
389
  return this.setNode('rangeEnd', rangeEnd);
432
- };
433
- UnicodeRange.prototype.getRangeEnd = function () {
390
+ }
391
+ getRangeEnd() {
434
392
  return this.rangeEnd;
435
- };
436
- return UnicodeRange;
437
- }(Node));
393
+ }
394
+ }
438
395
  exports.UnicodeRange = UnicodeRange;
439
- var Identifier = /** @class */ (function (_super) {
440
- __extends(Identifier, _super);
441
- function Identifier(offset, length) {
442
- var _this = _super.call(this, offset, length) || this;
443
- _this.isCustomProperty = false;
444
- return _this;
445
- }
446
- Object.defineProperty(Identifier.prototype, "type", {
447
- get: function () {
448
- return NodeType.Identifier;
449
- },
450
- enumerable: false,
451
- configurable: true
452
- });
453
- Identifier.prototype.containsInterpolation = function () {
396
+ class Identifier extends Node {
397
+ constructor(offset, length) {
398
+ super(offset, length);
399
+ this.isCustomProperty = false;
400
+ }
401
+ get type() {
402
+ return NodeType.Identifier;
403
+ }
404
+ containsInterpolation() {
454
405
  return this.hasChildren();
455
- };
456
- return Identifier;
457
- }(Node));
406
+ }
407
+ }
458
408
  exports.Identifier = Identifier;
459
- var Stylesheet = /** @class */ (function (_super) {
460
- __extends(Stylesheet, _super);
461
- function Stylesheet(offset, length) {
462
- return _super.call(this, offset, length) || this;
463
- }
464
- Object.defineProperty(Stylesheet.prototype, "type", {
465
- get: function () {
466
- return NodeType.Stylesheet;
467
- },
468
- enumerable: false,
469
- configurable: true
470
- });
471
- return Stylesheet;
472
- }(Node));
409
+ class Stylesheet extends Node {
410
+ constructor(offset, length) {
411
+ super(offset, length);
412
+ }
413
+ get type() {
414
+ return NodeType.Stylesheet;
415
+ }
416
+ }
473
417
  exports.Stylesheet = Stylesheet;
474
- var Declarations = /** @class */ (function (_super) {
475
- __extends(Declarations, _super);
476
- function Declarations(offset, length) {
477
- return _super.call(this, offset, length) || this;
478
- }
479
- Object.defineProperty(Declarations.prototype, "type", {
480
- get: function () {
481
- return NodeType.Declarations;
482
- },
483
- enumerable: false,
484
- configurable: true
485
- });
486
- return Declarations;
487
- }(Node));
418
+ class Declarations extends Node {
419
+ constructor(offset, length) {
420
+ super(offset, length);
421
+ }
422
+ get type() {
423
+ return NodeType.Declarations;
424
+ }
425
+ }
488
426
  exports.Declarations = Declarations;
489
- var BodyDeclaration = /** @class */ (function (_super) {
490
- __extends(BodyDeclaration, _super);
491
- function BodyDeclaration(offset, length) {
492
- return _super.call(this, offset, length) || this;
427
+ class BodyDeclaration extends Node {
428
+ constructor(offset, length) {
429
+ super(offset, length);
493
430
  }
494
- BodyDeclaration.prototype.getDeclarations = function () {
431
+ getDeclarations() {
495
432
  return this.declarations;
496
- };
497
- BodyDeclaration.prototype.setDeclarations = function (decls) {
433
+ }
434
+ setDeclarations(decls) {
498
435
  return this.setNode('declarations', decls);
499
- };
500
- return BodyDeclaration;
501
- }(Node));
436
+ }
437
+ }
502
438
  exports.BodyDeclaration = BodyDeclaration;
503
- var RuleSet = /** @class */ (function (_super) {
504
- __extends(RuleSet, _super);
505
- function RuleSet(offset, length) {
506
- return _super.call(this, offset, length) || this;
507
- }
508
- Object.defineProperty(RuleSet.prototype, "type", {
509
- get: function () {
510
- return NodeType.Ruleset;
511
- },
512
- enumerable: false,
513
- configurable: true
514
- });
515
- RuleSet.prototype.getSelectors = function () {
439
+ class RuleSet extends BodyDeclaration {
440
+ constructor(offset, length) {
441
+ super(offset, length);
442
+ }
443
+ get type() {
444
+ return NodeType.Ruleset;
445
+ }
446
+ getSelectors() {
516
447
  if (!this.selectors) {
517
448
  this.selectors = new Nodelist(this);
518
449
  }
519
450
  return this.selectors;
520
- };
521
- RuleSet.prototype.isNested = function () {
451
+ }
452
+ isNested() {
522
453
  return !!this.parent && this.parent.findParent(NodeType.Declarations) !== null;
523
- };
524
- return RuleSet;
525
- }(BodyDeclaration));
454
+ }
455
+ }
526
456
  exports.RuleSet = RuleSet;
527
- var Selector = /** @class */ (function (_super) {
528
- __extends(Selector, _super);
529
- function Selector(offset, length) {
530
- return _super.call(this, offset, length) || this;
531
- }
532
- Object.defineProperty(Selector.prototype, "type", {
533
- get: function () {
534
- return NodeType.Selector;
535
- },
536
- enumerable: false,
537
- configurable: true
538
- });
539
- return Selector;
540
- }(Node));
457
+ class Selector extends Node {
458
+ constructor(offset, length) {
459
+ super(offset, length);
460
+ }
461
+ get type() {
462
+ return NodeType.Selector;
463
+ }
464
+ }
541
465
  exports.Selector = Selector;
542
- var SimpleSelector = /** @class */ (function (_super) {
543
- __extends(SimpleSelector, _super);
544
- function SimpleSelector(offset, length) {
545
- return _super.call(this, offset, length) || this;
546
- }
547
- Object.defineProperty(SimpleSelector.prototype, "type", {
548
- get: function () {
549
- return NodeType.SimpleSelector;
550
- },
551
- enumerable: false,
552
- configurable: true
553
- });
554
- return SimpleSelector;
555
- }(Node));
466
+ class SimpleSelector extends Node {
467
+ constructor(offset, length) {
468
+ super(offset, length);
469
+ }
470
+ get type() {
471
+ return NodeType.SimpleSelector;
472
+ }
473
+ }
556
474
  exports.SimpleSelector = SimpleSelector;
557
- var AtApplyRule = /** @class */ (function (_super) {
558
- __extends(AtApplyRule, _super);
559
- function AtApplyRule(offset, length) {
560
- return _super.call(this, offset, length) || this;
561
- }
562
- Object.defineProperty(AtApplyRule.prototype, "type", {
563
- get: function () {
564
- return NodeType.AtApplyRule;
565
- },
566
- enumerable: false,
567
- configurable: true
568
- });
569
- AtApplyRule.prototype.setIdentifier = function (node) {
475
+ class AtApplyRule extends Node {
476
+ constructor(offset, length) {
477
+ super(offset, length);
478
+ }
479
+ get type() {
480
+ return NodeType.AtApplyRule;
481
+ }
482
+ setIdentifier(node) {
570
483
  return this.setNode('identifier', node, 0);
571
- };
572
- AtApplyRule.prototype.getIdentifier = function () {
484
+ }
485
+ getIdentifier() {
573
486
  return this.identifier;
574
- };
575
- AtApplyRule.prototype.getName = function () {
487
+ }
488
+ getName() {
576
489
  return this.identifier ? this.identifier.getText() : '';
577
- };
578
- return AtApplyRule;
579
- }(Node));
490
+ }
491
+ }
580
492
  exports.AtApplyRule = AtApplyRule;
581
- var AbstractDeclaration = /** @class */ (function (_super) {
582
- __extends(AbstractDeclaration, _super);
583
- function AbstractDeclaration(offset, length) {
584
- return _super.call(this, offset, length) || this;
493
+ class AbstractDeclaration extends Node {
494
+ constructor(offset, length) {
495
+ super(offset, length);
585
496
  }
586
- return AbstractDeclaration;
587
- }(Node));
497
+ }
588
498
  exports.AbstractDeclaration = AbstractDeclaration;
589
- var CustomPropertySet = /** @class */ (function (_super) {
590
- __extends(CustomPropertySet, _super);
591
- function CustomPropertySet(offset, length) {
592
- return _super.call(this, offset, length) || this;
593
- }
594
- Object.defineProperty(CustomPropertySet.prototype, "type", {
595
- get: function () {
596
- return NodeType.CustomPropertySet;
597
- },
598
- enumerable: false,
599
- configurable: true
600
- });
601
- return CustomPropertySet;
602
- }(BodyDeclaration));
499
+ class CustomPropertySet extends BodyDeclaration {
500
+ constructor(offset, length) {
501
+ super(offset, length);
502
+ }
503
+ get type() {
504
+ return NodeType.CustomPropertySet;
505
+ }
506
+ }
603
507
  exports.CustomPropertySet = CustomPropertySet;
604
- var Declaration = /** @class */ (function (_super) {
605
- __extends(Declaration, _super);
606
- function Declaration(offset, length) {
607
- var _this = _super.call(this, offset, length) || this;
608
- _this.property = null;
609
- return _this;
610
- }
611
- Object.defineProperty(Declaration.prototype, "type", {
612
- get: function () {
613
- return NodeType.Declaration;
614
- },
615
- enumerable: false,
616
- configurable: true
617
- });
618
- Declaration.prototype.setProperty = function (node) {
508
+ class Declaration extends AbstractDeclaration {
509
+ constructor(offset, length) {
510
+ super(offset, length);
511
+ this.property = null;
512
+ }
513
+ get type() {
514
+ return NodeType.Declaration;
515
+ }
516
+ setProperty(node) {
619
517
  return this.setNode('property', node);
620
- };
621
- Declaration.prototype.getProperty = function () {
518
+ }
519
+ getProperty() {
622
520
  return this.property;
623
- };
624
- Declaration.prototype.getFullPropertyName = function () {
625
- var propertyName = this.property ? this.property.getName() : 'unknown';
521
+ }
522
+ getFullPropertyName() {
523
+ const propertyName = this.property ? this.property.getName() : 'unknown';
626
524
  if (this.parent instanceof Declarations && this.parent.getParent() instanceof NestedProperties) {
627
- var parentDecl = this.parent.getParent().getParent();
525
+ const parentDecl = this.parent.getParent().getParent();
628
526
  if (parentDecl instanceof Declaration) {
629
527
  return parentDecl.getFullPropertyName() + propertyName;
630
528
  }
631
529
  }
632
530
  return propertyName;
633
- };
634
- Declaration.prototype.getNonPrefixedPropertyName = function () {
635
- var propertyName = this.getFullPropertyName();
531
+ }
532
+ getNonPrefixedPropertyName() {
533
+ const propertyName = this.getFullPropertyName();
636
534
  if (propertyName && propertyName.charAt(0) === '-') {
637
- var vendorPrefixEnd = propertyName.indexOf('-', 1);
535
+ const vendorPrefixEnd = propertyName.indexOf('-', 1);
638
536
  if (vendorPrefixEnd !== -1) {
639
537
  return propertyName.substring(vendorPrefixEnd + 1);
640
538
  }
641
539
  }
642
540
  return propertyName;
643
- };
644
- Declaration.prototype.setValue = function (value) {
541
+ }
542
+ setValue(value) {
645
543
  return this.setNode('value', value);
646
- };
647
- Declaration.prototype.getValue = function () {
544
+ }
545
+ getValue() {
648
546
  return this.value;
649
- };
650
- Declaration.prototype.setNestedProperties = function (value) {
547
+ }
548
+ setNestedProperties(value) {
651
549
  return this.setNode('nestedProperties', value);
652
- };
653
- Declaration.prototype.getNestedProperties = function () {
550
+ }
551
+ getNestedProperties() {
654
552
  return this.nestedProperties;
655
- };
656
- return Declaration;
657
- }(AbstractDeclaration));
553
+ }
554
+ }
658
555
  exports.Declaration = Declaration;
659
- var CustomPropertyDeclaration = /** @class */ (function (_super) {
660
- __extends(CustomPropertyDeclaration, _super);
661
- function CustomPropertyDeclaration(offset, length) {
662
- return _super.call(this, offset, length) || this;
663
- }
664
- Object.defineProperty(CustomPropertyDeclaration.prototype, "type", {
665
- get: function () {
666
- return NodeType.CustomPropertyDeclaration;
667
- },
668
- enumerable: false,
669
- configurable: true
670
- });
671
- CustomPropertyDeclaration.prototype.setPropertySet = function (value) {
556
+ class CustomPropertyDeclaration extends Declaration {
557
+ constructor(offset, length) {
558
+ super(offset, length);
559
+ }
560
+ get type() {
561
+ return NodeType.CustomPropertyDeclaration;
562
+ }
563
+ setPropertySet(value) {
672
564
  return this.setNode('propertySet', value);
673
- };
674
- CustomPropertyDeclaration.prototype.getPropertySet = function () {
565
+ }
566
+ getPropertySet() {
675
567
  return this.propertySet;
676
- };
677
- return CustomPropertyDeclaration;
678
- }(Declaration));
568
+ }
569
+ }
679
570
  exports.CustomPropertyDeclaration = CustomPropertyDeclaration;
680
- var Property = /** @class */ (function (_super) {
681
- __extends(Property, _super);
682
- function Property(offset, length) {
683
- return _super.call(this, offset, length) || this;
684
- }
685
- Object.defineProperty(Property.prototype, "type", {
686
- get: function () {
687
- return NodeType.Property;
688
- },
689
- enumerable: false,
690
- configurable: true
691
- });
692
- Property.prototype.setIdentifier = function (value) {
571
+ class Property extends Node {
572
+ constructor(offset, length) {
573
+ super(offset, length);
574
+ }
575
+ get type() {
576
+ return NodeType.Property;
577
+ }
578
+ setIdentifier(value) {
693
579
  return this.setNode('identifier', value);
694
- };
695
- Property.prototype.getIdentifier = function () {
580
+ }
581
+ getIdentifier() {
696
582
  return this.identifier;
697
- };
698
- Property.prototype.getName = function () {
583
+ }
584
+ getName() {
699
585
  return (0, strings_1.trim)(this.getText(), /[_\+]+$/); /* +_: less merge */
700
- };
701
- Property.prototype.isCustomProperty = function () {
586
+ }
587
+ isCustomProperty() {
702
588
  return !!this.identifier && this.identifier.isCustomProperty;
703
- };
704
- return Property;
705
- }(Node));
589
+ }
590
+ }
706
591
  exports.Property = Property;
707
- var Invocation = /** @class */ (function (_super) {
708
- __extends(Invocation, _super);
709
- function Invocation(offset, length) {
710
- return _super.call(this, offset, length) || this;
711
- }
712
- Object.defineProperty(Invocation.prototype, "type", {
713
- get: function () {
714
- return NodeType.Invocation;
715
- },
716
- enumerable: false,
717
- configurable: true
718
- });
719
- Invocation.prototype.getArguments = function () {
592
+ class Invocation extends Node {
593
+ constructor(offset, length) {
594
+ super(offset, length);
595
+ }
596
+ get type() {
597
+ return NodeType.Invocation;
598
+ }
599
+ getArguments() {
720
600
  if (!this.arguments) {
721
601
  this.arguments = new Nodelist(this);
722
602
  }
723
603
  return this.arguments;
724
- };
725
- return Invocation;
726
- }(Node));
604
+ }
605
+ }
727
606
  exports.Invocation = Invocation;
728
- var Function = /** @class */ (function (_super) {
729
- __extends(Function, _super);
730
- function Function(offset, length) {
731
- return _super.call(this, offset, length) || this;
732
- }
733
- Object.defineProperty(Function.prototype, "type", {
734
- get: function () {
735
- return NodeType.Function;
736
- },
737
- enumerable: false,
738
- configurable: true
739
- });
740
- Function.prototype.setIdentifier = function (node) {
607
+ class Function extends Invocation {
608
+ constructor(offset, length) {
609
+ super(offset, length);
610
+ }
611
+ get type() {
612
+ return NodeType.Function;
613
+ }
614
+ setIdentifier(node) {
741
615
  return this.setNode('identifier', node, 0);
742
- };
743
- Function.prototype.getIdentifier = function () {
616
+ }
617
+ getIdentifier() {
744
618
  return this.identifier;
745
- };
746
- Function.prototype.getName = function () {
619
+ }
620
+ getName() {
747
621
  return this.identifier ? this.identifier.getText() : '';
748
- };
749
- return Function;
750
- }(Invocation));
622
+ }
623
+ }
751
624
  exports.Function = Function;
752
- var FunctionParameter = /** @class */ (function (_super) {
753
- __extends(FunctionParameter, _super);
754
- function FunctionParameter(offset, length) {
755
- return _super.call(this, offset, length) || this;
756
- }
757
- Object.defineProperty(FunctionParameter.prototype, "type", {
758
- get: function () {
759
- return NodeType.FunctionParameter;
760
- },
761
- enumerable: false,
762
- configurable: true
763
- });
764
- FunctionParameter.prototype.setIdentifier = function (node) {
625
+ class FunctionParameter extends Node {
626
+ constructor(offset, length) {
627
+ super(offset, length);
628
+ }
629
+ get type() {
630
+ return NodeType.FunctionParameter;
631
+ }
632
+ setIdentifier(node) {
765
633
  return this.setNode('identifier', node, 0);
766
- };
767
- FunctionParameter.prototype.getIdentifier = function () {
634
+ }
635
+ getIdentifier() {
768
636
  return this.identifier;
769
- };
770
- FunctionParameter.prototype.getName = function () {
637
+ }
638
+ getName() {
771
639
  return this.identifier ? this.identifier.getText() : '';
772
- };
773
- FunctionParameter.prototype.setDefaultValue = function (node) {
640
+ }
641
+ setDefaultValue(node) {
774
642
  return this.setNode('defaultValue', node, 0);
775
- };
776
- FunctionParameter.prototype.getDefaultValue = function () {
643
+ }
644
+ getDefaultValue() {
777
645
  return this.defaultValue;
778
- };
779
- return FunctionParameter;
780
- }(Node));
646
+ }
647
+ }
781
648
  exports.FunctionParameter = FunctionParameter;
782
- var FunctionArgument = /** @class */ (function (_super) {
783
- __extends(FunctionArgument, _super);
784
- function FunctionArgument(offset, length) {
785
- return _super.call(this, offset, length) || this;
786
- }
787
- Object.defineProperty(FunctionArgument.prototype, "type", {
788
- get: function () {
789
- return NodeType.FunctionArgument;
790
- },
791
- enumerable: false,
792
- configurable: true
793
- });
794
- FunctionArgument.prototype.setIdentifier = function (node) {
649
+ class FunctionArgument extends Node {
650
+ constructor(offset, length) {
651
+ super(offset, length);
652
+ }
653
+ get type() {
654
+ return NodeType.FunctionArgument;
655
+ }
656
+ setIdentifier(node) {
795
657
  return this.setNode('identifier', node, 0);
796
- };
797
- FunctionArgument.prototype.getIdentifier = function () {
658
+ }
659
+ getIdentifier() {
798
660
  return this.identifier;
799
- };
800
- FunctionArgument.prototype.getName = function () {
661
+ }
662
+ getName() {
801
663
  return this.identifier ? this.identifier.getText() : '';
802
- };
803
- FunctionArgument.prototype.setValue = function (node) {
664
+ }
665
+ setValue(node) {
804
666
  return this.setNode('value', node, 0);
805
- };
806
- FunctionArgument.prototype.getValue = function () {
667
+ }
668
+ getValue() {
807
669
  return this.value;
808
- };
809
- return FunctionArgument;
810
- }(Node));
670
+ }
671
+ }
811
672
  exports.FunctionArgument = FunctionArgument;
812
- var IfStatement = /** @class */ (function (_super) {
813
- __extends(IfStatement, _super);
814
- function IfStatement(offset, length) {
815
- return _super.call(this, offset, length) || this;
816
- }
817
- Object.defineProperty(IfStatement.prototype, "type", {
818
- get: function () {
819
- return NodeType.If;
820
- },
821
- enumerable: false,
822
- configurable: true
823
- });
824
- IfStatement.prototype.setExpression = function (node) {
673
+ class IfStatement extends BodyDeclaration {
674
+ constructor(offset, length) {
675
+ super(offset, length);
676
+ }
677
+ get type() {
678
+ return NodeType.If;
679
+ }
680
+ setExpression(node) {
825
681
  return this.setNode('expression', node, 0);
826
- };
827
- IfStatement.prototype.setElseClause = function (elseClause) {
682
+ }
683
+ setElseClause(elseClause) {
828
684
  return this.setNode('elseClause', elseClause);
829
- };
830
- return IfStatement;
831
- }(BodyDeclaration));
685
+ }
686
+ }
832
687
  exports.IfStatement = IfStatement;
833
- var ForStatement = /** @class */ (function (_super) {
834
- __extends(ForStatement, _super);
835
- function ForStatement(offset, length) {
836
- return _super.call(this, offset, length) || this;
837
- }
838
- Object.defineProperty(ForStatement.prototype, "type", {
839
- get: function () {
840
- return NodeType.For;
841
- },
842
- enumerable: false,
843
- configurable: true
844
- });
845
- ForStatement.prototype.setVariable = function (node) {
688
+ class ForStatement extends BodyDeclaration {
689
+ constructor(offset, length) {
690
+ super(offset, length);
691
+ }
692
+ get type() {
693
+ return NodeType.For;
694
+ }
695
+ setVariable(node) {
846
696
  return this.setNode('variable', node, 0);
847
- };
848
- return ForStatement;
849
- }(BodyDeclaration));
697
+ }
698
+ }
850
699
  exports.ForStatement = ForStatement;
851
- var EachStatement = /** @class */ (function (_super) {
852
- __extends(EachStatement, _super);
853
- function EachStatement(offset, length) {
854
- return _super.call(this, offset, length) || this;
855
- }
856
- Object.defineProperty(EachStatement.prototype, "type", {
857
- get: function () {
858
- return NodeType.Each;
859
- },
860
- enumerable: false,
861
- configurable: true
862
- });
863
- EachStatement.prototype.getVariables = function () {
700
+ class EachStatement extends BodyDeclaration {
701
+ constructor(offset, length) {
702
+ super(offset, length);
703
+ }
704
+ get type() {
705
+ return NodeType.Each;
706
+ }
707
+ getVariables() {
864
708
  if (!this.variables) {
865
709
  this.variables = new Nodelist(this);
866
710
  }
867
711
  return this.variables;
868
- };
869
- return EachStatement;
870
- }(BodyDeclaration));
712
+ }
713
+ }
871
714
  exports.EachStatement = EachStatement;
872
- var WhileStatement = /** @class */ (function (_super) {
873
- __extends(WhileStatement, _super);
874
- function WhileStatement(offset, length) {
875
- return _super.call(this, offset, length) || this;
876
- }
877
- Object.defineProperty(WhileStatement.prototype, "type", {
878
- get: function () {
879
- return NodeType.While;
880
- },
881
- enumerable: false,
882
- configurable: true
883
- });
884
- return WhileStatement;
885
- }(BodyDeclaration));
715
+ class WhileStatement extends BodyDeclaration {
716
+ constructor(offset, length) {
717
+ super(offset, length);
718
+ }
719
+ get type() {
720
+ return NodeType.While;
721
+ }
722
+ }
886
723
  exports.WhileStatement = WhileStatement;
887
- var ElseStatement = /** @class */ (function (_super) {
888
- __extends(ElseStatement, _super);
889
- function ElseStatement(offset, length) {
890
- return _super.call(this, offset, length) || this;
891
- }
892
- Object.defineProperty(ElseStatement.prototype, "type", {
893
- get: function () {
894
- return NodeType.Else;
895
- },
896
- enumerable: false,
897
- configurable: true
898
- });
899
- return ElseStatement;
900
- }(BodyDeclaration));
724
+ class ElseStatement extends BodyDeclaration {
725
+ constructor(offset, length) {
726
+ super(offset, length);
727
+ }
728
+ get type() {
729
+ return NodeType.Else;
730
+ }
731
+ }
901
732
  exports.ElseStatement = ElseStatement;
902
- var FunctionDeclaration = /** @class */ (function (_super) {
903
- __extends(FunctionDeclaration, _super);
904
- function FunctionDeclaration(offset, length) {
905
- return _super.call(this, offset, length) || this;
906
- }
907
- Object.defineProperty(FunctionDeclaration.prototype, "type", {
908
- get: function () {
909
- return NodeType.FunctionDeclaration;
910
- },
911
- enumerable: false,
912
- configurable: true
913
- });
914
- FunctionDeclaration.prototype.setIdentifier = function (node) {
733
+ class FunctionDeclaration extends BodyDeclaration {
734
+ constructor(offset, length) {
735
+ super(offset, length);
736
+ }
737
+ get type() {
738
+ return NodeType.FunctionDeclaration;
739
+ }
740
+ setIdentifier(node) {
915
741
  return this.setNode('identifier', node, 0);
916
- };
917
- FunctionDeclaration.prototype.getIdentifier = function () {
742
+ }
743
+ getIdentifier() {
918
744
  return this.identifier;
919
- };
920
- FunctionDeclaration.prototype.getName = function () {
745
+ }
746
+ getName() {
921
747
  return this.identifier ? this.identifier.getText() : '';
922
- };
923
- FunctionDeclaration.prototype.getParameters = function () {
748
+ }
749
+ getParameters() {
924
750
  if (!this.parameters) {
925
751
  this.parameters = new Nodelist(this);
926
752
  }
927
753
  return this.parameters;
928
- };
929
- return FunctionDeclaration;
930
- }(BodyDeclaration));
754
+ }
755
+ }
931
756
  exports.FunctionDeclaration = FunctionDeclaration;
932
- var ViewPort = /** @class */ (function (_super) {
933
- __extends(ViewPort, _super);
934
- function ViewPort(offset, length) {
935
- return _super.call(this, offset, length) || this;
936
- }
937
- Object.defineProperty(ViewPort.prototype, "type", {
938
- get: function () {
939
- return NodeType.ViewPort;
940
- },
941
- enumerable: false,
942
- configurable: true
943
- });
944
- return ViewPort;
945
- }(BodyDeclaration));
757
+ class ViewPort extends BodyDeclaration {
758
+ constructor(offset, length) {
759
+ super(offset, length);
760
+ }
761
+ get type() {
762
+ return NodeType.ViewPort;
763
+ }
764
+ }
946
765
  exports.ViewPort = ViewPort;
947
- var FontFace = /** @class */ (function (_super) {
948
- __extends(FontFace, _super);
949
- function FontFace(offset, length) {
950
- return _super.call(this, offset, length) || this;
951
- }
952
- Object.defineProperty(FontFace.prototype, "type", {
953
- get: function () {
954
- return NodeType.FontFace;
955
- },
956
- enumerable: false,
957
- configurable: true
958
- });
959
- return FontFace;
960
- }(BodyDeclaration));
766
+ class FontFace extends BodyDeclaration {
767
+ constructor(offset, length) {
768
+ super(offset, length);
769
+ }
770
+ get type() {
771
+ return NodeType.FontFace;
772
+ }
773
+ }
961
774
  exports.FontFace = FontFace;
962
- var NestedProperties = /** @class */ (function (_super) {
963
- __extends(NestedProperties, _super);
964
- function NestedProperties(offset, length) {
965
- return _super.call(this, offset, length) || this;
966
- }
967
- Object.defineProperty(NestedProperties.prototype, "type", {
968
- get: function () {
969
- return NodeType.NestedProperties;
970
- },
971
- enumerable: false,
972
- configurable: true
973
- });
974
- return NestedProperties;
975
- }(BodyDeclaration));
775
+ class NestedProperties extends BodyDeclaration {
776
+ constructor(offset, length) {
777
+ super(offset, length);
778
+ }
779
+ get type() {
780
+ return NodeType.NestedProperties;
781
+ }
782
+ }
976
783
  exports.NestedProperties = NestedProperties;
977
- var Keyframe = /** @class */ (function (_super) {
978
- __extends(Keyframe, _super);
979
- function Keyframe(offset, length) {
980
- return _super.call(this, offset, length) || this;
981
- }
982
- Object.defineProperty(Keyframe.prototype, "type", {
983
- get: function () {
984
- return NodeType.Keyframe;
985
- },
986
- enumerable: false,
987
- configurable: true
988
- });
989
- Keyframe.prototype.setKeyword = function (keyword) {
784
+ class Keyframe extends BodyDeclaration {
785
+ constructor(offset, length) {
786
+ super(offset, length);
787
+ }
788
+ get type() {
789
+ return NodeType.Keyframe;
790
+ }
791
+ setKeyword(keyword) {
990
792
  return this.setNode('keyword', keyword, 0);
991
- };
992
- Keyframe.prototype.getKeyword = function () {
793
+ }
794
+ getKeyword() {
993
795
  return this.keyword;
994
- };
995
- Keyframe.prototype.setIdentifier = function (node) {
796
+ }
797
+ setIdentifier(node) {
996
798
  return this.setNode('identifier', node, 0);
997
- };
998
- Keyframe.prototype.getIdentifier = function () {
799
+ }
800
+ getIdentifier() {
999
801
  return this.identifier;
1000
- };
1001
- Keyframe.prototype.getName = function () {
802
+ }
803
+ getName() {
1002
804
  return this.identifier ? this.identifier.getText() : '';
1003
- };
1004
- return Keyframe;
1005
- }(BodyDeclaration));
805
+ }
806
+ }
1006
807
  exports.Keyframe = Keyframe;
1007
- var KeyframeSelector = /** @class */ (function (_super) {
1008
- __extends(KeyframeSelector, _super);
1009
- function KeyframeSelector(offset, length) {
1010
- return _super.call(this, offset, length) || this;
1011
- }
1012
- Object.defineProperty(KeyframeSelector.prototype, "type", {
1013
- get: function () {
1014
- return NodeType.KeyframeSelector;
1015
- },
1016
- enumerable: false,
1017
- configurable: true
1018
- });
1019
- return KeyframeSelector;
1020
- }(BodyDeclaration));
808
+ class KeyframeSelector extends BodyDeclaration {
809
+ constructor(offset, length) {
810
+ super(offset, length);
811
+ }
812
+ get type() {
813
+ return NodeType.KeyframeSelector;
814
+ }
815
+ }
1021
816
  exports.KeyframeSelector = KeyframeSelector;
1022
- var Import = /** @class */ (function (_super) {
1023
- __extends(Import, _super);
1024
- function Import(offset, length) {
1025
- return _super.call(this, offset, length) || this;
1026
- }
1027
- Object.defineProperty(Import.prototype, "type", {
1028
- get: function () {
1029
- return NodeType.Import;
1030
- },
1031
- enumerable: false,
1032
- configurable: true
1033
- });
1034
- Import.prototype.setMedialist = function (node) {
817
+ class Import extends Node {
818
+ constructor(offset, length) {
819
+ super(offset, length);
820
+ }
821
+ get type() {
822
+ return NodeType.Import;
823
+ }
824
+ setMedialist(node) {
1035
825
  if (node) {
1036
826
  node.attachTo(this);
1037
827
  return true;
1038
828
  }
1039
829
  return false;
1040
- };
1041
- return Import;
1042
- }(Node));
830
+ }
831
+ }
1043
832
  exports.Import = Import;
1044
- var Use = /** @class */ (function (_super) {
1045
- __extends(Use, _super);
1046
- function Use() {
1047
- return _super !== null && _super.apply(this, arguments) || this;
1048
- }
1049
- Object.defineProperty(Use.prototype, "type", {
1050
- get: function () {
1051
- return NodeType.Use;
1052
- },
1053
- enumerable: false,
1054
- configurable: true
1055
- });
1056
- Use.prototype.getParameters = function () {
833
+ class Use extends Node {
834
+ get type() {
835
+ return NodeType.Use;
836
+ }
837
+ getParameters() {
1057
838
  if (!this.parameters) {
1058
839
  this.parameters = new Nodelist(this);
1059
840
  }
1060
841
  return this.parameters;
1061
- };
1062
- Use.prototype.setIdentifier = function (node) {
842
+ }
843
+ setIdentifier(node) {
1063
844
  return this.setNode('identifier', node, 0);
1064
- };
1065
- Use.prototype.getIdentifier = function () {
845
+ }
846
+ getIdentifier() {
1066
847
  return this.identifier;
1067
- };
1068
- return Use;
1069
- }(Node));
848
+ }
849
+ }
1070
850
  exports.Use = Use;
1071
- var ModuleConfiguration = /** @class */ (function (_super) {
1072
- __extends(ModuleConfiguration, _super);
1073
- function ModuleConfiguration() {
1074
- return _super !== null && _super.apply(this, arguments) || this;
1075
- }
1076
- Object.defineProperty(ModuleConfiguration.prototype, "type", {
1077
- get: function () {
1078
- return NodeType.ModuleConfiguration;
1079
- },
1080
- enumerable: false,
1081
- configurable: true
1082
- });
1083
- ModuleConfiguration.prototype.setIdentifier = function (node) {
851
+ class ModuleConfiguration extends Node {
852
+ get type() {
853
+ return NodeType.ModuleConfiguration;
854
+ }
855
+ setIdentifier(node) {
1084
856
  return this.setNode('identifier', node, 0);
1085
- };
1086
- ModuleConfiguration.prototype.getIdentifier = function () {
857
+ }
858
+ getIdentifier() {
1087
859
  return this.identifier;
1088
- };
1089
- ModuleConfiguration.prototype.getName = function () {
860
+ }
861
+ getName() {
1090
862
  return this.identifier ? this.identifier.getText() : '';
1091
- };
1092
- ModuleConfiguration.prototype.setValue = function (node) {
863
+ }
864
+ setValue(node) {
1093
865
  return this.setNode('value', node, 0);
1094
- };
1095
- ModuleConfiguration.prototype.getValue = function () {
866
+ }
867
+ getValue() {
1096
868
  return this.value;
1097
- };
1098
- return ModuleConfiguration;
1099
- }(Node));
869
+ }
870
+ }
1100
871
  exports.ModuleConfiguration = ModuleConfiguration;
1101
- var Forward = /** @class */ (function (_super) {
1102
- __extends(Forward, _super);
1103
- function Forward() {
1104
- return _super !== null && _super.apply(this, arguments) || this;
1105
- }
1106
- Object.defineProperty(Forward.prototype, "type", {
1107
- get: function () {
1108
- return NodeType.Forward;
1109
- },
1110
- enumerable: false,
1111
- configurable: true
1112
- });
1113
- Forward.prototype.setIdentifier = function (node) {
872
+ class Forward extends Node {
873
+ get type() {
874
+ return NodeType.Forward;
875
+ }
876
+ setIdentifier(node) {
1114
877
  return this.setNode('identifier', node, 0);
1115
- };
1116
- Forward.prototype.getIdentifier = function () {
878
+ }
879
+ getIdentifier() {
1117
880
  return this.identifier;
1118
- };
1119
- Forward.prototype.getMembers = function () {
881
+ }
882
+ getMembers() {
1120
883
  if (!this.members) {
1121
884
  this.members = new Nodelist(this);
1122
885
  }
1123
886
  return this.members;
1124
- };
1125
- Forward.prototype.getParameters = function () {
887
+ }
888
+ getParameters() {
1126
889
  if (!this.parameters) {
1127
890
  this.parameters = new Nodelist(this);
1128
891
  }
1129
892
  return this.parameters;
1130
- };
1131
- return Forward;
1132
- }(Node));
893
+ }
894
+ }
1133
895
  exports.Forward = Forward;
1134
- var ForwardVisibility = /** @class */ (function (_super) {
1135
- __extends(ForwardVisibility, _super);
1136
- function ForwardVisibility() {
1137
- return _super !== null && _super.apply(this, arguments) || this;
1138
- }
1139
- Object.defineProperty(ForwardVisibility.prototype, "type", {
1140
- get: function () {
1141
- return NodeType.ForwardVisibility;
1142
- },
1143
- enumerable: false,
1144
- configurable: true
1145
- });
1146
- ForwardVisibility.prototype.setIdentifier = function (node) {
896
+ class ForwardVisibility extends Node {
897
+ get type() {
898
+ return NodeType.ForwardVisibility;
899
+ }
900
+ setIdentifier(node) {
1147
901
  return this.setNode('identifier', node, 0);
1148
- };
1149
- ForwardVisibility.prototype.getIdentifier = function () {
902
+ }
903
+ getIdentifier() {
1150
904
  return this.identifier;
1151
- };
1152
- return ForwardVisibility;
1153
- }(Node));
905
+ }
906
+ }
1154
907
  exports.ForwardVisibility = ForwardVisibility;
1155
- var Namespace = /** @class */ (function (_super) {
1156
- __extends(Namespace, _super);
1157
- function Namespace(offset, length) {
1158
- return _super.call(this, offset, length) || this;
1159
- }
1160
- Object.defineProperty(Namespace.prototype, "type", {
1161
- get: function () {
1162
- return NodeType.Namespace;
1163
- },
1164
- enumerable: false,
1165
- configurable: true
1166
- });
1167
- return Namespace;
1168
- }(Node));
908
+ class Namespace extends Node {
909
+ constructor(offset, length) {
910
+ super(offset, length);
911
+ }
912
+ get type() {
913
+ return NodeType.Namespace;
914
+ }
915
+ }
1169
916
  exports.Namespace = Namespace;
1170
- var Media = /** @class */ (function (_super) {
1171
- __extends(Media, _super);
1172
- function Media(offset, length) {
1173
- return _super.call(this, offset, length) || this;
1174
- }
1175
- Object.defineProperty(Media.prototype, "type", {
1176
- get: function () {
1177
- return NodeType.Media;
1178
- },
1179
- enumerable: false,
1180
- configurable: true
1181
- });
1182
- return Media;
1183
- }(BodyDeclaration));
917
+ class Media extends BodyDeclaration {
918
+ constructor(offset, length) {
919
+ super(offset, length);
920
+ }
921
+ get type() {
922
+ return NodeType.Media;
923
+ }
924
+ }
1184
925
  exports.Media = Media;
1185
- var Supports = /** @class */ (function (_super) {
1186
- __extends(Supports, _super);
1187
- function Supports(offset, length) {
1188
- return _super.call(this, offset, length) || this;
1189
- }
1190
- Object.defineProperty(Supports.prototype, "type", {
1191
- get: function () {
1192
- return NodeType.Supports;
1193
- },
1194
- enumerable: false,
1195
- configurable: true
1196
- });
1197
- return Supports;
1198
- }(BodyDeclaration));
926
+ class Supports extends BodyDeclaration {
927
+ constructor(offset, length) {
928
+ super(offset, length);
929
+ }
930
+ get type() {
931
+ return NodeType.Supports;
932
+ }
933
+ }
1199
934
  exports.Supports = Supports;
1200
- var Document = /** @class */ (function (_super) {
1201
- __extends(Document, _super);
1202
- function Document(offset, length) {
1203
- return _super.call(this, offset, length) || this;
1204
- }
1205
- Object.defineProperty(Document.prototype, "type", {
1206
- get: function () {
1207
- return NodeType.Document;
1208
- },
1209
- enumerable: false,
1210
- configurable: true
1211
- });
1212
- return Document;
1213
- }(BodyDeclaration));
935
+ class Layer extends BodyDeclaration {
936
+ constructor(offset, length) {
937
+ super(offset, length);
938
+ }
939
+ get type() {
940
+ return NodeType.Layer;
941
+ }
942
+ setNames(names) {
943
+ return this.setNode('names', names);
944
+ }
945
+ getNames() {
946
+ return this.names;
947
+ }
948
+ }
949
+ exports.Layer = Layer;
950
+ class Document extends BodyDeclaration {
951
+ constructor(offset, length) {
952
+ super(offset, length);
953
+ }
954
+ get type() {
955
+ return NodeType.Document;
956
+ }
957
+ }
1214
958
  exports.Document = Document;
1215
- var Medialist = /** @class */ (function (_super) {
1216
- __extends(Medialist, _super);
1217
- function Medialist(offset, length) {
1218
- return _super.call(this, offset, length) || this;
1219
- }
1220
- Medialist.prototype.getMediums = function () {
1221
- if (!this.mediums) {
1222
- this.mediums = new Nodelist(this);
1223
- }
1224
- return this.mediums;
1225
- };
1226
- return Medialist;
1227
- }(Node));
959
+ class Medialist extends Node {
960
+ constructor(offset, length) {
961
+ super(offset, length);
962
+ }
963
+ }
1228
964
  exports.Medialist = Medialist;
1229
- var MediaQuery = /** @class */ (function (_super) {
1230
- __extends(MediaQuery, _super);
1231
- function MediaQuery(offset, length) {
1232
- return _super.call(this, offset, length) || this;
1233
- }
1234
- Object.defineProperty(MediaQuery.prototype, "type", {
1235
- get: function () {
1236
- return NodeType.MediaQuery;
1237
- },
1238
- enumerable: false,
1239
- configurable: true
1240
- });
1241
- return MediaQuery;
1242
- }(Node));
965
+ class MediaQuery extends Node {
966
+ constructor(offset, length) {
967
+ super(offset, length);
968
+ }
969
+ get type() {
970
+ return NodeType.MediaQuery;
971
+ }
972
+ }
1243
973
  exports.MediaQuery = MediaQuery;
1244
- var MediaCondition = /** @class */ (function (_super) {
1245
- __extends(MediaCondition, _super);
1246
- function MediaCondition(offset, length) {
1247
- return _super.call(this, offset, length) || this;
1248
- }
1249
- Object.defineProperty(MediaCondition.prototype, "type", {
1250
- get: function () {
1251
- return NodeType.MediaCondition;
1252
- },
1253
- enumerable: false,
1254
- configurable: true
1255
- });
1256
- return MediaCondition;
1257
- }(Node));
974
+ class MediaCondition extends Node {
975
+ constructor(offset, length) {
976
+ super(offset, length);
977
+ }
978
+ get type() {
979
+ return NodeType.MediaCondition;
980
+ }
981
+ }
1258
982
  exports.MediaCondition = MediaCondition;
1259
- var MediaFeature = /** @class */ (function (_super) {
1260
- __extends(MediaFeature, _super);
1261
- function MediaFeature(offset, length) {
1262
- return _super.call(this, offset, length) || this;
1263
- }
1264
- Object.defineProperty(MediaFeature.prototype, "type", {
1265
- get: function () {
1266
- return NodeType.MediaFeature;
1267
- },
1268
- enumerable: false,
1269
- configurable: true
1270
- });
1271
- return MediaFeature;
1272
- }(Node));
983
+ class MediaFeature extends Node {
984
+ constructor(offset, length) {
985
+ super(offset, length);
986
+ }
987
+ get type() {
988
+ return NodeType.MediaFeature;
989
+ }
990
+ }
1273
991
  exports.MediaFeature = MediaFeature;
1274
- var SupportsCondition = /** @class */ (function (_super) {
1275
- __extends(SupportsCondition, _super);
1276
- function SupportsCondition(offset, length) {
1277
- return _super.call(this, offset, length) || this;
1278
- }
1279
- Object.defineProperty(SupportsCondition.prototype, "type", {
1280
- get: function () {
1281
- return NodeType.SupportsCondition;
1282
- },
1283
- enumerable: false,
1284
- configurable: true
1285
- });
1286
- return SupportsCondition;
1287
- }(Node));
992
+ class SupportsCondition extends Node {
993
+ constructor(offset, length) {
994
+ super(offset, length);
995
+ }
996
+ get type() {
997
+ return NodeType.SupportsCondition;
998
+ }
999
+ }
1288
1000
  exports.SupportsCondition = SupportsCondition;
1289
- var Page = /** @class */ (function (_super) {
1290
- __extends(Page, _super);
1291
- function Page(offset, length) {
1292
- return _super.call(this, offset, length) || this;
1293
- }
1294
- Object.defineProperty(Page.prototype, "type", {
1295
- get: function () {
1296
- return NodeType.Page;
1297
- },
1298
- enumerable: false,
1299
- configurable: true
1300
- });
1301
- return Page;
1302
- }(BodyDeclaration));
1001
+ class Page extends BodyDeclaration {
1002
+ constructor(offset, length) {
1003
+ super(offset, length);
1004
+ }
1005
+ get type() {
1006
+ return NodeType.Page;
1007
+ }
1008
+ }
1303
1009
  exports.Page = Page;
1304
- var PageBoxMarginBox = /** @class */ (function (_super) {
1305
- __extends(PageBoxMarginBox, _super);
1306
- function PageBoxMarginBox(offset, length) {
1307
- return _super.call(this, offset, length) || this;
1308
- }
1309
- Object.defineProperty(PageBoxMarginBox.prototype, "type", {
1310
- get: function () {
1311
- return NodeType.PageBoxMarginBox;
1312
- },
1313
- enumerable: false,
1314
- configurable: true
1315
- });
1316
- return PageBoxMarginBox;
1317
- }(BodyDeclaration));
1010
+ class PageBoxMarginBox extends BodyDeclaration {
1011
+ constructor(offset, length) {
1012
+ super(offset, length);
1013
+ }
1014
+ get type() {
1015
+ return NodeType.PageBoxMarginBox;
1016
+ }
1017
+ }
1318
1018
  exports.PageBoxMarginBox = PageBoxMarginBox;
1319
- var Expression = /** @class */ (function (_super) {
1320
- __extends(Expression, _super);
1321
- function Expression(offset, length) {
1322
- return _super.call(this, offset, length) || this;
1323
- }
1324
- Object.defineProperty(Expression.prototype, "type", {
1325
- get: function () {
1326
- return NodeType.Expression;
1327
- },
1328
- enumerable: false,
1329
- configurable: true
1330
- });
1331
- return Expression;
1332
- }(Node));
1019
+ class Expression extends Node {
1020
+ constructor(offset, length) {
1021
+ super(offset, length);
1022
+ }
1023
+ get type() {
1024
+ return NodeType.Expression;
1025
+ }
1026
+ }
1333
1027
  exports.Expression = Expression;
1334
- var BinaryExpression = /** @class */ (function (_super) {
1335
- __extends(BinaryExpression, _super);
1336
- function BinaryExpression(offset, length) {
1337
- return _super.call(this, offset, length) || this;
1338
- }
1339
- Object.defineProperty(BinaryExpression.prototype, "type", {
1340
- get: function () {
1341
- return NodeType.BinaryExpression;
1342
- },
1343
- enumerable: false,
1344
- configurable: true
1345
- });
1346
- BinaryExpression.prototype.setLeft = function (left) {
1028
+ class BinaryExpression extends Node {
1029
+ constructor(offset, length) {
1030
+ super(offset, length);
1031
+ }
1032
+ get type() {
1033
+ return NodeType.BinaryExpression;
1034
+ }
1035
+ setLeft(left) {
1347
1036
  return this.setNode('left', left);
1348
- };
1349
- BinaryExpression.prototype.getLeft = function () {
1037
+ }
1038
+ getLeft() {
1350
1039
  return this.left;
1351
- };
1352
- BinaryExpression.prototype.setRight = function (right) {
1040
+ }
1041
+ setRight(right) {
1353
1042
  return this.setNode('right', right);
1354
- };
1355
- BinaryExpression.prototype.getRight = function () {
1043
+ }
1044
+ getRight() {
1356
1045
  return this.right;
1357
- };
1358
- BinaryExpression.prototype.setOperator = function (value) {
1046
+ }
1047
+ setOperator(value) {
1359
1048
  return this.setNode('operator', value);
1360
- };
1361
- BinaryExpression.prototype.getOperator = function () {
1049
+ }
1050
+ getOperator() {
1362
1051
  return this.operator;
1363
- };
1364
- return BinaryExpression;
1365
- }(Node));
1052
+ }
1053
+ }
1366
1054
  exports.BinaryExpression = BinaryExpression;
1367
- var Term = /** @class */ (function (_super) {
1368
- __extends(Term, _super);
1369
- function Term(offset, length) {
1370
- return _super.call(this, offset, length) || this;
1371
- }
1372
- Object.defineProperty(Term.prototype, "type", {
1373
- get: function () {
1374
- return NodeType.Term;
1375
- },
1376
- enumerable: false,
1377
- configurable: true
1378
- });
1379
- Term.prototype.setOperator = function (value) {
1055
+ class Term extends Node {
1056
+ constructor(offset, length) {
1057
+ super(offset, length);
1058
+ }
1059
+ get type() {
1060
+ return NodeType.Term;
1061
+ }
1062
+ setOperator(value) {
1380
1063
  return this.setNode('operator', value);
1381
- };
1382
- Term.prototype.getOperator = function () {
1064
+ }
1065
+ getOperator() {
1383
1066
  return this.operator;
1384
- };
1385
- Term.prototype.setExpression = function (value) {
1067
+ }
1068
+ setExpression(value) {
1386
1069
  return this.setNode('expression', value);
1387
- };
1388
- Term.prototype.getExpression = function () {
1070
+ }
1071
+ getExpression() {
1389
1072
  return this.expression;
1390
- };
1391
- return Term;
1392
- }(Node));
1073
+ }
1074
+ }
1393
1075
  exports.Term = Term;
1394
- var AttributeSelector = /** @class */ (function (_super) {
1395
- __extends(AttributeSelector, _super);
1396
- function AttributeSelector(offset, length) {
1397
- return _super.call(this, offset, length) || this;
1398
- }
1399
- Object.defineProperty(AttributeSelector.prototype, "type", {
1400
- get: function () {
1401
- return NodeType.AttributeSelector;
1402
- },
1403
- enumerable: false,
1404
- configurable: true
1405
- });
1406
- AttributeSelector.prototype.setNamespacePrefix = function (value) {
1076
+ class AttributeSelector extends Node {
1077
+ constructor(offset, length) {
1078
+ super(offset, length);
1079
+ }
1080
+ get type() {
1081
+ return NodeType.AttributeSelector;
1082
+ }
1083
+ setNamespacePrefix(value) {
1407
1084
  return this.setNode('namespacePrefix', value);
1408
- };
1409
- AttributeSelector.prototype.getNamespacePrefix = function () {
1085
+ }
1086
+ getNamespacePrefix() {
1410
1087
  return this.namespacePrefix;
1411
- };
1412
- AttributeSelector.prototype.setIdentifier = function (value) {
1088
+ }
1089
+ setIdentifier(value) {
1413
1090
  return this.setNode('identifier', value);
1414
- };
1415
- AttributeSelector.prototype.getIdentifier = function () {
1091
+ }
1092
+ getIdentifier() {
1416
1093
  return this.identifier;
1417
- };
1418
- AttributeSelector.prototype.setOperator = function (operator) {
1094
+ }
1095
+ setOperator(operator) {
1419
1096
  return this.setNode('operator', operator);
1420
- };
1421
- AttributeSelector.prototype.getOperator = function () {
1097
+ }
1098
+ getOperator() {
1422
1099
  return this.operator;
1423
- };
1424
- AttributeSelector.prototype.setValue = function (value) {
1100
+ }
1101
+ setValue(value) {
1425
1102
  return this.setNode('value', value);
1426
- };
1427
- AttributeSelector.prototype.getValue = function () {
1103
+ }
1104
+ getValue() {
1428
1105
  return this.value;
1429
- };
1430
- return AttributeSelector;
1431
- }(Node));
1106
+ }
1107
+ }
1432
1108
  exports.AttributeSelector = AttributeSelector;
1433
- var Operator = /** @class */ (function (_super) {
1434
- __extends(Operator, _super);
1435
- function Operator(offset, length) {
1436
- return _super.call(this, offset, length) || this;
1437
- }
1438
- Object.defineProperty(Operator.prototype, "type", {
1439
- get: function () {
1440
- return NodeType.Operator;
1441
- },
1442
- enumerable: false,
1443
- configurable: true
1444
- });
1445
- return Operator;
1446
- }(Node));
1109
+ class Operator extends Node {
1110
+ constructor(offset, length) {
1111
+ super(offset, length);
1112
+ }
1113
+ get type() {
1114
+ return NodeType.Operator;
1115
+ }
1116
+ }
1447
1117
  exports.Operator = Operator;
1448
- var HexColorValue = /** @class */ (function (_super) {
1449
- __extends(HexColorValue, _super);
1450
- function HexColorValue(offset, length) {
1451
- return _super.call(this, offset, length) || this;
1452
- }
1453
- Object.defineProperty(HexColorValue.prototype, "type", {
1454
- get: function () {
1455
- return NodeType.HexColorValue;
1456
- },
1457
- enumerable: false,
1458
- configurable: true
1459
- });
1460
- return HexColorValue;
1461
- }(Node));
1118
+ class HexColorValue extends Node {
1119
+ constructor(offset, length) {
1120
+ super(offset, length);
1121
+ }
1122
+ get type() {
1123
+ return NodeType.HexColorValue;
1124
+ }
1125
+ }
1462
1126
  exports.HexColorValue = HexColorValue;
1463
- var RatioValue = /** @class */ (function (_super) {
1464
- __extends(RatioValue, _super);
1465
- function RatioValue(offset, length) {
1466
- return _super.call(this, offset, length) || this;
1467
- }
1468
- Object.defineProperty(RatioValue.prototype, "type", {
1469
- get: function () {
1470
- return NodeType.RatioValue;
1471
- },
1472
- enumerable: false,
1473
- configurable: true
1474
- });
1475
- return RatioValue;
1476
- }(Node));
1127
+ class RatioValue extends Node {
1128
+ constructor(offset, length) {
1129
+ super(offset, length);
1130
+ }
1131
+ get type() {
1132
+ return NodeType.RatioValue;
1133
+ }
1134
+ }
1477
1135
  exports.RatioValue = RatioValue;
1478
- var _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
1479
- var NumericValue = /** @class */ (function (_super) {
1480
- __extends(NumericValue, _super);
1481
- function NumericValue(offset, length) {
1482
- return _super.call(this, offset, length) || this;
1483
- }
1484
- Object.defineProperty(NumericValue.prototype, "type", {
1485
- get: function () {
1486
- return NodeType.NumericValue;
1487
- },
1488
- enumerable: false,
1489
- configurable: true
1490
- });
1491
- NumericValue.prototype.getValue = function () {
1492
- var raw = this.getText();
1493
- var unitIdx = 0;
1494
- var code;
1495
- for (var i = 0, len = raw.length; i < len; i++) {
1136
+ const _dot = '.'.charCodeAt(0), _0 = '0'.charCodeAt(0), _9 = '9'.charCodeAt(0);
1137
+ class NumericValue extends Node {
1138
+ constructor(offset, length) {
1139
+ super(offset, length);
1140
+ }
1141
+ get type() {
1142
+ return NodeType.NumericValue;
1143
+ }
1144
+ getValue() {
1145
+ const raw = this.getText();
1146
+ let unitIdx = 0;
1147
+ let code;
1148
+ for (let i = 0, len = raw.length; i < len; i++) {
1496
1149
  code = raw.charCodeAt(i);
1497
1150
  if (!(_0 <= code && code <= _9 || code === _dot)) {
1498
1151
  break;
@@ -1503,317 +1156,231 @@ var __extends = (this && this.__extends) || (function () {
1503
1156
  value: raw.substring(0, unitIdx),
1504
1157
  unit: unitIdx < raw.length ? raw.substring(unitIdx) : undefined
1505
1158
  };
1506
- };
1507
- return NumericValue;
1508
- }(Node));
1159
+ }
1160
+ }
1509
1161
  exports.NumericValue = NumericValue;
1510
- var VariableDeclaration = /** @class */ (function (_super) {
1511
- __extends(VariableDeclaration, _super);
1512
- function VariableDeclaration(offset, length) {
1513
- var _this = _super.call(this, offset, length) || this;
1514
- _this.variable = null;
1515
- _this.value = null;
1516
- _this.needsSemicolon = true;
1517
- return _this;
1518
- }
1519
- Object.defineProperty(VariableDeclaration.prototype, "type", {
1520
- get: function () {
1521
- return NodeType.VariableDeclaration;
1522
- },
1523
- enumerable: false,
1524
- configurable: true
1525
- });
1526
- VariableDeclaration.prototype.setVariable = function (node) {
1162
+ class VariableDeclaration extends AbstractDeclaration {
1163
+ constructor(offset, length) {
1164
+ super(offset, length);
1165
+ this.needsSemicolon = true;
1166
+ }
1167
+ get type() {
1168
+ return NodeType.VariableDeclaration;
1169
+ }
1170
+ setVariable(node) {
1527
1171
  if (node) {
1528
1172
  node.attachTo(this);
1529
1173
  this.variable = node;
1530
1174
  return true;
1531
1175
  }
1532
1176
  return false;
1533
- };
1534
- VariableDeclaration.prototype.getVariable = function () {
1177
+ }
1178
+ getVariable() {
1535
1179
  return this.variable;
1536
- };
1537
- VariableDeclaration.prototype.getName = function () {
1180
+ }
1181
+ getName() {
1538
1182
  return this.variable ? this.variable.getName() : '';
1539
- };
1540
- VariableDeclaration.prototype.setValue = function (node) {
1183
+ }
1184
+ setValue(node) {
1541
1185
  if (node) {
1542
1186
  node.attachTo(this);
1543
1187
  this.value = node;
1544
1188
  return true;
1545
1189
  }
1546
1190
  return false;
1547
- };
1548
- VariableDeclaration.prototype.getValue = function () {
1191
+ }
1192
+ getValue() {
1549
1193
  return this.value;
1550
- };
1551
- return VariableDeclaration;
1552
- }(AbstractDeclaration));
1194
+ }
1195
+ }
1553
1196
  exports.VariableDeclaration = VariableDeclaration;
1554
- var Interpolation = /** @class */ (function (_super) {
1555
- __extends(Interpolation, _super);
1197
+ class Interpolation extends Node {
1556
1198
  // private _interpolations: void; // workaround for https://github.com/Microsoft/TypeScript/issues/18276
1557
- function Interpolation(offset, length) {
1558
- return _super.call(this, offset, length) || this;
1559
- }
1560
- Object.defineProperty(Interpolation.prototype, "type", {
1561
- get: function () {
1562
- return NodeType.Interpolation;
1563
- },
1564
- enumerable: false,
1565
- configurable: true
1566
- });
1567
- return Interpolation;
1568
- }(Node));
1199
+ constructor(offset, length) {
1200
+ super(offset, length);
1201
+ }
1202
+ get type() {
1203
+ return NodeType.Interpolation;
1204
+ }
1205
+ }
1569
1206
  exports.Interpolation = Interpolation;
1570
- var Variable = /** @class */ (function (_super) {
1571
- __extends(Variable, _super);
1572
- function Variable(offset, length) {
1573
- return _super.call(this, offset, length) || this;
1574
- }
1575
- Object.defineProperty(Variable.prototype, "type", {
1576
- get: function () {
1577
- return NodeType.VariableName;
1578
- },
1579
- enumerable: false,
1580
- configurable: true
1581
- });
1582
- Variable.prototype.getName = function () {
1207
+ class Variable extends Node {
1208
+ constructor(offset, length) {
1209
+ super(offset, length);
1210
+ }
1211
+ get type() {
1212
+ return NodeType.VariableName;
1213
+ }
1214
+ getName() {
1583
1215
  return this.getText();
1584
- };
1585
- return Variable;
1586
- }(Node));
1216
+ }
1217
+ }
1587
1218
  exports.Variable = Variable;
1588
- var ExtendsReference = /** @class */ (function (_super) {
1589
- __extends(ExtendsReference, _super);
1590
- function ExtendsReference(offset, length) {
1591
- return _super.call(this, offset, length) || this;
1592
- }
1593
- Object.defineProperty(ExtendsReference.prototype, "type", {
1594
- get: function () {
1595
- return NodeType.ExtendsReference;
1596
- },
1597
- enumerable: false,
1598
- configurable: true
1599
- });
1600
- ExtendsReference.prototype.getSelectors = function () {
1219
+ class ExtendsReference extends Node {
1220
+ constructor(offset, length) {
1221
+ super(offset, length);
1222
+ }
1223
+ get type() {
1224
+ return NodeType.ExtendsReference;
1225
+ }
1226
+ getSelectors() {
1601
1227
  if (!this.selectors) {
1602
1228
  this.selectors = new Nodelist(this);
1603
1229
  }
1604
1230
  return this.selectors;
1605
- };
1606
- return ExtendsReference;
1607
- }(Node));
1231
+ }
1232
+ }
1608
1233
  exports.ExtendsReference = ExtendsReference;
1609
- var MixinContentReference = /** @class */ (function (_super) {
1610
- __extends(MixinContentReference, _super);
1611
- function MixinContentReference(offset, length) {
1612
- return _super.call(this, offset, length) || this;
1613
- }
1614
- Object.defineProperty(MixinContentReference.prototype, "type", {
1615
- get: function () {
1616
- return NodeType.MixinContentReference;
1617
- },
1618
- enumerable: false,
1619
- configurable: true
1620
- });
1621
- MixinContentReference.prototype.getArguments = function () {
1234
+ class MixinContentReference extends Node {
1235
+ constructor(offset, length) {
1236
+ super(offset, length);
1237
+ }
1238
+ get type() {
1239
+ return NodeType.MixinContentReference;
1240
+ }
1241
+ getArguments() {
1622
1242
  if (!this.arguments) {
1623
1243
  this.arguments = new Nodelist(this);
1624
1244
  }
1625
1245
  return this.arguments;
1626
- };
1627
- return MixinContentReference;
1628
- }(Node));
1246
+ }
1247
+ }
1629
1248
  exports.MixinContentReference = MixinContentReference;
1630
- var MixinContentDeclaration = /** @class */ (function (_super) {
1631
- __extends(MixinContentDeclaration, _super);
1632
- function MixinContentDeclaration(offset, length) {
1633
- return _super.call(this, offset, length) || this;
1634
- }
1635
- Object.defineProperty(MixinContentDeclaration.prototype, "type", {
1636
- get: function () {
1637
- return NodeType.MixinContentReference;
1638
- },
1639
- enumerable: false,
1640
- configurable: true
1641
- });
1642
- MixinContentDeclaration.prototype.getParameters = function () {
1249
+ class MixinContentDeclaration extends BodyDeclaration {
1250
+ constructor(offset, length) {
1251
+ super(offset, length);
1252
+ }
1253
+ get type() {
1254
+ return NodeType.MixinContentReference;
1255
+ }
1256
+ getParameters() {
1643
1257
  if (!this.parameters) {
1644
1258
  this.parameters = new Nodelist(this);
1645
1259
  }
1646
1260
  return this.parameters;
1647
- };
1648
- return MixinContentDeclaration;
1649
- }(BodyDeclaration));
1261
+ }
1262
+ }
1650
1263
  exports.MixinContentDeclaration = MixinContentDeclaration;
1651
- var MixinReference = /** @class */ (function (_super) {
1652
- __extends(MixinReference, _super);
1653
- function MixinReference(offset, length) {
1654
- return _super.call(this, offset, length) || this;
1655
- }
1656
- Object.defineProperty(MixinReference.prototype, "type", {
1657
- get: function () {
1658
- return NodeType.MixinReference;
1659
- },
1660
- enumerable: false,
1661
- configurable: true
1662
- });
1663
- MixinReference.prototype.getNamespaces = function () {
1264
+ class MixinReference extends Node {
1265
+ constructor(offset, length) {
1266
+ super(offset, length);
1267
+ }
1268
+ get type() {
1269
+ return NodeType.MixinReference;
1270
+ }
1271
+ getNamespaces() {
1664
1272
  if (!this.namespaces) {
1665
1273
  this.namespaces = new Nodelist(this);
1666
1274
  }
1667
1275
  return this.namespaces;
1668
- };
1669
- MixinReference.prototype.setIdentifier = function (node) {
1276
+ }
1277
+ setIdentifier(node) {
1670
1278
  return this.setNode('identifier', node, 0);
1671
- };
1672
- MixinReference.prototype.getIdentifier = function () {
1279
+ }
1280
+ getIdentifier() {
1673
1281
  return this.identifier;
1674
- };
1675
- MixinReference.prototype.getName = function () {
1282
+ }
1283
+ getName() {
1676
1284
  return this.identifier ? this.identifier.getText() : '';
1677
- };
1678
- MixinReference.prototype.getArguments = function () {
1285
+ }
1286
+ getArguments() {
1679
1287
  if (!this.arguments) {
1680
1288
  this.arguments = new Nodelist(this);
1681
1289
  }
1682
1290
  return this.arguments;
1683
- };
1684
- MixinReference.prototype.setContent = function (node) {
1291
+ }
1292
+ setContent(node) {
1685
1293
  return this.setNode('content', node);
1686
- };
1687
- MixinReference.prototype.getContent = function () {
1294
+ }
1295
+ getContent() {
1688
1296
  return this.content;
1689
- };
1690
- return MixinReference;
1691
- }(Node));
1297
+ }
1298
+ }
1692
1299
  exports.MixinReference = MixinReference;
1693
- var MixinDeclaration = /** @class */ (function (_super) {
1694
- __extends(MixinDeclaration, _super);
1695
- function MixinDeclaration(offset, length) {
1696
- return _super.call(this, offset, length) || this;
1697
- }
1698
- Object.defineProperty(MixinDeclaration.prototype, "type", {
1699
- get: function () {
1700
- return NodeType.MixinDeclaration;
1701
- },
1702
- enumerable: false,
1703
- configurable: true
1704
- });
1705
- MixinDeclaration.prototype.setIdentifier = function (node) {
1300
+ class MixinDeclaration extends BodyDeclaration {
1301
+ constructor(offset, length) {
1302
+ super(offset, length);
1303
+ }
1304
+ get type() {
1305
+ return NodeType.MixinDeclaration;
1306
+ }
1307
+ setIdentifier(node) {
1706
1308
  return this.setNode('identifier', node, 0);
1707
- };
1708
- MixinDeclaration.prototype.getIdentifier = function () {
1309
+ }
1310
+ getIdentifier() {
1709
1311
  return this.identifier;
1710
- };
1711
- MixinDeclaration.prototype.getName = function () {
1312
+ }
1313
+ getName() {
1712
1314
  return this.identifier ? this.identifier.getText() : '';
1713
- };
1714
- MixinDeclaration.prototype.getParameters = function () {
1315
+ }
1316
+ getParameters() {
1715
1317
  if (!this.parameters) {
1716
1318
  this.parameters = new Nodelist(this);
1717
1319
  }
1718
1320
  return this.parameters;
1719
- };
1720
- MixinDeclaration.prototype.setGuard = function (node) {
1321
+ }
1322
+ setGuard(node) {
1721
1323
  if (node) {
1722
1324
  node.attachTo(this);
1723
1325
  this.guard = node;
1724
1326
  }
1725
1327
  return false;
1726
- };
1727
- return MixinDeclaration;
1728
- }(BodyDeclaration));
1328
+ }
1329
+ }
1729
1330
  exports.MixinDeclaration = MixinDeclaration;
1730
- var UnknownAtRule = /** @class */ (function (_super) {
1731
- __extends(UnknownAtRule, _super);
1732
- function UnknownAtRule(offset, length) {
1733
- return _super.call(this, offset, length) || this;
1734
- }
1735
- Object.defineProperty(UnknownAtRule.prototype, "type", {
1736
- get: function () {
1737
- return NodeType.UnknownAtRule;
1738
- },
1739
- enumerable: false,
1740
- configurable: true
1741
- });
1742
- UnknownAtRule.prototype.setAtRuleName = function (atRuleName) {
1331
+ class UnknownAtRule extends BodyDeclaration {
1332
+ constructor(offset, length) {
1333
+ super(offset, length);
1334
+ }
1335
+ get type() {
1336
+ return NodeType.UnknownAtRule;
1337
+ }
1338
+ setAtRuleName(atRuleName) {
1743
1339
  this.atRuleName = atRuleName;
1744
- };
1745
- UnknownAtRule.prototype.getAtRuleName = function () {
1340
+ }
1341
+ getAtRuleName() {
1746
1342
  return this.atRuleName;
1747
- };
1748
- return UnknownAtRule;
1749
- }(BodyDeclaration));
1343
+ }
1344
+ }
1750
1345
  exports.UnknownAtRule = UnknownAtRule;
1751
- var ListEntry = /** @class */ (function (_super) {
1752
- __extends(ListEntry, _super);
1753
- function ListEntry() {
1754
- return _super !== null && _super.apply(this, arguments) || this;
1755
- }
1756
- Object.defineProperty(ListEntry.prototype, "type", {
1757
- get: function () {
1758
- return NodeType.ListEntry;
1759
- },
1760
- enumerable: false,
1761
- configurable: true
1762
- });
1763
- ListEntry.prototype.setKey = function (node) {
1346
+ class ListEntry extends Node {
1347
+ get type() {
1348
+ return NodeType.ListEntry;
1349
+ }
1350
+ setKey(node) {
1764
1351
  return this.setNode('key', node, 0);
1765
- };
1766
- ListEntry.prototype.setValue = function (node) {
1352
+ }
1353
+ setValue(node) {
1767
1354
  return this.setNode('value', node, 1);
1768
- };
1769
- return ListEntry;
1770
- }(Node));
1771
- exports.ListEntry = ListEntry;
1772
- var LessGuard = /** @class */ (function (_super) {
1773
- __extends(LessGuard, _super);
1774
- function LessGuard() {
1775
- return _super !== null && _super.apply(this, arguments) || this;
1776
1355
  }
1777
- LessGuard.prototype.getConditions = function () {
1356
+ }
1357
+ exports.ListEntry = ListEntry;
1358
+ class LessGuard extends Node {
1359
+ getConditions() {
1778
1360
  if (!this.conditions) {
1779
1361
  this.conditions = new Nodelist(this);
1780
1362
  }
1781
1363
  return this.conditions;
1782
- };
1783
- return LessGuard;
1784
- }(Node));
1785
- exports.LessGuard = LessGuard;
1786
- var GuardCondition = /** @class */ (function (_super) {
1787
- __extends(GuardCondition, _super);
1788
- function GuardCondition() {
1789
- return _super !== null && _super.apply(this, arguments) || this;
1790
1364
  }
1791
- GuardCondition.prototype.setVariable = function (node) {
1365
+ }
1366
+ exports.LessGuard = LessGuard;
1367
+ class GuardCondition extends Node {
1368
+ setVariable(node) {
1792
1369
  return this.setNode('variable', node);
1793
- };
1794
- return GuardCondition;
1795
- }(Node));
1370
+ }
1371
+ }
1796
1372
  exports.GuardCondition = GuardCondition;
1797
- var Module = /** @class */ (function (_super) {
1798
- __extends(Module, _super);
1799
- function Module() {
1800
- return _super !== null && _super.apply(this, arguments) || this;
1801
- }
1802
- Object.defineProperty(Module.prototype, "type", {
1803
- get: function () {
1804
- return NodeType.Module;
1805
- },
1806
- enumerable: false,
1807
- configurable: true
1808
- });
1809
- Module.prototype.setIdentifier = function (node) {
1373
+ class Module extends Node {
1374
+ get type() {
1375
+ return NodeType.Module;
1376
+ }
1377
+ setIdentifier(node) {
1810
1378
  return this.setNode('identifier', node, 0);
1811
- };
1812
- Module.prototype.getIdentifier = function () {
1379
+ }
1380
+ getIdentifier() {
1813
1381
  return this.identifier;
1814
- };
1815
- return Module;
1816
- }(Node));
1382
+ }
1383
+ }
1817
1384
  exports.Module = Module;
1818
1385
  var Level;
1819
1386
  (function (Level) {
@@ -1821,10 +1388,8 @@ var __extends = (this && this.__extends) || (function () {
1821
1388
  Level[Level["Warning"] = 2] = "Warning";
1822
1389
  Level[Level["Error"] = 4] = "Error";
1823
1390
  })(Level = exports.Level || (exports.Level = {}));
1824
- var Marker = /** @class */ (function () {
1825
- function Marker(node, rule, level, message, offset, length) {
1826
- if (offset === void 0) { offset = node.offset; }
1827
- if (length === void 0) { length = node.length; }
1391
+ class Marker {
1392
+ constructor(node, rule, level, message, offset = node.offset, length = node.length) {
1828
1393
  this.node = node;
1829
1394
  this.rule = rule;
1830
1395
  this.level = level;
@@ -1832,26 +1397,25 @@ var __extends = (this && this.__extends) || (function () {
1832
1397
  this.offset = offset;
1833
1398
  this.length = length;
1834
1399
  }
1835
- Marker.prototype.getRule = function () {
1400
+ getRule() {
1836
1401
  return this.rule;
1837
- };
1838
- Marker.prototype.getLevel = function () {
1402
+ }
1403
+ getLevel() {
1839
1404
  return this.level;
1840
- };
1841
- Marker.prototype.getOffset = function () {
1405
+ }
1406
+ getOffset() {
1842
1407
  return this.offset;
1843
- };
1844
- Marker.prototype.getLength = function () {
1408
+ }
1409
+ getLength() {
1845
1410
  return this.length;
1846
- };
1847
- Marker.prototype.getNode = function () {
1411
+ }
1412
+ getNode() {
1848
1413
  return this.node;
1849
- };
1850
- Marker.prototype.getMessage = function () {
1414
+ }
1415
+ getMessage() {
1851
1416
  return this.message;
1852
- };
1853
- return Marker;
1854
- }());
1417
+ }
1418
+ }
1855
1419
  exports.Marker = Marker;
1856
1420
  /*
1857
1421
  export class DefaultVisitor implements IVisitor {
@@ -2013,22 +1577,21 @@ var __extends = (this && this.__extends) || (function () {
2013
1577
  }
2014
1578
  }
2015
1579
  */
2016
- var ParseErrorCollector = /** @class */ (function () {
2017
- function ParseErrorCollector() {
1580
+ class ParseErrorCollector {
1581
+ constructor() {
2018
1582
  this.entries = [];
2019
1583
  }
2020
- ParseErrorCollector.entries = function (node) {
2021
- var visitor = new ParseErrorCollector();
1584
+ static entries(node) {
1585
+ const visitor = new ParseErrorCollector();
2022
1586
  node.acceptVisitor(visitor);
2023
1587
  return visitor.entries;
2024
- };
2025
- ParseErrorCollector.prototype.visitNode = function (node) {
1588
+ }
1589
+ visitNode(node) {
2026
1590
  if (node.isErroneous()) {
2027
1591
  node.collectIssues(this.entries);
2028
1592
  }
2029
1593
  return true;
2030
- };
2031
- return ParseErrorCollector;
2032
- }());
1594
+ }
1595
+ }
2033
1596
  exports.ParseErrorCollector = ParseErrorCollector;
2034
1597
  });