vscode-css-languageservice 5.4.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -1
- package/lib/esm/cssLanguageService.d.ts +37 -37
- package/lib/esm/cssLanguageService.js +72 -75
- package/lib/esm/cssLanguageTypes.d.ts +238 -238
- package/lib/esm/cssLanguageTypes.js +42 -42
- package/lib/esm/data/webCustomData.js +21965 -21965
- package/lib/esm/languageFacts/builtinData.js +142 -142
- package/lib/esm/languageFacts/colors.js +469 -472
- package/lib/esm/languageFacts/dataManager.js +88 -92
- package/lib/esm/languageFacts/dataProvider.js +73 -79
- package/lib/esm/languageFacts/entry.js +137 -138
- package/lib/esm/languageFacts/facts.js +8 -8
- package/lib/esm/parser/cssErrors.js +48 -50
- package/lib/esm/parser/cssNodes.js +1502 -2019
- package/lib/esm/parser/cssParser.js +1534 -1563
- package/lib/esm/parser/cssScanner.js +592 -599
- package/lib/esm/parser/cssSymbolScope.js +311 -341
- package/lib/esm/parser/lessParser.js +714 -740
- package/lib/esm/parser/lessScanner.js +57 -78
- package/lib/esm/parser/scssErrors.js +18 -20
- package/lib/esm/parser/scssParser.js +796 -818
- package/lib/esm/parser/scssScanner.js +95 -116
- package/lib/esm/services/cssCodeActions.js +77 -81
- package/lib/esm/services/cssCompletion.js +1054 -1149
- package/lib/esm/services/cssFolding.js +190 -193
- package/lib/esm/services/cssFormatter.js +136 -136
- package/lib/esm/services/cssHover.js +148 -151
- package/lib/esm/services/cssNavigation.js +378 -470
- package/lib/esm/services/cssSelectionRange.js +47 -47
- package/lib/esm/services/cssValidation.js +41 -44
- package/lib/esm/services/lessCompletion.js +378 -397
- package/lib/esm/services/lint.js +518 -532
- package/lib/esm/services/lintRules.js +76 -83
- package/lib/esm/services/lintUtil.js +196 -205
- package/lib/esm/services/pathCompletion.js +157 -231
- package/lib/esm/services/scssCompletion.js +354 -378
- package/lib/esm/services/scssNavigation.js +82 -154
- package/lib/esm/services/selectorPrinting.js +492 -536
- package/lib/esm/utils/arrays.js +40 -46
- package/lib/esm/utils/objects.js +11 -11
- package/lib/esm/utils/resources.js +11 -24
- package/lib/esm/utils/strings.js +102 -104
- package/lib/umd/cssLanguageService.d.ts +37 -37
- package/lib/umd/cssLanguageService.js +99 -102
- package/lib/umd/cssLanguageTypes.d.ts +238 -238
- package/lib/umd/cssLanguageTypes.js +89 -88
- package/lib/umd/data/webCustomData.js +21978 -21978
- package/lib/umd/languageFacts/builtinData.js +154 -154
- package/lib/umd/languageFacts/colors.js +492 -495
- package/lib/umd/languageFacts/dataManager.js +101 -104
- package/lib/umd/languageFacts/dataProvider.js +86 -91
- package/lib/umd/languageFacts/entry.js +152 -153
- package/lib/umd/languageFacts/facts.js +29 -29
- package/lib/umd/parser/cssErrors.js +61 -62
- package/lib/umd/parser/cssNodes.js +1587 -2034
- package/lib/umd/parser/cssParser.js +1547 -1575
- package/lib/umd/parser/cssScanner.js +606 -611
- package/lib/umd/parser/cssSymbolScope.js +328 -353
- package/lib/umd/parser/lessParser.js +727 -752
- package/lib/umd/parser/lessScanner.js +70 -90
- package/lib/umd/parser/scssErrors.js +31 -32
- package/lib/umd/parser/scssParser.js +809 -830
- package/lib/umd/parser/scssScanner.js +108 -128
- package/lib/umd/services/cssCodeActions.js +90 -93
- package/lib/umd/services/cssCompletion.js +1067 -1161
- package/lib/umd/services/cssFolding.js +203 -206
- package/lib/umd/services/cssFormatter.js +150 -150
- package/lib/umd/services/cssHover.js +161 -163
- package/lib/umd/services/cssNavigation.js +391 -482
- package/lib/umd/services/cssSelectionRange.js +60 -60
- package/lib/umd/services/cssValidation.js +54 -56
- package/lib/umd/services/lessCompletion.js +391 -409
- package/lib/umd/services/lint.js +531 -544
- package/lib/umd/services/lintRules.js +91 -95
- package/lib/umd/services/lintUtil.js +210 -218
- package/lib/umd/services/pathCompletion.js +171 -244
- package/lib/umd/services/scssCompletion.js +367 -390
- package/lib/umd/services/scssNavigation.js +95 -166
- package/lib/umd/services/selectorPrinting.js +510 -550
- package/lib/umd/utils/arrays.js +55 -61
- package/lib/umd/utils/objects.js +25 -25
- package/lib/umd/utils/resources.js +26 -39
- package/lib/umd/utils/strings.js +120 -122
- package/package.json +10 -10
|
@@ -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
|
-
|
|
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
|
-
|
|
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, '<').replace(/>/g, '>');
|
|
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
|
-
|
|
71
|
-
if (
|
|
72
|
-
if (entry.status) {
|
|
73
|
-
result += getEntryStatus(entry.status);
|
|
74
|
-
}
|
|
75
|
-
result += entry.description;
|
|
76
|
-
|
|
77
|
-
if (browserLabel) {
|
|
78
|
-
result += '\n(' + browserLabel + ')';
|
|
79
|
-
}
|
|
80
|
-
if ('syntax' in entry) {
|
|
81
|
-
result +=
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (entry.references && entry.references.length > 0 &&
|
|
85
|
-
if (result.length > 0) {
|
|
86
|
-
result += '\n\n';
|
|
87
|
-
}
|
|
88
|
-
result += entry.references.map(
|
|
89
|
-
return
|
|
90
|
-
}).join(' | ');
|
|
91
|
-
}
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
function getEntryMarkdownDescription(entry, settings) {
|
|
95
|
-
if (!entry.description || entry.description === '') {
|
|
96
|
-
return '';
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (
|
|
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
|
-
|
|
110
|
-
if (browserLabel) {
|
|
111
|
-
result += '\n\n(' + textToMarkedString(browserLabel) + ')';
|
|
112
|
-
}
|
|
113
|
-
if ('syntax' in entry && entry.syntax) {
|
|
114
|
-
result +=
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (entry.references && entry.references.length > 0 &&
|
|
118
|
-
if (result.length > 0) {
|
|
119
|
-
result += '\n\n';
|
|
120
|
-
}
|
|
121
|
-
result += entry.references.map(
|
|
122
|
-
return
|
|
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 ===
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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, '<').replace(/>/g, '>');
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.id = id;
|
|
22
|
-
this.message = message;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
+
});
|