vscode-css-languageservice 5.4.1 → 6.0.1

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 (87) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/README.md +1 -0
  3. package/lib/esm/beautify/beautify-css.js +50 -8
  4. package/lib/esm/cssLanguageService.d.ts +37 -37
  5. package/lib/esm/cssLanguageService.js +72 -75
  6. package/lib/esm/cssLanguageTypes.d.ts +238 -238
  7. package/lib/esm/cssLanguageTypes.js +42 -42
  8. package/lib/esm/data/webCustomData.js +21959 -21965
  9. package/lib/esm/languageFacts/builtinData.js +142 -142
  10. package/lib/esm/languageFacts/colors.js +469 -472
  11. package/lib/esm/languageFacts/dataManager.js +88 -92
  12. package/lib/esm/languageFacts/dataProvider.js +73 -79
  13. package/lib/esm/languageFacts/entry.js +137 -138
  14. package/lib/esm/languageFacts/facts.js +8 -8
  15. package/lib/esm/parser/cssErrors.js +48 -50
  16. package/lib/esm/parser/cssNodes.js +1502 -2019
  17. package/lib/esm/parser/cssParser.js +1534 -1566
  18. package/lib/esm/parser/cssScanner.js +592 -599
  19. package/lib/esm/parser/cssSymbolScope.js +311 -341
  20. package/lib/esm/parser/lessParser.js +714 -740
  21. package/lib/esm/parser/lessScanner.js +57 -78
  22. package/lib/esm/parser/scssErrors.js +18 -20
  23. package/lib/esm/parser/scssParser.js +796 -818
  24. package/lib/esm/parser/scssScanner.js +95 -116
  25. package/lib/esm/services/cssCodeActions.js +77 -81
  26. package/lib/esm/services/cssCompletion.js +1054 -1149
  27. package/lib/esm/services/cssFolding.js +190 -193
  28. package/lib/esm/services/cssFormatter.js +136 -136
  29. package/lib/esm/services/cssHover.js +148 -151
  30. package/lib/esm/services/cssNavigation.js +378 -470
  31. package/lib/esm/services/cssSelectionRange.js +47 -47
  32. package/lib/esm/services/cssValidation.js +41 -44
  33. package/lib/esm/services/lessCompletion.js +378 -397
  34. package/lib/esm/services/lint.js +518 -532
  35. package/lib/esm/services/lintRules.js +76 -83
  36. package/lib/esm/services/lintUtil.js +196 -205
  37. package/lib/esm/services/pathCompletion.js +157 -231
  38. package/lib/esm/services/scssCompletion.js +354 -378
  39. package/lib/esm/services/scssNavigation.js +82 -154
  40. package/lib/esm/services/selectorPrinting.js +492 -536
  41. package/lib/esm/utils/arrays.js +40 -46
  42. package/lib/esm/utils/objects.js +11 -11
  43. package/lib/esm/utils/resources.js +11 -24
  44. package/lib/esm/utils/strings.js +102 -104
  45. package/lib/umd/beautify/beautify-css.js +50 -8
  46. package/lib/umd/cssLanguageService.d.ts +37 -37
  47. package/lib/umd/cssLanguageService.js +99 -102
  48. package/lib/umd/cssLanguageTypes.d.ts +238 -238
  49. package/lib/umd/cssLanguageTypes.js +89 -88
  50. package/lib/umd/data/webCustomData.js +21972 -21978
  51. package/lib/umd/languageFacts/builtinData.js +154 -154
  52. package/lib/umd/languageFacts/colors.js +492 -495
  53. package/lib/umd/languageFacts/dataManager.js +101 -104
  54. package/lib/umd/languageFacts/dataProvider.js +86 -91
  55. package/lib/umd/languageFacts/entry.js +152 -153
  56. package/lib/umd/languageFacts/facts.js +29 -29
  57. package/lib/umd/parser/cssErrors.js +61 -62
  58. package/lib/umd/parser/cssNodes.js +1587 -2034
  59. package/lib/umd/parser/cssParser.js +1547 -1578
  60. package/lib/umd/parser/cssScanner.js +606 -611
  61. package/lib/umd/parser/cssSymbolScope.js +328 -353
  62. package/lib/umd/parser/lessParser.js +727 -752
  63. package/lib/umd/parser/lessScanner.js +70 -90
  64. package/lib/umd/parser/scssErrors.js +31 -32
  65. package/lib/umd/parser/scssParser.js +809 -830
  66. package/lib/umd/parser/scssScanner.js +108 -128
  67. package/lib/umd/services/cssCodeActions.js +90 -93
  68. package/lib/umd/services/cssCompletion.js +1067 -1161
  69. package/lib/umd/services/cssFolding.js +203 -206
  70. package/lib/umd/services/cssFormatter.js +150 -150
  71. package/lib/umd/services/cssHover.js +161 -163
  72. package/lib/umd/services/cssNavigation.js +391 -482
  73. package/lib/umd/services/cssSelectionRange.js +60 -60
  74. package/lib/umd/services/cssValidation.js +54 -56
  75. package/lib/umd/services/lessCompletion.js +391 -409
  76. package/lib/umd/services/lint.js +531 -544
  77. package/lib/umd/services/lintRules.js +91 -95
  78. package/lib/umd/services/lintUtil.js +210 -218
  79. package/lib/umd/services/pathCompletion.js +171 -244
  80. package/lib/umd/services/scssCompletion.js +367 -390
  81. package/lib/umd/services/scssNavigation.js +95 -166
  82. package/lib/umd/services/selectorPrinting.js +510 -550
  83. package/lib/umd/utils/arrays.js +55 -61
  84. package/lib/umd/utils/objects.js +25 -25
  85. package/lib/umd/utils/resources.js +26 -39
  86. package/lib/umd/utils/strings.js +120 -122
  87. package/package.json +11 -11
@@ -1,153 +1,152 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "../cssLanguageTypes"], factory);
8
- }
9
- })(function (require, exports) {
10
- /*---------------------------------------------------------------------------------------------
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License. See License.txt in the project root for license information.
13
- *--------------------------------------------------------------------------------------------*/
14
- 'use strict';
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.getBrowserLabel = exports.textToMarkedString = exports.getEntryDescription = exports.browserNames = void 0;
17
- var cssLanguageTypes_1 = require("../cssLanguageTypes");
18
- exports.browserNames = {
19
- E: 'Edge',
20
- FF: 'Firefox',
21
- S: 'Safari',
22
- C: 'Chrome',
23
- IE: 'IE',
24
- O: 'Opera'
25
- };
26
- function getEntryStatus(status) {
27
- switch (status) {
28
- case 'experimental':
29
- return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
30
- case 'nonstandard':
31
- return '🚨️ Property is nonstandard. Avoid using it.\n\n';
32
- case 'obsolete':
33
- return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
34
- default:
35
- return '';
36
- }
37
- }
38
- function getEntryDescription(entry, doesSupportMarkdown, settings) {
39
- var result;
40
- if (doesSupportMarkdown) {
41
- result = {
42
- kind: 'markdown',
43
- value: getEntryMarkdownDescription(entry, settings)
44
- };
45
- }
46
- else {
47
- result = {
48
- kind: 'plaintext',
49
- value: getEntryStringDescription(entry, settings)
50
- };
51
- }
52
- if (result.value === '') {
53
- return undefined;
54
- }
55
- return result;
56
- }
57
- exports.getEntryDescription = getEntryDescription;
58
- function textToMarkedString(text) {
59
- text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
60
- return text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
61
- }
62
- exports.textToMarkedString = textToMarkedString;
63
- function getEntryStringDescription(entry, settings) {
64
- if (!entry.description || entry.description === '') {
65
- return '';
66
- }
67
- if (typeof entry.description !== 'string') {
68
- return entry.description.value;
69
- }
70
- var result = '';
71
- if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) {
72
- if (entry.status) {
73
- result += getEntryStatus(entry.status);
74
- }
75
- result += entry.description;
76
- var browserLabel = getBrowserLabel(entry.browsers);
77
- if (browserLabel) {
78
- result += '\n(' + browserLabel + ')';
79
- }
80
- if ('syntax' in entry) {
81
- result += "\n\nSyntax: ".concat(entry.syntax);
82
- }
83
- }
84
- if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) {
85
- if (result.length > 0) {
86
- result += '\n\n';
87
- }
88
- result += entry.references.map(function (r) {
89
- return "".concat(r.name, ": ").concat(r.url);
90
- }).join(' | ');
91
- }
92
- return result;
93
- }
94
- function getEntryMarkdownDescription(entry, settings) {
95
- if (!entry.description || entry.description === '') {
96
- return '';
97
- }
98
- var result = '';
99
- if ((settings === null || settings === void 0 ? void 0 : settings.documentation) !== false) {
100
- if (entry.status) {
101
- result += getEntryStatus(entry.status);
102
- }
103
- if (typeof entry.description === 'string') {
104
- result += textToMarkedString(entry.description);
105
- }
106
- else {
107
- result += entry.description.kind === cssLanguageTypes_1.MarkupKind.Markdown ? entry.description.value : textToMarkedString(entry.description.value);
108
- }
109
- var browserLabel = getBrowserLabel(entry.browsers);
110
- if (browserLabel) {
111
- result += '\n\n(' + textToMarkedString(browserLabel) + ')';
112
- }
113
- if ('syntax' in entry && entry.syntax) {
114
- result += "\n\nSyntax: ".concat(textToMarkedString(entry.syntax));
115
- }
116
- }
117
- if (entry.references && entry.references.length > 0 && (settings === null || settings === void 0 ? void 0 : settings.references) !== false) {
118
- if (result.length > 0) {
119
- result += '\n\n';
120
- }
121
- result += entry.references.map(function (r) {
122
- return "[".concat(r.name, "](").concat(r.url, ")");
123
- }).join(' | ');
124
- }
125
- return result;
126
- }
127
- /**
128
- * Input is like `["E12","FF49","C47","IE","O"]`
129
- * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
130
- */
131
- function getBrowserLabel(browsers) {
132
- if (browsers === void 0) { browsers = []; }
133
- if (browsers.length === 0) {
134
- return null;
135
- }
136
- return browsers
137
- .map(function (b) {
138
- var result = '';
139
- var matches = b.match(/([A-Z]+)(\d+)?/);
140
- var name = matches[1];
141
- var version = matches[2];
142
- if (name in exports.browserNames) {
143
- result += exports.browserNames[name];
144
- }
145
- if (version) {
146
- result += ' ' + version;
147
- }
148
- return result;
149
- })
150
- .join(', ');
151
- }
152
- exports.getBrowserLabel = getBrowserLabel;
153
- });
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "../cssLanguageTypes"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ /*---------------------------------------------------------------------------------------------
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License. See License.txt in the project root for license information.
13
+ *--------------------------------------------------------------------------------------------*/
14
+ 'use strict';
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.getBrowserLabel = exports.textToMarkedString = exports.getEntryDescription = exports.browserNames = void 0;
17
+ const cssLanguageTypes_1 = require("../cssLanguageTypes");
18
+ exports.browserNames = {
19
+ E: 'Edge',
20
+ FF: 'Firefox',
21
+ S: 'Safari',
22
+ C: 'Chrome',
23
+ IE: 'IE',
24
+ O: 'Opera'
25
+ };
26
+ function getEntryStatus(status) {
27
+ switch (status) {
28
+ case 'experimental':
29
+ return '⚠️ Property is experimental. Be cautious when using it.️\n\n';
30
+ case 'nonstandard':
31
+ return '🚨️ Property is nonstandard. Avoid using it.\n\n';
32
+ case 'obsolete':
33
+ return '🚨️️️ Property is obsolete. Avoid using it.\n\n';
34
+ default:
35
+ return '';
36
+ }
37
+ }
38
+ function getEntryDescription(entry, doesSupportMarkdown, settings) {
39
+ let result;
40
+ if (doesSupportMarkdown) {
41
+ result = {
42
+ kind: 'markdown',
43
+ value: getEntryMarkdownDescription(entry, settings)
44
+ };
45
+ }
46
+ else {
47
+ result = {
48
+ kind: 'plaintext',
49
+ value: getEntryStringDescription(entry, settings)
50
+ };
51
+ }
52
+ if (result.value === '') {
53
+ return undefined;
54
+ }
55
+ return result;
56
+ }
57
+ exports.getEntryDescription = getEntryDescription;
58
+ function textToMarkedString(text) {
59
+ text = text.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
60
+ return text.replace(/</g, '&lt;').replace(/>/g, '&gt;');
61
+ }
62
+ exports.textToMarkedString = textToMarkedString;
63
+ function getEntryStringDescription(entry, settings) {
64
+ if (!entry.description || entry.description === '') {
65
+ return '';
66
+ }
67
+ if (typeof entry.description !== 'string') {
68
+ return entry.description.value;
69
+ }
70
+ let result = '';
71
+ if (settings?.documentation !== false) {
72
+ if (entry.status) {
73
+ result += getEntryStatus(entry.status);
74
+ }
75
+ result += entry.description;
76
+ const browserLabel = getBrowserLabel(entry.browsers);
77
+ if (browserLabel) {
78
+ result += '\n(' + browserLabel + ')';
79
+ }
80
+ if ('syntax' in entry) {
81
+ result += `\n\nSyntax: ${entry.syntax}`;
82
+ }
83
+ }
84
+ if (entry.references && entry.references.length > 0 && settings?.references !== false) {
85
+ if (result.length > 0) {
86
+ result += '\n\n';
87
+ }
88
+ result += entry.references.map(r => {
89
+ return `${r.name}: ${r.url}`;
90
+ }).join(' | ');
91
+ }
92
+ return result;
93
+ }
94
+ function getEntryMarkdownDescription(entry, settings) {
95
+ if (!entry.description || entry.description === '') {
96
+ return '';
97
+ }
98
+ let result = '';
99
+ if (settings?.documentation !== false) {
100
+ if (entry.status) {
101
+ result += getEntryStatus(entry.status);
102
+ }
103
+ if (typeof entry.description === 'string') {
104
+ result += textToMarkedString(entry.description);
105
+ }
106
+ else {
107
+ result += entry.description.kind === cssLanguageTypes_1.MarkupKind.Markdown ? entry.description.value : textToMarkedString(entry.description.value);
108
+ }
109
+ const browserLabel = getBrowserLabel(entry.browsers);
110
+ if (browserLabel) {
111
+ result += '\n\n(' + textToMarkedString(browserLabel) + ')';
112
+ }
113
+ if ('syntax' in entry && entry.syntax) {
114
+ result += `\n\nSyntax: ${textToMarkedString(entry.syntax)}`;
115
+ }
116
+ }
117
+ if (entry.references && entry.references.length > 0 && settings?.references !== false) {
118
+ if (result.length > 0) {
119
+ result += '\n\n';
120
+ }
121
+ result += entry.references.map(r => {
122
+ return `[${r.name}](${r.url})`;
123
+ }).join(' | ');
124
+ }
125
+ return result;
126
+ }
127
+ /**
128
+ * Input is like `["E12","FF49","C47","IE","O"]`
129
+ * Output is like `Edge 12, Firefox 49, Chrome 47, IE, Opera`
130
+ */
131
+ function getBrowserLabel(browsers = []) {
132
+ if (browsers.length === 0) {
133
+ return null;
134
+ }
135
+ return browsers
136
+ .map(b => {
137
+ let result = '';
138
+ const matches = b.match(/([A-Z]+)(\d+)?/);
139
+ const name = matches[1];
140
+ const version = matches[2];
141
+ if (name in exports.browserNames) {
142
+ result += exports.browserNames[name];
143
+ }
144
+ if (version) {
145
+ result += ' ' + version;
146
+ }
147
+ return result;
148
+ })
149
+ .join(', ');
150
+ }
151
+ exports.getBrowserLabel = getBrowserLabel;
152
+ });
@@ -1,29 +1,29 @@
1
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
- if (k2 === undefined) k2 = k;
3
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
- }) : (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- o[k2] = m[k];
7
- }));
8
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
9
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
10
- };
11
- (function (factory) {
12
- if (typeof module === "object" && typeof module.exports === "object") {
13
- var v = factory(require, exports);
14
- if (v !== undefined) module.exports = v;
15
- }
16
- else if (typeof define === "function" && define.amd) {
17
- define(["require", "exports", "./entry", "./colors", "./builtinData"], factory);
18
- }
19
- })(function (require, exports) {
20
- /*---------------------------------------------------------------------------------------------
21
- * Copyright (c) Microsoft Corporation. All rights reserved.
22
- * Licensed under the MIT License. See License.txt in the project root for license information.
23
- *--------------------------------------------------------------------------------------------*/
24
- 'use strict';
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- __exportStar(require("./entry"), exports);
27
- __exportStar(require("./colors"), exports);
28
- __exportStar(require("./builtinData"), exports);
29
- });
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ }) : (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ o[k2] = m[k];
7
+ }));
8
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
9
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
10
+ };
11
+ (function (factory) {
12
+ if (typeof module === "object" && typeof module.exports === "object") {
13
+ var v = factory(require, exports);
14
+ if (v !== undefined) module.exports = v;
15
+ }
16
+ else if (typeof define === "function" && define.amd) {
17
+ define(["require", "exports", "./entry", "./colors", "./builtinData"], factory);
18
+ }
19
+ })(function (require, exports) {
20
+ /*---------------------------------------------------------------------------------------------
21
+ * Copyright (c) Microsoft Corporation. All rights reserved.
22
+ * Licensed under the MIT License. See License.txt in the project root for license information.
23
+ *--------------------------------------------------------------------------------------------*/
24
+ 'use strict';
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ __exportStar(require("./entry"), exports);
27
+ __exportStar(require("./colors"), exports);
28
+ __exportStar(require("./builtinData"), exports);
29
+ });
@@ -1,62 +1,61 @@
1
- (function (factory) {
2
- if (typeof module === "object" && typeof module.exports === "object") {
3
- var v = factory(require, exports);
4
- if (v !== undefined) module.exports = v;
5
- }
6
- else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "vscode-nls"], factory);
8
- }
9
- })(function (require, exports) {
10
- /*---------------------------------------------------------------------------------------------
11
- * Copyright (c) Microsoft Corporation. All rights reserved.
12
- * Licensed under the MIT License. See License.txt in the project root for license information.
13
- *--------------------------------------------------------------------------------------------*/
14
- 'use strict';
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ParseError = exports.CSSIssueType = void 0;
17
- var nls = require("vscode-nls");
18
- var localize = nls.loadMessageBundle();
19
- var CSSIssueType = /** @class */ (function () {
20
- function CSSIssueType(id, message) {
21
- this.id = id;
22
- this.message = message;
23
- }
24
- return CSSIssueType;
25
- }());
26
- exports.CSSIssueType = CSSIssueType;
27
- exports.ParseError = {
28
- NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
29
- ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
30
- RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
31
- DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
32
- ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
33
- SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
34
- TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
35
- ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
36
- OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
37
- IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
38
- PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
39
- URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
40
- URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
41
- VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
42
- VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
43
- PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
44
- LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
45
- RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
46
- LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
47
- RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
48
- LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
49
- RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
50
- CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
51
- PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
52
- UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
53
- UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
54
- SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
55
- StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
56
- WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
57
- MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
58
- IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
59
- WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
60
- IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
61
- };
62
- });
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "vscode-nls"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ /*---------------------------------------------------------------------------------------------
11
+ * Copyright (c) Microsoft Corporation. All rights reserved.
12
+ * Licensed under the MIT License. See License.txt in the project root for license information.
13
+ *--------------------------------------------------------------------------------------------*/
14
+ 'use strict';
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ParseError = exports.CSSIssueType = void 0;
17
+ const nls = require("vscode-nls");
18
+ const localize = nls.loadMessageBundle();
19
+ class CSSIssueType {
20
+ constructor(id, message) {
21
+ this.id = id;
22
+ this.message = message;
23
+ }
24
+ }
25
+ exports.CSSIssueType = CSSIssueType;
26
+ exports.ParseError = {
27
+ NumberExpected: new CSSIssueType('css-numberexpected', localize('expected.number', "number expected")),
28
+ ConditionExpected: new CSSIssueType('css-conditionexpected', localize('expected.condt', "condition expected")),
29
+ RuleOrSelectorExpected: new CSSIssueType('css-ruleorselectorexpected', localize('expected.ruleorselector', "at-rule or selector expected")),
30
+ DotExpected: new CSSIssueType('css-dotexpected', localize('expected.dot', "dot expected")),
31
+ ColonExpected: new CSSIssueType('css-colonexpected', localize('expected.colon', "colon expected")),
32
+ SemiColonExpected: new CSSIssueType('css-semicolonexpected', localize('expected.semicolon', "semi-colon expected")),
33
+ TermExpected: new CSSIssueType('css-termexpected', localize('expected.term', "term expected")),
34
+ ExpressionExpected: new CSSIssueType('css-expressionexpected', localize('expected.expression', "expression expected")),
35
+ OperatorExpected: new CSSIssueType('css-operatorexpected', localize('expected.operator', "operator expected")),
36
+ IdentifierExpected: new CSSIssueType('css-identifierexpected', localize('expected.ident', "identifier expected")),
37
+ PercentageExpected: new CSSIssueType('css-percentageexpected', localize('expected.percentage', "percentage expected")),
38
+ URIOrStringExpected: new CSSIssueType('css-uriorstringexpected', localize('expected.uriorstring', "uri or string expected")),
39
+ URIExpected: new CSSIssueType('css-uriexpected', localize('expected.uri', "URI expected")),
40
+ VariableNameExpected: new CSSIssueType('css-varnameexpected', localize('expected.varname', "variable name expected")),
41
+ VariableValueExpected: new CSSIssueType('css-varvalueexpected', localize('expected.varvalue', "variable value expected")),
42
+ PropertyValueExpected: new CSSIssueType('css-propertyvalueexpected', localize('expected.propvalue', "property value expected")),
43
+ LeftCurlyExpected: new CSSIssueType('css-lcurlyexpected', localize('expected.lcurly', "{ expected")),
44
+ RightCurlyExpected: new CSSIssueType('css-rcurlyexpected', localize('expected.rcurly', "} expected")),
45
+ LeftSquareBracketExpected: new CSSIssueType('css-rbracketexpected', localize('expected.lsquare', "[ expected")),
46
+ RightSquareBracketExpected: new CSSIssueType('css-lbracketexpected', localize('expected.rsquare', "] expected")),
47
+ LeftParenthesisExpected: new CSSIssueType('css-lparentexpected', localize('expected.lparen', "( expected")),
48
+ RightParenthesisExpected: new CSSIssueType('css-rparentexpected', localize('expected.rparent', ") expected")),
49
+ CommaExpected: new CSSIssueType('css-commaexpected', localize('expected.comma', "comma expected")),
50
+ PageDirectiveOrDeclarationExpected: new CSSIssueType('css-pagedirordeclexpected', localize('expected.pagedirordecl', "page directive or declaraton expected")),
51
+ UnknownAtRule: new CSSIssueType('css-unknownatrule', localize('unknown.atrule', "at-rule unknown")),
52
+ UnknownKeyword: new CSSIssueType('css-unknownkeyword', localize('unknown.keyword', "unknown keyword")),
53
+ SelectorExpected: new CSSIssueType('css-selectorexpected', localize('expected.selector', "selector expected")),
54
+ StringLiteralExpected: new CSSIssueType('css-stringliteralexpected', localize('expected.stringliteral', "string literal expected")),
55
+ WhitespaceExpected: new CSSIssueType('css-whitespaceexpected', localize('expected.whitespace', "whitespace expected")),
56
+ MediaQueryExpected: new CSSIssueType('css-mediaqueryexpected', localize('expected.mediaquery', "media query expected")),
57
+ IdentifierOrWildcardExpected: new CSSIssueType('css-idorwildcardexpected', localize('expected.idorwildcard', "identifier or wildcard expected")),
58
+ WildcardExpected: new CSSIssueType('css-wildcardexpected', localize('expected.wildcard', "wildcard expected")),
59
+ IdentifierOrVariableExpected: new CSSIssueType('css-idorvarexpected', localize('expected.idorvar', "identifier or variable expected")),
60
+ };
61
+ });