vscode-css-languageservice 6.0.1 → 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 (87) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/beautify/beautify-css.js +11 -4
  4. package/lib/esm/cssLanguageService.d.ts +38 -37
  5. package/lib/esm/cssLanguageService.js +73 -72
  6. package/lib/esm/cssLanguageTypes.d.ts +238 -238
  7. package/lib/esm/cssLanguageTypes.js +42 -42
  8. package/lib/esm/data/webCustomData.js +22089 -21959
  9. package/lib/esm/languageFacts/builtinData.js +142 -142
  10. package/lib/esm/languageFacts/colors.js +469 -469
  11. package/lib/esm/languageFacts/dataManager.js +88 -88
  12. package/lib/esm/languageFacts/dataProvider.js +73 -73
  13. package/lib/esm/languageFacts/entry.js +137 -137
  14. package/lib/esm/languageFacts/facts.js +8 -8
  15. package/lib/esm/parser/cssErrors.js +48 -48
  16. package/lib/esm/parser/cssNodes.js +1511 -1502
  17. package/lib/esm/parser/cssParser.js +1606 -1534
  18. package/lib/esm/parser/cssScanner.js +592 -592
  19. package/lib/esm/parser/cssSymbolScope.js +311 -311
  20. package/lib/esm/parser/lessParser.js +715 -714
  21. package/lib/esm/parser/lessScanner.js +57 -57
  22. package/lib/esm/parser/scssErrors.js +18 -18
  23. package/lib/esm/parser/scssParser.js +806 -796
  24. package/lib/esm/parser/scssScanner.js +95 -95
  25. package/lib/esm/services/cssCodeActions.js +77 -77
  26. package/lib/esm/services/cssCompletion.js +1054 -1054
  27. package/lib/esm/services/cssFolding.js +190 -190
  28. package/lib/esm/services/cssFormatter.js +136 -136
  29. package/lib/esm/services/cssHover.js +148 -148
  30. package/lib/esm/services/cssNavigation.js +441 -378
  31. package/lib/esm/services/cssSelectionRange.js +47 -47
  32. package/lib/esm/services/cssValidation.js +41 -41
  33. package/lib/esm/services/lessCompletion.js +378 -378
  34. package/lib/esm/services/lint.js +518 -518
  35. package/lib/esm/services/lintRules.js +76 -76
  36. package/lib/esm/services/lintUtil.js +196 -196
  37. package/lib/esm/services/pathCompletion.js +157 -157
  38. package/lib/esm/services/scssCompletion.js +354 -354
  39. package/lib/esm/services/scssNavigation.js +82 -82
  40. package/lib/esm/services/selectorPrinting.js +492 -492
  41. package/lib/esm/utils/arrays.js +40 -40
  42. package/lib/esm/utils/objects.js +11 -11
  43. package/lib/esm/utils/resources.js +11 -11
  44. package/lib/esm/utils/strings.js +102 -102
  45. package/lib/umd/beautify/beautify-css.js +11 -4
  46. package/lib/umd/cssLanguageService.d.ts +38 -37
  47. package/lib/umd/cssLanguageService.js +104 -99
  48. package/lib/umd/cssLanguageTypes.d.ts +238 -238
  49. package/lib/umd/cssLanguageTypes.js +89 -89
  50. package/lib/umd/data/webCustomData.js +22102 -21972
  51. package/lib/umd/languageFacts/builtinData.js +154 -154
  52. package/lib/umd/languageFacts/colors.js +492 -492
  53. package/lib/umd/languageFacts/dataManager.js +101 -101
  54. package/lib/umd/languageFacts/dataProvider.js +86 -86
  55. package/lib/umd/languageFacts/entry.js +152 -152
  56. package/lib/umd/languageFacts/facts.js +33 -29
  57. package/lib/umd/parser/cssErrors.js +61 -61
  58. package/lib/umd/parser/cssNodes.js +1597 -1587
  59. package/lib/umd/parser/cssParser.js +1619 -1547
  60. package/lib/umd/parser/cssScanner.js +606 -606
  61. package/lib/umd/parser/cssSymbolScope.js +328 -328
  62. package/lib/umd/parser/lessParser.js +728 -727
  63. package/lib/umd/parser/lessScanner.js +70 -70
  64. package/lib/umd/parser/scssErrors.js +31 -31
  65. package/lib/umd/parser/scssParser.js +819 -809
  66. package/lib/umd/parser/scssScanner.js +108 -108
  67. package/lib/umd/services/cssCodeActions.js +90 -90
  68. package/lib/umd/services/cssCompletion.js +1067 -1067
  69. package/lib/umd/services/cssFolding.js +203 -203
  70. package/lib/umd/services/cssFormatter.js +150 -150
  71. package/lib/umd/services/cssHover.js +161 -161
  72. package/lib/umd/services/cssNavigation.js +454 -391
  73. package/lib/umd/services/cssSelectionRange.js +60 -60
  74. package/lib/umd/services/cssValidation.js +54 -54
  75. package/lib/umd/services/lessCompletion.js +391 -391
  76. package/lib/umd/services/lint.js +531 -531
  77. package/lib/umd/services/lintRules.js +91 -91
  78. package/lib/umd/services/lintUtil.js +210 -210
  79. package/lib/umd/services/pathCompletion.js +171 -171
  80. package/lib/umd/services/scssCompletion.js +367 -367
  81. package/lib/umd/services/scssNavigation.js +95 -95
  82. package/lib/umd/services/selectorPrinting.js +510 -510
  83. package/lib/umd/utils/arrays.js +55 -55
  84. package/lib/umd/utils/objects.js +25 -25
  85. package/lib/umd/utils/resources.js +26 -26
  86. package/lib/umd/utils/strings.js +120 -120
  87. package/package.json +13 -12
@@ -1,152 +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
- 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
+ (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,33 @@
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
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
+ desc = { enumerable: true, get: function() { return m[k]; } };
6
+ }
7
+ Object.defineProperty(o, k2, desc);
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
13
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
14
+ };
15
+ (function (factory) {
16
+ if (typeof module === "object" && typeof module.exports === "object") {
17
+ var v = factory(require, exports);
18
+ if (v !== undefined) module.exports = v;
19
+ }
20
+ else if (typeof define === "function" && define.amd) {
21
+ define(["require", "exports", "./entry", "./colors", "./builtinData"], factory);
22
+ }
23
+ })(function (require, exports) {
24
+ /*---------------------------------------------------------------------------------------------
25
+ * Copyright (c) Microsoft Corporation. All rights reserved.
26
+ * Licensed under the MIT License. See License.txt in the project root for license information.
27
+ *--------------------------------------------------------------------------------------------*/
28
+ 'use strict';
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./entry"), exports);
31
+ __exportStar(require("./colors"), exports);
32
+ __exportStar(require("./builtinData"), exports);
33
+ });
@@ -1,61 +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
- 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
- });
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
+ });