build
This commit is contained in:
parent
ef9df32d3d
commit
6b1c88d0b9
|
|
@ -894,11 +894,11 @@ __webpack_require__.r(__webpack_exports__);
|
|||
|
||||
|
||||
|
||||
/**
|
||||
* Options preset for `OffscreenCanvas`.
|
||||
* @param config - Preset requirements.
|
||||
* @param config.DOMParser - XML/HTML parser from string into DOM Document.
|
||||
* @returns Preset object.
|
||||
/**
|
||||
* Options preset for `OffscreenCanvas`.
|
||||
* @param config - Preset requirements.
|
||||
* @param config.DOMParser - XML/HTML parser from string into DOM Document.
|
||||
* @returns Preset object.
|
||||
*/
|
||||
function offscreen() {
|
||||
var {
|
||||
|
|
@ -932,13 +932,13 @@ function offscreen() {
|
|||
return preset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options preset for `node-canvas`.
|
||||
* @param config - Preset requirements.
|
||||
* @param config.DOMParser - XML/HTML parser from string into DOM Document.
|
||||
* @param config.canvas - `node-canvas` exports.
|
||||
* @param config.fetch - WHATWG-compatible `fetch` function.
|
||||
* @returns Preset object.
|
||||
/**
|
||||
* Options preset for `node-canvas`.
|
||||
* @param config - Preset requirements.
|
||||
* @param config.DOMParser - XML/HTML parser from string into DOM Document.
|
||||
* @param config.canvas - `node-canvas` exports.
|
||||
* @param config.fetch - WHATWG-compatible `fetch` function.
|
||||
* @returns Preset object.
|
||||
*/
|
||||
function node(_ref) {
|
||||
var {
|
||||
|
|
@ -963,36 +963,36 @@ var index = /*#__PURE__*/Object.freeze({
|
|||
node: node
|
||||
});
|
||||
|
||||
/**
|
||||
* HTML-safe compress white-spaces.
|
||||
* @param str - String to compress.
|
||||
* @returns String.
|
||||
/**
|
||||
* HTML-safe compress white-spaces.
|
||||
* @param str - String to compress.
|
||||
* @returns String.
|
||||
*/
|
||||
function compressSpaces(str) {
|
||||
return str.replace(/(?!\u3000)\s+/gm, ' ');
|
||||
}
|
||||
/**
|
||||
* HTML-safe left trim.
|
||||
* @param str - String to trim.
|
||||
* @returns String.
|
||||
/**
|
||||
* HTML-safe left trim.
|
||||
* @param str - String to trim.
|
||||
* @returns String.
|
||||
*/
|
||||
|
||||
function trimLeft(str) {
|
||||
return str.replace(/^[\n \t]+/, '');
|
||||
}
|
||||
/**
|
||||
* HTML-safe right trim.
|
||||
* @param str - String to trim.
|
||||
* @returns String.
|
||||
/**
|
||||
* HTML-safe right trim.
|
||||
* @param str - String to trim.
|
||||
* @returns String.
|
||||
*/
|
||||
|
||||
function trimRight(str) {
|
||||
return str.replace(/[\n \t]+$/, '');
|
||||
}
|
||||
/**
|
||||
* String to numbers array.
|
||||
* @param str - Numbers string.
|
||||
* @returns Numbers array.
|
||||
/**
|
||||
* String to numbers array.
|
||||
* @param str - Numbers string.
|
||||
* @returns Numbers array.
|
||||
*/
|
||||
|
||||
function toNumbers(str) {
|
||||
|
|
@ -1001,10 +1001,10 @@ function toNumbers(str) {
|
|||
} // Microsoft Edge fix
|
||||
|
||||
var allUppercase = /^[A-Z-]+$/;
|
||||
/**
|
||||
* Normalize attribute name.
|
||||
* @param name - Attribute name.
|
||||
* @returns Normalized attribute name.
|
||||
/**
|
||||
* Normalize attribute name.
|
||||
* @param name - Attribute name.
|
||||
* @returns Normalized attribute name.
|
||||
*/
|
||||
|
||||
function normalizeAttributeName(name) {
|
||||
|
|
@ -1014,10 +1014,10 @@ function normalizeAttributeName(name) {
|
|||
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* Parse external URL.
|
||||
* @param url - CSS url string.
|
||||
* @returns Parsed URL.
|
||||
/**
|
||||
* Parse external URL.
|
||||
* @param url - CSS url string.
|
||||
* @returns Parsed URL.
|
||||
*/
|
||||
|
||||
function parseExternalUrl(url) {
|
||||
|
|
@ -1028,10 +1028,10 @@ function parseExternalUrl(url) {
|
|||
var urlMatch = /url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(url) || [];
|
||||
return urlMatch[2] || urlMatch[3] || urlMatch[4];
|
||||
}
|
||||
/**
|
||||
* Transform floats to integers in rgb colors.
|
||||
* @param color - Color to normalize.
|
||||
* @returns Normalized color.
|
||||
/**
|
||||
* Transform floats to integers in rgb colors.
|
||||
* @param color - Color to normalize.
|
||||
* @returns Normalized color.
|
||||
*/
|
||||
|
||||
function normalizeColor(color) {
|
||||
|
|
@ -1062,10 +1062,10 @@ function findSelectorMatch(selector, regex) {
|
|||
|
||||
return [selector.replace(regex, ' '), matches.length];
|
||||
}
|
||||
/**
|
||||
* Measure selector specificity.
|
||||
* @param selector - Selector to measure.
|
||||
* @returns Specificity.
|
||||
/**
|
||||
* Measure selector specificity.
|
||||
* @param selector - Selector to measure.
|
||||
* @returns Specificity.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -1093,30 +1093,30 @@ function getSelectorSpecificity(selector) {
|
|||
}
|
||||
|
||||
var PSEUDO_ZERO = .00000001;
|
||||
/**
|
||||
* Vector magnitude.
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
/**
|
||||
* Vector magnitude.
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
*/
|
||||
|
||||
function vectorMagnitude(v) {
|
||||
return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));
|
||||
}
|
||||
/**
|
||||
* Ratio between two vectors.
|
||||
* @param u
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
/**
|
||||
* Ratio between two vectors.
|
||||
* @param u
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
*/
|
||||
|
||||
function vectorsRatio(u, v) {
|
||||
return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));
|
||||
}
|
||||
/**
|
||||
* Angle between two vectors.
|
||||
* @param u
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
/**
|
||||
* Angle between two vectors.
|
||||
* @param u
|
||||
* @param v
|
||||
* @returns Number result.
|
||||
*/
|
||||
|
||||
function vectorsAngle(u, v) {
|
||||
|
|
@ -2807,10 +2807,10 @@ function wrapFontFamily(fontFamily) {
|
|||
function prepareFontFamily(fontFamily) {
|
||||
return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');
|
||||
}
|
||||
/**
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
|
||||
* @param fontStyle
|
||||
* @returns CSS font style.
|
||||
/**
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
|
||||
* @param fontStyle
|
||||
* @returns CSS font style.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -2838,10 +2838,10 @@ function prepareFontStyle(fontStyle) {
|
|||
return '';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
||||
* @param fontWeight
|
||||
* @returns CSS font weight.
|
||||
/**
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
||||
* @param fontWeight
|
||||
* @returns CSS font weight.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -4545,11 +4545,11 @@ class SVGElement extends RenderedElement {
|
|||
super.clearContext(ctx);
|
||||
this.document.screen.viewPort.removeCurrent();
|
||||
}
|
||||
/**
|
||||
* Resize SVG to fit in given size.
|
||||
* @param width
|
||||
* @param height
|
||||
* @param preserveAspectRatio
|
||||
/**
|
||||
* Resize SVG to fit in given size.
|
||||
* @param width
|
||||
* @param height
|
||||
* @param preserveAspectRatio
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7201,16 +7201,16 @@ Document.elementTypes = elements;
|
|||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
/**
|
||||
* SVG renderer on canvas.
|
||||
/**
|
||||
* SVG renderer on canvas.
|
||||
*/
|
||||
|
||||
class Canvg {
|
||||
/**
|
||||
* Main constructor.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG Document.
|
||||
* @param options - Rendering options.
|
||||
/**
|
||||
* Main constructor.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG Document.
|
||||
* @param options - Rendering options.
|
||||
*/
|
||||
constructor(ctx, svg) {
|
||||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
|
|
@ -7222,12 +7222,12 @@ class Canvg {
|
|||
this.document = document;
|
||||
this.documentElement = documentElement;
|
||||
}
|
||||
/**
|
||||
* Create Canvg instance from SVG source string or URL.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string or URL.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
/**
|
||||
* Create Canvg instance from SVG source string or URL.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string or URL.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7240,12 +7240,12 @@ class Canvg {
|
|||
return new Canvg(ctx, svgDocument, options);
|
||||
})();
|
||||
}
|
||||
/**
|
||||
* Create Canvg instance from SVG source string.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
/**
|
||||
* Create Canvg instance from SVG source string.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7255,12 +7255,12 @@ class Canvg {
|
|||
var svgDocument = parser.parseFromString(svg);
|
||||
return new Canvg(ctx, svgDocument, options);
|
||||
}
|
||||
/**
|
||||
* Create new Canvg instance with inherited options.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string or URL.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
/**
|
||||
* Create new Canvg instance with inherited options.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string or URL.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7268,12 +7268,12 @@ class Canvg {
|
|||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
return Canvg.from(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
|
||||
}
|
||||
/**
|
||||
* Create new Canvg instance with inherited options.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
/**
|
||||
* Create new Canvg instance with inherited options.
|
||||
* @param ctx - Rendering context.
|
||||
* @param svg - SVG source string.
|
||||
* @param options - Rendering options.
|
||||
* @returns Canvg instance.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7281,27 +7281,27 @@ class Canvg {
|
|||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
return Canvg.fromString(ctx, svg, _objectSpread(_objectSpread({}, this.options), options));
|
||||
}
|
||||
/**
|
||||
* Document is ready promise.
|
||||
* @returns Ready promise.
|
||||
/**
|
||||
* Document is ready promise.
|
||||
* @returns Ready promise.
|
||||
*/
|
||||
|
||||
|
||||
ready() {
|
||||
return this.screen.ready();
|
||||
}
|
||||
/**
|
||||
* Document is ready value.
|
||||
* @returns Is ready or not.
|
||||
/**
|
||||
* Document is ready value.
|
||||
* @returns Is ready or not.
|
||||
*/
|
||||
|
||||
|
||||
isReady() {
|
||||
return this.screen.isReady();
|
||||
}
|
||||
/**
|
||||
* Render only first frame, ignoring animations and mouse.
|
||||
* @param options - Rendering options.
|
||||
/**
|
||||
* Render only first frame, ignoring animations and mouse.
|
||||
* @param options - Rendering options.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7323,9 +7323,9 @@ class Canvg {
|
|||
_this.stop();
|
||||
})();
|
||||
}
|
||||
/**
|
||||
* Start rendering.
|
||||
* @param options - Render options.
|
||||
/**
|
||||
* Start rendering.
|
||||
* @param options - Render options.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -7340,19 +7340,19 @@ class Canvg {
|
|||
enableRedraw: true
|
||||
}, baseOptions), options));
|
||||
}
|
||||
/**
|
||||
* Stop rendering.
|
||||
/**
|
||||
* Stop rendering.
|
||||
*/
|
||||
|
||||
|
||||
stop() {
|
||||
this.screen.stop();
|
||||
}
|
||||
/**
|
||||
* Resize SVG to fit in given size.
|
||||
* @param width
|
||||
* @param height
|
||||
* @param preserveAspectRatio
|
||||
/**
|
||||
* Resize SVG to fit in given size.
|
||||
* @param width
|
||||
* @param height
|
||||
* @param preserveAspectRatio
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,40 +14,40 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/* harmony import */ var _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../typescript/typescript.js */ "87dK");
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["conf"];
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.js',
|
||||
keywords: [
|
||||
'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'default', 'delete', 'do', 'else',
|
||||
'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'import', 'in', 'instanceof', 'let', 'new', 'null',
|
||||
'return', 'set', 'super', 'switch', 'symbol', 'this', 'throw', 'true',
|
||||
'try', 'typeof', 'undefined', 'var', 'void', 'while', 'with', 'yield',
|
||||
'async', 'await', 'of'
|
||||
],
|
||||
typeKeywords: [],
|
||||
operators: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].operators,
|
||||
symbols: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].symbols,
|
||||
escapes: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].escapes,
|
||||
digits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].digits,
|
||||
octaldigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].octaldigits,
|
||||
binarydigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].binarydigits,
|
||||
hexdigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].hexdigits,
|
||||
regexpctl: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].regexpctl,
|
||||
regexpesc: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].regexpesc,
|
||||
tokenizer: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].tokenizer,
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["conf"];
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.js',
|
||||
keywords: [
|
||||
'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'default', 'delete', 'do', 'else',
|
||||
'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'import', 'in', 'instanceof', 'let', 'new', 'null',
|
||||
'return', 'set', 'super', 'switch', 'symbol', 'this', 'throw', 'true',
|
||||
'try', 'typeof', 'undefined', 'var', 'void', 'while', 'with', 'yield',
|
||||
'async', 'await', 'of'
|
||||
],
|
||||
typeKeywords: [],
|
||||
operators: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].operators,
|
||||
symbols: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].symbols,
|
||||
escapes: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].escapes,
|
||||
digits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].digits,
|
||||
octaldigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].octaldigits,
|
||||
binarydigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].binarydigits,
|
||||
hexdigits: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].hexdigits,
|
||||
regexpctl: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].regexpctl,
|
||||
regexpesc: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].regexpesc,
|
||||
tokenizer: _typescript_typescript_js__WEBPACK_IMPORTED_MODULE_0__["language"].tokenizer,
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
@ -65,205 +65,205 @@ var language = {
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
// e.g. /** | */
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
afterText: /^\s*\*\/$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: '* ' }
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, removeText: 1 }
|
||||
}
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
||||
{ open: "/**", close: " */", notIn: ["string"] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
||||
end: new RegExp("^\\s*//\\s*#?endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.ts',
|
||||
keywords: [
|
||||
'abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else',
|
||||
'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface',
|
||||
'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package',
|
||||
'private', 'protected', 'public', 'readonly', 'require', 'global', 'return',
|
||||
'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try',
|
||||
'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async',
|
||||
'await', 'of'
|
||||
],
|
||||
typeKeywords: [
|
||||
'any', 'boolean', 'number', 'object', 'string', 'undefined'
|
||||
],
|
||||
operators: [
|
||||
'<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**',
|
||||
'*', '/', '%', '++', '--', '<<', '</', '>>', '>>>', '&',
|
||||
'|', '^', '!', '~', '&&', '||', '??', '?', ':', '=', '+=', '-=',
|
||||
'*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=',
|
||||
'^=', '@',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[{}]/, 'delimiter.bracket'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
common: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// [/[A-Z][\w\$]*/, 'identifier'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
||||
[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/!(?=([^=]|$))/, 'delimiter'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)n?/, 'number.hex'],
|
||||
[/0[oO]?(@octaldigits)n?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)n?/, 'number.binary'],
|
||||
[/(@digits)n?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string_double'],
|
||||
[/'/, 'string', '@string_single'],
|
||||
[/`/, 'string', '@string_backtick'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
jsdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']],
|
||||
[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/, ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
|
||||
[/[()]/, 'regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, { token: 'regexp.escape.control', next: '@pop', bracket: '@close' }]
|
||||
],
|
||||
string_double: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
string_single: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, 'string', '@pop']
|
||||
],
|
||||
string_backtick: [
|
||||
[/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
|
||||
[/[^\\`$]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/`/, 'string', '@pop']
|
||||
],
|
||||
bracketCounting: [
|
||||
[/\{/, 'delimiter.bracket', '@bracketCounting'],
|
||||
[/\}/, 'delimiter.bracket', '@pop'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
// e.g. /** | */
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
afterText: /^\s*\*\/$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: '* ' }
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, removeText: 1 }
|
||||
}
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
||||
{ open: "/**", close: " */", notIn: ["string"] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
||||
end: new RegExp("^\\s*//\\s*#?endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.ts',
|
||||
keywords: [
|
||||
'abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else',
|
||||
'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface',
|
||||
'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package',
|
||||
'private', 'protected', 'public', 'readonly', 'require', 'global', 'return',
|
||||
'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try',
|
||||
'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async',
|
||||
'await', 'of'
|
||||
],
|
||||
typeKeywords: [
|
||||
'any', 'boolean', 'number', 'object', 'string', 'undefined'
|
||||
],
|
||||
operators: [
|
||||
'<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**',
|
||||
'*', '/', '%', '++', '--', '<<', '</', '>>', '>>>', '&',
|
||||
'|', '^', '!', '~', '&&', '||', '??', '?', ':', '=', '+=', '-=',
|
||||
'*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=',
|
||||
'^=', '@',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[{}]/, 'delimiter.bracket'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
common: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// [/[A-Z][\w\$]*/, 'identifier'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
||||
[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/!(?=([^=]|$))/, 'delimiter'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)n?/, 'number.hex'],
|
||||
[/0[oO]?(@octaldigits)n?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)n?/, 'number.binary'],
|
||||
[/(@digits)n?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string_double'],
|
||||
[/'/, 'string', '@string_single'],
|
||||
[/`/, 'string', '@string_backtick'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
jsdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']],
|
||||
[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/, ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
|
||||
[/[()]/, 'regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, { token: 'regexp.escape.control', next: '@pop', bracket: '@close' }]
|
||||
],
|
||||
string_double: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
string_single: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, 'string', '@pop']
|
||||
],
|
||||
string_backtick: [
|
||||
[/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
|
||||
[/[^\\`$]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/`/, 'string', '@pop']
|
||||
],
|
||||
bracketCounting: [
|
||||
[/\{/, 'delimiter.bracket', '@bracketCounting'],
|
||||
[/\}/, 'delimiter.bracket', '@pop'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
4954
21.2329b082.async.js
4954
21.2329b082.async.js
File diff suppressed because it is too large
Load Diff
5002
22.ef8b9ab5.async.js
5002
22.ef8b9ab5.async.js
File diff suppressed because it is too large
Load Diff
5234
23.2f1b1a41.async.js
5234
23.2f1b1a41.async.js
File diff suppressed because it is too large
Load Diff
|
|
@ -13,100 +13,100 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '*',
|
||||
},
|
||||
brackets: [
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
};
|
||||
var abapKeywords = [
|
||||
'abstract', 'add', 'add-corresponding', 'adjacent', 'alias', 'aliases', 'all', 'append', 'appending', 'ascending', 'as', 'assert', 'assign', 'assigned', 'assigning', 'association', 'authority-check',
|
||||
'back', 'begin', 'binary', 'block', 'bound', 'break-point', 'by', 'byte',
|
||||
'class', 'call', 'cast', 'changing', 'check', 'class-data', 'class-method', 'class-methods', 'clear', 'close', 'cnt', 'collect', 'commit', 'cond', 'character',
|
||||
'corresponding', 'communication', 'component', 'compute', 'concatenate', 'condense', 'constants', 'conv', 'count',
|
||||
'controls', 'convert', 'create', 'currency',
|
||||
'data', 'descending', 'default', 'define', 'deferred', 'delete', 'describe', 'detail', 'display', 'divide', 'divide-corresponding', 'display-mode', 'duplicates',
|
||||
'deleting',
|
||||
'editor-call', 'end', 'endexec', 'endfunction', 'ending', 'endmodule', 'end-of-definition', 'end-of-page', 'end-of-selection', 'end-test-injection', 'end-test-seam', 'exit-command', 'endclass', 'endmethod', 'endform', 'endinterface',
|
||||
'endprovide', 'endselect', 'endtry', 'endwhile', 'enum', 'event', 'events', 'exec', 'exit', 'export',
|
||||
'exporting', 'extract', 'exception', 'exceptions',
|
||||
'field-symbols', 'field-groups', 'field', 'first', 'fetch', 'fields', 'format', 'frame', 'free', 'from', 'function', 'find', 'for', 'found', 'function-pool',
|
||||
'generate', 'get',
|
||||
'handle', 'hide', 'hashed',
|
||||
'include', 'import', 'importing', 'index', 'infotypes', 'initial', 'initialization',
|
||||
'id', 'is', 'in', 'interface', 'interfaces', 'init', 'input', 'insert', 'instance', 'into',
|
||||
'key',
|
||||
'left-justified', 'leave', 'like', 'line', 'line-count', 'line-size', 'load', 'local', 'log-point', 'length', 'left', 'leading', 'lower',
|
||||
'matchcode', 'method', 'mesh', 'message', 'message-id', 'methods', 'modify', 'module', 'move', 'move-corresponding', 'multiply', 'multiply-corresponding', 'match',
|
||||
'new', 'new-line', 'new-page', 'new-section', 'next', 'no', 'no-gap', 'no-gaps', 'no-sign', 'no-zero', 'non-unique', 'number',
|
||||
'occurrence', 'object', 'obligatory', 'of', 'output', 'overlay', 'optional', 'others', 'occurrences', 'occurs', 'offset', 'options',
|
||||
'pack', 'parameters', 'perform', 'places', 'position', 'print-control', 'private', 'program', 'protected', 'provide', 'public', 'put',
|
||||
'radiobutton', 'raising', 'ranges', 'receive', 'receiving', 'redefinition', 'reduce', 'reference', 'refresh', 'regex', 'reject', 'results', 'requested',
|
||||
'ref', 'replace', 'report', 'reserve', 'restore', 'result', 'return', 'returning', 'right-justified', 'rollback', 'read', 'read-only', 'rp-provide-from-last', 'run',
|
||||
'scan', 'screen', 'scroll', 'search', 'select', 'select-options', 'selection-screen', 'stamp', 'source', 'subkey',
|
||||
'separated', 'set', 'shift', 'single', 'skip', 'sort', 'sorted', 'split', 'standard', 'stamp', 'starting', 'start-of-selection', 'sum', 'subtract-corresponding', 'statics', 'step', 'stop', 'structure', 'submatches', 'submit', 'subtract', 'summary', 'supplied', 'suppress', 'section', 'syntax-check', 'syntax-trace', 'system-call', 'switch',
|
||||
'tables', 'table', 'task', 'testing', 'test-seam', 'test-injection', 'then', 'time', 'times', 'title', 'titlebar', 'to', 'top-of-page', 'trailing', 'transfer', 'transformation', 'translate', 'transporting', 'types', 'type', 'type-pool', 'type-pools',
|
||||
'unassign', 'unique', 'uline', 'unpack', 'update', 'upper', 'using',
|
||||
'value',
|
||||
'when', 'while', 'window', 'write', 'where', 'with', 'work',
|
||||
'at', 'case', 'catch', 'continue', 'do', 'elseif', 'else', 'endat', 'endcase', 'enddo', 'endif', 'endloop', 'endon', 'if', 'loop', 'on', 'raise', 'try',
|
||||
'abs', 'sign', 'ceil', 'floor', 'trunc', 'frac', 'acos', 'asin', 'atan', 'cos', 'sin', 'tan', 'cosh', 'sinh', 'tanh', 'exp', 'log', 'log10', 'sqrt', 'strlen', 'xstrlen', 'charlen', 'lines', 'numofchar', 'dbmaxlen', 'round', 'rescale', 'nmax', 'nmin', 'cmax', 'cmin', 'boolc', 'boolx', 'xsdbool', 'contains', 'contains_any_of', 'contains_any_not_of', 'matches', 'line_exists', 'ipow', 'char_off', 'count', 'count_any_of', 'count_any_not_of', 'distance', 'condense', 'concat_lines_of', 'escape', 'find', 'find_end', 'find_any_of', 'find_any_not_of', 'insert', 'match', 'repeat', 'replace', 'reverse', 'segment', 'shift_left', 'shift_right', 'substring', 'substring_after', 'substring_from', 'substring_before', 'substring_to', 'to_upper', 'to_lower', 'to_mixed', 'from_mixed', 'translate', 'bit-set', 'line_index',
|
||||
'definition', 'implementation', 'public', 'inheriting', 'final'
|
||||
];
|
||||
var language = {
|
||||
defaultToken: 'invalid',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.abap',
|
||||
keywords: abapKeywords,
|
||||
typeKeywords: [
|
||||
'abap_bool', 'string', 'xstring', 'any', 'clike', 'csequence', 'numeric',
|
||||
'xsequence', 'c', 'n', 'i', 'p', 'f', 'd', 't', 'x'
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '/', '*',
|
||||
'=', '<', '>', '<=', '>=', '<>', '><', '=<', '=>',
|
||||
'EQ', 'NE', 'GE', 'LE',
|
||||
'CS', 'CN', 'CA', 'CO', 'CP', 'NS', 'NA', 'NP',
|
||||
],
|
||||
symbols: /[=><!~?&+\-*\/\^%]+/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier' } }],
|
||||
{ include: '@whitespace' },
|
||||
[/[:,.]/, 'delimiter'],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, { cases: { '@operators': 'operator',
|
||||
'@default': '' } }],
|
||||
[/'/, { token: 'string', bracket: '@open', next: '@stringquote' }],
|
||||
[/\|/, { token: 'string', bracket: '@open', next: '@stringtemplate' }],
|
||||
[/\d+/, 'number'],
|
||||
],
|
||||
stringtemplate: [
|
||||
[/[^\\\|]+/, 'string'],
|
||||
[/\\\|/, 'string'],
|
||||
[/\|/, { token: 'string', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
stringquote: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/'/, { token: 'string', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\*.*$/, 'comment'],
|
||||
[/\".*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '*',
|
||||
},
|
||||
brackets: [
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
};
|
||||
var abapKeywords = [
|
||||
'abstract', 'add', 'add-corresponding', 'adjacent', 'alias', 'aliases', 'all', 'append', 'appending', 'ascending', 'as', 'assert', 'assign', 'assigned', 'assigning', 'association', 'authority-check',
|
||||
'back', 'begin', 'binary', 'block', 'bound', 'break-point', 'by', 'byte',
|
||||
'class', 'call', 'cast', 'changing', 'check', 'class-data', 'class-method', 'class-methods', 'clear', 'close', 'cnt', 'collect', 'commit', 'cond', 'character',
|
||||
'corresponding', 'communication', 'component', 'compute', 'concatenate', 'condense', 'constants', 'conv', 'count',
|
||||
'controls', 'convert', 'create', 'currency',
|
||||
'data', 'descending', 'default', 'define', 'deferred', 'delete', 'describe', 'detail', 'display', 'divide', 'divide-corresponding', 'display-mode', 'duplicates',
|
||||
'deleting',
|
||||
'editor-call', 'end', 'endexec', 'endfunction', 'ending', 'endmodule', 'end-of-definition', 'end-of-page', 'end-of-selection', 'end-test-injection', 'end-test-seam', 'exit-command', 'endclass', 'endmethod', 'endform', 'endinterface',
|
||||
'endprovide', 'endselect', 'endtry', 'endwhile', 'enum', 'event', 'events', 'exec', 'exit', 'export',
|
||||
'exporting', 'extract', 'exception', 'exceptions',
|
||||
'field-symbols', 'field-groups', 'field', 'first', 'fetch', 'fields', 'format', 'frame', 'free', 'from', 'function', 'find', 'for', 'found', 'function-pool',
|
||||
'generate', 'get',
|
||||
'handle', 'hide', 'hashed',
|
||||
'include', 'import', 'importing', 'index', 'infotypes', 'initial', 'initialization',
|
||||
'id', 'is', 'in', 'interface', 'interfaces', 'init', 'input', 'insert', 'instance', 'into',
|
||||
'key',
|
||||
'left-justified', 'leave', 'like', 'line', 'line-count', 'line-size', 'load', 'local', 'log-point', 'length', 'left', 'leading', 'lower',
|
||||
'matchcode', 'method', 'mesh', 'message', 'message-id', 'methods', 'modify', 'module', 'move', 'move-corresponding', 'multiply', 'multiply-corresponding', 'match',
|
||||
'new', 'new-line', 'new-page', 'new-section', 'next', 'no', 'no-gap', 'no-gaps', 'no-sign', 'no-zero', 'non-unique', 'number',
|
||||
'occurrence', 'object', 'obligatory', 'of', 'output', 'overlay', 'optional', 'others', 'occurrences', 'occurs', 'offset', 'options',
|
||||
'pack', 'parameters', 'perform', 'places', 'position', 'print-control', 'private', 'program', 'protected', 'provide', 'public', 'put',
|
||||
'radiobutton', 'raising', 'ranges', 'receive', 'receiving', 'redefinition', 'reduce', 'reference', 'refresh', 'regex', 'reject', 'results', 'requested',
|
||||
'ref', 'replace', 'report', 'reserve', 'restore', 'result', 'return', 'returning', 'right-justified', 'rollback', 'read', 'read-only', 'rp-provide-from-last', 'run',
|
||||
'scan', 'screen', 'scroll', 'search', 'select', 'select-options', 'selection-screen', 'stamp', 'source', 'subkey',
|
||||
'separated', 'set', 'shift', 'single', 'skip', 'sort', 'sorted', 'split', 'standard', 'stamp', 'starting', 'start-of-selection', 'sum', 'subtract-corresponding', 'statics', 'step', 'stop', 'structure', 'submatches', 'submit', 'subtract', 'summary', 'supplied', 'suppress', 'section', 'syntax-check', 'syntax-trace', 'system-call', 'switch',
|
||||
'tables', 'table', 'task', 'testing', 'test-seam', 'test-injection', 'then', 'time', 'times', 'title', 'titlebar', 'to', 'top-of-page', 'trailing', 'transfer', 'transformation', 'translate', 'transporting', 'types', 'type', 'type-pool', 'type-pools',
|
||||
'unassign', 'unique', 'uline', 'unpack', 'update', 'upper', 'using',
|
||||
'value',
|
||||
'when', 'while', 'window', 'write', 'where', 'with', 'work',
|
||||
'at', 'case', 'catch', 'continue', 'do', 'elseif', 'else', 'endat', 'endcase', 'enddo', 'endif', 'endloop', 'endon', 'if', 'loop', 'on', 'raise', 'try',
|
||||
'abs', 'sign', 'ceil', 'floor', 'trunc', 'frac', 'acos', 'asin', 'atan', 'cos', 'sin', 'tan', 'cosh', 'sinh', 'tanh', 'exp', 'log', 'log10', 'sqrt', 'strlen', 'xstrlen', 'charlen', 'lines', 'numofchar', 'dbmaxlen', 'round', 'rescale', 'nmax', 'nmin', 'cmax', 'cmin', 'boolc', 'boolx', 'xsdbool', 'contains', 'contains_any_of', 'contains_any_not_of', 'matches', 'line_exists', 'ipow', 'char_off', 'count', 'count_any_of', 'count_any_not_of', 'distance', 'condense', 'concat_lines_of', 'escape', 'find', 'find_end', 'find_any_of', 'find_any_not_of', 'insert', 'match', 'repeat', 'replace', 'reverse', 'segment', 'shift_left', 'shift_right', 'substring', 'substring_after', 'substring_from', 'substring_before', 'substring_to', 'to_upper', 'to_lower', 'to_mixed', 'from_mixed', 'translate', 'bit-set', 'line_index',
|
||||
'definition', 'implementation', 'public', 'inheriting', 'final'
|
||||
];
|
||||
var language = {
|
||||
defaultToken: 'invalid',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.abap',
|
||||
keywords: abapKeywords,
|
||||
typeKeywords: [
|
||||
'abap_bool', 'string', 'xstring', 'any', 'clike', 'csequence', 'numeric',
|
||||
'xsequence', 'c', 'n', 'i', 'p', 'f', 'd', 't', 'x'
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '/', '*',
|
||||
'=', '<', '>', '<=', '>=', '<>', '><', '=<', '=>',
|
||||
'EQ', 'NE', 'GE', 'LE',
|
||||
'CS', 'CN', 'CA', 'CO', 'CP', 'NS', 'NA', 'NP',
|
||||
],
|
||||
symbols: /[=><!~?&+\-*\/\^%]+/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier' } }],
|
||||
{ include: '@whitespace' },
|
||||
[/[:,.]/, 'delimiter'],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, { cases: { '@operators': 'operator',
|
||||
'@default': '' } }],
|
||||
[/'/, { token: 'string', bracket: '@open', next: '@stringquote' }],
|
||||
[/\|/, { token: 'string', bracket: '@open', next: '@stringtemplate' }],
|
||||
[/\d+/, 'number'],
|
||||
],
|
||||
stringtemplate: [
|
||||
[/[^\\\|]+/, 'string'],
|
||||
[/\\\|/, 'string'],
|
||||
[/\|/, { token: 'string', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
stringquote: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/'/, { token: 'string', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\*.*$/, 'comment'],
|
||||
[/\".*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,290 +13,290 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var keywords = [
|
||||
'abstract',
|
||||
'activate',
|
||||
'and',
|
||||
'any',
|
||||
'array',
|
||||
'as',
|
||||
'asc',
|
||||
'assert',
|
||||
'autonomous',
|
||||
'begin',
|
||||
'bigdecimal',
|
||||
'blob',
|
||||
'boolean',
|
||||
'break',
|
||||
'bulk',
|
||||
'by',
|
||||
'case',
|
||||
'cast',
|
||||
'catch',
|
||||
'char',
|
||||
'class',
|
||||
'collect',
|
||||
'commit',
|
||||
'const',
|
||||
'continue',
|
||||
'convertcurrency',
|
||||
'decimal',
|
||||
'default',
|
||||
'delete',
|
||||
'desc',
|
||||
'do',
|
||||
'double',
|
||||
'else',
|
||||
'end',
|
||||
'enum',
|
||||
'exception',
|
||||
'exit',
|
||||
'export',
|
||||
'extends',
|
||||
'false',
|
||||
'final',
|
||||
'finally',
|
||||
'float',
|
||||
'for',
|
||||
'from',
|
||||
'future',
|
||||
'get',
|
||||
'global',
|
||||
'goto',
|
||||
'group',
|
||||
'having',
|
||||
'hint',
|
||||
'if',
|
||||
'implements',
|
||||
'import',
|
||||
'in',
|
||||
'inner',
|
||||
'insert',
|
||||
'instanceof',
|
||||
'int',
|
||||
'interface',
|
||||
'into',
|
||||
'join',
|
||||
'last_90_days',
|
||||
'last_month',
|
||||
'last_n_days',
|
||||
'last_week',
|
||||
'like',
|
||||
'limit',
|
||||
'list',
|
||||
'long',
|
||||
'loop',
|
||||
'map',
|
||||
'merge',
|
||||
'native',
|
||||
'new',
|
||||
'next_90_days',
|
||||
'next_month',
|
||||
'next_n_days',
|
||||
'next_week',
|
||||
'not',
|
||||
'null',
|
||||
'nulls',
|
||||
'number',
|
||||
'object',
|
||||
'of',
|
||||
'on',
|
||||
'or',
|
||||
'outer',
|
||||
'override',
|
||||
'package',
|
||||
'parallel',
|
||||
'pragma',
|
||||
'private',
|
||||
'protected',
|
||||
'public',
|
||||
'retrieve',
|
||||
'return',
|
||||
'returning',
|
||||
'rollback',
|
||||
'savepoint',
|
||||
'search',
|
||||
'select',
|
||||
'set',
|
||||
'short',
|
||||
'sort',
|
||||
'stat',
|
||||
'static',
|
||||
'strictfp',
|
||||
'super',
|
||||
'switch',
|
||||
'synchronized',
|
||||
'system',
|
||||
'testmethod',
|
||||
'then',
|
||||
'this',
|
||||
'this_month',
|
||||
'this_week',
|
||||
'throw',
|
||||
'throws',
|
||||
'today',
|
||||
'tolabel',
|
||||
'tomorrow',
|
||||
'transaction',
|
||||
'transient',
|
||||
'trigger',
|
||||
'true',
|
||||
'try',
|
||||
'type',
|
||||
'undelete',
|
||||
'update',
|
||||
'upsert',
|
||||
'using',
|
||||
'virtual',
|
||||
'void',
|
||||
'volatile',
|
||||
'webservice',
|
||||
'when',
|
||||
'where',
|
||||
'while',
|
||||
'yesterday'
|
||||
];
|
||||
// create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive
|
||||
// because we use a heuristic to assume that identifiers starting with an upper case letter are types.
|
||||
var uppercaseFirstLetter = function (lowercase) { return lowercase.charAt(0).toUpperCase() + lowercase.substr(1); };
|
||||
var keywordsWithCaseVariations = [];
|
||||
keywords.forEach(function (lowercase) {
|
||||
keywordsWithCaseVariations.push(lowercase);
|
||||
keywordsWithCaseVariations.push(lowercase.toUpperCase());
|
||||
keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
|
||||
});
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.apex',
|
||||
keywords: keywordsWithCaseVariations,
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// assume that identifiers starting with an uppercase letter are types
|
||||
[/[A-Z][\w\$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'type.identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@apexdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
apexdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, { cases: { '$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string' } }]
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var keywords = [
|
||||
'abstract',
|
||||
'activate',
|
||||
'and',
|
||||
'any',
|
||||
'array',
|
||||
'as',
|
||||
'asc',
|
||||
'assert',
|
||||
'autonomous',
|
||||
'begin',
|
||||
'bigdecimal',
|
||||
'blob',
|
||||
'boolean',
|
||||
'break',
|
||||
'bulk',
|
||||
'by',
|
||||
'case',
|
||||
'cast',
|
||||
'catch',
|
||||
'char',
|
||||
'class',
|
||||
'collect',
|
||||
'commit',
|
||||
'const',
|
||||
'continue',
|
||||
'convertcurrency',
|
||||
'decimal',
|
||||
'default',
|
||||
'delete',
|
||||
'desc',
|
||||
'do',
|
||||
'double',
|
||||
'else',
|
||||
'end',
|
||||
'enum',
|
||||
'exception',
|
||||
'exit',
|
||||
'export',
|
||||
'extends',
|
||||
'false',
|
||||
'final',
|
||||
'finally',
|
||||
'float',
|
||||
'for',
|
||||
'from',
|
||||
'future',
|
||||
'get',
|
||||
'global',
|
||||
'goto',
|
||||
'group',
|
||||
'having',
|
||||
'hint',
|
||||
'if',
|
||||
'implements',
|
||||
'import',
|
||||
'in',
|
||||
'inner',
|
||||
'insert',
|
||||
'instanceof',
|
||||
'int',
|
||||
'interface',
|
||||
'into',
|
||||
'join',
|
||||
'last_90_days',
|
||||
'last_month',
|
||||
'last_n_days',
|
||||
'last_week',
|
||||
'like',
|
||||
'limit',
|
||||
'list',
|
||||
'long',
|
||||
'loop',
|
||||
'map',
|
||||
'merge',
|
||||
'native',
|
||||
'new',
|
||||
'next_90_days',
|
||||
'next_month',
|
||||
'next_n_days',
|
||||
'next_week',
|
||||
'not',
|
||||
'null',
|
||||
'nulls',
|
||||
'number',
|
||||
'object',
|
||||
'of',
|
||||
'on',
|
||||
'or',
|
||||
'outer',
|
||||
'override',
|
||||
'package',
|
||||
'parallel',
|
||||
'pragma',
|
||||
'private',
|
||||
'protected',
|
||||
'public',
|
||||
'retrieve',
|
||||
'return',
|
||||
'returning',
|
||||
'rollback',
|
||||
'savepoint',
|
||||
'search',
|
||||
'select',
|
||||
'set',
|
||||
'short',
|
||||
'sort',
|
||||
'stat',
|
||||
'static',
|
||||
'strictfp',
|
||||
'super',
|
||||
'switch',
|
||||
'synchronized',
|
||||
'system',
|
||||
'testmethod',
|
||||
'then',
|
||||
'this',
|
||||
'this_month',
|
||||
'this_week',
|
||||
'throw',
|
||||
'throws',
|
||||
'today',
|
||||
'tolabel',
|
||||
'tomorrow',
|
||||
'transaction',
|
||||
'transient',
|
||||
'trigger',
|
||||
'true',
|
||||
'try',
|
||||
'type',
|
||||
'undelete',
|
||||
'update',
|
||||
'upsert',
|
||||
'using',
|
||||
'virtual',
|
||||
'void',
|
||||
'volatile',
|
||||
'webservice',
|
||||
'when',
|
||||
'where',
|
||||
'while',
|
||||
'yesterday'
|
||||
];
|
||||
// create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive
|
||||
// because we use a heuristic to assume that identifiers starting with an upper case letter are types.
|
||||
var uppercaseFirstLetter = function (lowercase) { return lowercase.charAt(0).toUpperCase() + lowercase.substr(1); };
|
||||
var keywordsWithCaseVariations = [];
|
||||
keywords.forEach(function (lowercase) {
|
||||
keywordsWithCaseVariations.push(lowercase);
|
||||
keywordsWithCaseVariations.push(lowercase.toUpperCase());
|
||||
keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
|
||||
});
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.apex',
|
||||
keywords: keywordsWithCaseVariations,
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// assume that identifiers starting with an uppercase letter are types
|
||||
[/[A-Z][\w\$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'type.identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@apexdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
apexdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, { cases: { '$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string' } }]
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,61 +13,61 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: 'keyword',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.azcli',
|
||||
str: /[^#\s]/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comment' },
|
||||
[/\s-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': { token: 'key.identifier', next: '@type' }
|
||||
}
|
||||
}],
|
||||
[/^-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': { token: 'key.identifier', next: '@type' }
|
||||
}
|
||||
}]
|
||||
],
|
||||
type: [
|
||||
{ include: '@comment' },
|
||||
[/-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': 'key.identifier'
|
||||
}
|
||||
}],
|
||||
[/@str+\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
comment: [
|
||||
[/#.*$/, {
|
||||
cases: {
|
||||
'@eos': { token: 'comment', next: '@popall' }
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: 'keyword',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.azcli',
|
||||
str: /[^#\s]/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comment' },
|
||||
[/\s-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': { token: 'key.identifier', next: '@type' }
|
||||
}
|
||||
}],
|
||||
[/^-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': { token: 'key.identifier', next: '@type' }
|
||||
}
|
||||
}]
|
||||
],
|
||||
type: [
|
||||
{ include: '@comment' },
|
||||
[/-+@str*\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'key.identifier', next: '@popall' },
|
||||
'@default': 'key.identifier'
|
||||
}
|
||||
}],
|
||||
[/@str+\s*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
comment: [
|
||||
[/#.*$/, {
|
||||
cases: {
|
||||
'@eos': { token: 'comment', next: '@popall' }
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,102 +13,102 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: 'REM'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
|
||||
end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.bat',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/^(\s*)(rem(?:\s.*|))$/, ['', 'comment']],
|
||||
[/(\@?)(@keywords)(?!\w)/, [{ token: 'keyword' }, { token: 'keyword.$2' }]],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// blocks
|
||||
[/setlocal(?!\w)/, 'keyword.tag-setlocal'],
|
||||
[/endlocal(?!\w)/, 'keyword.tag-setlocal'],
|
||||
// words
|
||||
[/[a-zA-Z_]\w*/, ''],
|
||||
// labels
|
||||
[/:\w*/, 'metatag'],
|
||||
// variables
|
||||
[/%[^%]+%/, 'variable'],
|
||||
[/%%[\w]+(?!\w)/, 'variable'],
|
||||
// punctuations
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// punctuation: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"'%]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/%[\w ]+%/, 'variable'],
|
||||
[/%%[\w]+(?!\w)/, 'variable'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/$/, 'string', '@popall']
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: 'REM'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
|
||||
end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.bat',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/^(\s*)(rem(?:\s.*|))$/, ['', 'comment']],
|
||||
[/(\@?)(@keywords)(?!\w)/, [{ token: 'keyword' }, { token: 'keyword.$2' }]],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// blocks
|
||||
[/setlocal(?!\w)/, 'keyword.tag-setlocal'],
|
||||
[/endlocal(?!\w)/, 'keyword.tag-setlocal'],
|
||||
// words
|
||||
[/[a-zA-Z_]\w*/, ''],
|
||||
// labels
|
||||
[/:\w*/, 'metatag'],
|
||||
// variables
|
||||
[/%[^%]+%/, 'variable'],
|
||||
[/%%[\w]+(?!\w)/, 'variable'],
|
||||
// punctuations
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// punctuation: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"'%]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/%[\w ]+%/, 'variable'],
|
||||
[/%%[\w]+(?!\w)/, 'variable'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/$/, 'string', '@popall']
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,116 +13,116 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cameligo',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'abs', 'begin', 'Bytes', 'Crypto', 'Current', 'else', 'end', 'failwith',
|
||||
'false', 'fun', 'if', 'in', 'let', 'let%entry', 'let%init', 'List', 'list',
|
||||
'Map', 'map', 'match', 'match%nat', 'mod', 'not', 'operation', 'Operation', 'of',
|
||||
'Set', 'set', 'sender', 'source', 'String', 'then', 'true', 'type', 'with',
|
||||
],
|
||||
typeKeywords: [
|
||||
'int', 'unit', 'string', 'tz',
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'mod', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%', '->', '<-'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
/* */
|
||||
comment: [
|
||||
[/[^\(\*]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\(\*/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\(\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cameligo',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'abs', 'begin', 'Bytes', 'Crypto', 'Current', 'else', 'end', 'failwith',
|
||||
'false', 'fun', 'if', 'in', 'let', 'let%entry', 'let%init', 'List', 'list',
|
||||
'Map', 'map', 'match', 'match%nat', 'mod', 'not', 'operation', 'Operation', 'of',
|
||||
'Set', 'set', 'sender', 'source', 'String', 'then', 'true', 'type', 'with',
|
||||
],
|
||||
typeKeywords: [
|
||||
'int', 'unit', 'string', 'tz',
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'mod', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%', '->', '<-'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
/* */
|
||||
comment: [
|
||||
[/[^\(\*]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\(\*/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\(\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
1524
30.0ee59578.async.js
1524
30.0ee59578.async.js
File diff suppressed because it is too large
Load Diff
|
|
@ -13,176 +13,176 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['###', '###'],
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.coffee',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
||||
keywords: [
|
||||
'and', 'or', 'is', 'isnt', 'not', 'on', 'yes', '@', 'no', 'off',
|
||||
'true', 'false', 'null', 'this',
|
||||
'new', 'delete', 'typeof', 'in', 'instanceof',
|
||||
'return', 'throw', 'break', 'continue', 'debugger',
|
||||
'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally',
|
||||
'class', 'extends', 'super',
|
||||
'undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\@[a-zA-Z_]\w*/, 'variable.predefined'],
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'this': 'variable.predefined',
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// Comments
|
||||
[/###/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
// regular expressions
|
||||
['///', { token: 'regexp', next: '@hereregexp' }],
|
||||
[/^(\s*)(@regEx)/, ['', 'regexp']],
|
||||
[/(\()(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\=)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\[)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\!)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\&)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\|)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\?)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\{)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\;)(\s*)(@regEx)/, ['', '', 'regexp']],
|
||||
// delimiters
|
||||
[/}/, {
|
||||
cases: {
|
||||
'$S2==interpolatedstring': { token: 'string', next: '@pop' },
|
||||
'@default': '@brackets'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/0[0-7]+(?!\d)/, 'number.octal'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"""/, 'string', '@herestring."""'],
|
||||
[/'''/, 'string', '@herestring.\'\'\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\#\\]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'string', next: 'root.interpolatedstring' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/#/, 'string']
|
||||
],
|
||||
herestring: [
|
||||
[/("""|''')/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^#\\'"]+/, 'string'],
|
||||
[/['"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/#/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^#]+/, 'comment',],
|
||||
[/###/, 'comment', '@pop'],
|
||||
[/#/, 'comment'],
|
||||
],
|
||||
hereregexp: [
|
||||
[/[^\\\/#]+/, 'regexp'],
|
||||
[/\\./, 'regexp'],
|
||||
[/#.*$/, 'comment'],
|
||||
['///[igm]*', { token: 'regexp', next: '@pop' }],
|
||||
[/\//, 'regexp'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['###', '###'],
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.coffee',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
||||
keywords: [
|
||||
'and', 'or', 'is', 'isnt', 'not', 'on', 'yes', '@', 'no', 'off',
|
||||
'true', 'false', 'null', 'this',
|
||||
'new', 'delete', 'typeof', 'in', 'instanceof',
|
||||
'return', 'throw', 'break', 'continue', 'debugger',
|
||||
'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally',
|
||||
'class', 'extends', 'super',
|
||||
'undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\@[a-zA-Z_]\w*/, 'variable.predefined'],
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'this': 'variable.predefined',
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// Comments
|
||||
[/###/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
// regular expressions
|
||||
['///', { token: 'regexp', next: '@hereregexp' }],
|
||||
[/^(\s*)(@regEx)/, ['', 'regexp']],
|
||||
[/(\()(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\=)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\[)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\!)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\&)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\|)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\?)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\{)(\s*)(@regEx)/, ['@brackets', '', 'regexp']],
|
||||
[/(\;)(\s*)(@regEx)/, ['', '', 'regexp']],
|
||||
// delimiters
|
||||
[/}/, {
|
||||
cases: {
|
||||
'$S2==interpolatedstring': { token: 'string', next: '@pop' },
|
||||
'@default': '@brackets'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/0[0-7]+(?!\d)/, 'number.octal'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"""/, 'string', '@herestring."""'],
|
||||
[/'''/, 'string', '@herestring.\'\'\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\#\\]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'string', next: 'root.interpolatedstring' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/#/, 'string']
|
||||
],
|
||||
herestring: [
|
||||
[/("""|''')/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^#\\'"]+/, 'string'],
|
||||
[/['"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/#/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^#]+/, 'comment',],
|
||||
[/###/, 'comment', '@pop'],
|
||||
[/#/, 'comment'],
|
||||
],
|
||||
hereregexp: [
|
||||
[/[^\\\/#]+/, 'regexp'],
|
||||
[/\\./, 'regexp'],
|
||||
[/#.*$/, 'comment'],
|
||||
['///[igm]*', { token: 'regexp', next: '@pop' }],
|
||||
[/\//, 'regexp'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,190 +13,190 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cs',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'extern', 'alias', 'using', 'bool', 'decimal', 'sbyte', 'byte', 'short',
|
||||
'ushort', 'int', 'uint', 'long', 'ulong', 'char', 'float', 'double',
|
||||
'object', 'dynamic', 'string', 'assembly', 'is', 'as', 'ref',
|
||||
'out', 'this', 'base', 'new', 'typeof', 'void', 'checked', 'unchecked',
|
||||
'default', 'delegate', 'var', 'const', 'if', 'else', 'switch', 'case',
|
||||
'while', 'do', 'for', 'foreach', 'in', 'break', 'continue', 'goto',
|
||||
'return', 'throw', 'try', 'catch', 'finally', 'lock', 'yield', 'from',
|
||||
'let', 'where', 'join', 'on', 'equals', 'into', 'orderby', 'ascending',
|
||||
'descending', 'select', 'group', 'by', 'namespace', 'partial', 'class',
|
||||
'field', 'event', 'method', 'param', 'property', 'public', 'protected',
|
||||
'internal', 'private', 'abstract', 'sealed', 'static', 'struct', 'readonly',
|
||||
'volatile', 'virtual', 'override', 'params', 'get', 'set', 'add', 'remove',
|
||||
'operator', 'true', 'false', 'implicit', 'explicit', 'interface', 'enum',
|
||||
'null', 'async', 'await', 'fixed', 'sizeof', 'stackalloc', 'unsafe', 'nameof',
|
||||
'when'
|
||||
],
|
||||
namespaceFollows: [
|
||||
'namespace', 'using',
|
||||
],
|
||||
parenFollows: [
|
||||
'if', 'for', 'while', 'switch', 'foreach', 'using', 'catch', 'when'
|
||||
],
|
||||
operators: [
|
||||
'=', '??', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<<',
|
||||
'+', '-', '*', '/', '%', '!', '~', '++', '--', '+=',
|
||||
'-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '>>', '=>'
|
||||
],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
// escape sequences
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\@?[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@namespaceFollows': { token: 'keyword.$0', next: '@namespace' },
|
||||
'@keywords': { token: 'keyword.$0', next: '@qualified' },
|
||||
'@default': { token: 'identifier', next: '@qualified' }
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/}/, {
|
||||
cases: {
|
||||
'$S2==interpolatedstring': { token: 'string.quote', next: '@pop' },
|
||||
'$S2==litinterpstring': { token: 'string.quote', next: '@pop' },
|
||||
'@default': '@brackets'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]+/, 'number.hex'],
|
||||
[/0[bB][01_]+/, 'number.hex'],
|
||||
[/[0-9_]+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@string' }],
|
||||
[/\$\@"/, { token: 'string.quote', next: '@litinterpstring' }],
|
||||
[/\@"/, { token: 'string.quote', next: '@litstring' }],
|
||||
[/\$"/, { token: 'string.quote', next: '@interpolatedstring' }],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
qualified: [
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/\./, 'delimiter'],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
namespace: [
|
||||
{ include: '@whitespace' },
|
||||
[/[A-Z]\w*/, 'namespace'],
|
||||
[/[\.=]/, 'delimiter'],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // no nested comments :-(
|
||||
['\\*/', 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
litstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
litinterpstring: [
|
||||
[/[^"{]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/{{/, 'string.escape'],
|
||||
[/}}/, 'string.escape'],
|
||||
[/{/, { token: 'string.quote', next: 'root.litinterpstring' }],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
interpolatedstring: [
|
||||
[/[^\\"{]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/{{/, 'string.escape'],
|
||||
[/}}/, 'string.escape'],
|
||||
[/{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, 'directive.csx'],
|
||||
[/^[ \t\v\f]*#\w.*$/, 'namespace.cpp'],
|
||||
[/[ \t\v\f\r\n]+/, ''],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cs',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'extern', 'alias', 'using', 'bool', 'decimal', 'sbyte', 'byte', 'short',
|
||||
'ushort', 'int', 'uint', 'long', 'ulong', 'char', 'float', 'double',
|
||||
'object', 'dynamic', 'string', 'assembly', 'is', 'as', 'ref',
|
||||
'out', 'this', 'base', 'new', 'typeof', 'void', 'checked', 'unchecked',
|
||||
'default', 'delegate', 'var', 'const', 'if', 'else', 'switch', 'case',
|
||||
'while', 'do', 'for', 'foreach', 'in', 'break', 'continue', 'goto',
|
||||
'return', 'throw', 'try', 'catch', 'finally', 'lock', 'yield', 'from',
|
||||
'let', 'where', 'join', 'on', 'equals', 'into', 'orderby', 'ascending',
|
||||
'descending', 'select', 'group', 'by', 'namespace', 'partial', 'class',
|
||||
'field', 'event', 'method', 'param', 'property', 'public', 'protected',
|
||||
'internal', 'private', 'abstract', 'sealed', 'static', 'struct', 'readonly',
|
||||
'volatile', 'virtual', 'override', 'params', 'get', 'set', 'add', 'remove',
|
||||
'operator', 'true', 'false', 'implicit', 'explicit', 'interface', 'enum',
|
||||
'null', 'async', 'await', 'fixed', 'sizeof', 'stackalloc', 'unsafe', 'nameof',
|
||||
'when'
|
||||
],
|
||||
namespaceFollows: [
|
||||
'namespace', 'using',
|
||||
],
|
||||
parenFollows: [
|
||||
'if', 'for', 'while', 'switch', 'foreach', 'using', 'catch', 'when'
|
||||
],
|
||||
operators: [
|
||||
'=', '??', '||', '&&', '|', '^', '&', '==', '!=', '<=', '>=', '<<',
|
||||
'+', '-', '*', '/', '%', '!', '~', '++', '--', '+=',
|
||||
'-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '>>', '=>'
|
||||
],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
// escape sequences
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\@?[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@namespaceFollows': { token: 'keyword.$0', next: '@namespace' },
|
||||
'@keywords': { token: 'keyword.$0', next: '@qualified' },
|
||||
'@default': { token: 'identifier', next: '@qualified' }
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/}/, {
|
||||
cases: {
|
||||
'$S2==interpolatedstring': { token: 'string.quote', next: '@pop' },
|
||||
'$S2==litinterpstring': { token: 'string.quote', next: '@pop' },
|
||||
'@default': '@brackets'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]+/, 'number.hex'],
|
||||
[/0[bB][01_]+/, 'number.hex'],
|
||||
[/[0-9_]+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@string' }],
|
||||
[/\$\@"/, { token: 'string.quote', next: '@litinterpstring' }],
|
||||
[/\@"/, { token: 'string.quote', next: '@litstring' }],
|
||||
[/\$"/, { token: 'string.quote', next: '@interpolatedstring' }],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
qualified: [
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/\./, 'delimiter'],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
namespace: [
|
||||
{ include: '@whitespace' },
|
||||
[/[A-Z]\w*/, 'namespace'],
|
||||
[/[\.=]/, 'delimiter'],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // no nested comments :-(
|
||||
['\\*/', 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
litstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
litinterpstring: [
|
||||
[/[^"{]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/{{/, 'string.escape'],
|
||||
[/}}/, 'string.escape'],
|
||||
[/{/, { token: 'string.quote', next: 'root.litinterpstring' }],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
interpolatedstring: [
|
||||
[/[^\\"{]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/{{/, 'string.escape'],
|
||||
[/}}/, 'string.escape'],
|
||||
[/{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, 'directive.csx'],
|
||||
[/^[ \t\v\f]*#\w.*$/, 'namespace.cpp'],
|
||||
[/[ \t\v\f\r\n]+/, ''],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,61 +13,61 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [],
|
||||
autoClosingPairs: [],
|
||||
surroundingPairs: []
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
// defaultToken: 'invalid',
|
||||
keywords: [],
|
||||
typeKeywords: [],
|
||||
tokenPostfix: '.csp',
|
||||
operators: [],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/child-src/, 'string.quote'],
|
||||
[/connect-src/, 'string.quote'],
|
||||
[/default-src/, 'string.quote'],
|
||||
[/font-src/, 'string.quote'],
|
||||
[/frame-src/, 'string.quote'],
|
||||
[/img-src/, 'string.quote'],
|
||||
[/manifest-src/, 'string.quote'],
|
||||
[/media-src/, 'string.quote'],
|
||||
[/object-src/, 'string.quote'],
|
||||
[/script-src/, 'string.quote'],
|
||||
[/style-src/, 'string.quote'],
|
||||
[/worker-src/, 'string.quote'],
|
||||
[/base-uri/, 'string.quote'],
|
||||
[/plugin-types/, 'string.quote'],
|
||||
[/sandbox/, 'string.quote'],
|
||||
[/disown-opener/, 'string.quote'],
|
||||
[/form-action/, 'string.quote'],
|
||||
[/frame-ancestors/, 'string.quote'],
|
||||
[/report-uri/, 'string.quote'],
|
||||
[/report-to/, 'string.quote'],
|
||||
[/upgrade-insecure-requests/, 'string.quote'],
|
||||
[/block-all-mixed-content/, 'string.quote'],
|
||||
[/require-sri-for/, 'string.quote'],
|
||||
[/reflected-xss/, 'string.quote'],
|
||||
[/referrer/, 'string.quote'],
|
||||
[/policy-uri/, 'string.quote'],
|
||||
[/'self'/, 'string.quote'],
|
||||
[/'unsafe-inline'/, 'string.quote'],
|
||||
[/'unsafe-eval'/, 'string.quote'],
|
||||
[/'strict-dynamic'/, 'string.quote'],
|
||||
[/'unsafe-hashed-attributes'/, 'string.quote']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [],
|
||||
autoClosingPairs: [],
|
||||
surroundingPairs: []
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
// defaultToken: 'invalid',
|
||||
keywords: [],
|
||||
typeKeywords: [],
|
||||
tokenPostfix: '.csp',
|
||||
operators: [],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/child-src/, 'string.quote'],
|
||||
[/connect-src/, 'string.quote'],
|
||||
[/default-src/, 'string.quote'],
|
||||
[/font-src/, 'string.quote'],
|
||||
[/frame-src/, 'string.quote'],
|
||||
[/img-src/, 'string.quote'],
|
||||
[/manifest-src/, 'string.quote'],
|
||||
[/media-src/, 'string.quote'],
|
||||
[/object-src/, 'string.quote'],
|
||||
[/script-src/, 'string.quote'],
|
||||
[/style-src/, 'string.quote'],
|
||||
[/worker-src/, 'string.quote'],
|
||||
[/base-uri/, 'string.quote'],
|
||||
[/plugin-types/, 'string.quote'],
|
||||
[/sandbox/, 'string.quote'],
|
||||
[/disown-opener/, 'string.quote'],
|
||||
[/form-action/, 'string.quote'],
|
||||
[/frame-ancestors/, 'string.quote'],
|
||||
[/report-uri/, 'string.quote'],
|
||||
[/report-to/, 'string.quote'],
|
||||
[/upgrade-insecure-requests/, 'string.quote'],
|
||||
[/block-all-mixed-content/, 'string.quote'],
|
||||
[/require-sri-for/, 'string.quote'],
|
||||
[/reflected-xss/, 'string.quote'],
|
||||
[/referrer/, 'string.quote'],
|
||||
[/policy-uri/, 'string.quote'],
|
||||
[/'self'/, 'string.quote'],
|
||||
[/'unsafe-inline'/, 'string.quote'],
|
||||
[/'unsafe-eval'/, 'string.quote'],
|
||||
[/'strict-dynamic'/, 'string.quote'],
|
||||
[/'unsafe-hashed-attributes'/, 'string.quote']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,177 +13,177 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.css',
|
||||
ws: '[ \t\n\r\f]*',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.bracket' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@selector' },
|
||||
],
|
||||
selector: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@import' },
|
||||
{ include: '@strings' },
|
||||
['[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)', { token: 'keyword', next: '@keyframedeclaration' }],
|
||||
['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],
|
||||
['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['(url-prefix)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
['(url)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
{ include: '@selectorname' },
|
||||
['[\\*]', 'tag'],
|
||||
['[>\\+,]', 'delimiter'],
|
||||
['\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],
|
||||
['{', { token: 'delimiter.bracket', next: '@selectorbody' }]
|
||||
],
|
||||
selectorbody: [
|
||||
{ include: '@comments' },
|
||||
['[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],
|
||||
['}', { token: 'delimiter.bracket', next: '@pop' }]
|
||||
],
|
||||
selectorname: [
|
||||
['(\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'],
|
||||
],
|
||||
selectorattribute: [
|
||||
{ include: '@term' },
|
||||
[']', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
term: [
|
||||
{ include: '@comments' },
|
||||
['(url-prefix)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
['(url)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
{ include: '@functioninvocation' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@name' },
|
||||
['([<>=\\+\\-\\*\\/\\^\\|\\~,])', 'delimiter'],
|
||||
[',', 'delimiter']
|
||||
],
|
||||
rulevalue: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@term' },
|
||||
['!important', 'keyword'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }] // missing semicolon
|
||||
],
|
||||
warndebug: [
|
||||
['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }]
|
||||
],
|
||||
import: [
|
||||
['[@](import)', { token: 'keyword', next: '@declarationbody' }]
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
|
||||
],
|
||||
parenthizedterm: [
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
|
||||
],
|
||||
declarationbody: [
|
||||
{ include: '@term' },
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }] // missing semicolon
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment']
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
[/[^*/]+/, 'comment'],
|
||||
[/./, 'comment'],
|
||||
],
|
||||
name: [
|
||||
['@identifier', 'attribute.value']
|
||||
],
|
||||
numbers: [
|
||||
['-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'attribute.value.unit', '@pop']
|
||||
],
|
||||
keyframedeclaration: [
|
||||
['@identifier', 'attribute.value'],
|
||||
['{', { token: 'delimiter.bracket', switchTo: '@keyframebody' }],
|
||||
],
|
||||
keyframebody: [
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.bracket', next: '@selectorbody' }],
|
||||
['}', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
functioninvocation: [
|
||||
['@identifier\\(', { token: 'attribute.value', next: '@functionarguments' }],
|
||||
],
|
||||
functionarguments: [
|
||||
['\\$@identifier@ws:', 'attribute.name'],
|
||||
['[,]', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'attribute.value', next: '@pop' }],
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string', next: '@stringenddoublequote' }],
|
||||
['~?\'', { token: 'string', next: '@stringendquote' }]
|
||||
],
|
||||
stringenddoublequote: [
|
||||
['\\\\.', 'string'],
|
||||
['"', { token: 'string', next: '@pop' }],
|
||||
[/[^\\"]+/, 'string'],
|
||||
['.', 'string']
|
||||
],
|
||||
stringendquote: [
|
||||
['\\\\.', 'string'],
|
||||
['\'', { token: 'string', next: '@pop' }],
|
||||
[/[^\\']+/, 'string'],
|
||||
['.', 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.css',
|
||||
ws: '[ \t\n\r\f]*',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.bracket' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@selector' },
|
||||
],
|
||||
selector: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@import' },
|
||||
{ include: '@strings' },
|
||||
['[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)', { token: 'keyword', next: '@keyframedeclaration' }],
|
||||
['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],
|
||||
['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['(url-prefix)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
['(url)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
{ include: '@selectorname' },
|
||||
['[\\*]', 'tag'],
|
||||
['[>\\+,]', 'delimiter'],
|
||||
['\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],
|
||||
['{', { token: 'delimiter.bracket', next: '@selectorbody' }]
|
||||
],
|
||||
selectorbody: [
|
||||
{ include: '@comments' },
|
||||
['[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],
|
||||
['}', { token: 'delimiter.bracket', next: '@pop' }]
|
||||
],
|
||||
selectorname: [
|
||||
['(\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'],
|
||||
],
|
||||
selectorattribute: [
|
||||
{ include: '@term' },
|
||||
[']', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
term: [
|
||||
{ include: '@comments' },
|
||||
['(url-prefix)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
['(url)(\\()', ['attribute.value', { token: 'delimiter.parenthesis', next: '@urldeclaration' }]],
|
||||
{ include: '@functioninvocation' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@name' },
|
||||
['([<>=\\+\\-\\*\\/\\^\\|\\~,])', 'delimiter'],
|
||||
[',', 'delimiter']
|
||||
],
|
||||
rulevalue: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@term' },
|
||||
['!important', 'keyword'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }] // missing semicolon
|
||||
],
|
||||
warndebug: [
|
||||
['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }]
|
||||
],
|
||||
import: [
|
||||
['[@](import)', { token: 'keyword', next: '@declarationbody' }]
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
|
||||
],
|
||||
parenthizedterm: [
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }]
|
||||
],
|
||||
declarationbody: [
|
||||
{ include: '@term' },
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }] // missing semicolon
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment']
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
[/[^*/]+/, 'comment'],
|
||||
[/./, 'comment'],
|
||||
],
|
||||
name: [
|
||||
['@identifier', 'attribute.value']
|
||||
],
|
||||
numbers: [
|
||||
['-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'attribute.value.unit', '@pop']
|
||||
],
|
||||
keyframedeclaration: [
|
||||
['@identifier', 'attribute.value'],
|
||||
['{', { token: 'delimiter.bracket', switchTo: '@keyframebody' }],
|
||||
],
|
||||
keyframebody: [
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.bracket', next: '@selectorbody' }],
|
||||
['}', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
functioninvocation: [
|
||||
['@identifier\\(', { token: 'attribute.value', next: '@functionarguments' }],
|
||||
],
|
||||
functionarguments: [
|
||||
['\\$@identifier@ws:', 'attribute.name'],
|
||||
['[,]', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'attribute.value', next: '@pop' }],
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string', next: '@stringenddoublequote' }],
|
||||
['~?\'', { token: 'string', next: '@stringendquote' }]
|
||||
],
|
||||
stringenddoublequote: [
|
||||
['\\\\.', 'string'],
|
||||
['"', { token: 'string', next: '@pop' }],
|
||||
[/[^\\"]+/, 'string'],
|
||||
['.', 'string']
|
||||
],
|
||||
stringendquote: [
|
||||
['\\\\.', 'string'],
|
||||
['\'', { token: 'string', next: '@pop' }],
|
||||
[/[^\\']+/, 'string'],
|
||||
['.', 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,115 +13,115 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.dockerfile',
|
||||
variable: /\${?[\w]+}?/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
[/(ONBUILD)(\s+)/, ['keyword', '']],
|
||||
[/(ENV)(\s+)([\w]+)/, ['keyword', '', { token: 'variable', next: '@arguments' }]],
|
||||
[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/, { token: 'keyword', next: '@arguments' }]
|
||||
],
|
||||
arguments: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@strings' },
|
||||
[/(@variable)/, {
|
||||
cases: {
|
||||
'@eos': { token: 'variable', next: '@popall' },
|
||||
'@default': 'variable'
|
||||
}
|
||||
}],
|
||||
[/\\/, {
|
||||
cases: {
|
||||
'@eos': '',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
[/./, {
|
||||
cases: {
|
||||
'@eos': { token: '', next: '@popall' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
],
|
||||
// Deal with white space, including comments
|
||||
whitespace: [
|
||||
[/\s+/, {
|
||||
cases: {
|
||||
'@eos': { token: '', next: '@popall' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
],
|
||||
comment: [
|
||||
[/(^#.*$)/, 'comment', '@popall']
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string', '@popall'],
|
||||
[/'/, 'string', '@stringBody'],
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"/, 'string', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\\$']/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/\\./, 'string.escape'],
|
||||
[/'$/, 'string', '@popall'],
|
||||
[/'/, 'string', '@pop'],
|
||||
[/(@variable)/, 'variable'],
|
||||
[/\\$/, 'string'],
|
||||
[/$/, 'string', '@popall']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\\$"]/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/\\./, 'string.escape'],
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"/, 'string', '@pop'],
|
||||
[/(@variable)/, 'variable'],
|
||||
[/\\$/, 'string'],
|
||||
[/$/, 'string', '@popall']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.dockerfile',
|
||||
variable: /\${?[\w]+}?/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
[/(ONBUILD)(\s+)/, ['keyword', '']],
|
||||
[/(ENV)(\s+)([\w]+)/, ['keyword', '', { token: 'variable', next: '@arguments' }]],
|
||||
[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/, { token: 'keyword', next: '@arguments' }]
|
||||
],
|
||||
arguments: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@strings' },
|
||||
[/(@variable)/, {
|
||||
cases: {
|
||||
'@eos': { token: 'variable', next: '@popall' },
|
||||
'@default': 'variable'
|
||||
}
|
||||
}],
|
||||
[/\\/, {
|
||||
cases: {
|
||||
'@eos': '',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
[/./, {
|
||||
cases: {
|
||||
'@eos': { token: '', next: '@popall' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
],
|
||||
// Deal with white space, including comments
|
||||
whitespace: [
|
||||
[/\s+/, {
|
||||
cases: {
|
||||
'@eos': { token: '', next: '@popall' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
],
|
||||
comment: [
|
||||
[/(^#.*$)/, 'comment', '@popall']
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string', '@popall'],
|
||||
[/'/, 'string', '@stringBody'],
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"/, 'string', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\\$']/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/\\./, 'string.escape'],
|
||||
[/'$/, 'string', '@popall'],
|
||||
[/'/, 'string', '@pop'],
|
||||
[/(@variable)/, 'variable'],
|
||||
[/\\$/, 'string'],
|
||||
[/$/, 'string', '@popall']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\\$"]/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/\\./, 'string.escape'],
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"/, 'string', '@pop'],
|
||||
[/(@variable)/, 'variable'],
|
||||
[/\\$/, 'string'],
|
||||
[/$/, 'string', '@popall']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,144 +13,144 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),
|
||||
end: new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.fs',
|
||||
keywords: [
|
||||
'abstract', 'and', 'atomic', 'as',
|
||||
'assert', 'asr', 'base', 'begin',
|
||||
'break', 'checked', 'component',
|
||||
'const', 'constraint', 'constructor',
|
||||
'continue', 'class', 'default',
|
||||
'delegate', 'do', 'done', 'downcast',
|
||||
'downto', 'elif', 'else', 'end',
|
||||
'exception', 'eager', 'event', 'external',
|
||||
'extern', 'false', 'finally', 'for',
|
||||
'fun', 'function', 'fixed', 'functor',
|
||||
'global', 'if', 'in', 'include', 'inherit',
|
||||
'inline', 'interface', 'internal', 'land',
|
||||
'lor', 'lsl', 'lsr', 'lxor', 'lazy', 'let',
|
||||
'match', 'member', 'mod', 'module', 'mutable',
|
||||
'namespace', 'method', 'mixin', 'new', 'not',
|
||||
'null', 'of', 'open', 'or', 'object',
|
||||
'override', 'private', 'parallel', 'process',
|
||||
'protected', 'pure', 'public', 'rec', 'return',
|
||||
'static', 'sealed', 'struct', 'sig', 'then',
|
||||
'to', 'true', 'tailcall', 'trait',
|
||||
'try', 'type', 'upcast', 'use',
|
||||
'val', 'void', 'virtual', 'volatile',
|
||||
'when', 'while', 'with', 'yield'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\^%;\.,\/]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /[uU]?[yslnLI]?/,
|
||||
floatsuffix: /[fFmM]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [< attributes >].
|
||||
[/\[<.*>\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^#(if|else|endif)/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0x[0-9a-fA-F]+LF/, 'number.float'],
|
||||
[/0x[0-9a-fA-F]+(@integersuffix)/, 'number.hex'],
|
||||
[/0b[0-1]+(@integersuffix)/, 'number.bin'],
|
||||
[/\d+(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"""/, 'string', '@string."""'],
|
||||
[/"/, 'string', '@string."'],
|
||||
// literal string
|
||||
[/\@"/, { token: 'string.quote', next: '@litstring' }],
|
||||
// characters
|
||||
[/'[^\\']'B?/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\(\*(?!\))/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^*(]+/, 'comment'],
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\*/, 'comment'],
|
||||
[/\(\*\)/, 'comment'],
|
||||
[/\(/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/("""|"B?)/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
litstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),
|
||||
end: new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.fs',
|
||||
keywords: [
|
||||
'abstract', 'and', 'atomic', 'as',
|
||||
'assert', 'asr', 'base', 'begin',
|
||||
'break', 'checked', 'component',
|
||||
'const', 'constraint', 'constructor',
|
||||
'continue', 'class', 'default',
|
||||
'delegate', 'do', 'done', 'downcast',
|
||||
'downto', 'elif', 'else', 'end',
|
||||
'exception', 'eager', 'event', 'external',
|
||||
'extern', 'false', 'finally', 'for',
|
||||
'fun', 'function', 'fixed', 'functor',
|
||||
'global', 'if', 'in', 'include', 'inherit',
|
||||
'inline', 'interface', 'internal', 'land',
|
||||
'lor', 'lsl', 'lsr', 'lxor', 'lazy', 'let',
|
||||
'match', 'member', 'mod', 'module', 'mutable',
|
||||
'namespace', 'method', 'mixin', 'new', 'not',
|
||||
'null', 'of', 'open', 'or', 'object',
|
||||
'override', 'private', 'parallel', 'process',
|
||||
'protected', 'pure', 'public', 'rec', 'return',
|
||||
'static', 'sealed', 'struct', 'sig', 'then',
|
||||
'to', 'true', 'tailcall', 'trait',
|
||||
'try', 'type', 'upcast', 'use',
|
||||
'val', 'void', 'virtual', 'volatile',
|
||||
'when', 'while', 'with', 'yield'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\^%;\.,\/]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /[uU]?[yslnLI]?/,
|
||||
floatsuffix: /[fFmM]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [< attributes >].
|
||||
[/\[<.*>\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^#(if|else|endif)/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0x[0-9a-fA-F]+LF/, 'number.float'],
|
||||
[/0x[0-9a-fA-F]+(@integersuffix)/, 'number.hex'],
|
||||
[/0b[0-1]+(@integersuffix)/, 'number.bin'],
|
||||
[/\d+(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"""/, 'string', '@string."""'],
|
||||
[/"/, 'string', '@string."'],
|
||||
// literal string
|
||||
[/\@"/, { token: 'string.quote', next: '@litstring' }],
|
||||
// characters
|
||||
[/'[^\\']'B?/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\(\*(?!\))/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^*(]+/, 'comment'],
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\*/, 'comment'],
|
||||
[/\(\*\)/, 'comment'],
|
||||
[/\(/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/("""|"B?)/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
litstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }]
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,176 +13,176 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '`', close: '`', notIn: ['string'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '`', close: '`' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.go',
|
||||
keywords: [
|
||||
'break',
|
||||
'case',
|
||||
'chan',
|
||||
'const',
|
||||
'continue',
|
||||
'default',
|
||||
'defer',
|
||||
'else',
|
||||
'fallthrough',
|
||||
'for',
|
||||
'func',
|
||||
'go',
|
||||
'goto',
|
||||
'if',
|
||||
'import',
|
||||
'interface',
|
||||
'map',
|
||||
'package',
|
||||
'range',
|
||||
'return',
|
||||
'select',
|
||||
'struct',
|
||||
'switch',
|
||||
'type',
|
||||
'var',
|
||||
'bool',
|
||||
'true',
|
||||
'false',
|
||||
'uint8',
|
||||
'uint16',
|
||||
'uint32',
|
||||
'uint64',
|
||||
'int8',
|
||||
'int16',
|
||||
'int32',
|
||||
'int64',
|
||||
'float32',
|
||||
'float64',
|
||||
'complex64',
|
||||
'complex128',
|
||||
'byte',
|
||||
'rune',
|
||||
'uint',
|
||||
'int',
|
||||
'uintptr',
|
||||
'string',
|
||||
'nil',
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '&', '|', '^', '<<', '>>', '&^',
|
||||
'+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '&^=',
|
||||
'&&', '||', '<-', '++', '--', '==', '<', '>', '=', '!', '!=', '<=', '>=', ':=', '...',
|
||||
'(', ')', '', ']', '{', '}', ',', ';', '.', ':'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary'],
|
||||
[/\d[\d']*/, 'number'],
|
||||
[/\d/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
[/`/, "string", "@rawstring"],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
// [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
rawstring: [
|
||||
[/[^\`]/, "string"],
|
||||
[/`/, "string", "@pop"]
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '`', close: '`', notIn: ['string'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '`', close: '`' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.go',
|
||||
keywords: [
|
||||
'break',
|
||||
'case',
|
||||
'chan',
|
||||
'const',
|
||||
'continue',
|
||||
'default',
|
||||
'defer',
|
||||
'else',
|
||||
'fallthrough',
|
||||
'for',
|
||||
'func',
|
||||
'go',
|
||||
'goto',
|
||||
'if',
|
||||
'import',
|
||||
'interface',
|
||||
'map',
|
||||
'package',
|
||||
'range',
|
||||
'return',
|
||||
'select',
|
||||
'struct',
|
||||
'switch',
|
||||
'type',
|
||||
'var',
|
||||
'bool',
|
||||
'true',
|
||||
'false',
|
||||
'uint8',
|
||||
'uint16',
|
||||
'uint32',
|
||||
'uint64',
|
||||
'int8',
|
||||
'int16',
|
||||
'int32',
|
||||
'int64',
|
||||
'float32',
|
||||
'float64',
|
||||
'complex64',
|
||||
'complex128',
|
||||
'byte',
|
||||
'rune',
|
||||
'uint',
|
||||
'int',
|
||||
'uintptr',
|
||||
'string',
|
||||
'nil',
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '&', '|', '^', '<<', '>>', '&^',
|
||||
'+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '<<=', '>>=', '&^=',
|
||||
'&&', '||', '<-', '++', '--', '==', '<', '>', '=', '!', '!=', '<=', '>=', ':=', '...',
|
||||
'(', ')', '', ']', '{', '}', ',', ';', '.', ':'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary'],
|
||||
[/\d[\d']*/, 'number'],
|
||||
[/\d/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
[/`/, "string", "@rawstring"],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
// [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
rawstring: [
|
||||
[/[^\`]/, "string"],
|
||||
[/`/, "string", "@pop"]
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,135 +13,135 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"""', close: '"""', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"""', close: '"""' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.gql',
|
||||
keywords: [
|
||||
'null', 'true', 'false',
|
||||
'query', 'mutation', 'subscription',
|
||||
'extend', 'schema', 'directive',
|
||||
'scalar', 'type', 'interface', 'union', 'enum', 'input', 'implements',
|
||||
'fragment', 'on',
|
||||
],
|
||||
typeKeywords: ['Int', 'Float', 'String', 'Boolean', 'ID'],
|
||||
directiveLocations: [
|
||||
'SCHEMA', 'SCALAR', 'OBJECT', 'FIELD_DEFINITION', 'ARGUMENT_DEFINITION',
|
||||
'INTERFACE', 'UNION', 'ENUM', 'ENUM_VALUE', 'INPUT_OBJECT', 'INPUT_FIELD_DEFINITION',
|
||||
'QUERY', 'MUTATION', 'SUBSCRIPTION', 'FIELD', 'FRAGMENT_DEFINITION',
|
||||
'FRAGMENT_SPREAD', 'INLINE_FRAGMENT', 'VARIABLE_DEFINITION',
|
||||
],
|
||||
operators: ['=', '!', '?', ':', '&', '|'],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=!?:&|]+/,
|
||||
// https://facebook.github.io/graphql/draft/#sec-String-Value
|
||||
escapes: /\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// fields and argument names
|
||||
[
|
||||
/[a-z_][\w$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'key.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// identify typed input variables
|
||||
[
|
||||
/[$][\w$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'argument.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// to show class names nicely
|
||||
[
|
||||
/[A-Z][\w\$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@default': 'type.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[
|
||||
/@symbols/,
|
||||
{ cases: { '@operators': 'operator', '@default': '' } },
|
||||
],
|
||||
// @ annotations.
|
||||
// As an example, we emit a debugging log message on these tokens.
|
||||
// Note: message are supressed during the first load -- change some lines to see them.
|
||||
[
|
||||
/@\s*[a-zA-Z_\$][\w\$]*/,
|
||||
{ token: 'annotation', log: 'annotation token: $0' },
|
||||
],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/"""/,
|
||||
{ token: 'string', next: '@mlstring', nextEmbedded: 'markdown' }
|
||||
],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
|
||||
],
|
||||
mlstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
['"""', { token: 'string', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
|
||||
],
|
||||
whitespace: [[/[ \t\r\n]+/, ''], [/#.*$/, 'comment']],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"""', close: '"""', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"""', close: '"""' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.gql',
|
||||
keywords: [
|
||||
'null', 'true', 'false',
|
||||
'query', 'mutation', 'subscription',
|
||||
'extend', 'schema', 'directive',
|
||||
'scalar', 'type', 'interface', 'union', 'enum', 'input', 'implements',
|
||||
'fragment', 'on',
|
||||
],
|
||||
typeKeywords: ['Int', 'Float', 'String', 'Boolean', 'ID'],
|
||||
directiveLocations: [
|
||||
'SCHEMA', 'SCALAR', 'OBJECT', 'FIELD_DEFINITION', 'ARGUMENT_DEFINITION',
|
||||
'INTERFACE', 'UNION', 'ENUM', 'ENUM_VALUE', 'INPUT_OBJECT', 'INPUT_FIELD_DEFINITION',
|
||||
'QUERY', 'MUTATION', 'SUBSCRIPTION', 'FIELD', 'FRAGMENT_DEFINITION',
|
||||
'FRAGMENT_SPREAD', 'INLINE_FRAGMENT', 'VARIABLE_DEFINITION',
|
||||
],
|
||||
operators: ['=', '!', '?', ':', '&', '|'],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=!?:&|]+/,
|
||||
// https://facebook.github.io/graphql/draft/#sec-String-Value
|
||||
escapes: /\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// fields and argument names
|
||||
[
|
||||
/[a-z_][\w$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'key.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// identify typed input variables
|
||||
[
|
||||
/[$][\w$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'argument.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// to show class names nicely
|
||||
[
|
||||
/[A-Z][\w\$]*/,
|
||||
{
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@default': 'type.identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[
|
||||
/@symbols/,
|
||||
{ cases: { '@operators': 'operator', '@default': '' } },
|
||||
],
|
||||
// @ annotations.
|
||||
// As an example, we emit a debugging log message on these tokens.
|
||||
// Note: message are supressed during the first load -- change some lines to see them.
|
||||
[
|
||||
/@\s*[a-zA-Z_\$][\w\$]*/,
|
||||
{ token: 'annotation', log: 'annotation token: $0' },
|
||||
],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/"""/,
|
||||
{ token: 'string', next: '@mlstring', nextEmbedded: 'markdown' }
|
||||
],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
|
||||
],
|
||||
mlstring: [
|
||||
[/[^"]+/, 'string'],
|
||||
['"""', { token: 'string', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
|
||||
],
|
||||
whitespace: [[/[ \t\r\n]+/, ''], [/#.*$/, 'comment']],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,200 +13,200 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['{{!--', '--}}']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{{', '}}'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/\{/, 'delimiter.html'],
|
||||
[/[^<{]+/] // text
|
||||
],
|
||||
doctype: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
handlebarsInSimpleState: [
|
||||
[/\{\{\{?/, 'delimiter.handlebars'],
|
||||
[/\}\}\}?/, { token: 'delimiter.handlebars', switchTo: '@$S2.$S3' }],
|
||||
{ include: 'handlebarsRoot' }
|
||||
],
|
||||
handlebarsInEmbeddedState: [
|
||||
[/\{\{\{?/, 'delimiter.handlebars'],
|
||||
[/\}\}\}?/, { token: 'delimiter.handlebars', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
{ include: 'handlebarsRoot' }
|
||||
],
|
||||
handlebarsRoot: [
|
||||
[/"[^"]*"/, 'string.handlebars'],
|
||||
[/[#/][^\s}]+/, 'keyword.helper.handlebars'],
|
||||
[/else\b/, 'keyword.helper.handlebars'],
|
||||
[/[\s]+/],
|
||||
[/[^}]/, 'variable.parameter.handlebars'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['{{!--', '--}}']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{{', '}}'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/\{/, 'delimiter.html'],
|
||||
[/[^<{]+/] // text
|
||||
],
|
||||
doctype: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/\{\{/, { token: '@rematch', switchTo: '@handlebarsInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
handlebarsInSimpleState: [
|
||||
[/\{\{\{?/, 'delimiter.handlebars'],
|
||||
[/\}\}\}?/, { token: 'delimiter.handlebars', switchTo: '@$S2.$S3' }],
|
||||
{ include: 'handlebarsRoot' }
|
||||
],
|
||||
handlebarsInEmbeddedState: [
|
||||
[/\{\{\{?/, 'delimiter.handlebars'],
|
||||
[/\}\}\}?/, { token: 'delimiter.handlebars', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
{ include: 'handlebarsRoot' }
|
||||
],
|
||||
handlebarsRoot: [
|
||||
[/"[^"]*"/, 'string.handlebars'],
|
||||
[/[#/][^\s}]+/, 'keyword.helper.handlebars'],
|
||||
[/else\b/, 'keyword.helper.handlebars'],
|
||||
[/[\s]+/],
|
||||
[/[^}]/, 'variable.parameter.handlebars'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,177 +13,177 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.html',
|
||||
ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/<!DOCTYPE/, 'metatag', '@doctype'],
|
||||
[/<!--/, 'comment', '@comment'],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ['delimiter', 'tag', '', 'delimiter']],
|
||||
[/(<)(script)/, ['delimiter', { token: 'tag', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter', { token: 'tag', next: '@style' }]],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
|
||||
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
|
||||
[/</, 'delimiter'],
|
||||
[/[^<]+/],
|
||||
],
|
||||
doctype: [
|
||||
[/[^>]+/, 'metatag.content'],
|
||||
[/>/, 'metatag', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/-->/, 'comment', '@pop'],
|
||||
[/[^-]+/, 'comment.content'],
|
||||
[/./, 'comment.content']
|
||||
],
|
||||
otherTag: [
|
||||
[/\/?>/, 'delimiter', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.html',
|
||||
ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/<!DOCTYPE/, 'metatag', '@doctype'],
|
||||
[/<!--/, 'comment', '@comment'],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ['delimiter', 'tag', '', 'delimiter']],
|
||||
[/(<)(script)/, ['delimiter', { token: 'tag', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter', { token: 'tag', next: '@style' }]],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
|
||||
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]],
|
||||
[/</, 'delimiter'],
|
||||
[/[^<]+/],
|
||||
],
|
||||
doctype: [
|
||||
[/[^>]+/, 'metatag.content'],
|
||||
[/>/, 'metatag', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/-->/, 'comment', '@pop'],
|
||||
[/[^-]+/, 'comment.content'],
|
||||
[/./, 'comment.content']
|
||||
],
|
||||
otherTag: [
|
||||
[/\/?>/, 'delimiter', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/>/, { token: 'delimiter', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter', 'tag', { token: 'delimiter', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/>/, { token: 'delimiter', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,74 +13,74 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.ini',
|
||||
// we include these common regular expressions
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// sections
|
||||
[/^\[[^\]]*\]/, 'metatag'],
|
||||
// keys
|
||||
[/(^\w+)(\s*)(\=)/, ['key', '', 'delimiter']],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// numbers
|
||||
[/\d+/, 'number'],
|
||||
// strings: recover on non-terminated strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\s*[#;].*$/, 'comment'],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.ini',
|
||||
// we include these common regular expressions
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// sections
|
||||
[/^\[[^\]]*\]/, 'metatag'],
|
||||
// keys
|
||||
[/(^\w+)(\s*)(\=)/, ['key', '', 'delimiter']],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// numbers
|
||||
[/\d+/, 'number'],
|
||||
// strings: recover on non-terminated strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\s*[#;].*$/, 'comment'],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,141 +13,141 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.java',
|
||||
keywords: [
|
||||
'abstract', 'continue', 'for', 'new', 'switch', 'assert', 'default',
|
||||
'goto', 'package', 'synchronized', 'boolean', 'do', 'if', 'private',
|
||||
'this', 'break', 'double', 'implements', 'protected', 'throw', 'byte',
|
||||
'else', 'import', 'public', 'throws', 'case', 'enum', 'instanceof', 'return',
|
||||
'transient', 'catch', 'extends', 'int', 'short', 'try', 'char', 'final',
|
||||
'interface', 'static', 'void', 'class', 'finally', 'long', 'strictfp',
|
||||
'volatile', 'const', 'float', 'native', 'super', 'while', 'true', 'false'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
|
||||
[/0(@octaldigits)[Ll]?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
javadoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
// [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.java',
|
||||
keywords: [
|
||||
'abstract', 'continue', 'for', 'new', 'switch', 'assert', 'default',
|
||||
'goto', 'package', 'synchronized', 'boolean', 'do', 'if', 'private',
|
||||
'this', 'break', 'double', 'implements', 'protected', 'throw', 'byte',
|
||||
'else', 'import', 'public', 'throws', 'case', 'enum', 'instanceof', 'return',
|
||||
'transient', 'catch', 'extends', 'int', 'short', 'try', 'char', 'final',
|
||||
'interface', 'static', 'void', 'class', 'finally', 'long', 'strictfp',
|
||||
'volatile', 'const', 'float', 'native', 'super', 'while', 'true', 'false'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
|
||||
[/0(@octaldigits)[Ll]?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
javadoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
// [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-(
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,151 +13,151 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.kt',
|
||||
keywords: [
|
||||
'as', 'as?', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if',
|
||||
'in', '!in', 'interface', 'is', '!is', 'null', 'object', 'package', 'return', 'super',
|
||||
'this', 'throw', 'true', 'try', 'typealias', 'val', 'var', 'when', 'while', 'by',
|
||||
'catch', 'constructor', 'delegate', 'dynamic', 'field', 'file', 'finally', 'get',
|
||||
'import', 'init', 'param', 'property', 'receiver', 'set', 'setparam', 'where', 'actual',
|
||||
'abstract', 'annotation', 'companion', 'const', 'crossinline', 'data', 'enum', 'expect',
|
||||
'external', 'final', 'infix', 'inline', 'inner', 'internal', 'lateinit', 'noinline',
|
||||
'open', 'operator', 'out', 'override', 'private', 'protected', 'public', 'reified',
|
||||
'sealed', 'suspend', 'tailrec', 'vararg', 'field', 'it'
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '=', '+=', '-=', '*=', '/=',
|
||||
'%=', '++', '--', '&&', '||', '!', '==', '!=', '===',
|
||||
'!==', '>', '<', '<=', '>=', '[', ']', '!!', '?.', '?:',
|
||||
'::', '..', ':', '?', '->', '@', ';', '$', '_'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// class name highlighting
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
|
||||
[/0(@octaldigits)[Ll]?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"""/, 'string', '@multistring'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
javadoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\/\*/, 'comment.doc', '@push'],
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
multistring: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"""/, 'string', '@pop'],
|
||||
[/./, 'string']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
|
||||
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.kt',
|
||||
keywords: [
|
||||
'as', 'as?', 'break', 'class', 'continue', 'do', 'else', 'false', 'for', 'fun', 'if',
|
||||
'in', '!in', 'interface', 'is', '!is', 'null', 'object', 'package', 'return', 'super',
|
||||
'this', 'throw', 'true', 'try', 'typealias', 'val', 'var', 'when', 'while', 'by',
|
||||
'catch', 'constructor', 'delegate', 'dynamic', 'field', 'file', 'finally', 'get',
|
||||
'import', 'init', 'param', 'property', 'receiver', 'set', 'setparam', 'where', 'actual',
|
||||
'abstract', 'annotation', 'companion', 'const', 'crossinline', 'data', 'enum', 'expect',
|
||||
'external', 'final', 'infix', 'inline', 'inner', 'internal', 'lateinit', 'noinline',
|
||||
'open', 'operator', 'out', 'override', 'private', 'protected', 'public', 'reified',
|
||||
'sealed', 'suspend', 'tailrec', 'vararg', 'field', 'it'
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '=', '+=', '-=', '*=', '/=',
|
||||
'%=', '++', '--', '&&', '||', '!', '==', '!=', '===',
|
||||
'!==', '>', '<', '<=', '>=', '[', ']', '!!', '?.', '?:',
|
||||
'::', '..', ':', '?', '->', '@', ';', '$', '_'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// class name highlighting
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// @ annotations.
|
||||
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)[Ll]?/, 'number.hex'],
|
||||
[/0(@octaldigits)[Ll]?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)[Ll]?/, 'number.binary'],
|
||||
[/(@digits)[fFdD]/, 'number.float'],
|
||||
[/(@digits)[lL]?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"""/, 'string', '@multistring'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@javadoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
javadoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\/\*/, 'comment.doc', '@push'],
|
||||
[/\/\*/, 'comment.doc.invalid'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
multistring: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"""/, 'string', '@pop'],
|
||||
[/./, 'string']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,150 +13,150 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.less',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
identifierPlus: '-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@nestedJSBegin' },
|
||||
['[ \\t\\r\\n]+', ''],
|
||||
{ include: '@comments' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@numbers' },
|
||||
['[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))', 'attribute.name', '@attribute'],
|
||||
['url(\\-prefix)?\\(', { token: 'tag', next: '@urldeclaration' }],
|
||||
['[{}()\\[\\]]', '@brackets'],
|
||||
['[,:;]', 'delimiter'],
|
||||
['#@identifierPlus', 'tag.id'],
|
||||
['&', 'tag'],
|
||||
['\\.@identifierPlus(?=\\()', 'tag.class', '@attribute'],
|
||||
['\\.@identifierPlus', 'tag.class'],
|
||||
['@identifierPlus', 'tag'],
|
||||
{ include: '@operators' },
|
||||
['@(@identifier(?=[:,\\)]))', 'variable', '@attribute'],
|
||||
['@(@identifier)', 'variable'],
|
||||
['@', 'key', '@atRules']
|
||||
],
|
||||
nestedJSBegin: [
|
||||
['``', 'delimiter.backtick'],
|
||||
['`', { token: 'delimiter.backtick', next: '@nestedJSEnd', nextEmbedded: 'text/javascript' }],
|
||||
],
|
||||
nestedJSEnd: [
|
||||
['`', { token: 'delimiter.backtick', next: '@pop', nextEmbedded: '@pop' }],
|
||||
],
|
||||
operators: [
|
||||
['[<>=\\+\\-\\*\\/\\^\\|\\~]', 'operator']
|
||||
],
|
||||
keyword: [
|
||||
['(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b', 'keyword']
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'tag', next: '@pop' }],
|
||||
],
|
||||
attribute: [
|
||||
{ include: '@nestedJSBegin' },
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@keyword' },
|
||||
['[a-zA-Z\\-]+(?=\\()', 'attribute.value', '@attribute'],
|
||||
['>', 'operator', '@pop'],
|
||||
['@identifier', 'attribute.value'],
|
||||
{ include: '@operators' },
|
||||
['@(@identifier)', 'variable'],
|
||||
['[)\\}]', '@brackets', '@pop'],
|
||||
['[{}()\\[\\]>]', '@brackets'],
|
||||
['[;]', 'delimiter', '@pop'],
|
||||
['[,=:]', 'delimiter'],
|
||||
['\\s', ''],
|
||||
['.', 'attribute.value']
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment'],
|
||||
],
|
||||
numbers: [
|
||||
['(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'attribute.value.unit', '@pop']
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string.delimiter', next: '@stringsEndDoubleQuote' }],
|
||||
['~?\'', { token: 'string.delimiter', next: '@stringsEndQuote' }]
|
||||
],
|
||||
stringsEndDoubleQuote: [
|
||||
['\\\\"', 'string'],
|
||||
['"', { token: 'string.delimiter', next: '@popall' }],
|
||||
['.', 'string']
|
||||
],
|
||||
stringsEndQuote: [
|
||||
['\\\\\'', 'string'],
|
||||
['\'', { token: 'string.delimiter', next: '@popall' }],
|
||||
['.', 'string']
|
||||
],
|
||||
atRules: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
['[()]', 'delimiter'],
|
||||
['[\\{;]', 'delimiter', '@pop'],
|
||||
['.', 'key']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.less',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
identifierPlus: '-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@nestedJSBegin' },
|
||||
['[ \\t\\r\\n]+', ''],
|
||||
{ include: '@comments' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@numbers' },
|
||||
['[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))', 'attribute.name', '@attribute'],
|
||||
['url(\\-prefix)?\\(', { token: 'tag', next: '@urldeclaration' }],
|
||||
['[{}()\\[\\]]', '@brackets'],
|
||||
['[,:;]', 'delimiter'],
|
||||
['#@identifierPlus', 'tag.id'],
|
||||
['&', 'tag'],
|
||||
['\\.@identifierPlus(?=\\()', 'tag.class', '@attribute'],
|
||||
['\\.@identifierPlus', 'tag.class'],
|
||||
['@identifierPlus', 'tag'],
|
||||
{ include: '@operators' },
|
||||
['@(@identifier(?=[:,\\)]))', 'variable', '@attribute'],
|
||||
['@(@identifier)', 'variable'],
|
||||
['@', 'key', '@atRules']
|
||||
],
|
||||
nestedJSBegin: [
|
||||
['``', 'delimiter.backtick'],
|
||||
['`', { token: 'delimiter.backtick', next: '@nestedJSEnd', nextEmbedded: 'text/javascript' }],
|
||||
],
|
||||
nestedJSEnd: [
|
||||
['`', { token: 'delimiter.backtick', next: '@pop', nextEmbedded: '@pop' }],
|
||||
],
|
||||
operators: [
|
||||
['[<>=\\+\\-\\*\\/\\^\\|\\~]', 'operator']
|
||||
],
|
||||
keyword: [
|
||||
['(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b', 'keyword']
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'tag', next: '@pop' }],
|
||||
],
|
||||
attribute: [
|
||||
{ include: '@nestedJSBegin' },
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@keyword' },
|
||||
['[a-zA-Z\\-]+(?=\\()', 'attribute.value', '@attribute'],
|
||||
['>', 'operator', '@pop'],
|
||||
['@identifier', 'attribute.value'],
|
||||
{ include: '@operators' },
|
||||
['@(@identifier)', 'variable'],
|
||||
['[)\\}]', '@brackets', '@pop'],
|
||||
['[{}()\\[\\]>]', '@brackets'],
|
||||
['[;]', 'delimiter', '@pop'],
|
||||
['[,=:]', 'delimiter'],
|
||||
['\\s', ''],
|
||||
['.', 'attribute.value']
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment'],
|
||||
],
|
||||
numbers: [
|
||||
['(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'attribute.value.number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'attribute.value.hex']
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'attribute.value.unit', '@pop']
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string.delimiter', next: '@stringsEndDoubleQuote' }],
|
||||
['~?\'', { token: 'string.delimiter', next: '@stringsEndQuote' }]
|
||||
],
|
||||
stringsEndDoubleQuote: [
|
||||
['\\\\"', 'string'],
|
||||
['"', { token: 'string.delimiter', next: '@popall' }],
|
||||
['.', 'string']
|
||||
],
|
||||
stringsEndQuote: [
|
||||
['\\\\\'', 'string'],
|
||||
['\'', { token: 'string.delimiter', next: '@popall' }],
|
||||
['.', 'string']
|
||||
],
|
||||
atRules: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@strings' },
|
||||
['[()]', 'delimiter'],
|
||||
['[\\{;]', 'delimiter', '@pop'],
|
||||
['.', 'key']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,121 +13,121 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['--[[', ']]'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.lua',
|
||||
keywords: [
|
||||
'and', 'break', 'do', 'else', 'elseif',
|
||||
'end', 'false', 'for', 'function', 'goto', 'if',
|
||||
'in', 'local', 'nil', 'not', 'or',
|
||||
'repeat', 'return', 'then', 'true', 'until',
|
||||
'while'
|
||||
],
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '^', '#', '==', '~=', '<=', '>=', '<', '>', '=',
|
||||
';', ':', ',', '.', '..', '...'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// keys
|
||||
[/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['delimiter', '', 'key', '', 'delimiter']],
|
||||
[/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['@brackets', '', 'key', '', 'delimiter']],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings: recover on non-terminated strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/--\[([=]*)\[/, 'comment', '@comment.$1'],
|
||||
[/--.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\]]+/, 'comment'],
|
||||
[/\]([=]*)\]/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'comment', next: '@pop' },
|
||||
'@default': 'comment'
|
||||
}
|
||||
}],
|
||||
[/./, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['--[[', ']]'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.lua',
|
||||
keywords: [
|
||||
'and', 'break', 'do', 'else', 'elseif',
|
||||
'end', 'false', 'for', 'function', 'goto', 'if',
|
||||
'in', 'local', 'nil', 'not', 'or',
|
||||
'repeat', 'return', 'then', 'true', 'until',
|
||||
'while'
|
||||
],
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
operators: [
|
||||
'+', '-', '*', '/', '%', '^', '#', '==', '~=', '<=', '>=', '<', '>', '=',
|
||||
';', ':', ',', '.', '..', '...'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// keys
|
||||
[/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['delimiter', '', 'key', '', 'delimiter']],
|
||||
[/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/, ['@brackets', '', 'key', '', 'delimiter']],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings: recover on non-terminated strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/--\[([=]*)\[/, 'comment', '@comment.$1'],
|
||||
[/--.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\]]+/, 'comment'],
|
||||
[/\]([=]*)\]/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'comment', next: '@pop' },
|
||||
'@default': 'comment'
|
||||
}
|
||||
}],
|
||||
[/./, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,184 +13,184 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->',]
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>', notIn: ['string'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.md',
|
||||
// escape codes
|
||||
control: /[\\`*_\[\]{}()#+\-\.!]/,
|
||||
noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
|
||||
escapes: /\\(?:@control)/,
|
||||
// escape codes for javascript/CSS strings
|
||||
jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
|
||||
// non matched elements
|
||||
empty: [
|
||||
'area', 'base', 'basefont', 'br', 'col', 'frame',
|
||||
'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
// markdown tables
|
||||
[/^\s*\|/, '@rematch', '@table_header'],
|
||||
// headers (with #)
|
||||
[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ['white', 'keyword', 'keyword', 'keyword']],
|
||||
// headers (with =)
|
||||
[/^\s*(=+|\-+)\s*$/, 'keyword'],
|
||||
// headers (with ***)
|
||||
[/^\s*((\*[ ]?)+)\s*$/, 'meta.separator'],
|
||||
// quote
|
||||
[/^\s*>+/, 'comment'],
|
||||
// list (starting with * or number)
|
||||
[/^\s*([\*\-+:]|\d+\.)\s/, 'keyword'],
|
||||
// code block (4 spaces indent)
|
||||
[/^(\t|[ ]{4})[^ ].*$/, 'string'],
|
||||
// code block (3 tilde)
|
||||
[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
|
||||
// github style code blocks (with backticks and language)
|
||||
[/^\s*```\s*((?:\w|[\/\-#])+).*$/, { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }],
|
||||
// github style code blocks (with backticks but no language)
|
||||
[/^\s*```\s*$/, { token: 'string', next: '@codeblock' }],
|
||||
// markup within lines
|
||||
{ include: '@linecontent' },
|
||||
],
|
||||
table_header: [
|
||||
{ include: '@table_common' },
|
||||
[/[^\|]+/, 'keyword.table.header'],
|
||||
],
|
||||
table_body: [
|
||||
{ include: '@table_common' },
|
||||
{ include: '@linecontent' },
|
||||
],
|
||||
table_common: [
|
||||
[/\s*[\-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }],
|
||||
[/^\s*\|/, 'keyword.table.left'],
|
||||
[/^\s*[^\|]/, '@rematch', '@pop'],
|
||||
[/^\s*$/, '@rematch', '@pop'],
|
||||
[/\|/, {
|
||||
cases: {
|
||||
'@eos': 'keyword.table.right',
|
||||
'@default': 'keyword.table.middle',
|
||||
}
|
||||
}],
|
||||
],
|
||||
codeblock: [
|
||||
[/^\s*~~~\s*$/, { token: 'string', next: '@pop' }],
|
||||
[/^\s*```\s*$/, { token: 'string', next: '@pop' }],
|
||||
[/.*$/, 'variable.source'],
|
||||
],
|
||||
// github style code blocks
|
||||
codeblockgh: [
|
||||
[/```\s*$/, { token: 'variable.source', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^`]+/, 'variable.source'],
|
||||
],
|
||||
linecontent: [
|
||||
// escapes
|
||||
[/&\w+;/, 'string.escape'],
|
||||
[/@escapes/, 'escape'],
|
||||
// various markup
|
||||
[/\b__([^\\_]|@escapes|_(?!_))+__\b/, 'strong'],
|
||||
[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, 'strong'],
|
||||
[/\b_[^_]+_\b/, 'emphasis'],
|
||||
[/\*([^\\*]|@escapes)+\*/, 'emphasis'],
|
||||
[/`([^\\`]|@escapes)+`/, 'variable'],
|
||||
// links
|
||||
[/\{+[^}]+\}+/, 'string.target'],
|
||||
[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ['string.link', '', 'string.link']],
|
||||
[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, 'string.link'],
|
||||
// or html
|
||||
{ include: 'html' },
|
||||
],
|
||||
// Note: it is tempting to rather switch to the real HTML mode instead of building our own here
|
||||
// but currently there is a limitation in Monarch that prevents us from doing it: The opening
|
||||
// '<' would start the HTML mode, however there is no way to jump 1 character back to let the
|
||||
// HTML mode also tokenize the opening angle bracket. Thus, even though we could jump to HTML,
|
||||
// we cannot correctly tokenize it in that mode yet.
|
||||
html: [
|
||||
// html tags
|
||||
[/<(\w+)\/>/, 'tag'],
|
||||
[/<(\w+)/, {
|
||||
cases: {
|
||||
'@empty': { token: 'tag', next: '@tag.$1' },
|
||||
'@default': { token: 'tag', next: '@tag.$1' }
|
||||
}
|
||||
}],
|
||||
[/<\/(\w+)\s*>/, { token: 'tag' }],
|
||||
[/<!--/, 'comment', '@comment']
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, 'comment', '@pop'],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
// Almost full HTML tag matching, complete with embedded scripts & styles
|
||||
tag: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/(type)(\s*=\s*)(")([^"]+)(")/, ['attribute.name.html', 'delimiter.html', 'string.html',
|
||||
{ token: 'string.html', switchTo: '@tag.$S2.$4' },
|
||||
'string.html']],
|
||||
[/(type)(\s*=\s*)(')([^']+)(')/, ['attribute.name.html', 'delimiter.html', 'string.html',
|
||||
{ token: 'string.html', switchTo: '@tag.$S2.$4' },
|
||||
'string.html']],
|
||||
[/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name.html', 'delimiter.html', 'string.html']],
|
||||
[/\w+/, 'attribute.name.html'],
|
||||
[/\/>/, 'tag', '@pop'],
|
||||
[/>/, {
|
||||
cases: {
|
||||
'$S2==style': { token: 'tag', switchTo: 'embeddedStyle', nextEmbedded: 'text/css' },
|
||||
'$S2==script': {
|
||||
cases: {
|
||||
'$S3': { token: 'tag', switchTo: 'embeddedScript', nextEmbedded: '$S3' },
|
||||
'@default': { token: 'tag', switchTo: 'embeddedScript', nextEmbedded: 'text/javascript' }
|
||||
}
|
||||
},
|
||||
'@default': { token: 'tag', next: '@pop' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
embeddedStyle: [
|
||||
[/[^<]+/, ''],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/</, '']
|
||||
],
|
||||
embeddedScript: [
|
||||
[/[^<]+/, ''],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/</, '']
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->',]
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>', notIn: ['string'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.md',
|
||||
// escape codes
|
||||
control: /[\\`*_\[\]{}()#+\-\.!]/,
|
||||
noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
|
||||
escapes: /\\(?:@control)/,
|
||||
// escape codes for javascript/CSS strings
|
||||
jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
|
||||
// non matched elements
|
||||
empty: [
|
||||
'area', 'base', 'basefont', 'br', 'col', 'frame',
|
||||
'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
// markdown tables
|
||||
[/^\s*\|/, '@rematch', '@table_header'],
|
||||
// headers (with #)
|
||||
[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ['white', 'keyword', 'keyword', 'keyword']],
|
||||
// headers (with =)
|
||||
[/^\s*(=+|\-+)\s*$/, 'keyword'],
|
||||
// headers (with ***)
|
||||
[/^\s*((\*[ ]?)+)\s*$/, 'meta.separator'],
|
||||
// quote
|
||||
[/^\s*>+/, 'comment'],
|
||||
// list (starting with * or number)
|
||||
[/^\s*([\*\-+:]|\d+\.)\s/, 'keyword'],
|
||||
// code block (4 spaces indent)
|
||||
[/^(\t|[ ]{4})[^ ].*$/, 'string'],
|
||||
// code block (3 tilde)
|
||||
[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: 'string', next: '@codeblock' }],
|
||||
// github style code blocks (with backticks and language)
|
||||
[/^\s*```\s*((?:\w|[\/\-#])+).*$/, { token: 'string', next: '@codeblockgh', nextEmbedded: '$1' }],
|
||||
// github style code blocks (with backticks but no language)
|
||||
[/^\s*```\s*$/, { token: 'string', next: '@codeblock' }],
|
||||
// markup within lines
|
||||
{ include: '@linecontent' },
|
||||
],
|
||||
table_header: [
|
||||
{ include: '@table_common' },
|
||||
[/[^\|]+/, 'keyword.table.header'],
|
||||
],
|
||||
table_body: [
|
||||
{ include: '@table_common' },
|
||||
{ include: '@linecontent' },
|
||||
],
|
||||
table_common: [
|
||||
[/\s*[\-:]+\s*/, { token: 'keyword', switchTo: 'table_body' }],
|
||||
[/^\s*\|/, 'keyword.table.left'],
|
||||
[/^\s*[^\|]/, '@rematch', '@pop'],
|
||||
[/^\s*$/, '@rematch', '@pop'],
|
||||
[/\|/, {
|
||||
cases: {
|
||||
'@eos': 'keyword.table.right',
|
||||
'@default': 'keyword.table.middle',
|
||||
}
|
||||
}],
|
||||
],
|
||||
codeblock: [
|
||||
[/^\s*~~~\s*$/, { token: 'string', next: '@pop' }],
|
||||
[/^\s*```\s*$/, { token: 'string', next: '@pop' }],
|
||||
[/.*$/, 'variable.source'],
|
||||
],
|
||||
// github style code blocks
|
||||
codeblockgh: [
|
||||
[/```\s*$/, { token: 'variable.source', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^`]+/, 'variable.source'],
|
||||
],
|
||||
linecontent: [
|
||||
// escapes
|
||||
[/&\w+;/, 'string.escape'],
|
||||
[/@escapes/, 'escape'],
|
||||
// various markup
|
||||
[/\b__([^\\_]|@escapes|_(?!_))+__\b/, 'strong'],
|
||||
[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, 'strong'],
|
||||
[/\b_[^_]+_\b/, 'emphasis'],
|
||||
[/\*([^\\*]|@escapes)+\*/, 'emphasis'],
|
||||
[/`([^\\`]|@escapes)+`/, 'variable'],
|
||||
// links
|
||||
[/\{+[^}]+\}+/, 'string.target'],
|
||||
[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ['string.link', '', 'string.link']],
|
||||
[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, 'string.link'],
|
||||
// or html
|
||||
{ include: 'html' },
|
||||
],
|
||||
// Note: it is tempting to rather switch to the real HTML mode instead of building our own here
|
||||
// but currently there is a limitation in Monarch that prevents us from doing it: The opening
|
||||
// '<' would start the HTML mode, however there is no way to jump 1 character back to let the
|
||||
// HTML mode also tokenize the opening angle bracket. Thus, even though we could jump to HTML,
|
||||
// we cannot correctly tokenize it in that mode yet.
|
||||
html: [
|
||||
// html tags
|
||||
[/<(\w+)\/>/, 'tag'],
|
||||
[/<(\w+)/, {
|
||||
cases: {
|
||||
'@empty': { token: 'tag', next: '@tag.$1' },
|
||||
'@default': { token: 'tag', next: '@tag.$1' }
|
||||
}
|
||||
}],
|
||||
[/<\/(\w+)\s*>/, { token: 'tag' }],
|
||||
[/<!--/, 'comment', '@comment']
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, 'comment', '@pop'],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
// Almost full HTML tag matching, complete with embedded scripts & styles
|
||||
tag: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/(type)(\s*=\s*)(")([^"]+)(")/, ['attribute.name.html', 'delimiter.html', 'string.html',
|
||||
{ token: 'string.html', switchTo: '@tag.$S2.$4' },
|
||||
'string.html']],
|
||||
[/(type)(\s*=\s*)(')([^']+)(')/, ['attribute.name.html', 'delimiter.html', 'string.html',
|
||||
{ token: 'string.html', switchTo: '@tag.$S2.$4' },
|
||||
'string.html']],
|
||||
[/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name.html', 'delimiter.html', 'string.html']],
|
||||
[/\w+/, 'attribute.name.html'],
|
||||
[/\/>/, 'tag', '@pop'],
|
||||
[/>/, {
|
||||
cases: {
|
||||
'$S2==style': { token: 'tag', switchTo: 'embeddedStyle', nextEmbedded: 'text/css' },
|
||||
'$S2==script': {
|
||||
cases: {
|
||||
'$S3': { token: 'tag', switchTo: 'embeddedScript', nextEmbedded: '$S3' },
|
||||
'@default': { token: 'tag', switchTo: 'embeddedScript', nextEmbedded: 'text/javascript' }
|
||||
}
|
||||
},
|
||||
'@default': { token: 'tag', next: '@pop' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
embeddedStyle: [
|
||||
[/[^<]+/, ''],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/</, '']
|
||||
],
|
||||
embeddedScript: [
|
||||
[/[^<]+/, ''],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/</, '']
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,136 +13,136 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['###', '###'],
|
||||
lineComment: '#'
|
||||
},
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: false,
|
||||
tokenPostfix: '.mips',
|
||||
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
||||
keywords: [
|
||||
'.data', '.text', 'syscall', 'trap',
|
||||
'add', 'addu', 'addi', 'addiu', 'and', 'andi',
|
||||
'div', 'divu', 'mult', 'multu', 'nor', 'or', 'ori',
|
||||
'sll', 'slv', 'sra', 'srav', 'srl', 'srlv',
|
||||
'sub', 'subu', 'xor', 'xori', 'lhi', 'lho',
|
||||
'lhi', 'llo', 'slt', 'slti', 'sltu', 'sltiu',
|
||||
'beq', 'bgtz', 'blez', 'bne', 'j', 'jal', 'jalr', 'jr',
|
||||
'lb', 'lbu', 'lh', 'lhu', 'lw', 'li', 'la',
|
||||
'sb', 'sh', 'sw', 'mfhi', 'mflo', 'mthi', 'mtlo', 'move',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[\.,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\$[a-zA-Z_]\w*/, 'variable.predefined'],
|
||||
[/[.a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'this': 'variable.predefined',
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// Comments
|
||||
[/#.*$/, 'comment'],
|
||||
// regular expressions
|
||||
['///', { token: 'regexp', next: '@hereregexp' }],
|
||||
[/^(\s*)(@regEx)/, ['', 'regexp']],
|
||||
[/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
// delimiters
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/0[0-7]+(?!\d)/, 'number.octal'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"""/, 'string', '@herestring."""'],
|
||||
[/'''/, 'string', '@herestring.\'\'\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\#\\]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'string', next: 'root.interpolatedstring' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/#/, 'string']
|
||||
],
|
||||
herestring: [
|
||||
[/("""|''')/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^#\\'"]+/, 'string'],
|
||||
[/['"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/#/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^#]+/, 'comment',],
|
||||
[/#/, 'comment'],
|
||||
],
|
||||
hereregexp: [
|
||||
[/[^\\\/#]+/, 'regexp'],
|
||||
[/\\./, 'regexp'],
|
||||
[/#.*$/, 'comment'],
|
||||
['///[igm]*', { token: 'regexp', next: '@pop' }],
|
||||
[/\//, 'regexp'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['###', '###'],
|
||||
lineComment: '#'
|
||||
},
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: false,
|
||||
tokenPostfix: '.mips',
|
||||
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
|
||||
keywords: [
|
||||
'.data', '.text', 'syscall', 'trap',
|
||||
'add', 'addu', 'addi', 'addiu', 'and', 'andi',
|
||||
'div', 'divu', 'mult', 'multu', 'nor', 'or', 'ori',
|
||||
'sll', 'slv', 'sra', 'srav', 'srl', 'srlv',
|
||||
'sub', 'subu', 'xor', 'xori', 'lhi', 'lho',
|
||||
'lhi', 'llo', 'slt', 'slti', 'sltu', 'sltiu',
|
||||
'beq', 'bgtz', 'blez', 'bne', 'j', 'jal', 'jalr', 'jr',
|
||||
'lb', 'lbu', 'lh', 'lhu', 'lw', 'li', 'la',
|
||||
'sb', 'sh', 'sw', 'mfhi', 'mflo', 'mthi', 'mtlo', 'move',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[\.,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/\$[a-zA-Z_]\w*/, 'variable.predefined'],
|
||||
[/[.a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'this': 'variable.predefined',
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// Comments
|
||||
[/#.*$/, 'comment'],
|
||||
// regular expressions
|
||||
['///', { token: 'regexp', next: '@hereregexp' }],
|
||||
[/^(\s*)(@regEx)/, ['', 'regexp']],
|
||||
[/(\,)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
[/(\:)(\s*)(@regEx)/, ['delimiter', '', 'regexp']],
|
||||
// delimiters
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+[eE]([\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/0[0-7]+(?!\d)/, 'number.octal'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/"""/, 'string', '@herestring."""'],
|
||||
[/'''/, 'string', '@herestring.\'\'\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\#\\]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'string', next: 'root.interpolatedstring' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/#/, 'string']
|
||||
],
|
||||
herestring: [
|
||||
[/("""|''')/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^#\\'"]+/, 'string'],
|
||||
[/['"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\./, 'string.escape.invalid'],
|
||||
[/#{/, { token: 'string.quote', next: 'root.interpolatedstring' }],
|
||||
[/#/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^#]+/, 'comment',],
|
||||
[/#/, 'comment'],
|
||||
],
|
||||
hereregexp: [
|
||||
[/[^\\\/#]+/, 'regexp'],
|
||||
[/\\./, 'regexp'],
|
||||
[/#.*$/, 'comment'],
|
||||
['///[igm]*', { token: 'regexp', next: '@pop' }],
|
||||
[/\//, 'regexp'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,174 +13,174 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [['[', ']'], ['(', ')'], ['{', '}']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.msdax',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '{', close: '}', token: 'delimiter.brackets' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
// Query keywords
|
||||
'VAR',
|
||||
'RETURN',
|
||||
'NOT',
|
||||
'EVALUATE',
|
||||
'DATATABLE',
|
||||
'ORDER',
|
||||
'BY',
|
||||
'START',
|
||||
'AT',
|
||||
'DEFINE',
|
||||
'MEASURE',
|
||||
'ASC',
|
||||
'DESC',
|
||||
'IN',
|
||||
// Datatable types
|
||||
'BOOLEAN',
|
||||
'DOUBLE',
|
||||
'INTEGER',
|
||||
'DATETIME',
|
||||
'CURRENCY',
|
||||
'STRING'
|
||||
],
|
||||
functions: [
|
||||
// Relational
|
||||
'CLOSINGBALANCEMONTH', 'CLOSINGBALANCEQUARTER', 'CLOSINGBALANCEYEAR', 'DATEADD', 'DATESBETWEEN',
|
||||
'DATESINPERIOD', 'DATESMTD', 'DATESQTD', 'DATESYTD', 'ENDOFMONTH',
|
||||
'ENDOFQUARTER', 'ENDOFYEAR', 'FIRSTDATE', 'FIRSTNONBLANK', 'LASTDATE',
|
||||
'LASTNONBLANK', 'NEXTDAY', 'NEXTMONTH', 'NEXTQUARTER', 'NEXTYEAR',
|
||||
'OPENINGBALANCEMONTH', 'OPENINGBALANCEQUARTER', 'OPENINGBALANCEYEAR', 'PARALLELPERIOD', 'PREVIOUSDAY',
|
||||
'PREVIOUSMONTH', 'PREVIOUSQUARTER', 'PREVIOUSYEAR', 'SAMEPERIODLASTYEAR', 'STARTOFMONTH',
|
||||
'STARTOFQUARTER', 'STARTOFYEAR', 'TOTALMTD', 'TOTALQTD', 'TOTALYTD',
|
||||
'ADDCOLUMNS', 'ADDMISSINGITEMS', 'ALL', 'ALLEXCEPT', 'ALLNOBLANKROW',
|
||||
'ALLSELECTED', 'CALCULATE', 'CALCULATETABLE', 'CALENDAR', 'CALENDARAUTO',
|
||||
'CROSSFILTER', 'CROSSJOIN', 'CURRENTGROUP', 'DATATABLE', 'DETAILROWS',
|
||||
'DISTINCT', 'EARLIER', 'EARLIEST', 'EXCEPT', 'FILTER',
|
||||
'FILTERS', 'GENERATE', 'GENERATEALL', 'GROUPBY', 'IGNORE',
|
||||
'INTERSECT', 'ISONORAFTER', 'KEEPFILTERS', 'LOOKUPVALUE', 'NATURALINNERJOIN',
|
||||
'NATURALLEFTOUTERJOIN', 'RELATED', 'RELATEDTABLE', 'ROLLUP', 'ROLLUPADDISSUBTOTAL',
|
||||
'ROLLUPGROUP', 'ROLLUPISSUBTOTAL', 'ROW', 'SAMPLE', 'SELECTCOLUMNS',
|
||||
'SUBSTITUTEWITHINDEX', 'SUMMARIZE', 'SUMMARIZECOLUMNS', 'TOPN', 'TREATAS',
|
||||
'UNION', 'USERELATIONSHIP', 'VALUES', 'SUM', 'SUMX',
|
||||
'PATH', 'PATHCONTAINS', 'PATHITEM', 'PATHITEMREVERSE', 'PATHLENGTH',
|
||||
'AVERAGE', 'AVERAGEA', 'AVERAGEX', 'COUNT', 'COUNTA',
|
||||
'COUNTAX', 'COUNTBLANK', 'COUNTROWS', 'COUNTX', 'DISTINCTCOUNT',
|
||||
'DIVIDE', 'GEOMEAN', 'GEOMEANX', 'MAX', 'MAXA',
|
||||
'MAXX', 'MEDIAN', 'MEDIANX', 'MIN', 'MINA',
|
||||
'MINX', 'PERCENTILE.EXC', 'PERCENTILE.INC', 'PERCENTILEX.EXC', 'PERCENTILEX.INC',
|
||||
'PRODUCT', 'PRODUCTX', 'RANK.EQ', 'RANKX', 'STDEV.P',
|
||||
'STDEV.S', 'STDEVX.P', 'STDEVX.S', 'VAR.P', 'VAR.S',
|
||||
'VARX.P', 'VARX.S', 'XIRR', 'XNPV',
|
||||
// Scalar
|
||||
'DATE', 'DATEDIFF', 'DATEVALUE', 'DAY', 'EDATE',
|
||||
'EOMONTH', 'HOUR', 'MINUTE', 'MONTH', 'NOW',
|
||||
'SECOND', 'TIME', 'TIMEVALUE', 'TODAY', 'WEEKDAY',
|
||||
'WEEKNUM', 'YEAR', 'YEARFRAC', 'CONTAINS', 'CONTAINSROW',
|
||||
'CUSTOMDATA', 'ERROR', 'HASONEFILTER', 'HASONEVALUE', 'ISBLANK',
|
||||
'ISCROSSFILTERED', 'ISEMPTY', 'ISERROR', 'ISEVEN', 'ISFILTERED',
|
||||
'ISLOGICAL', 'ISNONTEXT', 'ISNUMBER', 'ISODD', 'ISSUBTOTAL',
|
||||
'ISTEXT', 'USERNAME', 'USERPRINCIPALNAME', 'AND', 'FALSE',
|
||||
'IF', 'IFERROR', 'NOT', 'OR', 'SWITCH',
|
||||
'TRUE', 'ABS', 'ACOS', 'ACOSH', 'ACOT',
|
||||
'ACOTH', 'ASIN', 'ASINH', 'ATAN', 'ATANH',
|
||||
'BETA.DIST', 'BETA.INV', 'CEILING', 'CHISQ.DIST', 'CHISQ.DIST.RT',
|
||||
'CHISQ.INV', 'CHISQ.INV.RT', 'COMBIN', 'COMBINA', 'CONFIDENCE.NORM',
|
||||
'CONFIDENCE.T', 'COS', 'COSH', 'COT', 'COTH',
|
||||
'CURRENCY', 'DEGREES', 'EVEN', 'EXP', 'EXPON.DIST',
|
||||
'FACT', 'FLOOR', 'GCD', 'INT', 'ISO.CEILING',
|
||||
'LCM', 'LN', 'LOG', 'LOG10', 'MOD',
|
||||
'MROUND', 'ODD', 'PERMUT', 'PI', 'POISSON.DIST',
|
||||
'POWER', 'QUOTIENT', 'RADIANS', 'RAND', 'RANDBETWEEN',
|
||||
'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'SIGN', 'SIN',
|
||||
'SINH', 'SQRT', 'SQRTPI', 'TAN', 'TANH',
|
||||
'TRUNC', 'BLANK', 'CONCATENATE', 'CONCATENATEX', 'EXACT',
|
||||
'FIND', 'FIXED', 'FORMAT', 'LEFT', 'LEN',
|
||||
'LOWER', 'MID', 'REPLACE', 'REPT', 'RIGHT',
|
||||
'SEARCH', 'SUBSTITUTE', 'TRIM', 'UNICHAR', 'UNICODE',
|
||||
'UPPER', 'VALUE'
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[({})]/, '@brackets'],
|
||||
[/[a-z_][a-zA-Z0-9_]*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@functions': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/\/\/+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/N"/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string', next: '@string' }]
|
||||
],
|
||||
string: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string'],
|
||||
[/"/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
|
||||
[/'/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
bracketedIdentifier: [
|
||||
[/[^\]]+/, 'identifier'],
|
||||
[/]]/, 'identifier'],
|
||||
[/]/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^']+/, 'identifier'],
|
||||
[/''/, 'identifier'],
|
||||
[/'/, { token: 'identifier.quote', next: '@pop' }]
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [['[', ']'], ['(', ')'], ['{', '}']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.msdax',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '{', close: '}', token: 'delimiter.brackets' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
// Query keywords
|
||||
'VAR',
|
||||
'RETURN',
|
||||
'NOT',
|
||||
'EVALUATE',
|
||||
'DATATABLE',
|
||||
'ORDER',
|
||||
'BY',
|
||||
'START',
|
||||
'AT',
|
||||
'DEFINE',
|
||||
'MEASURE',
|
||||
'ASC',
|
||||
'DESC',
|
||||
'IN',
|
||||
// Datatable types
|
||||
'BOOLEAN',
|
||||
'DOUBLE',
|
||||
'INTEGER',
|
||||
'DATETIME',
|
||||
'CURRENCY',
|
||||
'STRING'
|
||||
],
|
||||
functions: [
|
||||
// Relational
|
||||
'CLOSINGBALANCEMONTH', 'CLOSINGBALANCEQUARTER', 'CLOSINGBALANCEYEAR', 'DATEADD', 'DATESBETWEEN',
|
||||
'DATESINPERIOD', 'DATESMTD', 'DATESQTD', 'DATESYTD', 'ENDOFMONTH',
|
||||
'ENDOFQUARTER', 'ENDOFYEAR', 'FIRSTDATE', 'FIRSTNONBLANK', 'LASTDATE',
|
||||
'LASTNONBLANK', 'NEXTDAY', 'NEXTMONTH', 'NEXTQUARTER', 'NEXTYEAR',
|
||||
'OPENINGBALANCEMONTH', 'OPENINGBALANCEQUARTER', 'OPENINGBALANCEYEAR', 'PARALLELPERIOD', 'PREVIOUSDAY',
|
||||
'PREVIOUSMONTH', 'PREVIOUSQUARTER', 'PREVIOUSYEAR', 'SAMEPERIODLASTYEAR', 'STARTOFMONTH',
|
||||
'STARTOFQUARTER', 'STARTOFYEAR', 'TOTALMTD', 'TOTALQTD', 'TOTALYTD',
|
||||
'ADDCOLUMNS', 'ADDMISSINGITEMS', 'ALL', 'ALLEXCEPT', 'ALLNOBLANKROW',
|
||||
'ALLSELECTED', 'CALCULATE', 'CALCULATETABLE', 'CALENDAR', 'CALENDARAUTO',
|
||||
'CROSSFILTER', 'CROSSJOIN', 'CURRENTGROUP', 'DATATABLE', 'DETAILROWS',
|
||||
'DISTINCT', 'EARLIER', 'EARLIEST', 'EXCEPT', 'FILTER',
|
||||
'FILTERS', 'GENERATE', 'GENERATEALL', 'GROUPBY', 'IGNORE',
|
||||
'INTERSECT', 'ISONORAFTER', 'KEEPFILTERS', 'LOOKUPVALUE', 'NATURALINNERJOIN',
|
||||
'NATURALLEFTOUTERJOIN', 'RELATED', 'RELATEDTABLE', 'ROLLUP', 'ROLLUPADDISSUBTOTAL',
|
||||
'ROLLUPGROUP', 'ROLLUPISSUBTOTAL', 'ROW', 'SAMPLE', 'SELECTCOLUMNS',
|
||||
'SUBSTITUTEWITHINDEX', 'SUMMARIZE', 'SUMMARIZECOLUMNS', 'TOPN', 'TREATAS',
|
||||
'UNION', 'USERELATIONSHIP', 'VALUES', 'SUM', 'SUMX',
|
||||
'PATH', 'PATHCONTAINS', 'PATHITEM', 'PATHITEMREVERSE', 'PATHLENGTH',
|
||||
'AVERAGE', 'AVERAGEA', 'AVERAGEX', 'COUNT', 'COUNTA',
|
||||
'COUNTAX', 'COUNTBLANK', 'COUNTROWS', 'COUNTX', 'DISTINCTCOUNT',
|
||||
'DIVIDE', 'GEOMEAN', 'GEOMEANX', 'MAX', 'MAXA',
|
||||
'MAXX', 'MEDIAN', 'MEDIANX', 'MIN', 'MINA',
|
||||
'MINX', 'PERCENTILE.EXC', 'PERCENTILE.INC', 'PERCENTILEX.EXC', 'PERCENTILEX.INC',
|
||||
'PRODUCT', 'PRODUCTX', 'RANK.EQ', 'RANKX', 'STDEV.P',
|
||||
'STDEV.S', 'STDEVX.P', 'STDEVX.S', 'VAR.P', 'VAR.S',
|
||||
'VARX.P', 'VARX.S', 'XIRR', 'XNPV',
|
||||
// Scalar
|
||||
'DATE', 'DATEDIFF', 'DATEVALUE', 'DAY', 'EDATE',
|
||||
'EOMONTH', 'HOUR', 'MINUTE', 'MONTH', 'NOW',
|
||||
'SECOND', 'TIME', 'TIMEVALUE', 'TODAY', 'WEEKDAY',
|
||||
'WEEKNUM', 'YEAR', 'YEARFRAC', 'CONTAINS', 'CONTAINSROW',
|
||||
'CUSTOMDATA', 'ERROR', 'HASONEFILTER', 'HASONEVALUE', 'ISBLANK',
|
||||
'ISCROSSFILTERED', 'ISEMPTY', 'ISERROR', 'ISEVEN', 'ISFILTERED',
|
||||
'ISLOGICAL', 'ISNONTEXT', 'ISNUMBER', 'ISODD', 'ISSUBTOTAL',
|
||||
'ISTEXT', 'USERNAME', 'USERPRINCIPALNAME', 'AND', 'FALSE',
|
||||
'IF', 'IFERROR', 'NOT', 'OR', 'SWITCH',
|
||||
'TRUE', 'ABS', 'ACOS', 'ACOSH', 'ACOT',
|
||||
'ACOTH', 'ASIN', 'ASINH', 'ATAN', 'ATANH',
|
||||
'BETA.DIST', 'BETA.INV', 'CEILING', 'CHISQ.DIST', 'CHISQ.DIST.RT',
|
||||
'CHISQ.INV', 'CHISQ.INV.RT', 'COMBIN', 'COMBINA', 'CONFIDENCE.NORM',
|
||||
'CONFIDENCE.T', 'COS', 'COSH', 'COT', 'COTH',
|
||||
'CURRENCY', 'DEGREES', 'EVEN', 'EXP', 'EXPON.DIST',
|
||||
'FACT', 'FLOOR', 'GCD', 'INT', 'ISO.CEILING',
|
||||
'LCM', 'LN', 'LOG', 'LOG10', 'MOD',
|
||||
'MROUND', 'ODD', 'PERMUT', 'PI', 'POISSON.DIST',
|
||||
'POWER', 'QUOTIENT', 'RADIANS', 'RAND', 'RANDBETWEEN',
|
||||
'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'SIGN', 'SIN',
|
||||
'SINH', 'SQRT', 'SQRTPI', 'TAN', 'TANH',
|
||||
'TRUNC', 'BLANK', 'CONCATENATE', 'CONCATENATEX', 'EXACT',
|
||||
'FIND', 'FIXED', 'FORMAT', 'LEFT', 'LEN',
|
||||
'LOWER', 'MID', 'REPLACE', 'REPT', 'RIGHT',
|
||||
'SEARCH', 'SUBSTITUTE', 'TRIM', 'UNICHAR', 'UNICODE',
|
||||
'UPPER', 'VALUE'
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[({})]/, '@brackets'],
|
||||
[/[a-z_][a-zA-Z0-9_]*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@functions': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/\/\/+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/N"/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string', next: '@string' }]
|
||||
],
|
||||
string: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/""/, 'string'],
|
||||
[/"/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],
|
||||
[/'/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
bracketedIdentifier: [
|
||||
[/[^\]]+/, 'identifier'],
|
||||
[/]]/, 'identifier'],
|
||||
[/]/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^']+/, 'identifier'],
|
||||
[/''/, 'identifier'],
|
||||
[/'/, { token: 'identifier.quote', next: '@pop' }]
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,219 +13,219 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"ACCESSIBLE", "ACCOUNT", "ACTION", "ADD", "AFTER", "AGAINST", "AGGREGATE", "ALGORITHM", "ALL", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE",
|
||||
"AND", "ANY", "AS", "ASC", "ASCII", "ASENSITIVE", "AT", "AUTOEXTEND_SIZE", "AUTO_INCREMENT", "AVG", "AVG_ROW_LENGTH", "BACKUP", "BEFORE",
|
||||
"BEGIN", "BETWEEN", "BIGINT", "BINARY", "BINLOG", "BIT", "BLOB", "BLOCK", "BOOL", "BOOLEAN", "BOTH", "BTREE", "BY", "BYTE", "CACHE", "CALL",
|
||||
"CASCADE", "CASCADED", "CASE", "CATALOG_NAME", "CHAIN", "CHANGE", "CHANGED", "CHANNEL", "CHAR", "CHARACTER", "CHARSET", "CHECK", "CHECKSUM",
|
||||
"CIPHER", "CLASS_ORIGIN", "CLIENT", "CLOSE", "COALESCE", "CODE", "COLLATE", "COLLATION", "COLUMN", "COLUMNS", "COLUMN_FORMAT", "COLUMN_NAME",
|
||||
"COMMENT", "COMMIT", "COMMITTED", "COMPACT", "COMPLETION", "COMPRESSED", "COMPRESSION", "CONCURRENT", "CONDITION", "CONNECTION", "CONSISTENT",
|
||||
"CONSTRAINT", "CONSTRAINT_CATALOG", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONTAINS", "CONTEXT", "CONTINUE", "CONVERT", "CPU", "CREATE",
|
||||
"CROSS", "CUBE", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "CURSOR_NAME", "DATA", "DATABASE",
|
||||
"DATABASES", "DATAFILE", "DATE", "DATETIME", "DAY", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE", "DAY_SECOND", "DEALLOCATE", "DEC", "DECIMAL",
|
||||
"DECLARE", "DEFAULT", "DEFAULT_AUTH", "DEFINER", "DELAYED", "DELAY_KEY_WRITE", "DELETE", "DESC", "DESCRIBE", "DES_KEY_FILE", "DETERMINISTIC",
|
||||
"DIAGNOSTICS", "DIRECTORY", "DISABLE", "DISCARD", "DISK", "DISTINCT", "DISTINCTROW", "DIV", "DO", "DOUBLE", "DROP", "DUAL", "DUMPFILE",
|
||||
"DUPLICATE", "DYNAMIC", "EACH", "ELSE", "ELSEIF", "ENABLE", "ENCLOSED", "ENCRYPTION", "END", "ENDS", "ENGINE", "ENGINES", "ENUM", "ERROR",
|
||||
"ERRORS", "ESCAPE", "ESCAPED", "EVENT", "EVENTS", "EVERY", "EXCHANGE", "EXECUTE", "EXISTS", "EXIT", "EXPANSION", "EXPIRE", "EXPLAIN", "EXPORT",
|
||||
"EXTENDED", "EXTENT_SIZE", "FALSE", "FAST", "FAULTS", "FETCH", "FIELDS", "FILE", "FILE_BLOCK_SIZE", "FILTER", "FIRST", "FIXED", "FLOAT", "FLOAT4",
|
||||
"FLOAT8", "FLUSH", "FOLLOWS", "FOR", "FORCE", "FOREIGN", "FORMAT", "FOUND", "FROM", "FULL", "FULLTEXT", "FUNCTION", "GENERAL", "GENERATED",
|
||||
"GEOMETRY", "GEOMETRYCOLLECTION", "GET", "GET_FORMAT", "GLOBAL", "GRANT", "GRANTS", "GROUP", "GROUP_REPLICATION", "HANDLER", "HASH", "HAVING",
|
||||
"HELP", "HIGH_PRIORITY", "HOST", "HOSTS", "HOUR", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IDENTIFIED", "IF", "IGNORE", "IGNORE_SERVER_IDS",
|
||||
"IMPORT", "INDEX", "INDEXES", "INFILE", "INITIAL_SIZE", "INNER", "INOUT", "INSENSITIVE", "INSERT", "INSERT_METHOD", "INSTALL", "INSTANCE",
|
||||
"INT", "INT1", "INT2", "INT3", "INT4", "INT8", "INTEGER", "INTERVAL", "INTO", "INVOKER", "IO", "IO_AFTER_GTIDS", "IO_BEFORE_GTIDS", "IO_THREAD",
|
||||
"IPC", "ISOLATION", "ISSUER", "ITERATE", "JOIN", "JSON", "KEY", "KEYS", "KEY_BLOCK_SIZE", "KILL", "LANGUAGE", "LAST", "LEADING", "LEAVE",
|
||||
"LEAVES", "LEFT", "LESS", "LEVEL", "LIKE", "LIMIT", "LINEAR", "LINES", "LINESTRING", "LIST", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCK",
|
||||
"LOCKS", "LOGFILE", "LOGS", "LONG", "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY", "MASTER", "MASTER_AUTO_POSITION", "MASTER_BIND", "MASTER_CONNECT_RETRY",
|
||||
"MASTER_DELAY", "MASTER_HEARTBEAT_PERIOD", "MASTER_HOST", "MASTER_LOG_FILE", "MASTER_LOG_POS", "MASTER_PASSWORD", "MASTER_PORT", "MASTER_RETRY_COUNT",
|
||||
"MASTER_SERVER_ID", "MASTER_SSL", "MASTER_SSL_CA", "MASTER_SSL_CAPATH", "MASTER_SSL_CERT", "MASTER_SSL_CIPHER", "MASTER_SSL_CRL", "MASTER_SSL_CRLPATH",
|
||||
"MASTER_SSL_KEY", "MASTER_SSL_VERIFY_SERVER_CERT", "MASTER_TLS_VERSION", "MASTER_USER", "MATCH", "MAXVALUE", "MAX_CONNECTIONS_PER_HOUR", "MAX_QUERIES_PER_HOUR",
|
||||
"MAX_ROWS", "MAX_SIZE", "MAX_STATEMENT_TIME", "MAX_UPDATES_PER_HOUR", "MAX_USER_CONNECTIONS", "MEDIUM", "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MEMORY",
|
||||
"MERGE", "MESSAGE_TEXT", "MICROSECOND", "MIDDLEINT", "MIGRATE", "MINUTE", "MINUTE_MICROSECOND", "MINUTE_SECOND", "MIN_ROWS", "MOD", "MODE", "MODIFIES",
|
||||
"MODIFY", "MONTH", "MULTILINESTRING", "MULTIPOINT", "MULTIPOLYGON", "MUTEX", "MYSQL_ERRNO", "NAME", "NAMES", "NATIONAL", "NATURAL", "NCHAR", "NDB",
|
||||
"NDBCLUSTER", "NEVER", "NEW", "NEXT", "NO", "NODEGROUP", "NONBLOCKING", "NONE", "NO_WAIT", "NO_WRITE_TO_BINLOG", "NUMBER", "NUMERIC",
|
||||
"NVARCHAR", "OFFSET", "OLD_PASSWORD", "ON", "ONE", "ONLY", "OPEN", "OPTIMIZE", "OPTIMIZER_COSTS", "OPTION", "OPTIONALLY", "OPTIONS", "OR", "ORDER",
|
||||
"OUT", "OUTER", "OUTFILE", "OWNER", "PACK_KEYS", "PAGE", "PARSER", "PARSE_GCOL_EXPR", "PARTIAL", "PARTITION", "PARTITIONING", "PARTITIONS", "PASSWORD",
|
||||
"PHASE", "PLUGIN", "PLUGINS", "PLUGIN_DIR", "POINT", "POLYGON", "PORT", "PRECEDES", "PRECISION", "PREPARE", "PRESERVE", "PREV", "PRIMARY", "PRIVILEGES",
|
||||
"PROCEDURE", "PROCESSLIST", "PROFILE", "PROFILES", "PROXY", "PURGE", "QUARTER", "QUERY", "QUICK", "RANGE", "READ", "READS", "READ_ONLY", "READ_WRITE",
|
||||
"REAL", "REBUILD", "RECOVER", "REDOFILE", "REDO_BUFFER_SIZE", "REDUNDANT", "REFERENCES", "REGEXP", "RELAY", "RELAYLOG", "RELAY_LOG_FILE", "RELAY_LOG_POS",
|
||||
"RELAY_THREAD", "RELEASE", "RELOAD", "REMOVE", "RENAME", "REORGANIZE", "REPAIR", "REPEAT", "REPEATABLE", "REPLACE", "REPLICATE_DO_DB", "REPLICATE_DO_TABLE",
|
||||
"REPLICATE_IGNORE_DB", "REPLICATE_IGNORE_TABLE", "REPLICATE_REWRITE_DB", "REPLICATE_WILD_DO_TABLE", "REPLICATE_WILD_IGNORE_TABLE", "REPLICATION", "REQUIRE",
|
||||
"RESET", "RESIGNAL", "RESTORE", "RESTRICT", "RESUME", "RETURN", "RETURNED_SQLSTATE", "RETURNS", "REVERSE", "REVOKE", "RIGHT", "RLIKE", "ROLLBACK", "ROLLUP",
|
||||
"ROTATE", "ROUTINE", "ROW", "ROWS", "ROW_COUNT", "ROW_FORMAT", "RTREE", "SAVEPOINT", "SCHEDULE", "SCHEMA", "SCHEMAS", "SCHEMA_NAME", "SECOND", "SECOND_MICROSECOND",
|
||||
"SECURITY", "SELECT", "SENSITIVE", "SEPARATOR", "SERIAL", "SERIALIZABLE", "SERVER", "SESSION", "SET", "SHARE", "SHOW", "SHUTDOWN", "SIGNAL", "SIGNED", "SIMPLE",
|
||||
"SLAVE", "SLOW", "SMALLINT", "SNAPSHOT", "SOCKET", "SOME", "SONAME", "SOUNDS", "SOURCE", "SPATIAL", "SPECIFIC", "SQL", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING",
|
||||
"SQL_AFTER_GTIDS", "SQL_AFTER_MTS_GAPS", "SQL_BEFORE_GTIDS", "SQL_BIG_RESULT", "SQL_BUFFER_RESULT", "SQL_CACHE", "SQL_CALC_FOUND_ROWS", "SQL_NO_CACHE",
|
||||
"SQL_SMALL_RESULT", "SQL_THREAD", "SQL_TSI_DAY", "SQL_TSI_HOUR", "SQL_TSI_MINUTE", "SQL_TSI_MONTH", "SQL_TSI_QUARTER", "SQL_TSI_SECOND", "SQL_TSI_WEEK",
|
||||
"SQL_TSI_YEAR", "SSL", "STACKED", "START", "STARTING", "STARTS", "STATS_AUTO_RECALC", "STATS_PERSISTENT", "STATS_SAMPLE_PAGES", "STATUS", "STOP", "STORAGE",
|
||||
"STORED", "STRAIGHT_JOIN", "STRING", "SUBCLASS_ORIGIN", "SUBJECT", "SUBPARTITION", "SUBPARTITIONS", "SUPER", "SUSPEND", "SWAPS", "SWITCHES", "TABLE", "TABLES",
|
||||
"TABLESPACE", "TABLE_CHECKSUM", "TABLE_NAME", "TEMPORARY", "TEMPTABLE", "TERMINATED", "TEXT", "THAN", "THEN", "TIME", "TIMESTAMP", "TIMESTAMPADD", "TIMESTAMPDIFF",
|
||||
"TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING", "TRANSACTION", "TRIGGER", "TRIGGERS", "TRUE", "TRUNCATE", "TYPE", "TYPES", "UNCOMMITTED", "UNDEFINED", "UNDO",
|
||||
"UNDOFILE", "UNDO_BUFFER_SIZE", "UNICODE", "UNINSTALL", "UNION", "UNIQUE", "UNKNOWN", "UNLOCK", "UNSIGNED", "UNTIL", "UPDATE", "UPGRADE", "USAGE", "USE", "USER",
|
||||
"USER_RESOURCES", "USE_FRM", "USING", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALIDATION", "VALUE", "VALUES", "VARBINARY", "VARCHAR", "VARCHARACTER", "VARIABLES",
|
||||
"VARYING", "VIEW", "VIRTUAL", "WAIT", "WARNINGS", "WEEK", "WEIGHT_STRING", "WHEN", "WHERE", "WHILE", "WITH", "WITHOUT", "WORK", "WRAPPER", "WRITE", "X509", "XA",
|
||||
"XID", "XML", "XOR", "YEAR", "YEAR_MONTH", "ZEROFILL"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"ABS", "ACOS", "ADDDATE", "ADDTIME", "AES_DECRYPT", "AES_ENCRYPT", "ANY_VALUE", "Area", "AsBinary", "AsWKB", "ASCII", "ASIN",
|
||||
"AsText", "AsWKT", "ASYMMETRIC_DECRYPT", "ASYMMETRIC_DERIVE", "ASYMMETRIC_ENCRYPT", "ASYMMETRIC_SIGN", "ASYMMETRIC_VERIFY",
|
||||
"ATAN", "ATAN2", "ATAN", "AVG", "BENCHMARK", "BIN", "BIT_AND", "BIT_COUNT", "BIT_LENGTH", "BIT_OR", "BIT_XOR", "Buffer", "CAST",
|
||||
"CEIL", "CEILING", "Centroid", "CHAR", "CHAR_LENGTH", "CHARACTER_LENGTH", "CHARSET", "COALESCE", "COERCIBILITY", "COLLATION",
|
||||
"COMPRESS", "CONCAT", "CONCAT_WS", "CONNECTION_ID", "Contains", "CONV", "CONVERT", "CONVERT_TZ", "ConvexHull", "COS", "COT",
|
||||
"COUNT", "CRC32", "CREATE_ASYMMETRIC_PRIV_KEY", "CREATE_ASYMMETRIC_PUB_KEY", "CREATE_DH_PARAMETERS", "CREATE_DIGEST", "Crosses",
|
||||
"CURDATE", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURTIME", "DATABASE", "DATE", "DATE_ADD",
|
||||
"DATE_FORMAT", "DATE_SUB", "DATEDIFF", "DAY", "DAYNAME", "DAYOFMONTH", "DAYOFWEEK", "DAYOFYEAR", "DECODE", "DEFAULT", "DEGREES",
|
||||
"DES_DECRYPT", "DES_ENCRYPT", "Dimension", "Disjoint", "Distance", "ELT", "ENCODE", "ENCRYPT", "EndPoint", "Envelope", "Equals",
|
||||
"EXP", "EXPORT_SET", "ExteriorRing", "EXTRACT", "ExtractValue", "FIELD", "FIND_IN_SET", "FLOOR", "FORMAT", "FOUND_ROWS", "FROM_BASE64",
|
||||
"FROM_DAYS", "FROM_UNIXTIME", "GeomCollFromText", "GeometryCollectionFromText", "GeomCollFromWKB", "GeometryCollectionFromWKB",
|
||||
"GeometryCollection", "GeometryN", "GeometryType", "GeomFromText", "GeometryFromText", "GeomFromWKB", "GeometryFromWKB", "GET_FORMAT",
|
||||
"GET_LOCK", "GLength", "GREATEST", "GROUP_CONCAT", "GTID_SUBSET", "GTID_SUBTRACT", "HEX", "HOUR", "IF", "IFNULL", "INET_ATON",
|
||||
"INET_NTOA", "INET6_ATON", "INET6_NTOA", "INSERT", "INSTR", "InteriorRingN", "Intersects", "INTERVAL", "IS_FREE_LOCK", "IS_IPV4",
|
||||
"IS_IPV4_COMPAT", "IS_IPV4_MAPPED", "IS_IPV6", "IS_USED_LOCK", "IsClosed", "IsEmpty", "ISNULL", "IsSimple", "JSON_APPEND", "JSON_ARRAY",
|
||||
"JSON_ARRAY_APPEND", "JSON_ARRAY_INSERT", "JSON_CONTAINS", "JSON_CONTAINS_PATH", "JSON_DEPTH", "JSON_EXTRACT", "JSON_INSERT", "JSON_KEYS",
|
||||
"JSON_LENGTH", "JSON_MERGE", "JSON_MERGE_PRESERVE", "JSON_OBJECT", "JSON_QUOTE", "JSON_REMOVE", "JSON_REPLACE", "JSON_SEARCH", "JSON_SET",
|
||||
"JSON_TYPE", "JSON_UNQUOTE", "JSON_VALID", "LAST_INSERT_ID", "LCASE", "LEAST", "LEFT", "LENGTH", "LineFromText", "LineStringFromText",
|
||||
"LineFromWKB", "LineStringFromWKB", "LineString", "LN", "LOAD_FILE", "LOCALTIME", "LOCALTIMESTAMP", "LOCATE", "LOG", "LOG10", "LOG2",
|
||||
"LOWER", "LPAD", "LTRIM", "MAKE_SET", "MAKEDATE", "MAKETIME", "MASTER_POS_WAIT", "MAX", "MBRContains", "MBRCoveredBy", "MBRCovers",
|
||||
"MBRDisjoint", "MBREqual", "MBREquals", "MBRIntersects", "MBROverlaps", "MBRTouches", "MBRWithin", "MD5", "MICROSECOND", "MID",
|
||||
"MIN", "MINUTE", "MLineFromText", "MultiLineStringFromText", "MLineFromWKB", "MultiLineStringFromWKB", "MOD", "MONTH", "MONTHNAME",
|
||||
"MPointFromText", "MultiPointFromText", "MPointFromWKB", "MultiPointFromWKB", "MPolyFromText", "MultiPolygonFromText", "MPolyFromWKB",
|
||||
"MultiPolygonFromWKB", "MultiLineString", "MultiPoint", "MultiPolygon", "NAME_CONST", "NOT IN", "NOW", "NULLIF", "NumGeometries",
|
||||
"NumInteriorRings", "NumPoints", "OCT", "OCTET_LENGTH", "OLD_PASSWORD", "ORD", "Overlaps", "PASSWORD", "PERIOD_ADD", "PERIOD_DIFF",
|
||||
"PI", "Point", "PointFromText", "PointFromWKB", "PointN", "PolyFromText", "PolygonFromText", "PolyFromWKB", "PolygonFromWKB", "Polygon",
|
||||
"POSITION", "POW", "POWER", "PROCEDURE ANALYSE", "QUARTER", "QUOTE", "RADIANS", "RAND", "RANDOM_BYTES", "RELEASE_ALL_LOCKS", "RELEASE_LOCK",
|
||||
"REPEAT", "REPLACE", "REVERSE", "RIGHT", "ROUND", "ROW_COUNT", "RPAD", "RTRIM", "SCHEMA", "SEC_TO_TIME", "SECOND", "SESSION_USER", "SHA1",
|
||||
"SHA", "SHA2", "SIGN", "SIN", "SLEEP", "SOUNDEX", "SPACE", "SQRT", "SRID", "ST_Area", "ST_AsBinary", "ST_AsWKB", "ST_AsGeoJSON", "ST_AsText",
|
||||
"ST_AsWKT", "ST_Buffer", "ST_Buffer_Strategy", "ST_Centroid", "ST_Contains", "ST_ConvexHull", "ST_Crosses", "ST_Difference", "ST_Dimension",
|
||||
"ST_Disjoint", "ST_Distance", "ST_Distance_Sphere", "ST_EndPoint", "ST_Envelope", "ST_Equals", "ST_ExteriorRing", "ST_GeoHash",
|
||||
"ST_GeomCollFromText", "ST_GeometryCollectionFromText", "ST_GeomCollFromTxt", "ST_GeomCollFromWKB", "ST_GeometryCollectionFromWKB",
|
||||
"ST_GeometryN", "ST_GeometryType", "ST_GeomFromGeoJSON", "ST_GeomFromText", "ST_GeometryFromText", "ST_GeomFromWKB", "ST_GeometryFromWKB",
|
||||
"ST_InteriorRingN", "ST_Intersection", "ST_Intersects", "ST_IsClosed", "ST_IsEmpty", "ST_IsSimple", "ST_IsValid", "ST_LatFromGeoHash",
|
||||
"ST_Length", "ST_LineFromText", "ST_LineStringFromText", "ST_LineFromWKB", "ST_LineStringFromWKB", "ST_LongFromGeoHash", "ST_MakeEnvelope",
|
||||
"ST_MLineFromText", "ST_MultiLineStringFromText", "ST_MLineFromWKB", "ST_MultiLineStringFromWKB", "ST_MPointFromText", "ST_MultiPointFromText",
|
||||
"ST_MPointFromWKB", "ST_MultiPointFromWKB", "ST_MPolyFromText", "ST_MultiPolygonFromText", "ST_MPolyFromWKB", "ST_MultiPolygonFromWKB",
|
||||
"ST_NumGeometries", "ST_NumInteriorRing", "ST_NumInteriorRings", "ST_NumPoints", "ST_Overlaps", "ST_PointFromGeoHash", "ST_PointFromText",
|
||||
"ST_PointFromWKB", "ST_PointN", "ST_PolyFromText", "ST_PolygonFromText", "ST_PolyFromWKB", "ST_PolygonFromWKB", "ST_Simplify", "ST_SRID",
|
||||
"ST_StartPoint", "ST_SymDifference", "ST_Touches", "ST_Union", "ST_Validate", "ST_Within", "ST_X", "ST_Y", "StartPoint", "STD", "STDDEV",
|
||||
"STDDEV_POP", "STDDEV_SAMP", "STR_TO_DATE", "STRCMP", "SUBDATE", "SUBSTR", "SUBSTRING", "SUBSTRING_INDEX", "SUBTIME", "SUM", "SYSDATE",
|
||||
"SYSTEM_USER", "TAN", "TIME", "TIME_FORMAT", "TIME_TO_SEC", "TIMEDIFF", "TIMESTAMP", "TIMESTAMPADD", "TIMESTAMPDIFF", "TO_BASE64", "TO_DAYS",
|
||||
"TO_SECONDS", "Touches", "TRIM", "TRUNCATE", "UCASE", "UNCOMPRESS", "UNCOMPRESSED_LENGTH", "UNHEX", "UNIX_TIMESTAMP", "UpdateXML", "UPPER",
|
||||
"USER", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "UUID", "UUID_SHORT", "VALIDATE_PASSWORD_STRENGTH", "VALUES", "VAR_POP", "VAR_SAMP", "VARIANCE",
|
||||
"VERSION", "WAIT_FOR_EXECUTED_GTID_SET", "WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS", "WEEK", "WEEKDAY", "WEEKOFYEAR", "WEIGHT_STRING", "Within",
|
||||
"X", "Y", "YEAR", "YEARWEEK"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/#+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string.double', next: '@stringDouble' }]
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }],
|
||||
],
|
||||
stringDouble: [
|
||||
[/[^"]+/, 'string.double'],
|
||||
[/""/, 'string.double'],
|
||||
[/"/, { token: 'string.double', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/`/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^`]+/, 'identifier'],
|
||||
[/``/, 'identifier'],
|
||||
[/`/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"ACCESSIBLE", "ACCOUNT", "ACTION", "ADD", "AFTER", "AGAINST", "AGGREGATE", "ALGORITHM", "ALL", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE",
|
||||
"AND", "ANY", "AS", "ASC", "ASCII", "ASENSITIVE", "AT", "AUTOEXTEND_SIZE", "AUTO_INCREMENT", "AVG", "AVG_ROW_LENGTH", "BACKUP", "BEFORE",
|
||||
"BEGIN", "BETWEEN", "BIGINT", "BINARY", "BINLOG", "BIT", "BLOB", "BLOCK", "BOOL", "BOOLEAN", "BOTH", "BTREE", "BY", "BYTE", "CACHE", "CALL",
|
||||
"CASCADE", "CASCADED", "CASE", "CATALOG_NAME", "CHAIN", "CHANGE", "CHANGED", "CHANNEL", "CHAR", "CHARACTER", "CHARSET", "CHECK", "CHECKSUM",
|
||||
"CIPHER", "CLASS_ORIGIN", "CLIENT", "CLOSE", "COALESCE", "CODE", "COLLATE", "COLLATION", "COLUMN", "COLUMNS", "COLUMN_FORMAT", "COLUMN_NAME",
|
||||
"COMMENT", "COMMIT", "COMMITTED", "COMPACT", "COMPLETION", "COMPRESSED", "COMPRESSION", "CONCURRENT", "CONDITION", "CONNECTION", "CONSISTENT",
|
||||
"CONSTRAINT", "CONSTRAINT_CATALOG", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONTAINS", "CONTEXT", "CONTINUE", "CONVERT", "CPU", "CREATE",
|
||||
"CROSS", "CUBE", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURSOR", "CURSOR_NAME", "DATA", "DATABASE",
|
||||
"DATABASES", "DATAFILE", "DATE", "DATETIME", "DAY", "DAY_HOUR", "DAY_MICROSECOND", "DAY_MINUTE", "DAY_SECOND", "DEALLOCATE", "DEC", "DECIMAL",
|
||||
"DECLARE", "DEFAULT", "DEFAULT_AUTH", "DEFINER", "DELAYED", "DELAY_KEY_WRITE", "DELETE", "DESC", "DESCRIBE", "DES_KEY_FILE", "DETERMINISTIC",
|
||||
"DIAGNOSTICS", "DIRECTORY", "DISABLE", "DISCARD", "DISK", "DISTINCT", "DISTINCTROW", "DIV", "DO", "DOUBLE", "DROP", "DUAL", "DUMPFILE",
|
||||
"DUPLICATE", "DYNAMIC", "EACH", "ELSE", "ELSEIF", "ENABLE", "ENCLOSED", "ENCRYPTION", "END", "ENDS", "ENGINE", "ENGINES", "ENUM", "ERROR",
|
||||
"ERRORS", "ESCAPE", "ESCAPED", "EVENT", "EVENTS", "EVERY", "EXCHANGE", "EXECUTE", "EXISTS", "EXIT", "EXPANSION", "EXPIRE", "EXPLAIN", "EXPORT",
|
||||
"EXTENDED", "EXTENT_SIZE", "FALSE", "FAST", "FAULTS", "FETCH", "FIELDS", "FILE", "FILE_BLOCK_SIZE", "FILTER", "FIRST", "FIXED", "FLOAT", "FLOAT4",
|
||||
"FLOAT8", "FLUSH", "FOLLOWS", "FOR", "FORCE", "FOREIGN", "FORMAT", "FOUND", "FROM", "FULL", "FULLTEXT", "FUNCTION", "GENERAL", "GENERATED",
|
||||
"GEOMETRY", "GEOMETRYCOLLECTION", "GET", "GET_FORMAT", "GLOBAL", "GRANT", "GRANTS", "GROUP", "GROUP_REPLICATION", "HANDLER", "HASH", "HAVING",
|
||||
"HELP", "HIGH_PRIORITY", "HOST", "HOSTS", "HOUR", "HOUR_MICROSECOND", "HOUR_MINUTE", "HOUR_SECOND", "IDENTIFIED", "IF", "IGNORE", "IGNORE_SERVER_IDS",
|
||||
"IMPORT", "INDEX", "INDEXES", "INFILE", "INITIAL_SIZE", "INNER", "INOUT", "INSENSITIVE", "INSERT", "INSERT_METHOD", "INSTALL", "INSTANCE",
|
||||
"INT", "INT1", "INT2", "INT3", "INT4", "INT8", "INTEGER", "INTERVAL", "INTO", "INVOKER", "IO", "IO_AFTER_GTIDS", "IO_BEFORE_GTIDS", "IO_THREAD",
|
||||
"IPC", "ISOLATION", "ISSUER", "ITERATE", "JOIN", "JSON", "KEY", "KEYS", "KEY_BLOCK_SIZE", "KILL", "LANGUAGE", "LAST", "LEADING", "LEAVE",
|
||||
"LEAVES", "LEFT", "LESS", "LEVEL", "LIKE", "LIMIT", "LINEAR", "LINES", "LINESTRING", "LIST", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCK",
|
||||
"LOCKS", "LOGFILE", "LOGS", "LONG", "LONGBLOB", "LONGTEXT", "LOOP", "LOW_PRIORITY", "MASTER", "MASTER_AUTO_POSITION", "MASTER_BIND", "MASTER_CONNECT_RETRY",
|
||||
"MASTER_DELAY", "MASTER_HEARTBEAT_PERIOD", "MASTER_HOST", "MASTER_LOG_FILE", "MASTER_LOG_POS", "MASTER_PASSWORD", "MASTER_PORT", "MASTER_RETRY_COUNT",
|
||||
"MASTER_SERVER_ID", "MASTER_SSL", "MASTER_SSL_CA", "MASTER_SSL_CAPATH", "MASTER_SSL_CERT", "MASTER_SSL_CIPHER", "MASTER_SSL_CRL", "MASTER_SSL_CRLPATH",
|
||||
"MASTER_SSL_KEY", "MASTER_SSL_VERIFY_SERVER_CERT", "MASTER_TLS_VERSION", "MASTER_USER", "MATCH", "MAXVALUE", "MAX_CONNECTIONS_PER_HOUR", "MAX_QUERIES_PER_HOUR",
|
||||
"MAX_ROWS", "MAX_SIZE", "MAX_STATEMENT_TIME", "MAX_UPDATES_PER_HOUR", "MAX_USER_CONNECTIONS", "MEDIUM", "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MEMORY",
|
||||
"MERGE", "MESSAGE_TEXT", "MICROSECOND", "MIDDLEINT", "MIGRATE", "MINUTE", "MINUTE_MICROSECOND", "MINUTE_SECOND", "MIN_ROWS", "MOD", "MODE", "MODIFIES",
|
||||
"MODIFY", "MONTH", "MULTILINESTRING", "MULTIPOINT", "MULTIPOLYGON", "MUTEX", "MYSQL_ERRNO", "NAME", "NAMES", "NATIONAL", "NATURAL", "NCHAR", "NDB",
|
||||
"NDBCLUSTER", "NEVER", "NEW", "NEXT", "NO", "NODEGROUP", "NONBLOCKING", "NONE", "NO_WAIT", "NO_WRITE_TO_BINLOG", "NUMBER", "NUMERIC",
|
||||
"NVARCHAR", "OFFSET", "OLD_PASSWORD", "ON", "ONE", "ONLY", "OPEN", "OPTIMIZE", "OPTIMIZER_COSTS", "OPTION", "OPTIONALLY", "OPTIONS", "OR", "ORDER",
|
||||
"OUT", "OUTER", "OUTFILE", "OWNER", "PACK_KEYS", "PAGE", "PARSER", "PARSE_GCOL_EXPR", "PARTIAL", "PARTITION", "PARTITIONING", "PARTITIONS", "PASSWORD",
|
||||
"PHASE", "PLUGIN", "PLUGINS", "PLUGIN_DIR", "POINT", "POLYGON", "PORT", "PRECEDES", "PRECISION", "PREPARE", "PRESERVE", "PREV", "PRIMARY", "PRIVILEGES",
|
||||
"PROCEDURE", "PROCESSLIST", "PROFILE", "PROFILES", "PROXY", "PURGE", "QUARTER", "QUERY", "QUICK", "RANGE", "READ", "READS", "READ_ONLY", "READ_WRITE",
|
||||
"REAL", "REBUILD", "RECOVER", "REDOFILE", "REDO_BUFFER_SIZE", "REDUNDANT", "REFERENCES", "REGEXP", "RELAY", "RELAYLOG", "RELAY_LOG_FILE", "RELAY_LOG_POS",
|
||||
"RELAY_THREAD", "RELEASE", "RELOAD", "REMOVE", "RENAME", "REORGANIZE", "REPAIR", "REPEAT", "REPEATABLE", "REPLACE", "REPLICATE_DO_DB", "REPLICATE_DO_TABLE",
|
||||
"REPLICATE_IGNORE_DB", "REPLICATE_IGNORE_TABLE", "REPLICATE_REWRITE_DB", "REPLICATE_WILD_DO_TABLE", "REPLICATE_WILD_IGNORE_TABLE", "REPLICATION", "REQUIRE",
|
||||
"RESET", "RESIGNAL", "RESTORE", "RESTRICT", "RESUME", "RETURN", "RETURNED_SQLSTATE", "RETURNS", "REVERSE", "REVOKE", "RIGHT", "RLIKE", "ROLLBACK", "ROLLUP",
|
||||
"ROTATE", "ROUTINE", "ROW", "ROWS", "ROW_COUNT", "ROW_FORMAT", "RTREE", "SAVEPOINT", "SCHEDULE", "SCHEMA", "SCHEMAS", "SCHEMA_NAME", "SECOND", "SECOND_MICROSECOND",
|
||||
"SECURITY", "SELECT", "SENSITIVE", "SEPARATOR", "SERIAL", "SERIALIZABLE", "SERVER", "SESSION", "SET", "SHARE", "SHOW", "SHUTDOWN", "SIGNAL", "SIGNED", "SIMPLE",
|
||||
"SLAVE", "SLOW", "SMALLINT", "SNAPSHOT", "SOCKET", "SOME", "SONAME", "SOUNDS", "SOURCE", "SPATIAL", "SPECIFIC", "SQL", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING",
|
||||
"SQL_AFTER_GTIDS", "SQL_AFTER_MTS_GAPS", "SQL_BEFORE_GTIDS", "SQL_BIG_RESULT", "SQL_BUFFER_RESULT", "SQL_CACHE", "SQL_CALC_FOUND_ROWS", "SQL_NO_CACHE",
|
||||
"SQL_SMALL_RESULT", "SQL_THREAD", "SQL_TSI_DAY", "SQL_TSI_HOUR", "SQL_TSI_MINUTE", "SQL_TSI_MONTH", "SQL_TSI_QUARTER", "SQL_TSI_SECOND", "SQL_TSI_WEEK",
|
||||
"SQL_TSI_YEAR", "SSL", "STACKED", "START", "STARTING", "STARTS", "STATS_AUTO_RECALC", "STATS_PERSISTENT", "STATS_SAMPLE_PAGES", "STATUS", "STOP", "STORAGE",
|
||||
"STORED", "STRAIGHT_JOIN", "STRING", "SUBCLASS_ORIGIN", "SUBJECT", "SUBPARTITION", "SUBPARTITIONS", "SUPER", "SUSPEND", "SWAPS", "SWITCHES", "TABLE", "TABLES",
|
||||
"TABLESPACE", "TABLE_CHECKSUM", "TABLE_NAME", "TEMPORARY", "TEMPTABLE", "TERMINATED", "TEXT", "THAN", "THEN", "TIME", "TIMESTAMP", "TIMESTAMPADD", "TIMESTAMPDIFF",
|
||||
"TINYBLOB", "TINYINT", "TINYTEXT", "TO", "TRAILING", "TRANSACTION", "TRIGGER", "TRIGGERS", "TRUE", "TRUNCATE", "TYPE", "TYPES", "UNCOMMITTED", "UNDEFINED", "UNDO",
|
||||
"UNDOFILE", "UNDO_BUFFER_SIZE", "UNICODE", "UNINSTALL", "UNION", "UNIQUE", "UNKNOWN", "UNLOCK", "UNSIGNED", "UNTIL", "UPDATE", "UPGRADE", "USAGE", "USE", "USER",
|
||||
"USER_RESOURCES", "USE_FRM", "USING", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "VALIDATION", "VALUE", "VALUES", "VARBINARY", "VARCHAR", "VARCHARACTER", "VARIABLES",
|
||||
"VARYING", "VIEW", "VIRTUAL", "WAIT", "WARNINGS", "WEEK", "WEIGHT_STRING", "WHEN", "WHERE", "WHILE", "WITH", "WITHOUT", "WORK", "WRAPPER", "WRITE", "X509", "XA",
|
||||
"XID", "XML", "XOR", "YEAR", "YEAR_MONTH", "ZEROFILL"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"ABS", "ACOS", "ADDDATE", "ADDTIME", "AES_DECRYPT", "AES_ENCRYPT", "ANY_VALUE", "Area", "AsBinary", "AsWKB", "ASCII", "ASIN",
|
||||
"AsText", "AsWKT", "ASYMMETRIC_DECRYPT", "ASYMMETRIC_DERIVE", "ASYMMETRIC_ENCRYPT", "ASYMMETRIC_SIGN", "ASYMMETRIC_VERIFY",
|
||||
"ATAN", "ATAN2", "ATAN", "AVG", "BENCHMARK", "BIN", "BIT_AND", "BIT_COUNT", "BIT_LENGTH", "BIT_OR", "BIT_XOR", "Buffer", "CAST",
|
||||
"CEIL", "CEILING", "Centroid", "CHAR", "CHAR_LENGTH", "CHARACTER_LENGTH", "CHARSET", "COALESCE", "COERCIBILITY", "COLLATION",
|
||||
"COMPRESS", "CONCAT", "CONCAT_WS", "CONNECTION_ID", "Contains", "CONV", "CONVERT", "CONVERT_TZ", "ConvexHull", "COS", "COT",
|
||||
"COUNT", "CRC32", "CREATE_ASYMMETRIC_PRIV_KEY", "CREATE_ASYMMETRIC_PUB_KEY", "CREATE_DH_PARAMETERS", "CREATE_DIGEST", "Crosses",
|
||||
"CURDATE", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "CURTIME", "DATABASE", "DATE", "DATE_ADD",
|
||||
"DATE_FORMAT", "DATE_SUB", "DATEDIFF", "DAY", "DAYNAME", "DAYOFMONTH", "DAYOFWEEK", "DAYOFYEAR", "DECODE", "DEFAULT", "DEGREES",
|
||||
"DES_DECRYPT", "DES_ENCRYPT", "Dimension", "Disjoint", "Distance", "ELT", "ENCODE", "ENCRYPT", "EndPoint", "Envelope", "Equals",
|
||||
"EXP", "EXPORT_SET", "ExteriorRing", "EXTRACT", "ExtractValue", "FIELD", "FIND_IN_SET", "FLOOR", "FORMAT", "FOUND_ROWS", "FROM_BASE64",
|
||||
"FROM_DAYS", "FROM_UNIXTIME", "GeomCollFromText", "GeometryCollectionFromText", "GeomCollFromWKB", "GeometryCollectionFromWKB",
|
||||
"GeometryCollection", "GeometryN", "GeometryType", "GeomFromText", "GeometryFromText", "GeomFromWKB", "GeometryFromWKB", "GET_FORMAT",
|
||||
"GET_LOCK", "GLength", "GREATEST", "GROUP_CONCAT", "GTID_SUBSET", "GTID_SUBTRACT", "HEX", "HOUR", "IF", "IFNULL", "INET_ATON",
|
||||
"INET_NTOA", "INET6_ATON", "INET6_NTOA", "INSERT", "INSTR", "InteriorRingN", "Intersects", "INTERVAL", "IS_FREE_LOCK", "IS_IPV4",
|
||||
"IS_IPV4_COMPAT", "IS_IPV4_MAPPED", "IS_IPV6", "IS_USED_LOCK", "IsClosed", "IsEmpty", "ISNULL", "IsSimple", "JSON_APPEND", "JSON_ARRAY",
|
||||
"JSON_ARRAY_APPEND", "JSON_ARRAY_INSERT", "JSON_CONTAINS", "JSON_CONTAINS_PATH", "JSON_DEPTH", "JSON_EXTRACT", "JSON_INSERT", "JSON_KEYS",
|
||||
"JSON_LENGTH", "JSON_MERGE", "JSON_MERGE_PRESERVE", "JSON_OBJECT", "JSON_QUOTE", "JSON_REMOVE", "JSON_REPLACE", "JSON_SEARCH", "JSON_SET",
|
||||
"JSON_TYPE", "JSON_UNQUOTE", "JSON_VALID", "LAST_INSERT_ID", "LCASE", "LEAST", "LEFT", "LENGTH", "LineFromText", "LineStringFromText",
|
||||
"LineFromWKB", "LineStringFromWKB", "LineString", "LN", "LOAD_FILE", "LOCALTIME", "LOCALTIMESTAMP", "LOCATE", "LOG", "LOG10", "LOG2",
|
||||
"LOWER", "LPAD", "LTRIM", "MAKE_SET", "MAKEDATE", "MAKETIME", "MASTER_POS_WAIT", "MAX", "MBRContains", "MBRCoveredBy", "MBRCovers",
|
||||
"MBRDisjoint", "MBREqual", "MBREquals", "MBRIntersects", "MBROverlaps", "MBRTouches", "MBRWithin", "MD5", "MICROSECOND", "MID",
|
||||
"MIN", "MINUTE", "MLineFromText", "MultiLineStringFromText", "MLineFromWKB", "MultiLineStringFromWKB", "MOD", "MONTH", "MONTHNAME",
|
||||
"MPointFromText", "MultiPointFromText", "MPointFromWKB", "MultiPointFromWKB", "MPolyFromText", "MultiPolygonFromText", "MPolyFromWKB",
|
||||
"MultiPolygonFromWKB", "MultiLineString", "MultiPoint", "MultiPolygon", "NAME_CONST", "NOT IN", "NOW", "NULLIF", "NumGeometries",
|
||||
"NumInteriorRings", "NumPoints", "OCT", "OCTET_LENGTH", "OLD_PASSWORD", "ORD", "Overlaps", "PASSWORD", "PERIOD_ADD", "PERIOD_DIFF",
|
||||
"PI", "Point", "PointFromText", "PointFromWKB", "PointN", "PolyFromText", "PolygonFromText", "PolyFromWKB", "PolygonFromWKB", "Polygon",
|
||||
"POSITION", "POW", "POWER", "PROCEDURE ANALYSE", "QUARTER", "QUOTE", "RADIANS", "RAND", "RANDOM_BYTES", "RELEASE_ALL_LOCKS", "RELEASE_LOCK",
|
||||
"REPEAT", "REPLACE", "REVERSE", "RIGHT", "ROUND", "ROW_COUNT", "RPAD", "RTRIM", "SCHEMA", "SEC_TO_TIME", "SECOND", "SESSION_USER", "SHA1",
|
||||
"SHA", "SHA2", "SIGN", "SIN", "SLEEP", "SOUNDEX", "SPACE", "SQRT", "SRID", "ST_Area", "ST_AsBinary", "ST_AsWKB", "ST_AsGeoJSON", "ST_AsText",
|
||||
"ST_AsWKT", "ST_Buffer", "ST_Buffer_Strategy", "ST_Centroid", "ST_Contains", "ST_ConvexHull", "ST_Crosses", "ST_Difference", "ST_Dimension",
|
||||
"ST_Disjoint", "ST_Distance", "ST_Distance_Sphere", "ST_EndPoint", "ST_Envelope", "ST_Equals", "ST_ExteriorRing", "ST_GeoHash",
|
||||
"ST_GeomCollFromText", "ST_GeometryCollectionFromText", "ST_GeomCollFromTxt", "ST_GeomCollFromWKB", "ST_GeometryCollectionFromWKB",
|
||||
"ST_GeometryN", "ST_GeometryType", "ST_GeomFromGeoJSON", "ST_GeomFromText", "ST_GeometryFromText", "ST_GeomFromWKB", "ST_GeometryFromWKB",
|
||||
"ST_InteriorRingN", "ST_Intersection", "ST_Intersects", "ST_IsClosed", "ST_IsEmpty", "ST_IsSimple", "ST_IsValid", "ST_LatFromGeoHash",
|
||||
"ST_Length", "ST_LineFromText", "ST_LineStringFromText", "ST_LineFromWKB", "ST_LineStringFromWKB", "ST_LongFromGeoHash", "ST_MakeEnvelope",
|
||||
"ST_MLineFromText", "ST_MultiLineStringFromText", "ST_MLineFromWKB", "ST_MultiLineStringFromWKB", "ST_MPointFromText", "ST_MultiPointFromText",
|
||||
"ST_MPointFromWKB", "ST_MultiPointFromWKB", "ST_MPolyFromText", "ST_MultiPolygonFromText", "ST_MPolyFromWKB", "ST_MultiPolygonFromWKB",
|
||||
"ST_NumGeometries", "ST_NumInteriorRing", "ST_NumInteriorRings", "ST_NumPoints", "ST_Overlaps", "ST_PointFromGeoHash", "ST_PointFromText",
|
||||
"ST_PointFromWKB", "ST_PointN", "ST_PolyFromText", "ST_PolygonFromText", "ST_PolyFromWKB", "ST_PolygonFromWKB", "ST_Simplify", "ST_SRID",
|
||||
"ST_StartPoint", "ST_SymDifference", "ST_Touches", "ST_Union", "ST_Validate", "ST_Within", "ST_X", "ST_Y", "StartPoint", "STD", "STDDEV",
|
||||
"STDDEV_POP", "STDDEV_SAMP", "STR_TO_DATE", "STRCMP", "SUBDATE", "SUBSTR", "SUBSTRING", "SUBSTRING_INDEX", "SUBTIME", "SUM", "SYSDATE",
|
||||
"SYSTEM_USER", "TAN", "TIME", "TIME_FORMAT", "TIME_TO_SEC", "TIMEDIFF", "TIMESTAMP", "TIMESTAMPADD", "TIMESTAMPDIFF", "TO_BASE64", "TO_DAYS",
|
||||
"TO_SECONDS", "Touches", "TRIM", "TRUNCATE", "UCASE", "UNCOMPRESS", "UNCOMPRESSED_LENGTH", "UNHEX", "UNIX_TIMESTAMP", "UpdateXML", "UPPER",
|
||||
"USER", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "UUID", "UUID_SHORT", "VALIDATE_PASSWORD_STRENGTH", "VALUES", "VAR_POP", "VAR_SAMP", "VARIANCE",
|
||||
"VERSION", "WAIT_FOR_EXECUTED_GTID_SET", "WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS", "WEEK", "WEEKDAY", "WEEKOFYEAR", "WEIGHT_STRING", "Within",
|
||||
"X", "Y", "YEAR", "YEARWEEK"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/#+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string.double', next: '@stringDouble' }]
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }],
|
||||
],
|
||||
stringDouble: [
|
||||
[/[^"]+/, 'string.double'],
|
||||
[/""/, 'string.double'],
|
||||
[/"/, { token: 'string.double', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/`/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^`]+/, 'identifier'],
|
||||
[/``/, 'identifier'],
|
||||
[/`/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,328 +13,328 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cpp',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' }
|
||||
],
|
||||
keywords: [
|
||||
'abstract',
|
||||
'amp',
|
||||
'array',
|
||||
'auto',
|
||||
'bool',
|
||||
'break',
|
||||
'case',
|
||||
'catch',
|
||||
'char',
|
||||
'class',
|
||||
'const',
|
||||
'constexpr',
|
||||
'const_cast',
|
||||
'continue',
|
||||
'cpu',
|
||||
'decltype',
|
||||
'default',
|
||||
'delegate',
|
||||
'delete',
|
||||
'do',
|
||||
'double',
|
||||
'dynamic_cast',
|
||||
'each',
|
||||
'else',
|
||||
'enum',
|
||||
'event',
|
||||
'explicit',
|
||||
'export',
|
||||
'extern',
|
||||
'false',
|
||||
'final',
|
||||
'finally',
|
||||
'float',
|
||||
'for',
|
||||
'friend',
|
||||
'gcnew',
|
||||
'generic',
|
||||
'goto',
|
||||
'if',
|
||||
'in',
|
||||
'initonly',
|
||||
'inline',
|
||||
'int',
|
||||
'interface',
|
||||
'interior_ptr',
|
||||
'internal',
|
||||
'literal',
|
||||
'long',
|
||||
'mutable',
|
||||
'namespace',
|
||||
'new',
|
||||
'noexcept',
|
||||
'nullptr',
|
||||
'__nullptr',
|
||||
'operator',
|
||||
'override',
|
||||
'partial',
|
||||
'pascal',
|
||||
'pin_ptr',
|
||||
'private',
|
||||
'property',
|
||||
'protected',
|
||||
'public',
|
||||
'ref',
|
||||
'register',
|
||||
'reinterpret_cast',
|
||||
'restrict',
|
||||
'return',
|
||||
'safe_cast',
|
||||
'sealed',
|
||||
'short',
|
||||
'signed',
|
||||
'sizeof',
|
||||
'static',
|
||||
'static_assert',
|
||||
'static_cast',
|
||||
'struct',
|
||||
'switch',
|
||||
'template',
|
||||
'this',
|
||||
'thread_local',
|
||||
'throw',
|
||||
'tile_static',
|
||||
'true',
|
||||
'try',
|
||||
'typedef',
|
||||
'typeid',
|
||||
'typename',
|
||||
'union',
|
||||
'unsigned',
|
||||
'using',
|
||||
'virtual',
|
||||
'void',
|
||||
'volatile',
|
||||
'wchar_t',
|
||||
'where',
|
||||
'while',
|
||||
'_asm',
|
||||
'_based',
|
||||
'_cdecl',
|
||||
'_declspec',
|
||||
'_fastcall',
|
||||
'_if_exists',
|
||||
'_if_not_exists',
|
||||
'_inline',
|
||||
'_multiple_inheritance',
|
||||
'_pascal',
|
||||
'_single_inheritance',
|
||||
'_stdcall',
|
||||
'_virtual_inheritance',
|
||||
'_w64',
|
||||
'__abstract',
|
||||
'__alignof',
|
||||
'__asm',
|
||||
'__assume',
|
||||
'__based',
|
||||
'__box',
|
||||
'__builtin_alignof',
|
||||
'__cdecl',
|
||||
'__clrcall',
|
||||
'__declspec',
|
||||
'__delegate',
|
||||
'__event',
|
||||
'__except',
|
||||
'__fastcall',
|
||||
'__finally',
|
||||
'__forceinline',
|
||||
'__gc',
|
||||
'__hook',
|
||||
'__identifier',
|
||||
'__if_exists',
|
||||
'__if_not_exists',
|
||||
'__inline',
|
||||
'__int128',
|
||||
'__int16',
|
||||
'__int32',
|
||||
'__int64',
|
||||
'__int8',
|
||||
'__interface',
|
||||
'__leave',
|
||||
'__m128',
|
||||
'__m128d',
|
||||
'__m128i',
|
||||
'__m256',
|
||||
'__m256d',
|
||||
'__m256i',
|
||||
'__m64',
|
||||
'__multiple_inheritance',
|
||||
'__newslot',
|
||||
'__nogc',
|
||||
'__noop',
|
||||
'__nounwind',
|
||||
'__novtordisp',
|
||||
'__pascal',
|
||||
'__pin',
|
||||
'__pragma',
|
||||
'__property',
|
||||
'__ptr32',
|
||||
'__ptr64',
|
||||
'__raise',
|
||||
'__restrict',
|
||||
'__resume',
|
||||
'__sealed',
|
||||
'__single_inheritance',
|
||||
'__stdcall',
|
||||
'__super',
|
||||
'__thiscall',
|
||||
'__try',
|
||||
'__try_cast',
|
||||
'__typeof',
|
||||
'__unaligned',
|
||||
'__unhook',
|
||||
'__uuidof',
|
||||
'__value',
|
||||
'__virtual_inheritance',
|
||||
'__w64',
|
||||
'__wchar_t'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
|
||||
floatsuffix: /[fFlL]?/,
|
||||
encoding: /u|u8|U|L/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// C++ 11 Raw String
|
||||
[/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: 'string.raw.begin', next: '@raw.$1' }],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
[/^\s*#include/, { token: 'keyword.directive.include', next: '@include' }],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\s*\w+/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],
|
||||
[/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],
|
||||
[/\d[\d']*\d(@integersuffix)/, 'number'],
|
||||
[/\d(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
raw: [
|
||||
[/(.*)(\))(?:([^ ()\\\t]*))(\")/, {
|
||||
cases: {
|
||||
'$3==$S2': ['string.raw', 'string.raw.end', 'string.raw.end', { token: 'string.raw.end', next: '@pop' }],
|
||||
'@default': ['string.raw', 'string.raw', 'string.raw', 'string.raw']
|
||||
}
|
||||
}
|
||||
],
|
||||
[/.*/, 'string.raw']
|
||||
],
|
||||
include: [
|
||||
[/(\s*)(<)([^<>]*)(>)/, ['', 'keyword.directive.include.begin', 'string.include.identifier', { token: 'keyword.directive.include.end', next: '@pop' }]],
|
||||
[/(\s*)(")([^"]*)(")/, ['', 'keyword.directive.include.begin', 'string.include.identifier', { token: 'keyword.directive.include.end', next: '@pop' }]]
|
||||
]
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.cpp',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' }
|
||||
],
|
||||
keywords: [
|
||||
'abstract',
|
||||
'amp',
|
||||
'array',
|
||||
'auto',
|
||||
'bool',
|
||||
'break',
|
||||
'case',
|
||||
'catch',
|
||||
'char',
|
||||
'class',
|
||||
'const',
|
||||
'constexpr',
|
||||
'const_cast',
|
||||
'continue',
|
||||
'cpu',
|
||||
'decltype',
|
||||
'default',
|
||||
'delegate',
|
||||
'delete',
|
||||
'do',
|
||||
'double',
|
||||
'dynamic_cast',
|
||||
'each',
|
||||
'else',
|
||||
'enum',
|
||||
'event',
|
||||
'explicit',
|
||||
'export',
|
||||
'extern',
|
||||
'false',
|
||||
'final',
|
||||
'finally',
|
||||
'float',
|
||||
'for',
|
||||
'friend',
|
||||
'gcnew',
|
||||
'generic',
|
||||
'goto',
|
||||
'if',
|
||||
'in',
|
||||
'initonly',
|
||||
'inline',
|
||||
'int',
|
||||
'interface',
|
||||
'interior_ptr',
|
||||
'internal',
|
||||
'literal',
|
||||
'long',
|
||||
'mutable',
|
||||
'namespace',
|
||||
'new',
|
||||
'noexcept',
|
||||
'nullptr',
|
||||
'__nullptr',
|
||||
'operator',
|
||||
'override',
|
||||
'partial',
|
||||
'pascal',
|
||||
'pin_ptr',
|
||||
'private',
|
||||
'property',
|
||||
'protected',
|
||||
'public',
|
||||
'ref',
|
||||
'register',
|
||||
'reinterpret_cast',
|
||||
'restrict',
|
||||
'return',
|
||||
'safe_cast',
|
||||
'sealed',
|
||||
'short',
|
||||
'signed',
|
||||
'sizeof',
|
||||
'static',
|
||||
'static_assert',
|
||||
'static_cast',
|
||||
'struct',
|
||||
'switch',
|
||||
'template',
|
||||
'this',
|
||||
'thread_local',
|
||||
'throw',
|
||||
'tile_static',
|
||||
'true',
|
||||
'try',
|
||||
'typedef',
|
||||
'typeid',
|
||||
'typename',
|
||||
'union',
|
||||
'unsigned',
|
||||
'using',
|
||||
'virtual',
|
||||
'void',
|
||||
'volatile',
|
||||
'wchar_t',
|
||||
'where',
|
||||
'while',
|
||||
'_asm',
|
||||
'_based',
|
||||
'_cdecl',
|
||||
'_declspec',
|
||||
'_fastcall',
|
||||
'_if_exists',
|
||||
'_if_not_exists',
|
||||
'_inline',
|
||||
'_multiple_inheritance',
|
||||
'_pascal',
|
||||
'_single_inheritance',
|
||||
'_stdcall',
|
||||
'_virtual_inheritance',
|
||||
'_w64',
|
||||
'__abstract',
|
||||
'__alignof',
|
||||
'__asm',
|
||||
'__assume',
|
||||
'__based',
|
||||
'__box',
|
||||
'__builtin_alignof',
|
||||
'__cdecl',
|
||||
'__clrcall',
|
||||
'__declspec',
|
||||
'__delegate',
|
||||
'__event',
|
||||
'__except',
|
||||
'__fastcall',
|
||||
'__finally',
|
||||
'__forceinline',
|
||||
'__gc',
|
||||
'__hook',
|
||||
'__identifier',
|
||||
'__if_exists',
|
||||
'__if_not_exists',
|
||||
'__inline',
|
||||
'__int128',
|
||||
'__int16',
|
||||
'__int32',
|
||||
'__int64',
|
||||
'__int8',
|
||||
'__interface',
|
||||
'__leave',
|
||||
'__m128',
|
||||
'__m128d',
|
||||
'__m128i',
|
||||
'__m256',
|
||||
'__m256d',
|
||||
'__m256i',
|
||||
'__m64',
|
||||
'__multiple_inheritance',
|
||||
'__newslot',
|
||||
'__nogc',
|
||||
'__noop',
|
||||
'__nounwind',
|
||||
'__novtordisp',
|
||||
'__pascal',
|
||||
'__pin',
|
||||
'__pragma',
|
||||
'__property',
|
||||
'__ptr32',
|
||||
'__ptr64',
|
||||
'__raise',
|
||||
'__restrict',
|
||||
'__resume',
|
||||
'__sealed',
|
||||
'__single_inheritance',
|
||||
'__stdcall',
|
||||
'__super',
|
||||
'__thiscall',
|
||||
'__try',
|
||||
'__try_cast',
|
||||
'__typeof',
|
||||
'__unaligned',
|
||||
'__unhook',
|
||||
'__uuidof',
|
||||
'__value',
|
||||
'__virtual_inheritance',
|
||||
'__w64',
|
||||
'__wchar_t'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
|
||||
floatsuffix: /[fFlL]?/,
|
||||
encoding: /u|u8|U|L/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// C++ 11 Raw String
|
||||
[/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: 'string.raw.begin', next: '@raw.$1' }],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
[/^\s*#include/, { token: 'keyword.directive.include', next: '@include' }],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\s*\w+/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],
|
||||
[/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],
|
||||
[/\d[\d']*\d(@integersuffix)/, 'number'],
|
||||
[/\d(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
raw: [
|
||||
[/(.*)(\))(?:([^ ()\\\t]*))(\")/, {
|
||||
cases: {
|
||||
'$3==$S2': ['string.raw', 'string.raw.end', 'string.raw.end', { token: 'string.raw.end', next: '@pop' }],
|
||||
'@default': ['string.raw', 'string.raw', 'string.raw', 'string.raw']
|
||||
}
|
||||
}
|
||||
],
|
||||
[/.*/, 'string.raw']
|
||||
],
|
||||
include: [
|
||||
[/(\s*)(<)([^<>]*)(>)/, ['', 'keyword.directive.include.begin', 'string.include.identifier', { token: 'keyword.directive.include.end', next: '@pop' }]],
|
||||
[/(\s*)(")([^"]*)(")/, ['', 'keyword.directive.include.begin', 'string.include.identifier', { token: 'keyword.directive.include.end', next: '@pop' }]]
|
||||
]
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,187 +13,187 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.objective-c',
|
||||
keywords: [
|
||||
'#import',
|
||||
'#include',
|
||||
'#define',
|
||||
'#else',
|
||||
'#endif',
|
||||
'#if',
|
||||
'#ifdef',
|
||||
'#ifndef',
|
||||
'#ident',
|
||||
'#undef',
|
||||
'@class',
|
||||
'@defs',
|
||||
'@dynamic',
|
||||
'@encode',
|
||||
'@end',
|
||||
'@implementation',
|
||||
'@interface',
|
||||
'@package',
|
||||
'@private',
|
||||
'@protected',
|
||||
'@property',
|
||||
'@protocol',
|
||||
'@public',
|
||||
'@selector',
|
||||
'@synthesize',
|
||||
'__declspec',
|
||||
'assign',
|
||||
'auto',
|
||||
'BOOL',
|
||||
'break',
|
||||
'bycopy',
|
||||
'byref',
|
||||
'case',
|
||||
'char',
|
||||
'Class',
|
||||
'const',
|
||||
'copy',
|
||||
'continue',
|
||||
'default',
|
||||
'do',
|
||||
'double',
|
||||
'else',
|
||||
'enum',
|
||||
'extern',
|
||||
'FALSE',
|
||||
'false',
|
||||
'float',
|
||||
'for',
|
||||
'goto',
|
||||
'if',
|
||||
'in',
|
||||
'int',
|
||||
'id',
|
||||
'inout',
|
||||
'IMP',
|
||||
'long',
|
||||
'nil',
|
||||
'nonatomic',
|
||||
'NULL',
|
||||
'oneway',
|
||||
'out',
|
||||
'private',
|
||||
'public',
|
||||
'protected',
|
||||
'readwrite',
|
||||
'readonly',
|
||||
'register',
|
||||
'return',
|
||||
'SEL',
|
||||
'self',
|
||||
'short',
|
||||
'signed',
|
||||
'sizeof',
|
||||
'static',
|
||||
'struct',
|
||||
'super',
|
||||
'switch',
|
||||
'typedef',
|
||||
'TRUE',
|
||||
'true',
|
||||
'union',
|
||||
'unsigned',
|
||||
'volatile',
|
||||
'void',
|
||||
'while',
|
||||
],
|
||||
decpart: /\d(_?\d)*/,
|
||||
decimal: /0|@decpart/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/[{}\[\]()<>]/, '@brackets'],
|
||||
[/[a-zA-Z@#]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment',],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/, 'number.hex'],
|
||||
[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/, {
|
||||
cases: {
|
||||
'(\\d)*': 'number',
|
||||
'$0': 'number.float'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string.escape', '@popall'],
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"$/, 'string.escape', '@popall'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\']+$/, 'string', '@popall'],
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.objective-c',
|
||||
keywords: [
|
||||
'#import',
|
||||
'#include',
|
||||
'#define',
|
||||
'#else',
|
||||
'#endif',
|
||||
'#if',
|
||||
'#ifdef',
|
||||
'#ifndef',
|
||||
'#ident',
|
||||
'#undef',
|
||||
'@class',
|
||||
'@defs',
|
||||
'@dynamic',
|
||||
'@encode',
|
||||
'@end',
|
||||
'@implementation',
|
||||
'@interface',
|
||||
'@package',
|
||||
'@private',
|
||||
'@protected',
|
||||
'@property',
|
||||
'@protocol',
|
||||
'@public',
|
||||
'@selector',
|
||||
'@synthesize',
|
||||
'__declspec',
|
||||
'assign',
|
||||
'auto',
|
||||
'BOOL',
|
||||
'break',
|
||||
'bycopy',
|
||||
'byref',
|
||||
'case',
|
||||
'char',
|
||||
'Class',
|
||||
'const',
|
||||
'copy',
|
||||
'continue',
|
||||
'default',
|
||||
'do',
|
||||
'double',
|
||||
'else',
|
||||
'enum',
|
||||
'extern',
|
||||
'FALSE',
|
||||
'false',
|
||||
'float',
|
||||
'for',
|
||||
'goto',
|
||||
'if',
|
||||
'in',
|
||||
'int',
|
||||
'id',
|
||||
'inout',
|
||||
'IMP',
|
||||
'long',
|
||||
'nil',
|
||||
'nonatomic',
|
||||
'NULL',
|
||||
'oneway',
|
||||
'out',
|
||||
'private',
|
||||
'public',
|
||||
'protected',
|
||||
'readwrite',
|
||||
'readonly',
|
||||
'register',
|
||||
'return',
|
||||
'SEL',
|
||||
'self',
|
||||
'short',
|
||||
'signed',
|
||||
'sizeof',
|
||||
'static',
|
||||
'struct',
|
||||
'super',
|
||||
'switch',
|
||||
'typedef',
|
||||
'TRUE',
|
||||
'true',
|
||||
'union',
|
||||
'unsigned',
|
||||
'volatile',
|
||||
'void',
|
||||
'while',
|
||||
],
|
||||
decpart: /\d(_?\d)*/,
|
||||
decimal: /0|@decpart/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/[{}\[\]()<>]/, '@brackets'],
|
||||
[/[a-zA-Z@#]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment',],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/, 'number.hex'],
|
||||
[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/, {
|
||||
cases: {
|
||||
'(\\d)*': 'number',
|
||||
'$0': 'number.float'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string.escape', '@popall'],
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"$/, 'string.escape', '@popall'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\']+$/, 'string', '@popall'],
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,137 +13,137 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['{', '}'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),
|
||||
end: new RegExp("^\\s*\\{\\$ENDREGION\\}")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pascal',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'absolute', 'abstract', 'all', 'and_then', 'array', 'as', 'asm',
|
||||
'attribute', 'begin', 'bindable', 'case', 'class', 'const',
|
||||
'contains', 'default', 'div', 'else', 'end', 'except',
|
||||
'exports', 'external', 'far', 'file', 'finalization', 'finally',
|
||||
'forward', 'generic', 'goto', 'if', 'implements', 'import', 'in',
|
||||
'index', 'inherited', 'initialization', 'interrupt', 'is', 'label',
|
||||
'library', 'mod', 'module', 'name', 'near', 'not', 'object', 'of',
|
||||
'on', 'only', 'operator', 'or_else', 'otherwise', 'override',
|
||||
'package', 'packed', 'pow', 'private', 'program', 'protected',
|
||||
'public', 'published', 'interface', 'implementation', 'qualified',
|
||||
'read', 'record', 'resident', 'requires', 'resourcestring',
|
||||
'restricted', 'segment', 'set', 'shl', 'shr', 'specialize', 'stored',
|
||||
'then', 'threadvar', 'to', 'try', 'type', 'unit', 'uses', 'var',
|
||||
'view', 'virtual', 'dynamic', 'overload', 'reintroduce', 'with',
|
||||
'write', 'xor', 'true', 'false', 'procedure', 'function',
|
||||
'constructor', 'destructor', 'property', 'break', 'continue', 'exit',
|
||||
'abort', 'while', 'do', 'for', 'raise', 'repeat', 'until'
|
||||
],
|
||||
typeKeywords: [
|
||||
'boolean', 'double', 'byte', 'integer', 'shortint', 'char',
|
||||
'longint', 'float', 'string'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^\*\}]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\}/, 'comment', '@pop'],
|
||||
[/[\{]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\{/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `@$`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['{', '}'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),
|
||||
end: new RegExp("^\\s*\\{\\$ENDREGION\\}")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pascal',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'absolute', 'abstract', 'all', 'and_then', 'array', 'as', 'asm',
|
||||
'attribute', 'begin', 'bindable', 'case', 'class', 'const',
|
||||
'contains', 'default', 'div', 'else', 'end', 'except',
|
||||
'exports', 'external', 'far', 'file', 'finalization', 'finally',
|
||||
'forward', 'generic', 'goto', 'if', 'implements', 'import', 'in',
|
||||
'index', 'inherited', 'initialization', 'interrupt', 'is', 'label',
|
||||
'library', 'mod', 'module', 'name', 'near', 'not', 'object', 'of',
|
||||
'on', 'only', 'operator', 'or_else', 'otherwise', 'override',
|
||||
'package', 'packed', 'pow', 'private', 'program', 'protected',
|
||||
'public', 'published', 'interface', 'implementation', 'qualified',
|
||||
'read', 'record', 'resident', 'requires', 'resourcestring',
|
||||
'restricted', 'segment', 'set', 'shl', 'shr', 'specialize', 'stored',
|
||||
'then', 'threadvar', 'to', 'try', 'type', 'unit', 'uses', 'var',
|
||||
'view', 'virtual', 'dynamic', 'overload', 'reintroduce', 'with',
|
||||
'write', 'xor', 'true', 'false', 'procedure', 'function',
|
||||
'constructor', 'destructor', 'property', 'break', 'continue', 'exit',
|
||||
'abort', 'while', 'do', 'for', 'raise', 'repeat', 'until'
|
||||
],
|
||||
typeKeywords: [
|
||||
'boolean', 'double', 'byte', 'integer', 'shortint', 'char',
|
||||
'longint', 'float', 'string'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
comment: [
|
||||
[/[^\*\}]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\}/, 'comment', '@pop'],
|
||||
[/[\{]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\{/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,117 +13,117 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pascaligo',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'begin', 'block', 'case', 'const', 'else', 'end',
|
||||
'fail', 'for', 'from', 'function', 'if', 'is', 'nil',
|
||||
'of', 'remove', 'return', 'skip', 'then', 'type', 'var',
|
||||
'while', 'with', 'option', 'None', 'transaction'
|
||||
],
|
||||
typeKeywords: [
|
||||
'bool', 'int', 'list', 'map', 'nat', 'record',
|
||||
'string', 'unit', 'address', 'map', 'mtz', 'xtz'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'mod', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
/* */
|
||||
comment: [
|
||||
[/[^\(\*]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\(\*/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\(\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pascaligo',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
keywords: [
|
||||
'begin', 'block', 'case', 'const', 'else', 'end',
|
||||
'fail', 'for', 'from', 'function', 'if', 'is', 'nil',
|
||||
'of', 'remove', 'return', 'skip', 'then', 'type', 'var',
|
||||
'while', 'with', 'option', 'None', 'transaction'
|
||||
],
|
||||
typeKeywords: [
|
||||
'bool', 'int', 'list', 'map', 'nat', 'record',
|
||||
'string', 'unit', 'address', 'map', 'mtz', 'xtz'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '<=', '>=', '<>', ':', ':=', 'and', 'mod', 'or',
|
||||
'+', '-', '*', '/', '@', '&', '^', '%'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><:@\^&|+\-*\/\^%]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\$[0-9a-fA-F]{1,16}/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/'/, 'string.invalid'],
|
||||
[/\#\d+/, 'string']
|
||||
],
|
||||
/* */
|
||||
comment: [
|
||||
[/[^\(\*]+/, 'comment'],
|
||||
//[/\(\*/, 'comment', '@push' ], // nested comment not allowed :-(
|
||||
[/\*\)/, 'comment', '@pop'],
|
||||
[/\(\*/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\(\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
1226
53.4ea7154f.async.js
1226
53.4ea7154f.async.js
File diff suppressed because it is too large
Load Diff
|
|
@ -13,255 +13,255 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"A", "ABORT", "ABS", "ABSENT", "ABSOLUTE", "ACCESS", "ACCORDING", "ACTION", "ADA", "ADD", "ADMIN", "AFTER", "AGGREGATE", "ALL",
|
||||
"ALLOCATE", "ALSO", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE", "AND", "ANY", "ARE", "ARRAY", "ARRAY_AGG", "ARRAY_MAX_CARDINALITY",
|
||||
"AS", "ASC", "ASENSITIVE", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC", "AT", "ATOMIC", "ATTRIBUTE", "ATTRIBUTES", "AUTHORIZATION",
|
||||
"AVG", "BACKWARD", "BASE64", "BEFORE", "BEGIN", "BEGIN_FRAME", "BEGIN_PARTITION", "BERNOULLI", "BETWEEN", "BIGINT", "BINARY",
|
||||
"BIT", "BIT_LENGTH", "BLOB", "BLOCKED", "BOM", "BOOLEAN", "BOTH", "BREADTH", "BY", "C", "CACHE", "CALL", "CALLED", "CARDINALITY",
|
||||
"CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CATALOG_NAME", "CEIL", "CEILING", "CHAIN", "CHAR", "CHARACTER",
|
||||
"CHARACTERISTICS", "CHARACTERS", "CHARACTER_LENGTH", "CHARACTER_SET_CATALOG", "CHARACTER_SET_NAME", "CHARACTER_SET_SCHEMA",
|
||||
"CHAR_LENGTH", "CHECK", "CHECKPOINT", "CLASS", "CLASS_ORIGIN", "CLOB", "CLOSE", "CLUSTER", "COALESCE", "COBOL", "COLLATE",
|
||||
"COLLATION", "COLLATION_CATALOG", "COLLATION_NAME", "COLLATION_SCHEMA", "COLLECT", "COLUMN", "COLUMNS", "COLUMN_NAME",
|
||||
"COMMAND_FUNCTION", "COMMAND_FUNCTION_CODE", "COMMENT", "COMMENTS", "COMMIT", "COMMITTED", "CONCURRENTLY", "CONDITION",
|
||||
"CONDITION_NUMBER", "CONFIGURATION", "CONFLICT", "CONNECT", "CONNECTION", "CONNECTION_NAME", "CONSTRAINT", "CONSTRAINTS",
|
||||
"CONSTRAINT_CATALOG", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONSTRUCTOR", "CONTAINS", "CONTENT", "CONTINUE", "CONTROL",
|
||||
"CONVERSION", "CONVERT", "COPY", "CORR", "CORRESPONDING", "COST", "COUNT", "COVAR_POP", "COVAR_SAMP", "CREATE", "CROSS", "CSV",
|
||||
"CUBE", "CUME_DIST", "CURRENT", "CURRENT_CATALOG", "CURRENT_DATE", "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH",
|
||||
"CURRENT_ROLE", "CURRENT_ROW", "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_TRANSFORM_GROUP_FOR_TYPE",
|
||||
"CURRENT_USER", "CURSOR", "CURSOR_NAME", "CYCLE", "DATA", "DATABASE", "DATALINK", "DATE", "DATETIME_INTERVAL_CODE",
|
||||
"DATETIME_INTERVAL_PRECISION", "DAY", "DB", "DEALLOCATE", "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFAULTS", "DEFERRABLE",
|
||||
"DEFERRED", "DEFINED", "DEFINER", "DEGREE", "DELETE", "DELIMITER", "DELIMITERS", "DENSE_RANK", "DEPENDS", "DEPTH", "DEREF",
|
||||
"DERIVED", "DESC", "DESCRIBE", "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DICTIONARY", "DISABLE", "DISCARD", "DISCONNECT",
|
||||
"DISPATCH", "DISTINCT", "DLNEWCOPY", "DLPREVIOUSCOPY", "DLURLCOMPLETE", "DLURLCOMPLETEONLY", "DLURLCOMPLETEWRITE", "DLURLPATH",
|
||||
"DLURLPATHONLY", "DLURLPATHWRITE", "DLURLSCHEME", "DLURLSERVER", "DLVALUE", "DO", "DOCUMENT", "DOMAIN", "DOUBLE", "DROP",
|
||||
"DYNAMIC", "DYNAMIC_FUNCTION", "DYNAMIC_FUNCTION_CODE", "EACH", "ELEMENT", "ELSE", "EMPTY", "ENABLE", "ENCODING", "ENCRYPTED",
|
||||
"END", "END-EXEC", "END_FRAME", "END_PARTITION", "ENFORCED", "ENUM", "EQUALS", "ESCAPE", "EVENT", "EVERY", "EXCEPT", "EXCEPTION",
|
||||
"EXCLUDE", "EXCLUDING", "EXCLUSIVE", "EXEC", "EXECUTE", "EXISTS", "EXP", "EXPLAIN", "EXPRESSION", "EXTENSION", "EXTERNAL",
|
||||
"EXTRACT", "FALSE", "FAMILY", "FETCH", "FILE", "FILTER", "FINAL", "FIRST", "FIRST_VALUE", "FLAG", "FLOAT", "FLOOR", "FOLLOWING",
|
||||
"FOR", "FORCE", "FOREIGN", "FORTRAN", "FORWARD", "FOUND", "FRAME_ROW", "FREE", "FREEZE", "FROM", "FS", "FULL", "FUNCTION",
|
||||
"FUNCTIONS", "FUSION", "G", "GENERAL", "GENERATED", "GET", "GLOBAL", "GO", "GOTO", "GRANT", "GRANTED", "GREATEST", "GROUP",
|
||||
"GROUPING", "GROUPS", "HANDLER", "HAVING", "HEADER", "HEX", "HIERARCHY", "HOLD", "HOUR", "ID", "IDENTITY", "IF", "IGNORE",
|
||||
"ILIKE", "IMMEDIATE", "IMMEDIATELY", "IMMUTABLE", "IMPLEMENTATION", "IMPLICIT", "IMPORT", "IN", "INCLUDING", "INCREMENT",
|
||||
"INDENT", "INDEX", "INDEXES", "INDICATOR", "INHERIT", "INHERITS", "INITIALLY", "INLINE", "INNER", "INOUT", "INPUT",
|
||||
"INSENSITIVE", "INSERT", "INSTANCE", "INSTANTIABLE", "INSTEAD", "INT", "INTEGER", "INTEGRITY", "INTERSECT", "INTERSECTION",
|
||||
"INTERVAL", "INTO", "INVOKER", "IS", "ISNULL", "ISOLATION", "JOIN", "K", "KEY", "KEY_MEMBER", "KEY_TYPE", "LABEL", "LAG",
|
||||
"LANGUAGE", "LARGE", "LAST", "LAST_VALUE", "LATERAL", "LEAD", "LEADING", "LEAKPROOF", "LEAST", "LEFT", "LENGTH", "LEVEL",
|
||||
"LIBRARY", "LIKE", "LIKE_REGEX", "LIMIT", "LINK", "LISTEN", "LN", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATION",
|
||||
"LOCATOR", "LOCK", "LOCKED", "LOGGED", "LOWER", "M", "MAP", "MAPPING", "MATCH", "MATCHED", "MATERIALIZED", "MAX", "MAXVALUE",
|
||||
"MAX_CARDINALITY", "MEMBER", "MERGE", "MESSAGE_LENGTH", "MESSAGE_OCTET_LENGTH", "MESSAGE_TEXT", "METHOD", "MIN", "MINUTE",
|
||||
"MINVALUE", "MOD", "MODE", "MODIFIES", "MODULE", "MONTH", "MORE", "MOVE", "MULTISET", "MUMPS", "NAME", "NAMES", "NAMESPACE",
|
||||
"NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NESTING", "NEW", "NEXT", "NFC", "NFD", "NFKC", "NFKD", "NIL", "NO", "NONE",
|
||||
"NORMALIZE", "NORMALIZED", "NOT", "NOTHING", "NOTIFY", "NOTNULL", "NOWAIT", "NTH_VALUE", "NTILE", "NULL", "NULLABLE", "NULLIF",
|
||||
"NULLS", "NUMBER", "NUMERIC", "OBJECT", "OCCURRENCES_REGEX", "OCTETS", "OCTET_LENGTH", "OF", "OFF", "OFFSET", "OIDS", "OLD",
|
||||
"ON", "ONLY", "OPEN", "OPERATOR", "OPTION", "OPTIONS", "OR", "ORDER", "ORDERING", "ORDINALITY", "OTHERS", "OUT", "OUTER",
|
||||
"OUTPUT", "OVER", "OVERLAPS", "OVERLAY", "OVERRIDING", "OWNED", "OWNER", "P", "PAD", "PARALLEL", "PARAMETER", "PARAMETER_MODE",
|
||||
"PARAMETER_NAME", "PARAMETER_ORDINAL_POSITION", "PARAMETER_SPECIFIC_CATALOG", "PARAMETER_SPECIFIC_NAME",
|
||||
"PARAMETER_SPECIFIC_SCHEMA", "PARSER", "PARTIAL", "PARTITION", "PASCAL", "PASSING", "PASSTHROUGH", "PASSWORD", "PATH",
|
||||
"PERCENT", "PERCENTILE_CONT", "PERCENTILE_DISC", "PERCENT_RANK", "PERIOD", "PERMISSION", "PLACING", "PLANS", "PLI", "POLICY",
|
||||
"PORTION", "POSITION", "POSITION_REGEX", "POWER", "PRECEDES", "PRECEDING", "PRECISION", "PREPARE", "PREPARED", "PRESERVE",
|
||||
"PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE", "PROGRAM", "PUBLIC", "QUOTE", "RANGE", "RANK", "READ", "READS",
|
||||
"REAL", "REASSIGN", "RECHECK", "RECOVERY", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "REFRESH", "REGR_AVGX", "REGR_AVGY",
|
||||
"REGR_COUNT", "REGR_INTERCEPT", "REGR_R2", "REGR_SLOPE", "REGR_SXX", "REGR_SXY", "REGR_SYY", "REINDEX", "RELATIVE", "RELEASE",
|
||||
"RENAME", "REPEATABLE", "REPLACE", "REPLICA", "REQUIRING", "RESET", "RESPECT", "RESTART", "RESTORE", "RESTRICT", "RESULT",
|
||||
"RETURN", "RETURNED_CARDINALITY", "RETURNED_LENGTH", "RETURNED_OCTET_LENGTH", "RETURNED_SQLSTATE", "RETURNING", "RETURNS",
|
||||
"REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROUTINE_CATALOG", "ROUTINE_NAME", "ROUTINE_SCHEMA", "ROW", "ROWS",
|
||||
"ROW_COUNT", "ROW_NUMBER", "RULE", "SAVEPOINT", "SCALE", "SCHEMA", "SCHEMA_NAME", "SCOPE", "SCOPE_CATALOG", "SCOPE_NAME",
|
||||
"SCOPE_SCHEMA", "SCROLL", "SEARCH", "SECOND", "SECTION", "SECURITY", "SELECT", "SELECTIVE", "SELF", "SENSITIVE", "SEQUENCE",
|
||||
"SEQUENCES", "SERIALIZABLE", "SERVER", "SERVER_NAME", "SESSION", "SESSION_USER", "SET", "SETOF", "SETS", "SHARE", "SHOW",
|
||||
"SIMILAR", "SIMPLE", "SIZE", "SKIP", "SMALLINT", "SNAPSHOT", "SOME", "SOURCE", "SPACE", "SPECIFIC", "SPECIFICTYPE",
|
||||
"SPECIFIC_NAME", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "SQRT", "STABLE", "STANDALONE",
|
||||
"START", "STATE", "STATEMENT", "STATIC", "STATISTICS", "STDDEV_POP", "STDDEV_SAMP", "STDIN", "STDOUT", "STORAGE", "STRICT",
|
||||
"STRIP", "STRUCTURE", "STYLE", "SUBCLASS_ORIGIN", "SUBMULTISET", "SUBSTRING", "SUBSTRING_REGEX", "SUCCEEDS", "SUM", "SYMMETRIC",
|
||||
"SYSID", "SYSTEM", "SYSTEM_TIME", "SYSTEM_USER", "T", "TABLE", "TABLES", "TABLESAMPLE", "TABLESPACE", "TABLE_NAME", "TEMP",
|
||||
"TEMPLATE", "TEMPORARY", "TEXT", "THEN", "TIES", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TOKEN",
|
||||
"TOP_LEVEL_COUNT", "TRAILING", "TRANSACTION", "TRANSACTIONS_COMMITTED", "TRANSACTIONS_ROLLED_BACK", "TRANSACTION_ACTIVE",
|
||||
"TRANSFORM", "TRANSFORMS", "TRANSLATE", "TRANSLATE_REGEX", "TRANSLATION", "TREAT", "TRIGGER", "TRIGGER_CATALOG", "TRIGGER_NAME",
|
||||
"TRIGGER_SCHEMA", "TRIM", "TRIM_ARRAY", "TRUE", "TRUNCATE", "TRUSTED", "TYPE", "TYPES", "UESCAPE", "UNBOUNDED", "UNCOMMITTED",
|
||||
"UNDER", "UNENCRYPTED", "UNION", "UNIQUE", "UNKNOWN", "UNLINK", "UNLISTEN", "UNLOGGED", "UNNAMED", "UNNEST", "UNTIL", "UNTYPED",
|
||||
"UPDATE", "UPPER", "URI", "USAGE", "USER", "USER_DEFINED_TYPE_CATALOG", "USER_DEFINED_TYPE_CODE", "USER_DEFINED_TYPE_NAME",
|
||||
"USER_DEFINED_TYPE_SCHEMA", "USING", "VACUUM", "VALID", "VALIDATE", "VALIDATOR", "VALUE", "VALUES", "VALUE_OF", "VARBINARY",
|
||||
"VARCHAR", "VARIADIC", "VARYING", "VAR_POP", "VAR_SAMP", "VERBOSE", "VERSION", "VERSIONING", "VIEW", "VIEWS", "VOLATILE",
|
||||
"WHEN", "WHENEVER", "WHERE", "WHITESPACE", "WIDTH_BUCKET", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRAPPER", "WRITE",
|
||||
"XML", "XMLAGG", "XMLATTRIBUTES", "XMLBINARY", "XMLCAST", "XMLCOMMENT", "XMLCONCAT", "XMLDECLARATION", "XMLDOCUMENT",
|
||||
"XMLELEMENT", "XMLEXISTS", "XMLFOREST", "XMLITERATE", "XMLNAMESPACES", "XMLPARSE", "XMLPI", "XMLQUERY", "XMLROOT", "XMLSCHEMA",
|
||||
"XMLSERIALIZE", "XMLTABLE", "XMLTEXT", "XMLVALIDATE", "YEAR", "YES", "ZONE"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"abbrev", "abs", "acos", "acosd", "age", "any", "area", "array_agg", "array_append", "array_cat", "array_dims", "array_fill",
|
||||
"array_length", "array_lower", "array_ndims", "array_position", "array_positions", "array_prepend", "array_remove", "array_replace",
|
||||
"array_to_json", "array_to_string", "array_to_tsvector", "array_upper", "ascii", "asin", "asind", "atan", "atan2", "atan2d", "atand",
|
||||
"avg", "bit", "bit_and", "bit_length", "bit_or", "bool_and", "bool_or", "bound_box", "box", "brin_summarize_new_values", "broadcast",
|
||||
"btrim", "cardinality", "cbrt", "ceil", "ceiling", "center", "char_length", "character_length", "chr", "circle", "clock_timestamp",
|
||||
"coalesce", "col_description", "concat", "concat_ws", "convert", "convert_from", "convert_to", "corr", "cos", "cosd", "cot", "cotd",
|
||||
"count", "covar_pop", "covar_samp", "cume_dist", "current_catalog", "current_database", "current_date", "current_query", "current_role",
|
||||
"current_schema", "current_schemas", "current_setting", "current_time", "current_timestamp", "current_user", "currval", "cursor_to_xml",
|
||||
"date_part", "date_trunc", "decode", "degrees", "dense_rank", "diameter", "div", "encode", "enum_first", "enum_last", "enum_range", "every",
|
||||
"exp", "extract", "family", "first_value", "floor", "format", "format_type", "generate_series", "generate_subscripts", "get_bit", "get_byte",
|
||||
"get_current_ts_config", "gin_clean_pending_list", "greatest", "grouping", "has_any_column_privilege", "has_column_privilege",
|
||||
"has_database_privilege", "has_foreign_data_wrapper_privilege", "has_function_privilege", "has_language_privilege", "has_schema_privilege",
|
||||
"has_sequence_privilege", "has_server_privilege", "has_table_privilege", "has_tablespace_privilege", "has_type_privilege", "height", "host",
|
||||
"hostmask", "inet_client_addr", "inet_client_port", "inet_merge", "inet_same_family", "inet_server_addr", "inet_server_port", "initcap",
|
||||
"isclosed", "isempty", "isfinite", "isopen", "json_agg", "json_object", "json_object_agg", "json_populate_record", "json_populate_recordset",
|
||||
"json_to_record", "json_to_recordset", "jsonb_agg", "jsonb_object_agg", "justify_days", "justify_hours", "justify_interval", "lag",
|
||||
"last_value", "lastval", "lead", "least", "left", "length", "line", "ln", "localtime", "localtimestamp", "log", "lower", "lower_inc",
|
||||
"lower_inf", "lpad", "lseg", "ltrim", "make_date", "make_interval", "make_time", "make_timestamp", "make_timestamptz", "masklen", "max",
|
||||
"md5", "min", "mod", "mode", "netmask", "network", "nextval", "now", "npoints", "nth_value", "ntile", "nullif", "num_nonnulls", "num_nulls",
|
||||
"numnode", "obj_description", "octet_length", "overlay", "parse_ident", "path", "pclose", "percent_rank", "percentile_cont", "percentile_disc",
|
||||
"pg_advisory_lock", "pg_advisory_lock_shared", "pg_advisory_unlock", "pg_advisory_unlock_all", "pg_advisory_unlock_shared", "pg_advisory_xact_lock",
|
||||
"pg_advisory_xact_lock_shared", "pg_backend_pid", "pg_backup_start_time", "pg_blocking_pids", "pg_cancel_backend", "pg_client_encoding",
|
||||
"pg_collation_is_visible", "pg_column_size", "pg_conf_load_time", "pg_control_checkpoint", "pg_control_init", "pg_control_recovery",
|
||||
"pg_control_system", "pg_conversion_is_visible", "pg_create_logical_replication_slot", "pg_create_physical_replication_slot", "pg_create_restore_point",
|
||||
"pg_current_xlog_flush_location", "pg_current_xlog_insert_location", "pg_current_xlog_location", "pg_database_size", "pg_describe_object",
|
||||
"pg_drop_replication_slot", "pg_export_snapshot", "pg_filenode_relation", "pg_function_is_visible", "pg_get_constraintdef", "pg_get_expr",
|
||||
"pg_get_function_arguments", "pg_get_function_identity_arguments", "pg_get_function_result", "pg_get_functiondef", "pg_get_indexdef", "pg_get_keywords",
|
||||
"pg_get_object_address", "pg_get_owned_sequence", "pg_get_ruledef", "pg_get_serial_sequence", "pg_get_triggerdef", "pg_get_userbyid", "pg_get_viewdef",
|
||||
"pg_has_role", "pg_identify_object", "pg_identify_object_as_address", "pg_index_column_has_property", "pg_index_has_property", "pg_indexam_has_property",
|
||||
"pg_indexes_size", "pg_is_in_backup", "pg_is_in_recovery", "pg_is_other_temp_schema", "pg_is_xlog_replay_paused", "pg_last_committed_xact",
|
||||
"pg_last_xact_replay_timestamp", "pg_last_xlog_receive_location", "pg_last_xlog_replay_location", "pg_listening_channels", "pg_logical_emit_message",
|
||||
"pg_logical_slot_get_binary_changes", "pg_logical_slot_get_changes", "pg_logical_slot_peek_binary_changes", "pg_logical_slot_peek_changes", "pg_ls_dir",
|
||||
"pg_my_temp_schema", "pg_notification_queue_usage", "pg_opclass_is_visible", "pg_operator_is_visible", "pg_opfamily_is_visible", "pg_options_to_table",
|
||||
"pg_postmaster_start_time", "pg_read_binary_file", "pg_read_file", "pg_relation_filenode", "pg_relation_filepath", "pg_relation_size", "pg_reload_conf",
|
||||
"pg_replication_origin_create", "pg_replication_origin_drop", "pg_replication_origin_oid", "pg_replication_origin_progress", "pg_replication_origin_session_is_setup",
|
||||
"pg_replication_origin_session_progress", "pg_replication_origin_session_reset", "pg_replication_origin_session_setup", "pg_replication_origin_xact_reset",
|
||||
"pg_replication_origin_xact_setup", "pg_rotate_logfile", "pg_size_bytes", "pg_size_pretty", "pg_sleep", "pg_sleep_for", "pg_sleep_until", "pg_start_backup",
|
||||
"pg_stat_file", "pg_stop_backup", "pg_switch_xlog", "pg_table_is_visible", "pg_table_size", "pg_tablespace_databases", "pg_tablespace_location",
|
||||
"pg_tablespace_size", "pg_terminate_backend", "pg_total_relation_size", "pg_trigger_depth", "pg_try_advisory_lock", "pg_try_advisory_lock_shared",
|
||||
"pg_try_advisory_xact_lock", "pg_try_advisory_xact_lock_shared", "pg_ts_config_is_visible", "pg_ts_dict_is_visible", "pg_ts_parser_is_visible",
|
||||
"pg_ts_template_is_visible", "pg_type_is_visible", "pg_typeof", "pg_xact_commit_timestamp", "pg_xlog_location_diff", "pg_xlog_replay_pause",
|
||||
"pg_xlog_replay_resume", "pg_xlogfile_name", "pg_xlogfile_name_offset", "phraseto_tsquery", "pi", "plainto_tsquery", "point", "polygon", "popen", "position",
|
||||
"power", "pqserverversion", "query_to_xml", "querytree", "quote_ident", "quote_literal", "quote_nullable", "radians", "radius", "random", "range_merge",
|
||||
"rank", "regexp_matches", "regexp_replace", "regexp_split_to_array", "regexp_split_to_table", "regr_avgx", "regr_avgy", "regr_count", "regr_intercept",
|
||||
"regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "repeat", "replace", "reverse", "right", "round", "row_number", "row_security_active",
|
||||
"row_to_json", "rpad", "rtrim", "scale", "session_user", "set_bit", "set_byte", "set_config", "set_masklen", "setseed", "setval", "setweight",
|
||||
"shobj_description", "sign", "sin", "sind", "split_part", "sprintf", "sqrt", "statement_timestamp", "stddev", "stddev_pop", "stddev_samp", "string_agg",
|
||||
"string_to_array", "strip", "strpos", "substr", "substring", "sum", "table_to_xml", "table_to_xml_and_xmlschema", "tan", "tand", "text", "timeofday",
|
||||
"timezone", "to_ascii", "to_char", "to_date", "to_hex", "to_json", "to_number", "to_regclass", "to_regnamespace", "to_regoper", "to_regoperator", "to_regproc",
|
||||
"to_regprocedure", "to_regrole", "to_regtype", "to_timestamp", "to_tsquery", "to_tsvector", "transaction_timestamp", "translate", "trim", "trunc", "ts_debug",
|
||||
"ts_delete", "ts_filter", "ts_headline", "ts_lexize", "ts_parse", "ts_rank", "ts_rank_cd", "ts_rewrite", "ts_stat", "ts_token_type", "tsquery_phrase",
|
||||
"tsvector_to_array", "tsvector_update_trigger", "tsvector_update_trigger_column", "txid_current", "txid_current_snapshot", "txid_snapshot_xip", "txid_snapshot_xmax",
|
||||
"txid_snapshot_xmin", "txid_visible_in_snapshot", "unnest", "upper", "upper_inc", "upper_inf", "user", "var_pop", "var_samp", "variance", "version", "width",
|
||||
"width_bucket", "xml_is_well_formed", "xml_is_well_formed_content", "xml_is_well_formed_document", "xmlagg", "xmlcomment", "xmlconcat", "xmlelement", "xmlexists",
|
||||
"xmlforest", "xmlparse", "xmlpi", "xmlroot", "xmlserialize", "xpath", "xpath_exists"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^"]+/, 'identifier'],
|
||||
[/""/, 'identifier'],
|
||||
[/"/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"A", "ABORT", "ABS", "ABSENT", "ABSOLUTE", "ACCESS", "ACCORDING", "ACTION", "ADA", "ADD", "ADMIN", "AFTER", "AGGREGATE", "ALL",
|
||||
"ALLOCATE", "ALSO", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE", "AND", "ANY", "ARE", "ARRAY", "ARRAY_AGG", "ARRAY_MAX_CARDINALITY",
|
||||
"AS", "ASC", "ASENSITIVE", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC", "AT", "ATOMIC", "ATTRIBUTE", "ATTRIBUTES", "AUTHORIZATION",
|
||||
"AVG", "BACKWARD", "BASE64", "BEFORE", "BEGIN", "BEGIN_FRAME", "BEGIN_PARTITION", "BERNOULLI", "BETWEEN", "BIGINT", "BINARY",
|
||||
"BIT", "BIT_LENGTH", "BLOB", "BLOCKED", "BOM", "BOOLEAN", "BOTH", "BREADTH", "BY", "C", "CACHE", "CALL", "CALLED", "CARDINALITY",
|
||||
"CASCADE", "CASCADED", "CASE", "CAST", "CATALOG", "CATALOG_NAME", "CEIL", "CEILING", "CHAIN", "CHAR", "CHARACTER",
|
||||
"CHARACTERISTICS", "CHARACTERS", "CHARACTER_LENGTH", "CHARACTER_SET_CATALOG", "CHARACTER_SET_NAME", "CHARACTER_SET_SCHEMA",
|
||||
"CHAR_LENGTH", "CHECK", "CHECKPOINT", "CLASS", "CLASS_ORIGIN", "CLOB", "CLOSE", "CLUSTER", "COALESCE", "COBOL", "COLLATE",
|
||||
"COLLATION", "COLLATION_CATALOG", "COLLATION_NAME", "COLLATION_SCHEMA", "COLLECT", "COLUMN", "COLUMNS", "COLUMN_NAME",
|
||||
"COMMAND_FUNCTION", "COMMAND_FUNCTION_CODE", "COMMENT", "COMMENTS", "COMMIT", "COMMITTED", "CONCURRENTLY", "CONDITION",
|
||||
"CONDITION_NUMBER", "CONFIGURATION", "CONFLICT", "CONNECT", "CONNECTION", "CONNECTION_NAME", "CONSTRAINT", "CONSTRAINTS",
|
||||
"CONSTRAINT_CATALOG", "CONSTRAINT_NAME", "CONSTRAINT_SCHEMA", "CONSTRUCTOR", "CONTAINS", "CONTENT", "CONTINUE", "CONTROL",
|
||||
"CONVERSION", "CONVERT", "COPY", "CORR", "CORRESPONDING", "COST", "COUNT", "COVAR_POP", "COVAR_SAMP", "CREATE", "CROSS", "CSV",
|
||||
"CUBE", "CUME_DIST", "CURRENT", "CURRENT_CATALOG", "CURRENT_DATE", "CURRENT_DEFAULT_TRANSFORM_GROUP", "CURRENT_PATH",
|
||||
"CURRENT_ROLE", "CURRENT_ROW", "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_TRANSFORM_GROUP_FOR_TYPE",
|
||||
"CURRENT_USER", "CURSOR", "CURSOR_NAME", "CYCLE", "DATA", "DATABASE", "DATALINK", "DATE", "DATETIME_INTERVAL_CODE",
|
||||
"DATETIME_INTERVAL_PRECISION", "DAY", "DB", "DEALLOCATE", "DEC", "DECIMAL", "DECLARE", "DEFAULT", "DEFAULTS", "DEFERRABLE",
|
||||
"DEFERRED", "DEFINED", "DEFINER", "DEGREE", "DELETE", "DELIMITER", "DELIMITERS", "DENSE_RANK", "DEPENDS", "DEPTH", "DEREF",
|
||||
"DERIVED", "DESC", "DESCRIBE", "DESCRIPTOR", "DETERMINISTIC", "DIAGNOSTICS", "DICTIONARY", "DISABLE", "DISCARD", "DISCONNECT",
|
||||
"DISPATCH", "DISTINCT", "DLNEWCOPY", "DLPREVIOUSCOPY", "DLURLCOMPLETE", "DLURLCOMPLETEONLY", "DLURLCOMPLETEWRITE", "DLURLPATH",
|
||||
"DLURLPATHONLY", "DLURLPATHWRITE", "DLURLSCHEME", "DLURLSERVER", "DLVALUE", "DO", "DOCUMENT", "DOMAIN", "DOUBLE", "DROP",
|
||||
"DYNAMIC", "DYNAMIC_FUNCTION", "DYNAMIC_FUNCTION_CODE", "EACH", "ELEMENT", "ELSE", "EMPTY", "ENABLE", "ENCODING", "ENCRYPTED",
|
||||
"END", "END-EXEC", "END_FRAME", "END_PARTITION", "ENFORCED", "ENUM", "EQUALS", "ESCAPE", "EVENT", "EVERY", "EXCEPT", "EXCEPTION",
|
||||
"EXCLUDE", "EXCLUDING", "EXCLUSIVE", "EXEC", "EXECUTE", "EXISTS", "EXP", "EXPLAIN", "EXPRESSION", "EXTENSION", "EXTERNAL",
|
||||
"EXTRACT", "FALSE", "FAMILY", "FETCH", "FILE", "FILTER", "FINAL", "FIRST", "FIRST_VALUE", "FLAG", "FLOAT", "FLOOR", "FOLLOWING",
|
||||
"FOR", "FORCE", "FOREIGN", "FORTRAN", "FORWARD", "FOUND", "FRAME_ROW", "FREE", "FREEZE", "FROM", "FS", "FULL", "FUNCTION",
|
||||
"FUNCTIONS", "FUSION", "G", "GENERAL", "GENERATED", "GET", "GLOBAL", "GO", "GOTO", "GRANT", "GRANTED", "GREATEST", "GROUP",
|
||||
"GROUPING", "GROUPS", "HANDLER", "HAVING", "HEADER", "HEX", "HIERARCHY", "HOLD", "HOUR", "ID", "IDENTITY", "IF", "IGNORE",
|
||||
"ILIKE", "IMMEDIATE", "IMMEDIATELY", "IMMUTABLE", "IMPLEMENTATION", "IMPLICIT", "IMPORT", "IN", "INCLUDING", "INCREMENT",
|
||||
"INDENT", "INDEX", "INDEXES", "INDICATOR", "INHERIT", "INHERITS", "INITIALLY", "INLINE", "INNER", "INOUT", "INPUT",
|
||||
"INSENSITIVE", "INSERT", "INSTANCE", "INSTANTIABLE", "INSTEAD", "INT", "INTEGER", "INTEGRITY", "INTERSECT", "INTERSECTION",
|
||||
"INTERVAL", "INTO", "INVOKER", "IS", "ISNULL", "ISOLATION", "JOIN", "K", "KEY", "KEY_MEMBER", "KEY_TYPE", "LABEL", "LAG",
|
||||
"LANGUAGE", "LARGE", "LAST", "LAST_VALUE", "LATERAL", "LEAD", "LEADING", "LEAKPROOF", "LEAST", "LEFT", "LENGTH", "LEVEL",
|
||||
"LIBRARY", "LIKE", "LIKE_REGEX", "LIMIT", "LINK", "LISTEN", "LN", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", "LOCATION",
|
||||
"LOCATOR", "LOCK", "LOCKED", "LOGGED", "LOWER", "M", "MAP", "MAPPING", "MATCH", "MATCHED", "MATERIALIZED", "MAX", "MAXVALUE",
|
||||
"MAX_CARDINALITY", "MEMBER", "MERGE", "MESSAGE_LENGTH", "MESSAGE_OCTET_LENGTH", "MESSAGE_TEXT", "METHOD", "MIN", "MINUTE",
|
||||
"MINVALUE", "MOD", "MODE", "MODIFIES", "MODULE", "MONTH", "MORE", "MOVE", "MULTISET", "MUMPS", "NAME", "NAMES", "NAMESPACE",
|
||||
"NATIONAL", "NATURAL", "NCHAR", "NCLOB", "NESTING", "NEW", "NEXT", "NFC", "NFD", "NFKC", "NFKD", "NIL", "NO", "NONE",
|
||||
"NORMALIZE", "NORMALIZED", "NOT", "NOTHING", "NOTIFY", "NOTNULL", "NOWAIT", "NTH_VALUE", "NTILE", "NULL", "NULLABLE", "NULLIF",
|
||||
"NULLS", "NUMBER", "NUMERIC", "OBJECT", "OCCURRENCES_REGEX", "OCTETS", "OCTET_LENGTH", "OF", "OFF", "OFFSET", "OIDS", "OLD",
|
||||
"ON", "ONLY", "OPEN", "OPERATOR", "OPTION", "OPTIONS", "OR", "ORDER", "ORDERING", "ORDINALITY", "OTHERS", "OUT", "OUTER",
|
||||
"OUTPUT", "OVER", "OVERLAPS", "OVERLAY", "OVERRIDING", "OWNED", "OWNER", "P", "PAD", "PARALLEL", "PARAMETER", "PARAMETER_MODE",
|
||||
"PARAMETER_NAME", "PARAMETER_ORDINAL_POSITION", "PARAMETER_SPECIFIC_CATALOG", "PARAMETER_SPECIFIC_NAME",
|
||||
"PARAMETER_SPECIFIC_SCHEMA", "PARSER", "PARTIAL", "PARTITION", "PASCAL", "PASSING", "PASSTHROUGH", "PASSWORD", "PATH",
|
||||
"PERCENT", "PERCENTILE_CONT", "PERCENTILE_DISC", "PERCENT_RANK", "PERIOD", "PERMISSION", "PLACING", "PLANS", "PLI", "POLICY",
|
||||
"PORTION", "POSITION", "POSITION_REGEX", "POWER", "PRECEDES", "PRECEDING", "PRECISION", "PREPARE", "PREPARED", "PRESERVE",
|
||||
"PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE", "PROGRAM", "PUBLIC", "QUOTE", "RANGE", "RANK", "READ", "READS",
|
||||
"REAL", "REASSIGN", "RECHECK", "RECOVERY", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", "REFRESH", "REGR_AVGX", "REGR_AVGY",
|
||||
"REGR_COUNT", "REGR_INTERCEPT", "REGR_R2", "REGR_SLOPE", "REGR_SXX", "REGR_SXY", "REGR_SYY", "REINDEX", "RELATIVE", "RELEASE",
|
||||
"RENAME", "REPEATABLE", "REPLACE", "REPLICA", "REQUIRING", "RESET", "RESPECT", "RESTART", "RESTORE", "RESTRICT", "RESULT",
|
||||
"RETURN", "RETURNED_CARDINALITY", "RETURNED_LENGTH", "RETURNED_OCTET_LENGTH", "RETURNED_SQLSTATE", "RETURNING", "RETURNS",
|
||||
"REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROUTINE_CATALOG", "ROUTINE_NAME", "ROUTINE_SCHEMA", "ROW", "ROWS",
|
||||
"ROW_COUNT", "ROW_NUMBER", "RULE", "SAVEPOINT", "SCALE", "SCHEMA", "SCHEMA_NAME", "SCOPE", "SCOPE_CATALOG", "SCOPE_NAME",
|
||||
"SCOPE_SCHEMA", "SCROLL", "SEARCH", "SECOND", "SECTION", "SECURITY", "SELECT", "SELECTIVE", "SELF", "SENSITIVE", "SEQUENCE",
|
||||
"SEQUENCES", "SERIALIZABLE", "SERVER", "SERVER_NAME", "SESSION", "SESSION_USER", "SET", "SETOF", "SETS", "SHARE", "SHOW",
|
||||
"SIMILAR", "SIMPLE", "SIZE", "SKIP", "SMALLINT", "SNAPSHOT", "SOME", "SOURCE", "SPACE", "SPECIFIC", "SPECIFICTYPE",
|
||||
"SPECIFIC_NAME", "SQL", "SQLCODE", "SQLERROR", "SQLEXCEPTION", "SQLSTATE", "SQLWARNING", "SQRT", "STABLE", "STANDALONE",
|
||||
"START", "STATE", "STATEMENT", "STATIC", "STATISTICS", "STDDEV_POP", "STDDEV_SAMP", "STDIN", "STDOUT", "STORAGE", "STRICT",
|
||||
"STRIP", "STRUCTURE", "STYLE", "SUBCLASS_ORIGIN", "SUBMULTISET", "SUBSTRING", "SUBSTRING_REGEX", "SUCCEEDS", "SUM", "SYMMETRIC",
|
||||
"SYSID", "SYSTEM", "SYSTEM_TIME", "SYSTEM_USER", "T", "TABLE", "TABLES", "TABLESAMPLE", "TABLESPACE", "TABLE_NAME", "TEMP",
|
||||
"TEMPLATE", "TEMPORARY", "TEXT", "THEN", "TIES", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TOKEN",
|
||||
"TOP_LEVEL_COUNT", "TRAILING", "TRANSACTION", "TRANSACTIONS_COMMITTED", "TRANSACTIONS_ROLLED_BACK", "TRANSACTION_ACTIVE",
|
||||
"TRANSFORM", "TRANSFORMS", "TRANSLATE", "TRANSLATE_REGEX", "TRANSLATION", "TREAT", "TRIGGER", "TRIGGER_CATALOG", "TRIGGER_NAME",
|
||||
"TRIGGER_SCHEMA", "TRIM", "TRIM_ARRAY", "TRUE", "TRUNCATE", "TRUSTED", "TYPE", "TYPES", "UESCAPE", "UNBOUNDED", "UNCOMMITTED",
|
||||
"UNDER", "UNENCRYPTED", "UNION", "UNIQUE", "UNKNOWN", "UNLINK", "UNLISTEN", "UNLOGGED", "UNNAMED", "UNNEST", "UNTIL", "UNTYPED",
|
||||
"UPDATE", "UPPER", "URI", "USAGE", "USER", "USER_DEFINED_TYPE_CATALOG", "USER_DEFINED_TYPE_CODE", "USER_DEFINED_TYPE_NAME",
|
||||
"USER_DEFINED_TYPE_SCHEMA", "USING", "VACUUM", "VALID", "VALIDATE", "VALIDATOR", "VALUE", "VALUES", "VALUE_OF", "VARBINARY",
|
||||
"VARCHAR", "VARIADIC", "VARYING", "VAR_POP", "VAR_SAMP", "VERBOSE", "VERSION", "VERSIONING", "VIEW", "VIEWS", "VOLATILE",
|
||||
"WHEN", "WHENEVER", "WHERE", "WHITESPACE", "WIDTH_BUCKET", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRAPPER", "WRITE",
|
||||
"XML", "XMLAGG", "XMLATTRIBUTES", "XMLBINARY", "XMLCAST", "XMLCOMMENT", "XMLCONCAT", "XMLDECLARATION", "XMLDOCUMENT",
|
||||
"XMLELEMENT", "XMLEXISTS", "XMLFOREST", "XMLITERATE", "XMLNAMESPACES", "XMLPARSE", "XMLPI", "XMLQUERY", "XMLROOT", "XMLSCHEMA",
|
||||
"XMLSERIALIZE", "XMLTABLE", "XMLTEXT", "XMLVALIDATE", "YEAR", "YES", "ZONE"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"abbrev", "abs", "acos", "acosd", "age", "any", "area", "array_agg", "array_append", "array_cat", "array_dims", "array_fill",
|
||||
"array_length", "array_lower", "array_ndims", "array_position", "array_positions", "array_prepend", "array_remove", "array_replace",
|
||||
"array_to_json", "array_to_string", "array_to_tsvector", "array_upper", "ascii", "asin", "asind", "atan", "atan2", "atan2d", "atand",
|
||||
"avg", "bit", "bit_and", "bit_length", "bit_or", "bool_and", "bool_or", "bound_box", "box", "brin_summarize_new_values", "broadcast",
|
||||
"btrim", "cardinality", "cbrt", "ceil", "ceiling", "center", "char_length", "character_length", "chr", "circle", "clock_timestamp",
|
||||
"coalesce", "col_description", "concat", "concat_ws", "convert", "convert_from", "convert_to", "corr", "cos", "cosd", "cot", "cotd",
|
||||
"count", "covar_pop", "covar_samp", "cume_dist", "current_catalog", "current_database", "current_date", "current_query", "current_role",
|
||||
"current_schema", "current_schemas", "current_setting", "current_time", "current_timestamp", "current_user", "currval", "cursor_to_xml",
|
||||
"date_part", "date_trunc", "decode", "degrees", "dense_rank", "diameter", "div", "encode", "enum_first", "enum_last", "enum_range", "every",
|
||||
"exp", "extract", "family", "first_value", "floor", "format", "format_type", "generate_series", "generate_subscripts", "get_bit", "get_byte",
|
||||
"get_current_ts_config", "gin_clean_pending_list", "greatest", "grouping", "has_any_column_privilege", "has_column_privilege",
|
||||
"has_database_privilege", "has_foreign_data_wrapper_privilege", "has_function_privilege", "has_language_privilege", "has_schema_privilege",
|
||||
"has_sequence_privilege", "has_server_privilege", "has_table_privilege", "has_tablespace_privilege", "has_type_privilege", "height", "host",
|
||||
"hostmask", "inet_client_addr", "inet_client_port", "inet_merge", "inet_same_family", "inet_server_addr", "inet_server_port", "initcap",
|
||||
"isclosed", "isempty", "isfinite", "isopen", "json_agg", "json_object", "json_object_agg", "json_populate_record", "json_populate_recordset",
|
||||
"json_to_record", "json_to_recordset", "jsonb_agg", "jsonb_object_agg", "justify_days", "justify_hours", "justify_interval", "lag",
|
||||
"last_value", "lastval", "lead", "least", "left", "length", "line", "ln", "localtime", "localtimestamp", "log", "lower", "lower_inc",
|
||||
"lower_inf", "lpad", "lseg", "ltrim", "make_date", "make_interval", "make_time", "make_timestamp", "make_timestamptz", "masklen", "max",
|
||||
"md5", "min", "mod", "mode", "netmask", "network", "nextval", "now", "npoints", "nth_value", "ntile", "nullif", "num_nonnulls", "num_nulls",
|
||||
"numnode", "obj_description", "octet_length", "overlay", "parse_ident", "path", "pclose", "percent_rank", "percentile_cont", "percentile_disc",
|
||||
"pg_advisory_lock", "pg_advisory_lock_shared", "pg_advisory_unlock", "pg_advisory_unlock_all", "pg_advisory_unlock_shared", "pg_advisory_xact_lock",
|
||||
"pg_advisory_xact_lock_shared", "pg_backend_pid", "pg_backup_start_time", "pg_blocking_pids", "pg_cancel_backend", "pg_client_encoding",
|
||||
"pg_collation_is_visible", "pg_column_size", "pg_conf_load_time", "pg_control_checkpoint", "pg_control_init", "pg_control_recovery",
|
||||
"pg_control_system", "pg_conversion_is_visible", "pg_create_logical_replication_slot", "pg_create_physical_replication_slot", "pg_create_restore_point",
|
||||
"pg_current_xlog_flush_location", "pg_current_xlog_insert_location", "pg_current_xlog_location", "pg_database_size", "pg_describe_object",
|
||||
"pg_drop_replication_slot", "pg_export_snapshot", "pg_filenode_relation", "pg_function_is_visible", "pg_get_constraintdef", "pg_get_expr",
|
||||
"pg_get_function_arguments", "pg_get_function_identity_arguments", "pg_get_function_result", "pg_get_functiondef", "pg_get_indexdef", "pg_get_keywords",
|
||||
"pg_get_object_address", "pg_get_owned_sequence", "pg_get_ruledef", "pg_get_serial_sequence", "pg_get_triggerdef", "pg_get_userbyid", "pg_get_viewdef",
|
||||
"pg_has_role", "pg_identify_object", "pg_identify_object_as_address", "pg_index_column_has_property", "pg_index_has_property", "pg_indexam_has_property",
|
||||
"pg_indexes_size", "pg_is_in_backup", "pg_is_in_recovery", "pg_is_other_temp_schema", "pg_is_xlog_replay_paused", "pg_last_committed_xact",
|
||||
"pg_last_xact_replay_timestamp", "pg_last_xlog_receive_location", "pg_last_xlog_replay_location", "pg_listening_channels", "pg_logical_emit_message",
|
||||
"pg_logical_slot_get_binary_changes", "pg_logical_slot_get_changes", "pg_logical_slot_peek_binary_changes", "pg_logical_slot_peek_changes", "pg_ls_dir",
|
||||
"pg_my_temp_schema", "pg_notification_queue_usage", "pg_opclass_is_visible", "pg_operator_is_visible", "pg_opfamily_is_visible", "pg_options_to_table",
|
||||
"pg_postmaster_start_time", "pg_read_binary_file", "pg_read_file", "pg_relation_filenode", "pg_relation_filepath", "pg_relation_size", "pg_reload_conf",
|
||||
"pg_replication_origin_create", "pg_replication_origin_drop", "pg_replication_origin_oid", "pg_replication_origin_progress", "pg_replication_origin_session_is_setup",
|
||||
"pg_replication_origin_session_progress", "pg_replication_origin_session_reset", "pg_replication_origin_session_setup", "pg_replication_origin_xact_reset",
|
||||
"pg_replication_origin_xact_setup", "pg_rotate_logfile", "pg_size_bytes", "pg_size_pretty", "pg_sleep", "pg_sleep_for", "pg_sleep_until", "pg_start_backup",
|
||||
"pg_stat_file", "pg_stop_backup", "pg_switch_xlog", "pg_table_is_visible", "pg_table_size", "pg_tablespace_databases", "pg_tablespace_location",
|
||||
"pg_tablespace_size", "pg_terminate_backend", "pg_total_relation_size", "pg_trigger_depth", "pg_try_advisory_lock", "pg_try_advisory_lock_shared",
|
||||
"pg_try_advisory_xact_lock", "pg_try_advisory_xact_lock_shared", "pg_ts_config_is_visible", "pg_ts_dict_is_visible", "pg_ts_parser_is_visible",
|
||||
"pg_ts_template_is_visible", "pg_type_is_visible", "pg_typeof", "pg_xact_commit_timestamp", "pg_xlog_location_diff", "pg_xlog_replay_pause",
|
||||
"pg_xlog_replay_resume", "pg_xlogfile_name", "pg_xlogfile_name_offset", "phraseto_tsquery", "pi", "plainto_tsquery", "point", "polygon", "popen", "position",
|
||||
"power", "pqserverversion", "query_to_xml", "querytree", "quote_ident", "quote_literal", "quote_nullable", "radians", "radius", "random", "range_merge",
|
||||
"rank", "regexp_matches", "regexp_replace", "regexp_split_to_array", "regexp_split_to_table", "regr_avgx", "regr_avgy", "regr_count", "regr_intercept",
|
||||
"regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "repeat", "replace", "reverse", "right", "round", "row_number", "row_security_active",
|
||||
"row_to_json", "rpad", "rtrim", "scale", "session_user", "set_bit", "set_byte", "set_config", "set_masklen", "setseed", "setval", "setweight",
|
||||
"shobj_description", "sign", "sin", "sind", "split_part", "sprintf", "sqrt", "statement_timestamp", "stddev", "stddev_pop", "stddev_samp", "string_agg",
|
||||
"string_to_array", "strip", "strpos", "substr", "substring", "sum", "table_to_xml", "table_to_xml_and_xmlschema", "tan", "tand", "text", "timeofday",
|
||||
"timezone", "to_ascii", "to_char", "to_date", "to_hex", "to_json", "to_number", "to_regclass", "to_regnamespace", "to_regoper", "to_regoperator", "to_regproc",
|
||||
"to_regprocedure", "to_regrole", "to_regtype", "to_timestamp", "to_tsquery", "to_tsvector", "transaction_timestamp", "translate", "trim", "trunc", "ts_debug",
|
||||
"ts_delete", "ts_filter", "ts_headline", "ts_lexize", "ts_parse", "ts_rank", "ts_rank_cd", "ts_rewrite", "ts_stat", "ts_token_type", "tsquery_phrase",
|
||||
"tsvector_to_array", "tsvector_update_trigger", "tsvector_update_trigger_column", "txid_current", "txid_current_snapshot", "txid_snapshot_xip", "txid_snapshot_xmax",
|
||||
"txid_snapshot_xmin", "txid_visible_in_snapshot", "unnest", "upper", "upper_inc", "upper_inf", "user", "var_pop", "var_samp", "variance", "version", "width",
|
||||
"width_bucket", "xml_is_well_formed", "xml_is_well_formed_content", "xml_is_well_formed_document", "xmlagg", "xmlcomment", "xmlconcat", "xmlelement", "xmlexists",
|
||||
"xmlforest", "xmlparse", "xmlpi", "xmlroot", "xmlserialize", "xpath", "xpath_exists"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^"]+/, 'identifier'],
|
||||
[/""/, 'identifier'],
|
||||
[/"/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,284 +13,284 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string'] },
|
||||
{ open: '[', close: ']', notIn: ['string'] },
|
||||
{ open: '(', close: ')', notIn: ['string'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*(#|\/\/)region\\b"),
|
||||
end: new RegExp("^\\s*(#|\/\/)endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[^<]+/] // text
|
||||
],
|
||||
doctype: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
phpInSimpleState: [
|
||||
[/<\?((php)|=)?/, 'metatag.php'],
|
||||
[/\?>/, { token: 'metatag.php', switchTo: '@$S2.$S3' }],
|
||||
{ include: 'phpRoot' }
|
||||
],
|
||||
phpInEmbeddedState: [
|
||||
[/<\?((php)|=)?/, 'metatag.php'],
|
||||
[/\?>/, { token: 'metatag.php', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
{ include: 'phpRoot' }
|
||||
],
|
||||
phpRoot: [
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@phpKeywords': { token: 'keyword.php' },
|
||||
'@phpCompileTimeConstants': { token: 'constant.php' },
|
||||
'@default': 'identifier.php'
|
||||
}
|
||||
}],
|
||||
[/[$a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@phpPreDefinedVariables': { token: 'variable.predefined.php' },
|
||||
'@default': 'variable.php'
|
||||
}
|
||||
}],
|
||||
// brackets
|
||||
[/[{}]/, 'delimiter.bracket.php'],
|
||||
[/[\[\]]/, 'delimiter.array.php'],
|
||||
[/[()]/, 'delimiter.parenthesis.php'],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/],
|
||||
// comments
|
||||
[/(#|\/\/)$/, 'comment.php'],
|
||||
[/(#|\/\/)/, 'comment.php', '@phpLineComment'],
|
||||
// block comments
|
||||
[/\/\*/, 'comment.php', '@phpComment'],
|
||||
// strings
|
||||
[/"/, 'string.php', '@phpDoubleQuoteString'],
|
||||
[/'/, 'string.php', '@phpSingleQuoteString'],
|
||||
// delimiters
|
||||
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, 'delimiter.php'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float.php'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float.php'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex.php'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal.php'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary.php'],
|
||||
[/\d[\d']*/, 'number.php'],
|
||||
[/\d/, 'number.php'],
|
||||
],
|
||||
phpComment: [
|
||||
[/\*\//, 'comment.php', '@pop'],
|
||||
[/[^*]+/, 'comment.php'],
|
||||
[/./, 'comment.php']
|
||||
],
|
||||
phpLineComment: [
|
||||
[/\?>/, { token: '@rematch', next: '@pop' }],
|
||||
[/.$/, 'comment.php', '@pop'],
|
||||
[/[^?]+$/, 'comment.php', '@pop'],
|
||||
[/[^?]+/, 'comment.php'],
|
||||
[/./, 'comment.php']
|
||||
],
|
||||
phpDoubleQuoteString: [
|
||||
[/[^\\"]+/, 'string.php'],
|
||||
[/@escapes/, 'string.escape.php'],
|
||||
[/\\./, 'string.escape.invalid.php'],
|
||||
[/"/, 'string.php', '@pop']
|
||||
],
|
||||
phpSingleQuoteString: [
|
||||
[/[^\\']+/, 'string.php'],
|
||||
[/@escapes/, 'string.escape.php'],
|
||||
[/\\./, 'string.escape.invalid.php'],
|
||||
[/'/, 'string.php', '@pop']
|
||||
],
|
||||
},
|
||||
phpKeywords: [
|
||||
'abstract', 'and', 'array', 'as', 'break',
|
||||
'callable', 'case', 'catch', 'cfunction', 'class', 'clone',
|
||||
'const', 'continue', 'declare', 'default', 'do',
|
||||
'else', 'elseif', 'enddeclare', 'endfor', 'endforeach',
|
||||
'endif', 'endswitch', 'endwhile', 'extends', 'false', 'final',
|
||||
'for', 'foreach', 'function', 'global', 'goto',
|
||||
'if', 'implements', 'interface', 'instanceof', 'insteadof',
|
||||
'namespace', 'new', 'null', 'object', 'old_function', 'or', 'private',
|
||||
'protected', 'public', 'resource', 'static', 'switch', 'throw', 'trait',
|
||||
'try', 'true', 'use', 'var', 'while', 'xor',
|
||||
'die', 'echo', 'empty', 'exit', 'eval',
|
||||
'include', 'include_once', 'isset', 'list', 'require',
|
||||
'require_once', 'return', 'print', 'unset', 'yield',
|
||||
'__construct'
|
||||
],
|
||||
phpCompileTimeConstants: [
|
||||
'__CLASS__',
|
||||
'__DIR__',
|
||||
'__FILE__',
|
||||
'__LINE__',
|
||||
'__NAMESPACE__',
|
||||
'__METHOD__',
|
||||
'__FUNCTION__',
|
||||
'__TRAIT__'
|
||||
],
|
||||
phpPreDefinedVariables: [
|
||||
'$GLOBALS',
|
||||
'$_SERVER',
|
||||
'$_GET',
|
||||
'$_POST',
|
||||
'$_FILES',
|
||||
'$_REQUEST',
|
||||
'$_SESSION',
|
||||
'$_ENV',
|
||||
'$_COOKIE',
|
||||
'$php_errormsg',
|
||||
'$HTTP_RAW_POST_DATA',
|
||||
'$http_response_header',
|
||||
'$argc',
|
||||
'$argv'
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string'] },
|
||||
{ open: '[', close: ']', notIn: ['string'] },
|
||||
{ open: '(', close: ')', notIn: ['string'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*(#|\/\/)region\\b"),
|
||||
end: new RegExp("^\\s*(#|\/\/)endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[^<]+/] // text
|
||||
],
|
||||
doctype: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
phpInSimpleState: [
|
||||
[/<\?((php)|=)?/, 'metatag.php'],
|
||||
[/\?>/, { token: 'metatag.php', switchTo: '@$S2.$S3' }],
|
||||
{ include: 'phpRoot' }
|
||||
],
|
||||
phpInEmbeddedState: [
|
||||
[/<\?((php)|=)?/, 'metatag.php'],
|
||||
[/\?>/, { token: 'metatag.php', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
{ include: 'phpRoot' }
|
||||
],
|
||||
phpRoot: [
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@phpKeywords': { token: 'keyword.php' },
|
||||
'@phpCompileTimeConstants': { token: 'constant.php' },
|
||||
'@default': 'identifier.php'
|
||||
}
|
||||
}],
|
||||
[/[$a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@phpPreDefinedVariables': { token: 'variable.predefined.php' },
|
||||
'@default': 'variable.php'
|
||||
}
|
||||
}],
|
||||
// brackets
|
||||
[/[{}]/, 'delimiter.bracket.php'],
|
||||
[/[\[\]]/, 'delimiter.array.php'],
|
||||
[/[()]/, 'delimiter.parenthesis.php'],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/],
|
||||
// comments
|
||||
[/(#|\/\/)$/, 'comment.php'],
|
||||
[/(#|\/\/)/, 'comment.php', '@phpLineComment'],
|
||||
// block comments
|
||||
[/\/\*/, 'comment.php', '@phpComment'],
|
||||
// strings
|
||||
[/"/, 'string.php', '@phpDoubleQuoteString'],
|
||||
[/'/, 'string.php', '@phpSingleQuoteString'],
|
||||
// delimiters
|
||||
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/, 'delimiter.php'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float.php'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float.php'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex.php'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal.php'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary.php'],
|
||||
[/\d[\d']*/, 'number.php'],
|
||||
[/\d/, 'number.php'],
|
||||
],
|
||||
phpComment: [
|
||||
[/\*\//, 'comment.php', '@pop'],
|
||||
[/[^*]+/, 'comment.php'],
|
||||
[/./, 'comment.php']
|
||||
],
|
||||
phpLineComment: [
|
||||
[/\?>/, { token: '@rematch', next: '@pop' }],
|
||||
[/.$/, 'comment.php', '@pop'],
|
||||
[/[^?]+$/, 'comment.php', '@pop'],
|
||||
[/[^?]+/, 'comment.php'],
|
||||
[/./, 'comment.php']
|
||||
],
|
||||
phpDoubleQuoteString: [
|
||||
[/[^\\"]+/, 'string.php'],
|
||||
[/@escapes/, 'string.escape.php'],
|
||||
[/\\./, 'string.escape.invalid.php'],
|
||||
[/"/, 'string.php', '@pop']
|
||||
],
|
||||
phpSingleQuoteString: [
|
||||
[/[^\\']+/, 'string.php'],
|
||||
[/@escapes/, 'string.escape.php'],
|
||||
[/\\./, 'string.escape.invalid.php'],
|
||||
[/'/, 'string.php', '@pop']
|
||||
],
|
||||
},
|
||||
phpKeywords: [
|
||||
'abstract', 'and', 'array', 'as', 'break',
|
||||
'callable', 'case', 'catch', 'cfunction', 'class', 'clone',
|
||||
'const', 'continue', 'declare', 'default', 'do',
|
||||
'else', 'elseif', 'enddeclare', 'endfor', 'endforeach',
|
||||
'endif', 'endswitch', 'endwhile', 'extends', 'false', 'final',
|
||||
'for', 'foreach', 'function', 'global', 'goto',
|
||||
'if', 'implements', 'interface', 'instanceof', 'insteadof',
|
||||
'namespace', 'new', 'null', 'object', 'old_function', 'or', 'private',
|
||||
'protected', 'public', 'resource', 'static', 'switch', 'throw', 'trait',
|
||||
'try', 'true', 'use', 'var', 'while', 'xor',
|
||||
'die', 'echo', 'empty', 'exit', 'eval',
|
||||
'include', 'include_once', 'isset', 'list', 'require',
|
||||
'require_once', 'return', 'print', 'unset', 'yield',
|
||||
'__construct'
|
||||
],
|
||||
phpCompileTimeConstants: [
|
||||
'__CLASS__',
|
||||
'__DIR__',
|
||||
'__FILE__',
|
||||
'__LINE__',
|
||||
'__NAMESPACE__',
|
||||
'__METHOD__',
|
||||
'__FUNCTION__',
|
||||
'__TRAIT__'
|
||||
],
|
||||
phpPreDefinedVariables: [
|
||||
'$GLOBALS',
|
||||
'$_SERVER',
|
||||
'$_GET',
|
||||
'$_POST',
|
||||
'$_FILES',
|
||||
'$_REQUEST',
|
||||
'$_SESSION',
|
||||
'$_ENV',
|
||||
'$_COOKIE',
|
||||
'$php_errormsg',
|
||||
'$HTTP_RAW_POST_DATA',
|
||||
'$http_response_header',
|
||||
'$argc',
|
||||
'$argv'
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
1224
56.71f7538d.async.js
1224
56.71f7538d.async.js
File diff suppressed because it is too large
Load Diff
1812
57.ac4386ae.async.js
1812
57.ac4386ae.async.js
File diff suppressed because it is too large
Load Diff
|
|
@ -13,177 +13,177 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `$-`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['<#', '#>'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.ps1',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
keywords: [
|
||||
'begin', 'break', 'catch', 'class', 'continue', 'data',
|
||||
'define', 'do', 'dynamicparam', 'else', 'elseif', 'end',
|
||||
'exit', 'filter', 'finally', 'for', 'foreach', 'from',
|
||||
'function', 'if', 'in', 'param', 'process', 'return',
|
||||
'switch', 'throw', 'trap', 'try', 'until', 'using',
|
||||
'var', 'while', 'workflow', 'parallel', 'sequence', 'inlinescript', 'configuration'
|
||||
],
|
||||
helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&%|+\-*\/\^;\.,]+/,
|
||||
escapes: /`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// commands and keywords
|
||||
[/[a-zA-Z_][\w-]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// labels
|
||||
[/^:\w*/, 'metatag'],
|
||||
// variables
|
||||
[/\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/, 'variable'],
|
||||
// Comments
|
||||
[/<#/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
// delimiters
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/\@"/, 'string', '@herestring."'],
|
||||
[/\@'/, 'string', '@herestring.\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\$`]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape', next: '@popall' },
|
||||
'@default': 'string.escape'
|
||||
}
|
||||
}],
|
||||
[/`./, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape.invalid', next: '@popall' },
|
||||
'@default': 'string.escape.invalid'
|
||||
}
|
||||
}],
|
||||
[/\$[\w]+$/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'variable', next: '@popall' },
|
||||
'@default': { token: 'string', next: '@popall' }
|
||||
}
|
||||
}],
|
||||
[/\$[\w]+/, {
|
||||
cases: {
|
||||
'$S2=="': 'variable',
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
}],
|
||||
],
|
||||
herestring: [
|
||||
[/^\s*(["'])@/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^\$`]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/`./, 'string.escape.invalid'],
|
||||
[/\$[\w]+/, {
|
||||
cases: {
|
||||
'$S2=="': 'variable',
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
],
|
||||
comment: [
|
||||
[/[^#\.]+/, 'comment'],
|
||||
[/#>/, 'comment', '@pop'],
|
||||
[/(\.)(@helpKeywords)(?!\w)/, { token: 'comment.keyword.$2' }],
|
||||
[/[\.#]/, 'comment']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
// the default separators except `$-`
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['<#', '#>'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.ps1',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
keywords: [
|
||||
'begin', 'break', 'catch', 'class', 'continue', 'data',
|
||||
'define', 'do', 'dynamicparam', 'else', 'elseif', 'end',
|
||||
'exit', 'filter', 'finally', 'for', 'foreach', 'from',
|
||||
'function', 'if', 'in', 'param', 'process', 'return',
|
||||
'switch', 'throw', 'trap', 'try', 'until', 'using',
|
||||
'var', 'while', 'workflow', 'parallel', 'sequence', 'inlinescript', 'configuration'
|
||||
],
|
||||
helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&%|+\-*\/\^;\.,]+/,
|
||||
escapes: /`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// commands and keywords
|
||||
[/[a-zA-Z_][\w-]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/, ''],
|
||||
// labels
|
||||
[/^:\w*/, 'metatag'],
|
||||
// variables
|
||||
[/\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/, 'variable'],
|
||||
// Comments
|
||||
[/<#/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
// delimiters
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings:
|
||||
[/\@"/, 'string', '@herestring."'],
|
||||
[/\@'/, 'string', '@herestring.\''],
|
||||
[/"/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string."' }
|
||||
}
|
||||
}],
|
||||
[/'/, {
|
||||
cases: {
|
||||
'@eos': 'string',
|
||||
'@default': { token: 'string', next: '@string.\'' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
string: [
|
||||
[/[^"'\$`]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape', next: '@popall' },
|
||||
'@default': 'string.escape'
|
||||
}
|
||||
}],
|
||||
[/`./, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape.invalid', next: '@popall' },
|
||||
'@default': 'string.escape.invalid'
|
||||
}
|
||||
}],
|
||||
[/\$[\w]+$/, {
|
||||
cases: {
|
||||
'$S2=="': { token: 'variable', next: '@popall' },
|
||||
'@default': { token: 'string', next: '@popall' }
|
||||
}
|
||||
}],
|
||||
[/\$[\w]+/, {
|
||||
cases: {
|
||||
'$S2=="': 'variable',
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
}],
|
||||
],
|
||||
herestring: [
|
||||
[/^\s*(["'])@/, {
|
||||
cases: {
|
||||
'$1==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/[^\$`]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/`./, 'string.escape.invalid'],
|
||||
[/\$[\w]+/, {
|
||||
cases: {
|
||||
'$S2=="': 'variable',
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
],
|
||||
comment: [
|
||||
[/[^#\.]+/, 'comment'],
|
||||
[/#>/, 'comment', '@pop'],
|
||||
[/(\.)(@helpKeywords)(?!\w)/, { token: 'comment.keyword.$2' }],
|
||||
[/[\.#]/, 'comment']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,233 +13,233 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pug',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
keywords: ['append', 'block', 'case', 'default', 'doctype', 'each', 'else', 'extends',
|
||||
'for', 'if', 'in', 'include', 'mixin', 'typeof', 'unless', 'var', 'when'],
|
||||
tags: [
|
||||
'a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio',
|
||||
'b', 'base', 'basefont', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button',
|
||||
'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command',
|
||||
'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt',
|
||||
'em', 'embed',
|
||||
'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset',
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html',
|
||||
'i', 'iframe', 'img', 'input', 'ins',
|
||||
'keygen', 'kbd',
|
||||
'label', 'li', 'link',
|
||||
'map', 'mark', 'menu', 'meta', 'meter',
|
||||
'nav', 'noframes', 'noscript',
|
||||
'object', 'ol', 'optgroup', 'option', 'output',
|
||||
'p', 'param', 'pre', 'progress',
|
||||
'q',
|
||||
'rp', 'rt', 'ruby',
|
||||
's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup',
|
||||
'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'tracks', 'tt',
|
||||
'u', 'ul',
|
||||
'video',
|
||||
'wbr'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[\+\-\*\%\&\|\!\=\/\.\,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
// Tag or a keyword at start
|
||||
[/^(\s*)([a-zA-Z_-][\w-]*)/,
|
||||
{
|
||||
cases: {
|
||||
'$2@tags': {
|
||||
cases: {
|
||||
'@eos': ['', 'tag'],
|
||||
'@default': ['', { token: 'tag', next: '@tag.$1' },]
|
||||
}
|
||||
},
|
||||
'$2@keywords': ['', { token: 'keyword.$2' },],
|
||||
'@default': ['', '',]
|
||||
}
|
||||
}
|
||||
],
|
||||
// id
|
||||
[/^(\s*)(#[a-zA-Z_-][\w-]*)/, {
|
||||
cases: {
|
||||
'@eos': ['', 'tag.id'],
|
||||
'@default': ['', { token: 'tag.id', next: '@tag.$1' }]
|
||||
}
|
||||
}],
|
||||
// class
|
||||
[/^(\s*)(\.[a-zA-Z_-][\w-]*)/, {
|
||||
cases: {
|
||||
'@eos': ['', 'tag.class'],
|
||||
'@default': ['', { token: 'tag.class', next: '@tag.$1' }]
|
||||
}
|
||||
}],
|
||||
// plain text with pipe
|
||||
[/^(\s*)(\|.*)$/, ''],
|
||||
{ include: '@whitespace' },
|
||||
// keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+/, 'number'],
|
||||
// strings:
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
tag: [
|
||||
[/(\.)(\s*$)/, [{ token: 'delimiter', next: '@blockText.$S2.' }, '']],
|
||||
[/\s+/, { token: '', next: '@simpleText' }],
|
||||
// id
|
||||
[/#[a-zA-Z_-][\w-]*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'tag.id', next: '@pop' },
|
||||
'@default': 'tag.id'
|
||||
}
|
||||
}],
|
||||
// class
|
||||
[/\.[a-zA-Z_-][\w-]*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'tag.class', next: '@pop' },
|
||||
'@default': 'tag.class'
|
||||
}
|
||||
}],
|
||||
// attributes
|
||||
[/\(/, { token: 'delimiter.parenthesis', next: '@attributeList' }],
|
||||
],
|
||||
simpleText: [
|
||||
[/[^#]+$/, { token: '', next: '@popall' }],
|
||||
[/[^#]+/, { token: '' }],
|
||||
// interpolation
|
||||
[/(#{)([^}]*)(})/, {
|
||||
cases: {
|
||||
'@eos': ['interpolation.delimiter', 'interpolation', { token: 'interpolation.delimiter', next: '@popall' }],
|
||||
'@default': ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']
|
||||
}
|
||||
}],
|
||||
[/#$/, { token: '', next: '@popall' }],
|
||||
[/#/, '']
|
||||
],
|
||||
attributeList: [
|
||||
[/\s+/, ''],
|
||||
[/(\w+)(\s*=\s*)("|')/, ['attribute.name', 'delimiter', { token: 'attribute.value', next: '@value.$3' }]],
|
||||
[/\w+/, 'attribute.name'],
|
||||
[/,/, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.delimiter', next: '@popall' },
|
||||
'@default': 'attribute.delimiter'
|
||||
}
|
||||
}],
|
||||
[/\)$/, { token: 'delimiter.parenthesis', next: '@popall' }],
|
||||
[/\)/, { token: 'delimiter.parenthesis', next: '@pop' }],
|
||||
],
|
||||
whitespace: [
|
||||
[/^(\s*)(\/\/.*)$/, { token: 'comment', next: '@blockText.$1.comment' }],
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/<!--/, { token: 'comment', next: '@comment' }],
|
||||
],
|
||||
blockText: [
|
||||
[/^\s+.*$/, {
|
||||
cases: {
|
||||
'($S2\\s+.*$)': { token: '$S3' },
|
||||
'@default': { token: '@rematch', next: '@popall' }
|
||||
}
|
||||
}],
|
||||
[/./, { token: '@rematch', next: '@popall' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, { token: 'comment', next: '@pop' }],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"'#]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape', next: '@popall' },
|
||||
'@default': 'string.escape'
|
||||
}
|
||||
}],
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape.invalid', next: '@popall' },
|
||||
'@default': 'string.escape.invalid'
|
||||
}
|
||||
}],
|
||||
// interpolation
|
||||
[/(#{)([^}]*)(})/, ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']],
|
||||
[/#/, 'string'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': { token: 'string' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
// Almost identical to above, except for escapes and the output token
|
||||
value: [
|
||||
[/[^\\"']+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.value', next: '@popall' },
|
||||
'@default': 'attribute.value'
|
||||
}
|
||||
}],
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.value', next: '@popall' },
|
||||
'@default': 'attribute.value'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'attribute.value', next: '@pop' },
|
||||
'@default': { token: 'attribute.value' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.pug',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' }
|
||||
],
|
||||
keywords: ['append', 'block', 'case', 'default', 'doctype', 'each', 'else', 'extends',
|
||||
'for', 'if', 'in', 'include', 'mixin', 'typeof', 'unless', 'var', 'when'],
|
||||
tags: [
|
||||
'a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio',
|
||||
'b', 'base', 'basefont', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button',
|
||||
'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command',
|
||||
'datalist', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt',
|
||||
'em', 'embed',
|
||||
'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset',
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html',
|
||||
'i', 'iframe', 'img', 'input', 'ins',
|
||||
'keygen', 'kbd',
|
||||
'label', 'li', 'link',
|
||||
'map', 'mark', 'menu', 'meta', 'meter',
|
||||
'nav', 'noframes', 'noscript',
|
||||
'object', 'ol', 'optgroup', 'option', 'output',
|
||||
'p', 'param', 'pre', 'progress',
|
||||
'q',
|
||||
'rp', 'rt', 'ruby',
|
||||
's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup',
|
||||
'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'tracks', 'tt',
|
||||
'u', 'ul',
|
||||
'video',
|
||||
'wbr'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[\+\-\*\%\&\|\!\=\/\.\,\:]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
// Tag or a keyword at start
|
||||
[/^(\s*)([a-zA-Z_-][\w-]*)/,
|
||||
{
|
||||
cases: {
|
||||
'$2@tags': {
|
||||
cases: {
|
||||
'@eos': ['', 'tag'],
|
||||
'@default': ['', { token: 'tag', next: '@tag.$1' },]
|
||||
}
|
||||
},
|
||||
'$2@keywords': ['', { token: 'keyword.$2' },],
|
||||
'@default': ['', '',]
|
||||
}
|
||||
}
|
||||
],
|
||||
// id
|
||||
[/^(\s*)(#[a-zA-Z_-][\w-]*)/, {
|
||||
cases: {
|
||||
'@eos': ['', 'tag.id'],
|
||||
'@default': ['', { token: 'tag.id', next: '@tag.$1' }]
|
||||
}
|
||||
}],
|
||||
// class
|
||||
[/^(\s*)(\.[a-zA-Z_-][\w-]*)/, {
|
||||
cases: {
|
||||
'@eos': ['', 'tag.class'],
|
||||
'@default': ['', { token: 'tag.class', next: '@tag.$1' }]
|
||||
}
|
||||
}],
|
||||
// plain text with pipe
|
||||
[/^(\s*)(\|.*)$/, ''],
|
||||
{ include: '@whitespace' },
|
||||
// keywords
|
||||
[/[a-zA-Z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// numbers
|
||||
[/\d+\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/\d+/, 'number'],
|
||||
// strings:
|
||||
[/"/, 'string', '@string."'],
|
||||
[/'/, 'string', '@string.\''],
|
||||
],
|
||||
tag: [
|
||||
[/(\.)(\s*$)/, [{ token: 'delimiter', next: '@blockText.$S2.' }, '']],
|
||||
[/\s+/, { token: '', next: '@simpleText' }],
|
||||
// id
|
||||
[/#[a-zA-Z_-][\w-]*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'tag.id', next: '@pop' },
|
||||
'@default': 'tag.id'
|
||||
}
|
||||
}],
|
||||
// class
|
||||
[/\.[a-zA-Z_-][\w-]*/, {
|
||||
cases: {
|
||||
'@eos': { token: 'tag.class', next: '@pop' },
|
||||
'@default': 'tag.class'
|
||||
}
|
||||
}],
|
||||
// attributes
|
||||
[/\(/, { token: 'delimiter.parenthesis', next: '@attributeList' }],
|
||||
],
|
||||
simpleText: [
|
||||
[/[^#]+$/, { token: '', next: '@popall' }],
|
||||
[/[^#]+/, { token: '' }],
|
||||
// interpolation
|
||||
[/(#{)([^}]*)(})/, {
|
||||
cases: {
|
||||
'@eos': ['interpolation.delimiter', 'interpolation', { token: 'interpolation.delimiter', next: '@popall' }],
|
||||
'@default': ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']
|
||||
}
|
||||
}],
|
||||
[/#$/, { token: '', next: '@popall' }],
|
||||
[/#/, '']
|
||||
],
|
||||
attributeList: [
|
||||
[/\s+/, ''],
|
||||
[/(\w+)(\s*=\s*)("|')/, ['attribute.name', 'delimiter', { token: 'attribute.value', next: '@value.$3' }]],
|
||||
[/\w+/, 'attribute.name'],
|
||||
[/,/, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.delimiter', next: '@popall' },
|
||||
'@default': 'attribute.delimiter'
|
||||
}
|
||||
}],
|
||||
[/\)$/, { token: 'delimiter.parenthesis', next: '@popall' }],
|
||||
[/\)/, { token: 'delimiter.parenthesis', next: '@pop' }],
|
||||
],
|
||||
whitespace: [
|
||||
[/^(\s*)(\/\/.*)$/, { token: 'comment', next: '@blockText.$1.comment' }],
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/<!--/, { token: 'comment', next: '@comment' }],
|
||||
],
|
||||
blockText: [
|
||||
[/^\s+.*$/, {
|
||||
cases: {
|
||||
'($S2\\s+.*$)': { token: '$S3' },
|
||||
'@default': { token: '@rematch', next: '@popall' }
|
||||
}
|
||||
}],
|
||||
[/./, { token: '@rematch', next: '@popall' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, { token: 'comment', next: '@pop' }],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"'#]+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string', next: '@popall' },
|
||||
'@default': 'string'
|
||||
}
|
||||
}],
|
||||
[/@escapes/, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape', next: '@popall' },
|
||||
'@default': 'string.escape'
|
||||
}
|
||||
}],
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@eos': { token: 'string.escape.invalid', next: '@popall' },
|
||||
'@default': 'string.escape.invalid'
|
||||
}
|
||||
}],
|
||||
// interpolation
|
||||
[/(#{)([^}]*)(})/, ['interpolation.delimiter', 'interpolation', 'interpolation.delimiter']],
|
||||
[/#/, 'string'],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'string', next: '@pop' },
|
||||
'@default': { token: 'string' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
// Almost identical to above, except for escapes and the output token
|
||||
value: [
|
||||
[/[^\\"']+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.value', next: '@popall' },
|
||||
'@default': 'attribute.value'
|
||||
}
|
||||
}],
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@eos': { token: 'attribute.value', next: '@popall' },
|
||||
'@default': 'attribute.value'
|
||||
}
|
||||
}],
|
||||
[/["']/, {
|
||||
cases: {
|
||||
'$#==$S2': { token: 'attribute.value', next: '@pop' },
|
||||
'@default': { token: 'attribute.value' }
|
||||
}
|
||||
}],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,249 +13,249 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['\'\'\'', '\'\'\''],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
folding: {
|
||||
offSide: true,
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.python',
|
||||
keywords: [
|
||||
'and',
|
||||
'as',
|
||||
'assert',
|
||||
'break',
|
||||
'class',
|
||||
'continue',
|
||||
'def',
|
||||
'del',
|
||||
'elif',
|
||||
'else',
|
||||
'except',
|
||||
'exec',
|
||||
'finally',
|
||||
'for',
|
||||
'from',
|
||||
'global',
|
||||
'if',
|
||||
'import',
|
||||
'in',
|
||||
'is',
|
||||
'lambda',
|
||||
'None',
|
||||
'not',
|
||||
'or',
|
||||
'pass',
|
||||
'print',
|
||||
'raise',
|
||||
'return',
|
||||
'self',
|
||||
'try',
|
||||
'while',
|
||||
'with',
|
||||
'yield',
|
||||
'int',
|
||||
'float',
|
||||
'long',
|
||||
'complex',
|
||||
'hex',
|
||||
'abs',
|
||||
'all',
|
||||
'any',
|
||||
'apply',
|
||||
'basestring',
|
||||
'bin',
|
||||
'bool',
|
||||
'buffer',
|
||||
'bytearray',
|
||||
'callable',
|
||||
'chr',
|
||||
'classmethod',
|
||||
'cmp',
|
||||
'coerce',
|
||||
'compile',
|
||||
'complex',
|
||||
'delattr',
|
||||
'dict',
|
||||
'dir',
|
||||
'divmod',
|
||||
'enumerate',
|
||||
'eval',
|
||||
'execfile',
|
||||
'file',
|
||||
'filter',
|
||||
'format',
|
||||
'frozenset',
|
||||
'getattr',
|
||||
'globals',
|
||||
'hasattr',
|
||||
'hash',
|
||||
'help',
|
||||
'id',
|
||||
'input',
|
||||
'intern',
|
||||
'isinstance',
|
||||
'issubclass',
|
||||
'iter',
|
||||
'len',
|
||||
'locals',
|
||||
'list',
|
||||
'map',
|
||||
'max',
|
||||
'memoryview',
|
||||
'min',
|
||||
'next',
|
||||
'object',
|
||||
'oct',
|
||||
'open',
|
||||
'ord',
|
||||
'pow',
|
||||
'print',
|
||||
'property',
|
||||
'reversed',
|
||||
'range',
|
||||
'raw_input',
|
||||
'reduce',
|
||||
'reload',
|
||||
'repr',
|
||||
'reversed',
|
||||
'round',
|
||||
'set',
|
||||
'setattr',
|
||||
'slice',
|
||||
'sorted',
|
||||
'staticmethod',
|
||||
'str',
|
||||
'sum',
|
||||
'super',
|
||||
'tuple',
|
||||
'type',
|
||||
'unichr',
|
||||
'unicode',
|
||||
'vars',
|
||||
'xrange',
|
||||
'zip',
|
||||
'True',
|
||||
'False',
|
||||
'__dict__',
|
||||
'__methods__',
|
||||
'__members__',
|
||||
'__class__',
|
||||
'__bases__',
|
||||
'__name__',
|
||||
'__mro__',
|
||||
'__subclasses__',
|
||||
'__init__',
|
||||
'__import__'
|
||||
],
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
[/@[a-zA-Z]\w*/, 'tag'],
|
||||
[/[a-zA-Z]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Deal with white space, including single and multi-line comments
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
[/'''/, 'string', '@endDocString'],
|
||||
[/"""/, 'string', '@endDblDocString']
|
||||
],
|
||||
endDocString: [
|
||||
[/[^']+/, 'string'],
|
||||
[/\\'/, 'string'],
|
||||
[/'''/, 'string', '@popall'],
|
||||
[/'/, 'string']
|
||||
],
|
||||
endDblDocString: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/\\"/, 'string'],
|
||||
[/"""/, 'string', '@popall'],
|
||||
[/"/, 'string']
|
||||
],
|
||||
// Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
|
||||
numbers: [
|
||||
[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, 'number.hex'],
|
||||
[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, 'number']
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string.escape', '@popall'],
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"$/, 'string.escape', '@popall'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\']+$/, 'string', '@popall'],
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['\'\'\'', '\'\'\''],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
folding: {
|
||||
offSide: true,
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#region\\b"),
|
||||
end: new RegExp("^\\s*#endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.python',
|
||||
keywords: [
|
||||
'and',
|
||||
'as',
|
||||
'assert',
|
||||
'break',
|
||||
'class',
|
||||
'continue',
|
||||
'def',
|
||||
'del',
|
||||
'elif',
|
||||
'else',
|
||||
'except',
|
||||
'exec',
|
||||
'finally',
|
||||
'for',
|
||||
'from',
|
||||
'global',
|
||||
'if',
|
||||
'import',
|
||||
'in',
|
||||
'is',
|
||||
'lambda',
|
||||
'None',
|
||||
'not',
|
||||
'or',
|
||||
'pass',
|
||||
'print',
|
||||
'raise',
|
||||
'return',
|
||||
'self',
|
||||
'try',
|
||||
'while',
|
||||
'with',
|
||||
'yield',
|
||||
'int',
|
||||
'float',
|
||||
'long',
|
||||
'complex',
|
||||
'hex',
|
||||
'abs',
|
||||
'all',
|
||||
'any',
|
||||
'apply',
|
||||
'basestring',
|
||||
'bin',
|
||||
'bool',
|
||||
'buffer',
|
||||
'bytearray',
|
||||
'callable',
|
||||
'chr',
|
||||
'classmethod',
|
||||
'cmp',
|
||||
'coerce',
|
||||
'compile',
|
||||
'complex',
|
||||
'delattr',
|
||||
'dict',
|
||||
'dir',
|
||||
'divmod',
|
||||
'enumerate',
|
||||
'eval',
|
||||
'execfile',
|
||||
'file',
|
||||
'filter',
|
||||
'format',
|
||||
'frozenset',
|
||||
'getattr',
|
||||
'globals',
|
||||
'hasattr',
|
||||
'hash',
|
||||
'help',
|
||||
'id',
|
||||
'input',
|
||||
'intern',
|
||||
'isinstance',
|
||||
'issubclass',
|
||||
'iter',
|
||||
'len',
|
||||
'locals',
|
||||
'list',
|
||||
'map',
|
||||
'max',
|
||||
'memoryview',
|
||||
'min',
|
||||
'next',
|
||||
'object',
|
||||
'oct',
|
||||
'open',
|
||||
'ord',
|
||||
'pow',
|
||||
'print',
|
||||
'property',
|
||||
'reversed',
|
||||
'range',
|
||||
'raw_input',
|
||||
'reduce',
|
||||
'reload',
|
||||
'repr',
|
||||
'reversed',
|
||||
'round',
|
||||
'set',
|
||||
'setattr',
|
||||
'slice',
|
||||
'sorted',
|
||||
'staticmethod',
|
||||
'str',
|
||||
'sum',
|
||||
'super',
|
||||
'tuple',
|
||||
'type',
|
||||
'unichr',
|
||||
'unicode',
|
||||
'vars',
|
||||
'xrange',
|
||||
'zip',
|
||||
'True',
|
||||
'False',
|
||||
'__dict__',
|
||||
'__methods__',
|
||||
'__members__',
|
||||
'__class__',
|
||||
'__bases__',
|
||||
'__name__',
|
||||
'__mro__',
|
||||
'__subclasses__',
|
||||
'__init__',
|
||||
'__import__'
|
||||
],
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
[/@[a-zA-Z]\w*/, 'tag'],
|
||||
[/[a-zA-Z]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Deal with white space, including single and multi-line comments
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
[/'''/, 'string', '@endDocString'],
|
||||
[/"""/, 'string', '@endDblDocString']
|
||||
],
|
||||
endDocString: [
|
||||
[/[^']+/, 'string'],
|
||||
[/\\'/, 'string'],
|
||||
[/'''/, 'string', '@popall'],
|
||||
[/'/, 'string']
|
||||
],
|
||||
endDblDocString: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/\\"/, 'string'],
|
||||
[/"""/, 'string', '@popall'],
|
||||
[/"/, 'string']
|
||||
],
|
||||
// Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation
|
||||
numbers: [
|
||||
[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/, 'number.hex'],
|
||||
[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/, 'number']
|
||||
],
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/'$/, 'string.escape', '@popall'],
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"$/, 'string.escape', '@popall'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/[^\\']+$/, 'string', '@popall'],
|
||||
[/[^\\']+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
dblStringBody: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string'],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,224 +13,224 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.r',
|
||||
roxygen: [
|
||||
'@param',
|
||||
'@return',
|
||||
'@name',
|
||||
'@rdname',
|
||||
'@examples',
|
||||
'@include',
|
||||
'@docType',
|
||||
'@S3method',
|
||||
'@TODO',
|
||||
'@aliases',
|
||||
'@alias',
|
||||
'@assignee',
|
||||
'@author',
|
||||
'@callGraphDepth',
|
||||
'@callGraph',
|
||||
'@callGraphPrimitives',
|
||||
'@concept',
|
||||
'@exportClass',
|
||||
'@exportMethod',
|
||||
'@exportPattern',
|
||||
'@export',
|
||||
'@formals',
|
||||
'@format',
|
||||
'@importClassesFrom',
|
||||
'@importFrom',
|
||||
'@importMethodsFrom',
|
||||
'@import',
|
||||
'@keywords',
|
||||
'@method',
|
||||
'@nord',
|
||||
'@note',
|
||||
'@references',
|
||||
'@seealso',
|
||||
'@setClass',
|
||||
'@slot',
|
||||
'@source',
|
||||
'@title',
|
||||
'@usage'
|
||||
],
|
||||
constants: [
|
||||
'NULL',
|
||||
'FALSE',
|
||||
'TRUE',
|
||||
'NA',
|
||||
'Inf',
|
||||
'NaN ',
|
||||
'NA_integer_',
|
||||
'NA_real_',
|
||||
'NA_complex_',
|
||||
'NA_character_ ',
|
||||
'T',
|
||||
'F',
|
||||
'LETTERS',
|
||||
'letters',
|
||||
'month.abb',
|
||||
'month.name',
|
||||
'pi',
|
||||
'R.version.string'
|
||||
],
|
||||
keywords: [
|
||||
'break',
|
||||
'next',
|
||||
'return',
|
||||
'if',
|
||||
'else',
|
||||
'for',
|
||||
'in',
|
||||
'repeat',
|
||||
'while',
|
||||
'array',
|
||||
'category',
|
||||
'character',
|
||||
'complex',
|
||||
'double',
|
||||
'function',
|
||||
'integer',
|
||||
'list',
|
||||
'logical',
|
||||
'matrix',
|
||||
'numeric',
|
||||
'vector',
|
||||
'data.frame',
|
||||
'factor',
|
||||
'library',
|
||||
'require',
|
||||
'attach',
|
||||
'detach',
|
||||
'source'
|
||||
],
|
||||
special: [
|
||||
'\\n',
|
||||
'\\r',
|
||||
'\\t',
|
||||
'\\b',
|
||||
'\\a',
|
||||
'\\f',
|
||||
'\\v',
|
||||
'\\\'',
|
||||
'\\"',
|
||||
'\\\\'
|
||||
],
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
{ include: '@operators' },
|
||||
[/#'/, 'comment.doc', '@roxygen'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
[/\s+/, 'white'],
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/@[a-zA-Z]\w*/, 'tag'],
|
||||
[/[a-zA-Z]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@constants': 'constant',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Recognize Roxygen comments
|
||||
roxygen: [
|
||||
[/@\w+/, {
|
||||
cases: {
|
||||
'@roxygen': 'tag',
|
||||
'@eos': { token: 'comment.doc', next: '@pop' },
|
||||
'@default': 'comment.doc'
|
||||
}
|
||||
}],
|
||||
[/\s+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'comment.doc', next: '@pop' },
|
||||
'@default': 'comment.doc'
|
||||
}
|
||||
}],
|
||||
[/.*/, { token: 'comment.doc', next: '@pop' }]
|
||||
],
|
||||
// Recognize positives, negatives, decimals, imaginaries, and scientific notation
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/, 'number']
|
||||
],
|
||||
// Recognize operators
|
||||
operators: [
|
||||
[/<{1,2}-/, 'operator'],
|
||||
[/->{1,2}/, 'operator'],
|
||||
[/%[^%\s]+%/, 'operator'],
|
||||
[/\*\*/, 'operator'],
|
||||
[/%%/, 'operator'],
|
||||
[/&&/, 'operator'],
|
||||
[/\|\|/, 'operator'],
|
||||
[/<</, 'operator'],
|
||||
[/>>/, 'operator'],
|
||||
[/[-+=&|!<>^~*/:$]/, 'operator']
|
||||
],
|
||||
// Recognize strings, including those broken across lines
|
||||
strings: [
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@special': 'string',
|
||||
'@default': 'error-token'
|
||||
}
|
||||
}],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
dblStringBody: [
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@special': 'string',
|
||||
'@default': 'error-token'
|
||||
}
|
||||
}],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/./, 'string'],
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.r',
|
||||
roxygen: [
|
||||
'@param',
|
||||
'@return',
|
||||
'@name',
|
||||
'@rdname',
|
||||
'@examples',
|
||||
'@include',
|
||||
'@docType',
|
||||
'@S3method',
|
||||
'@TODO',
|
||||
'@aliases',
|
||||
'@alias',
|
||||
'@assignee',
|
||||
'@author',
|
||||
'@callGraphDepth',
|
||||
'@callGraph',
|
||||
'@callGraphPrimitives',
|
||||
'@concept',
|
||||
'@exportClass',
|
||||
'@exportMethod',
|
||||
'@exportPattern',
|
||||
'@export',
|
||||
'@formals',
|
||||
'@format',
|
||||
'@importClassesFrom',
|
||||
'@importFrom',
|
||||
'@importMethodsFrom',
|
||||
'@import',
|
||||
'@keywords',
|
||||
'@method',
|
||||
'@nord',
|
||||
'@note',
|
||||
'@references',
|
||||
'@seealso',
|
||||
'@setClass',
|
||||
'@slot',
|
||||
'@source',
|
||||
'@title',
|
||||
'@usage'
|
||||
],
|
||||
constants: [
|
||||
'NULL',
|
||||
'FALSE',
|
||||
'TRUE',
|
||||
'NA',
|
||||
'Inf',
|
||||
'NaN ',
|
||||
'NA_integer_',
|
||||
'NA_real_',
|
||||
'NA_complex_',
|
||||
'NA_character_ ',
|
||||
'T',
|
||||
'F',
|
||||
'LETTERS',
|
||||
'letters',
|
||||
'month.abb',
|
||||
'month.name',
|
||||
'pi',
|
||||
'R.version.string'
|
||||
],
|
||||
keywords: [
|
||||
'break',
|
||||
'next',
|
||||
'return',
|
||||
'if',
|
||||
'else',
|
||||
'for',
|
||||
'in',
|
||||
'repeat',
|
||||
'while',
|
||||
'array',
|
||||
'category',
|
||||
'character',
|
||||
'complex',
|
||||
'double',
|
||||
'function',
|
||||
'integer',
|
||||
'list',
|
||||
'logical',
|
||||
'matrix',
|
||||
'numeric',
|
||||
'vector',
|
||||
'data.frame',
|
||||
'factor',
|
||||
'library',
|
||||
'require',
|
||||
'attach',
|
||||
'detach',
|
||||
'source'
|
||||
],
|
||||
special: [
|
||||
'\\n',
|
||||
'\\r',
|
||||
'\\t',
|
||||
'\\b',
|
||||
'\\a',
|
||||
'\\f',
|
||||
'\\v',
|
||||
'\\\'',
|
||||
'\\"',
|
||||
'\\\\'
|
||||
],
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
{ include: '@operators' },
|
||||
[/#'/, 'comment.doc', '@roxygen'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
[/\s+/, 'white'],
|
||||
[/[,:;]/, 'delimiter'],
|
||||
[/@[a-zA-Z]\w*/, 'tag'],
|
||||
[/[a-zA-Z]\w*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@constants': 'constant',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Recognize Roxygen comments
|
||||
roxygen: [
|
||||
[/@\w+/, {
|
||||
cases: {
|
||||
'@roxygen': 'tag',
|
||||
'@eos': { token: 'comment.doc', next: '@pop' },
|
||||
'@default': 'comment.doc'
|
||||
}
|
||||
}],
|
||||
[/\s+/, {
|
||||
cases: {
|
||||
'@eos': { token: 'comment.doc', next: '@pop' },
|
||||
'@default': 'comment.doc'
|
||||
}
|
||||
}],
|
||||
[/.*/, { token: 'comment.doc', next: '@pop' }]
|
||||
],
|
||||
// Recognize positives, negatives, decimals, imaginaries, and scientific notation
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/, 'number']
|
||||
],
|
||||
// Recognize operators
|
||||
operators: [
|
||||
[/<{1,2}-/, 'operator'],
|
||||
[/->{1,2}/, 'operator'],
|
||||
[/%[^%\s]+%/, 'operator'],
|
||||
[/\*\*/, 'operator'],
|
||||
[/%%/, 'operator'],
|
||||
[/&&/, 'operator'],
|
||||
[/\|\|/, 'operator'],
|
||||
[/<</, 'operator'],
|
||||
[/>>/, 'operator'],
|
||||
[/[-+=&|!<>^~*/:$]/, 'operator']
|
||||
],
|
||||
// Recognize strings, including those broken across lines
|
||||
strings: [
|
||||
[/'/, 'string.escape', '@stringBody'],
|
||||
[/"/, 'string.escape', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@special': 'string',
|
||||
'@default': 'error-token'
|
||||
}
|
||||
}],
|
||||
[/'/, 'string.escape', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
dblStringBody: [
|
||||
[/\\./, {
|
||||
cases: {
|
||||
'@special': 'string',
|
||||
'@default': 'error-token'
|
||||
}
|
||||
}],
|
||||
[/"/, 'string.escape', '@popall'],
|
||||
[/./, 'string'],
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,278 +13,278 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' }
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/@@/],
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/[^<@]+/],
|
||||
],
|
||||
doctype: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
razorInSimpleState: [
|
||||
[/@\*/, 'comment.cs', '@razorBlockCommentTopLevel'],
|
||||
[/@[{(]/, 'metatag.cs', '@razorRootTopLevel'],
|
||||
[/(@)(\s*[\w]+)/, ['metatag.cs', { token: 'identifier.cs', switchTo: '@$S2.$S3' }]],
|
||||
[/[})]/, { token: 'metatag.cs', switchTo: '@$S2.$S3' }],
|
||||
[/\*@/, { token: 'comment.cs', switchTo: '@$S2.$S3' }],
|
||||
],
|
||||
razorInEmbeddedState: [
|
||||
[/@\*/, 'comment.cs', '@razorBlockCommentTopLevel'],
|
||||
[/@[{(]/, 'metatag.cs', '@razorRootTopLevel'],
|
||||
[/(@)(\s*[\w]+)/, ['metatag.cs', { token: 'identifier.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }]],
|
||||
[/[})]/, { token: 'metatag.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
[/\*@/, { token: 'comment.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
],
|
||||
razorBlockCommentTopLevel: [
|
||||
[/\*@/, '@rematch', '@pop'],
|
||||
[/[^*]+/, 'comment.cs'],
|
||||
[/./, 'comment.cs']
|
||||
],
|
||||
razorBlockComment: [
|
||||
[/\*@/, 'comment.cs', '@pop'],
|
||||
[/[^*]+/, 'comment.cs'],
|
||||
[/./, 'comment.cs']
|
||||
],
|
||||
razorRootTopLevel: [
|
||||
[/\{/, 'delimiter.bracket.cs', '@razorRoot'],
|
||||
[/\(/, 'delimiter.parenthesis.cs', '@razorRoot'],
|
||||
[/[})]/, '@rematch', '@pop'],
|
||||
{ include: 'razorCommon' }
|
||||
],
|
||||
razorRoot: [
|
||||
[/\{/, 'delimiter.bracket.cs', '@razorRoot'],
|
||||
[/\(/, 'delimiter.parenthesis.cs', '@razorRoot'],
|
||||
[/\}/, 'delimiter.bracket.cs', '@pop'],
|
||||
[/\)/, 'delimiter.parenthesis.cs', '@pop'],
|
||||
{ include: 'razorCommon' }
|
||||
],
|
||||
razorCommon: [
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@razorKeywords': { token: 'keyword.cs' },
|
||||
'@default': 'identifier.cs'
|
||||
}
|
||||
}],
|
||||
// brackets
|
||||
[/[\[\]]/, 'delimiter.array.cs'],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/],
|
||||
// comments
|
||||
[/\/\/.*$/, 'comment.cs'],
|
||||
[/@\*/, 'comment.cs', '@razorBlockComment'],
|
||||
// strings
|
||||
[/"([^"]*)"/, 'string.cs'],
|
||||
[/'([^']*)'/, 'string.cs'],
|
||||
// simple html
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<\/)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
// delimiters
|
||||
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/, 'delimiter.cs'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float.cs'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float.cs'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex.cs'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal.cs'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary.cs'],
|
||||
[/\d[\d']*/, 'number.cs'],
|
||||
[/\d/, 'number.cs'],
|
||||
]
|
||||
},
|
||||
razorKeywords: [
|
||||
'abstract', 'as', 'async', 'await', 'base', 'bool',
|
||||
'break', 'by', 'byte', 'case',
|
||||
'catch', 'char', 'checked', 'class',
|
||||
'const', 'continue', 'decimal', 'default',
|
||||
'delegate', 'do', 'double', 'descending',
|
||||
'explicit', 'event', 'extern', 'else',
|
||||
'enum', 'false', 'finally', 'fixed',
|
||||
'float', 'for', 'foreach', 'from',
|
||||
'goto', 'group', 'if', 'implicit',
|
||||
'in', 'int', 'interface', 'internal',
|
||||
'into', 'is', 'lock', 'long', 'nameof',
|
||||
'new', 'null', 'namespace', 'object',
|
||||
'operator', 'out', 'override', 'orderby',
|
||||
'params', 'private', 'protected', 'public',
|
||||
'readonly', 'ref', 'return', 'switch',
|
||||
'struct', 'sbyte', 'sealed', 'short',
|
||||
'sizeof', 'stackalloc', 'static', 'string',
|
||||
'select', 'this', 'throw', 'true',
|
||||
'try', 'typeof', 'uint', 'ulong',
|
||||
'unchecked', 'unsafe', 'ushort', 'using',
|
||||
'var', 'virtual', 'volatile', 'void', 'when',
|
||||
'while', 'where', 'yield',
|
||||
'model', 'inject' // Razor specific
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var EMPTY_ELEMENTS = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->']
|
||||
},
|
||||
brackets: [
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
['{', '}'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '<', close: '>' }
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
afterText: /^<\/(\w[\w\d]*)\s*>$/i,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent }
|
||||
},
|
||||
{
|
||||
beforeText: new RegExp("<(?!(?:" + EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'),
|
||||
action: { indentAction: _monaco.languages.IndentAction.Indent }
|
||||
}
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
// ignoreCase: true,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/@@/],
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/[^<@]+/],
|
||||
],
|
||||
doctype: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.comment' }],
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.comment' }],
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.otherTag' }],
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.script' }],
|
||||
[/type/, 'attribute.name', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptAfterType' }],
|
||||
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.scriptWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInEmbeddedState.scriptEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.style' }],
|
||||
[/type/, 'attribute.name', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleAfterType' }],
|
||||
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleAfterTypeEquals' }],
|
||||
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.styleWithCustomType.$S2' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value'],
|
||||
[/'([^']*)'/, 'attribute.value'],
|
||||
[/[\w\-]+/, 'attribute.name'],
|
||||
[/=/, 'delimiter'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInEmbeddedState.styleEmbedded.$S2', nextEmbedded: '@pop' }],
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }]
|
||||
],
|
||||
// -- END <style> tags handling
|
||||
razorInSimpleState: [
|
||||
[/@\*/, 'comment.cs', '@razorBlockCommentTopLevel'],
|
||||
[/@[{(]/, 'metatag.cs', '@razorRootTopLevel'],
|
||||
[/(@)(\s*[\w]+)/, ['metatag.cs', { token: 'identifier.cs', switchTo: '@$S2.$S3' }]],
|
||||
[/[})]/, { token: 'metatag.cs', switchTo: '@$S2.$S3' }],
|
||||
[/\*@/, { token: 'comment.cs', switchTo: '@$S2.$S3' }],
|
||||
],
|
||||
razorInEmbeddedState: [
|
||||
[/@\*/, 'comment.cs', '@razorBlockCommentTopLevel'],
|
||||
[/@[{(]/, 'metatag.cs', '@razorRootTopLevel'],
|
||||
[/(@)(\s*[\w]+)/, ['metatag.cs', { token: 'identifier.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }]],
|
||||
[/[})]/, { token: 'metatag.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
[/\*@/, { token: 'comment.cs', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
|
||||
],
|
||||
razorBlockCommentTopLevel: [
|
||||
[/\*@/, '@rematch', '@pop'],
|
||||
[/[^*]+/, 'comment.cs'],
|
||||
[/./, 'comment.cs']
|
||||
],
|
||||
razorBlockComment: [
|
||||
[/\*@/, 'comment.cs', '@pop'],
|
||||
[/[^*]+/, 'comment.cs'],
|
||||
[/./, 'comment.cs']
|
||||
],
|
||||
razorRootTopLevel: [
|
||||
[/\{/, 'delimiter.bracket.cs', '@razorRoot'],
|
||||
[/\(/, 'delimiter.parenthesis.cs', '@razorRoot'],
|
||||
[/[})]/, '@rematch', '@pop'],
|
||||
{ include: 'razorCommon' }
|
||||
],
|
||||
razorRoot: [
|
||||
[/\{/, 'delimiter.bracket.cs', '@razorRoot'],
|
||||
[/\(/, 'delimiter.parenthesis.cs', '@razorRoot'],
|
||||
[/\}/, 'delimiter.bracket.cs', '@pop'],
|
||||
[/\)/, 'delimiter.parenthesis.cs', '@pop'],
|
||||
{ include: 'razorCommon' }
|
||||
],
|
||||
razorCommon: [
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@razorKeywords': { token: 'keyword.cs' },
|
||||
'@default': 'identifier.cs'
|
||||
}
|
||||
}],
|
||||
// brackets
|
||||
[/[\[\]]/, 'delimiter.array.cs'],
|
||||
// whitespace
|
||||
[/[ \t\r\n]+/],
|
||||
// comments
|
||||
[/\/\/.*$/, 'comment.cs'],
|
||||
[/@\*/, 'comment.cs', '@razorBlockComment'],
|
||||
// strings
|
||||
[/"([^"]*)"/, 'string.cs'],
|
||||
[/'([^']*)'/, 'string.cs'],
|
||||
// simple html
|
||||
[/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
[/(<\/)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']],
|
||||
// delimiters
|
||||
[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/, 'delimiter.cs'],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?/, 'number.float.cs'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float.cs'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/, 'number.hex.cs'],
|
||||
[/0[0-7']*[0-7]/, 'number.octal.cs'],
|
||||
[/0[bB][0-1']*[0-1]/, 'number.binary.cs'],
|
||||
[/\d[\d']*/, 'number.cs'],
|
||||
[/\d/, 'number.cs'],
|
||||
]
|
||||
},
|
||||
razorKeywords: [
|
||||
'abstract', 'as', 'async', 'await', 'base', 'bool',
|
||||
'break', 'by', 'byte', 'case',
|
||||
'catch', 'char', 'checked', 'class',
|
||||
'const', 'continue', 'decimal', 'default',
|
||||
'delegate', 'do', 'double', 'descending',
|
||||
'explicit', 'event', 'extern', 'else',
|
||||
'enum', 'false', 'finally', 'fixed',
|
||||
'float', 'for', 'foreach', 'from',
|
||||
'goto', 'group', 'if', 'implicit',
|
||||
'in', 'int', 'interface', 'internal',
|
||||
'into', 'is', 'lock', 'long', 'nameof',
|
||||
'new', 'null', 'namespace', 'object',
|
||||
'operator', 'out', 'override', 'orderby',
|
||||
'params', 'private', 'protected', 'public',
|
||||
'readonly', 'ref', 'return', 'switch',
|
||||
'struct', 'sbyte', 'sealed', 'short',
|
||||
'sizeof', 'stackalloc', 'static', 'string',
|
||||
'select', 'this', 'throw', 'true',
|
||||
'try', 'typeof', 'uint', 'ulong',
|
||||
'unchecked', 'unsafe', 'ushort', 'using',
|
||||
'var', 'virtual', 'volatile', 'void', 'when',
|
||||
'while', 'where', 'yield',
|
||||
'model', 'inject' // Razor specific
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,127 +13,127 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.redis',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"APPEND", "AUTH", "BGREWRITEAOF", "BGSAVE", "BITCOUNT", "BITFIELD", "BITOP", "BITPOS", "BLPOP", "BRPOP", "BRPOPLPUSH",
|
||||
"CLIENT", "KILL", "LIST", "GETNAME", "PAUSE", "REPLY", "SETNAME", "CLUSTER", "ADDSLOTS", "COUNT-FAILURE-REPORTS",
|
||||
"COUNTKEYSINSLOT", "DELSLOTS", "FAILOVER", "FORGET", "GETKEYSINSLOT", "INFO", "KEYSLOT", "MEET", "NODES", "REPLICATE",
|
||||
"RESET", "SAVECONFIG", "SET-CONFIG-EPOCH", "SETSLOT", "SLAVES", "SLOTS", "COMMAND", "COUNT", "GETKEYS", "CONFIG", "GET",
|
||||
"REWRITE", "SET", "RESETSTAT", "DBSIZE", "DEBUG", "OBJECT", "SEGFAULT", "DECR", "DECRBY", "DEL", "DISCARD", "DUMP", "ECHO",
|
||||
"EVAL", "EVALSHA", "EXEC", "EXISTS", "EXPIRE", "EXPIREAT", "FLUSHALL", "FLUSHDB", "GEOADD", "GEOHASH", "GEOPOS", "GEODIST",
|
||||
"GEORADIUS", "GEORADIUSBYMEMBER", "GETBIT", "GETRANGE", "GETSET", "HDEL", "HEXISTS", "HGET", "HGETALL", "HINCRBY", "HINCRBYFLOAT",
|
||||
"HKEYS", "HLEN", "HMGET", "HMSET", "HSET", "HSETNX", "HSTRLEN", "HVALS", "INCR", "INCRBY", "INCRBYFLOAT", "KEYS", "LASTSAVE",
|
||||
"LINDEX", "LINSERT", "LLEN", "LPOP", "LPUSH", "LPUSHX", "LRANGE", "LREM", "LSET", "LTRIM", "MGET", "MIGRATE", "MONITOR",
|
||||
"MOVE", "MSET", "MSETNX", "MULTI", "PERSIST", "PEXPIRE", "PEXPIREAT", "PFADD", "PFCOUNT", "PFMERGE", "PING", "PSETEX",
|
||||
"PSUBSCRIBE", "PUBSUB", "PTTL", "PUBLISH", "PUNSUBSCRIBE", "QUIT", "RANDOMKEY", "READONLY", "READWRITE", "RENAME", "RENAMENX",
|
||||
"RESTORE", "ROLE", "RPOP", "RPOPLPUSH", "RPUSH", "RPUSHX", "SADD", "SAVE", "SCARD", "SCRIPT", "FLUSH", "LOAD", "SDIFF",
|
||||
"SDIFFSTORE", "SELECT", "SETBIT", "SETEX", "SETNX", "SETRANGE", "SHUTDOWN", "SINTER", "SINTERSTORE", "SISMEMBER", "SLAVEOF",
|
||||
"SLOWLOG", "SMEMBERS", "SMOVE", "SORT", "SPOP", "SRANDMEMBER", "SREM", "STRLEN", "SUBSCRIBE", "SUNION", "SUNIONSTORE", "SWAPDB",
|
||||
"SYNC", "TIME", "TOUCH", "TTL", "TYPE", "UNSUBSCRIBE", "UNLINK", "UNWATCH", "WAIT", "WATCH", "ZADD", "ZCARD", "ZCOUNT", "ZINCRBY",
|
||||
"ZINTERSTORE", "ZLEXCOUNT", "ZRANGE", "ZRANGEBYLEX", "ZREVRANGEBYLEX", "ZRANGEBYSCORE", "ZRANK", "ZREM", "ZREMRANGEBYLEX",
|
||||
"ZREMRANGEBYRANK", "ZREMRANGEBYSCORE", "ZREVRANGE", "ZREVRANGEBYSCORE", "ZREVRANK", "ZSCORE", "ZUNIONSTORE", "SCAN", "SSCAN",
|
||||
"HSCAN", "ZSCAN"
|
||||
],
|
||||
operators: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
builtinFunctions: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string.double', next: '@stringDouble' }]
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }],
|
||||
],
|
||||
stringDouble: [
|
||||
[/[^"]+/, 'string.double'],
|
||||
[/""/, 'string.double'],
|
||||
[/"/, { token: 'string.double', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.redis',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"APPEND", "AUTH", "BGREWRITEAOF", "BGSAVE", "BITCOUNT", "BITFIELD", "BITOP", "BITPOS", "BLPOP", "BRPOP", "BRPOPLPUSH",
|
||||
"CLIENT", "KILL", "LIST", "GETNAME", "PAUSE", "REPLY", "SETNAME", "CLUSTER", "ADDSLOTS", "COUNT-FAILURE-REPORTS",
|
||||
"COUNTKEYSINSLOT", "DELSLOTS", "FAILOVER", "FORGET", "GETKEYSINSLOT", "INFO", "KEYSLOT", "MEET", "NODES", "REPLICATE",
|
||||
"RESET", "SAVECONFIG", "SET-CONFIG-EPOCH", "SETSLOT", "SLAVES", "SLOTS", "COMMAND", "COUNT", "GETKEYS", "CONFIG", "GET",
|
||||
"REWRITE", "SET", "RESETSTAT", "DBSIZE", "DEBUG", "OBJECT", "SEGFAULT", "DECR", "DECRBY", "DEL", "DISCARD", "DUMP", "ECHO",
|
||||
"EVAL", "EVALSHA", "EXEC", "EXISTS", "EXPIRE", "EXPIREAT", "FLUSHALL", "FLUSHDB", "GEOADD", "GEOHASH", "GEOPOS", "GEODIST",
|
||||
"GEORADIUS", "GEORADIUSBYMEMBER", "GETBIT", "GETRANGE", "GETSET", "HDEL", "HEXISTS", "HGET", "HGETALL", "HINCRBY", "HINCRBYFLOAT",
|
||||
"HKEYS", "HLEN", "HMGET", "HMSET", "HSET", "HSETNX", "HSTRLEN", "HVALS", "INCR", "INCRBY", "INCRBYFLOAT", "KEYS", "LASTSAVE",
|
||||
"LINDEX", "LINSERT", "LLEN", "LPOP", "LPUSH", "LPUSHX", "LRANGE", "LREM", "LSET", "LTRIM", "MGET", "MIGRATE", "MONITOR",
|
||||
"MOVE", "MSET", "MSETNX", "MULTI", "PERSIST", "PEXPIRE", "PEXPIREAT", "PFADD", "PFCOUNT", "PFMERGE", "PING", "PSETEX",
|
||||
"PSUBSCRIBE", "PUBSUB", "PTTL", "PUBLISH", "PUNSUBSCRIBE", "QUIT", "RANDOMKEY", "READONLY", "READWRITE", "RENAME", "RENAMENX",
|
||||
"RESTORE", "ROLE", "RPOP", "RPOPLPUSH", "RPUSH", "RPUSHX", "SADD", "SAVE", "SCARD", "SCRIPT", "FLUSH", "LOAD", "SDIFF",
|
||||
"SDIFFSTORE", "SELECT", "SETBIT", "SETEX", "SETNX", "SETRANGE", "SHUTDOWN", "SINTER", "SINTERSTORE", "SISMEMBER", "SLAVEOF",
|
||||
"SLOWLOG", "SMEMBERS", "SMOVE", "SORT", "SPOP", "SRANDMEMBER", "SREM", "STRLEN", "SUBSCRIBE", "SUNION", "SUNIONSTORE", "SWAPDB",
|
||||
"SYNC", "TIME", "TOUCH", "TTL", "TYPE", "UNSUBSCRIBE", "UNLINK", "UNWATCH", "WAIT", "WATCH", "ZADD", "ZCARD", "ZCOUNT", "ZINCRBY",
|
||||
"ZINTERSTORE", "ZLEXCOUNT", "ZRANGE", "ZRANGEBYLEX", "ZREVRANGEBYLEX", "ZRANGEBYSCORE", "ZRANK", "ZREM", "ZREMRANGEBYLEX",
|
||||
"ZREMRANGEBYRANK", "ZREMRANGEBYSCORE", "ZREVRANGE", "ZREVRANGEBYSCORE", "ZREVRANK", "ZSCORE", "ZUNIONSTORE", "SCAN", "SSCAN",
|
||||
"HSCAN", "ZSCAN"
|
||||
],
|
||||
operators: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
builtinFunctions: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
[/"/, { token: 'string.double', next: '@stringDouble' }]
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }],
|
||||
],
|
||||
stringDouble: [
|
||||
[/[^"]+/, 'string.double'],
|
||||
[/""/, 'string.double'],
|
||||
[/"/, { token: 'string.double', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,213 +13,213 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"AES128", "AES256", "ALL", "ALLOWOVERWRITE", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY", "AS", "ASC", "AUTHORIZATION",
|
||||
"BACKUP", "BETWEEN", "BINARY", "BLANKSASNULL", "BOTH", "BYTEDICT", "BZIP2", "CASE", "CAST", "CHECK", "COLLATE", "COLUMN",
|
||||
"CONSTRAINT", "CREATE", "CREDENTIALS", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER",
|
||||
"CURRENT_USER_ID", "DEFAULT", "DEFERRABLE", "DEFLATE", "DEFRAG", "DELTA", "DELTA32K", "DESC", "DISABLE", "DISTINCT", "DO",
|
||||
"ELSE", "EMPTYASNULL", "ENABLE", "ENCODE", "ENCRYPT", "ENCRYPTION", "END", "EXCEPT", "EXPLICIT", "FALSE", "FOR", "FOREIGN",
|
||||
"FREEZE", "FROM", "FULL", "GLOBALDICT256", "GLOBALDICT64K", "GRANT", "GROUP", "GZIP", "HAVING", "IDENTITY", "IGNORE", "ILIKE",
|
||||
"IN", "INITIALLY", "INNER", "INTERSECT", "INTO", "IS", "ISNULL", "JOIN", "LEADING", "LEFT", "LIKE", "LIMIT", "LOCALTIME",
|
||||
"LOCALTIMESTAMP", "LUN", "LUNS", "LZO", "LZOP", "MINUS", "MOSTLY13", "MOSTLY32", "MOSTLY8", "NATURAL", "NEW", "NOT", "NOTNULL",
|
||||
"NULL", "NULLS", "OFF", "OFFLINE", "OFFSET", "OID", "OLD", "ON", "ONLY", "OPEN", "OR", "ORDER", "OUTER", "OVERLAPS", "PARALLEL",
|
||||
"PARTITION", "PERCENT", "PERMISSIONS", "PLACING", "PRIMARY", "RAW", "READRATIO", "RECOVER", "REFERENCES", "RESPECT", "REJECTLOG",
|
||||
"RESORT", "RESTORE", "RIGHT", "SELECT", "SESSION_USER", "SIMILAR", "SNAPSHOT", "SOME", "SYSDATE", "SYSTEM", "TABLE", "TAG",
|
||||
"TDES", "TEXT255", "TEXT32K", "THEN", "TIMESTAMP", "TO", "TOP", "TRAILING", "TRUE", "TRUNCATECOLUMNS", "UNION", "UNIQUE", "USER",
|
||||
"USING", "VERBOSE", "WALLET", "WHEN", "WHERE", "WITH", "WITHOUT"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"current_schema", "current_schemas", "has_database_privilege", "has_schema_privilege", "has_table_privilege", "age",
|
||||
"current_time", "current_timestamp", "localtime", "isfinite", "now", "ascii", "get_bit", "get_byte", "set_bit", "set_byte",
|
||||
"to_ascii", "approximate percentile_disc", "avg", "count", "listagg", "max", "median", "min", "percentile_cont", "stddev_samp",
|
||||
"stddev_pop", "sum", "var_samp", "var_pop", "bit_and", "bit_or", "bool_and", "bool_or", "cume_dist", "first_value", "lag",
|
||||
"last_value", "lead", "nth_value", "ratio_to_report", "dense_rank", "ntile", "percent_rank", "rank", "row_number", "case",
|
||||
"coalesce", "decode", "greatest", "least", "nvl", "nvl2", "nullif", "add_months", "at time zone", "convert_timezone",
|
||||
"current_date", "date_cmp", "date_cmp_timestamp", "date_cmp_timestamptz", "date_part_year", "dateadd", "datediff",
|
||||
"date_part", "date_trunc", "extract", "getdate", "interval_cmp", "last_day", "months_between", "next_day", "sysdate",
|
||||
"timeofday", "timestamp_cmp", "timestamp_cmp_date", "timestamp_cmp_timestamptz", "timestamptz_cmp", "timestamptz_cmp_date",
|
||||
"timestamptz_cmp_timestamp", "timezone", "to_timestamp", "trunc", "abs", "acos", "asin", "atan", "atan2", "cbrt", "ceil",
|
||||
"ceiling", "checksum", "cos", "cot", "degrees", "dexp", "dlog1", "dlog10", "exp", "floor", "ln", "log", "mod", "pi", "power",
|
||||
"radians", "random", "round", "sin", "sign", "sqrt", "tan", "to_hex", "bpcharcmp", "btrim", "bttext_pattern_cmp", "char_length",
|
||||
"character_length", "charindex", "chr", "concat", "crc32", "func_sha1", "initcap", "left and rights", "len", "length", "lower",
|
||||
"lpad and rpads", "ltrim", "md5", "octet_length", "position", "quote_ident", "quote_literal", "regexp_count", "regexp_instr",
|
||||
"regexp_replace", "regexp_substr", "repeat", "replace", "replicate", "reverse", "rtrim", "split_part", "strpos", "strtol",
|
||||
"substring", "textlen", "translate", "trim", "upper", "cast", "convert", "to_char", "to_date", "to_number", "json_array_length",
|
||||
"json_extract_array_element_text", "json_extract_path_text", "current_setting", "pg_cancel_backend", "pg_terminate_backend",
|
||||
"set_config", "current_database", "current_user", "current_user_id", "pg_backend_pid", "pg_last_copy_count", "pg_last_copy_id",
|
||||
"pg_last_query_id", "pg_last_unload_count", "session_user", "slice_num", "user", "version", "abbrev", "acosd", "any", "area",
|
||||
"array_agg", "array_append", "array_cat", "array_dims", "array_fill", "array_length", "array_lower", "array_ndims",
|
||||
"array_position", "array_positions", "array_prepend", "array_remove", "array_replace", "array_to_json", "array_to_string",
|
||||
"array_to_tsvector", "array_upper", "asind", "atan2d", "atand", "bit", "bit_length", "bound_box", "box",
|
||||
"brin_summarize_new_values", "broadcast", "cardinality", "center", "circle", "clock_timestamp", "col_description", "concat_ws",
|
||||
"convert_from", "convert_to", "corr", "cosd", "cotd", "covar_pop", "covar_samp", "current_catalog", "current_query",
|
||||
"current_role", "currval", "cursor_to_xml", "diameter", "div", "encode", "enum_first", "enum_last", "enum_range", "every",
|
||||
"family", "format", "format_type", "generate_series", "generate_subscripts", "get_current_ts_config", "gin_clean_pending_list",
|
||||
"grouping", "has_any_column_privilege", "has_column_privilege", "has_foreign_data_wrapper_privilege", "has_function_privilege",
|
||||
"has_language_privilege", "has_sequence_privilege", "has_server_privilege", "has_tablespace_privilege", "has_type_privilege",
|
||||
"height", "host", "hostmask", "inet_client_addr", "inet_client_port", "inet_merge", "inet_same_family", "inet_server_addr",
|
||||
"inet_server_port", "isclosed", "isempty", "isopen", "json_agg", "json_object", "json_object_agg", "json_populate_record",
|
||||
"json_populate_recordset", "json_to_record", "json_to_recordset", "jsonb_agg", "jsonb_object_agg", "justify_days", "justify_hours",
|
||||
"justify_interval", "lastval", "left", "line", "localtimestamp", "lower_inc", "lower_inf", "lpad", "lseg", "make_date",
|
||||
"make_interval", "make_time", "make_timestamp", "make_timestamptz", "masklen", "mode", "netmask", "network", "nextval", "npoints",
|
||||
"num_nonnulls", "num_nulls", "numnode", "obj_description", "overlay", "parse_ident", "path", "pclose", "percentile_disc",
|
||||
"pg_advisory_lock", "pg_advisory_lock_shared", "pg_advisory_unlock", "pg_advisory_unlock_all", "pg_advisory_unlock_shared",
|
||||
"pg_advisory_xact_lock", "pg_advisory_xact_lock_shared", "pg_backup_start_time", "pg_blocking_pids", "pg_client_encoding",
|
||||
"pg_collation_is_visible", "pg_column_size", "pg_conf_load_time", "pg_control_checkpoint", "pg_control_init", "pg_control_recovery",
|
||||
"pg_control_system", "pg_conversion_is_visible", "pg_create_logical_replication_slot", "pg_create_physical_replication_slot",
|
||||
"pg_create_restore_point", "pg_current_xlog_flush_location", "pg_current_xlog_insert_location", "pg_current_xlog_location",
|
||||
"pg_database_size", "pg_describe_object", "pg_drop_replication_slot", "pg_export_snapshot", "pg_filenode_relation",
|
||||
"pg_function_is_visible", "pg_get_constraintdef", "pg_get_expr", "pg_get_function_arguments", "pg_get_function_identity_arguments",
|
||||
"pg_get_function_result", "pg_get_functiondef", "pg_get_indexdef", "pg_get_keywords", "pg_get_object_address",
|
||||
"pg_get_owned_sequence", "pg_get_ruledef", "pg_get_serial_sequence", "pg_get_triggerdef", "pg_get_userbyid", "pg_get_viewdef",
|
||||
"pg_has_role", "pg_identify_object", "pg_identify_object_as_address", "pg_index_column_has_property", "pg_index_has_property",
|
||||
"pg_indexam_has_property", "pg_indexes_size", "pg_is_in_backup", "pg_is_in_recovery", "pg_is_other_temp_schema",
|
||||
"pg_is_xlog_replay_paused", "pg_last_committed_xact", "pg_last_xact_replay_timestamp", "pg_last_xlog_receive_location",
|
||||
"pg_last_xlog_replay_location", "pg_listening_channels", "pg_logical_emit_message", "pg_logical_slot_get_binary_changes",
|
||||
"pg_logical_slot_get_changes", "pg_logical_slot_peek_binary_changes", "pg_logical_slot_peek_changes", "pg_ls_dir",
|
||||
"pg_my_temp_schema", "pg_notification_queue_usage", "pg_opclass_is_visible", "pg_operator_is_visible", "pg_opfamily_is_visible",
|
||||
"pg_options_to_table", "pg_postmaster_start_time", "pg_read_binary_file", "pg_read_file", "pg_relation_filenode",
|
||||
"pg_relation_filepath", "pg_relation_size", "pg_reload_conf", "pg_replication_origin_create", "pg_replication_origin_drop",
|
||||
"pg_replication_origin_oid", "pg_replication_origin_progress", "pg_replication_origin_session_is_setup",
|
||||
"pg_replication_origin_session_progress", "pg_replication_origin_session_reset", "pg_replication_origin_session_setup",
|
||||
"pg_replication_origin_xact_reset", "pg_replication_origin_xact_setup", "pg_rotate_logfile", "pg_size_bytes", "pg_size_pretty",
|
||||
"pg_sleep", "pg_sleep_for", "pg_sleep_until", "pg_start_backup", "pg_stat_file", "pg_stop_backup", "pg_switch_xlog",
|
||||
"pg_table_is_visible", "pg_table_size", "pg_tablespace_databases", "pg_tablespace_location", "pg_tablespace_size",
|
||||
"pg_total_relation_size", "pg_trigger_depth", "pg_try_advisory_lock", "pg_try_advisory_lock_shared", "pg_try_advisory_xact_lock",
|
||||
"pg_try_advisory_xact_lock_shared", "pg_ts_config_is_visible", "pg_ts_dict_is_visible", "pg_ts_parser_is_visible",
|
||||
"pg_ts_template_is_visible", "pg_type_is_visible", "pg_typeof", "pg_xact_commit_timestamp", "pg_xlog_location_diff",
|
||||
"pg_xlog_replay_pause", "pg_xlog_replay_resume", "pg_xlogfile_name", "pg_xlogfile_name_offset", "phraseto_tsquery",
|
||||
"plainto_tsquery", "point", "polygon", "popen", "pqserverversion", "query_to_xml", "querytree", "quote_nullable", "radius",
|
||||
"range_merge", "regexp_matches", "regexp_split_to_array", "regexp_split_to_table", "regr_avgx", "regr_avgy", "regr_count",
|
||||
"regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "right", "row_security_active", "row_to_json",
|
||||
"rpad", "scale", "set_masklen", "setseed", "setval", "setweight", "shobj_description", "sind", "sprintf", "statement_timestamp",
|
||||
"stddev", "string_agg", "string_to_array", "strip", "substr", "table_to_xml", "table_to_xml_and_xmlschema", "tand", "text",
|
||||
"to_json", "to_regclass", "to_regnamespace", "to_regoper", "to_regoperator", "to_regproc", "to_regprocedure", "to_regrole",
|
||||
"to_regtype", "to_tsquery", "to_tsvector", "transaction_timestamp", "ts_debug", "ts_delete", "ts_filter", "ts_headline",
|
||||
"ts_lexize", "ts_parse", "ts_rank", "ts_rank_cd", "ts_rewrite", "ts_stat", "ts_token_type", "tsquery_phrase", "tsvector_to_array",
|
||||
"tsvector_update_trigger", "tsvector_update_trigger_column", "txid_current", "txid_current_snapshot", "txid_snapshot_xip",
|
||||
"txid_snapshot_xmax", "txid_snapshot_xmin", "txid_visible_in_snapshot", "unnest", "upper_inc", "upper_inf", "variance", "width",
|
||||
"width_bucket", "xml_is_well_formed", "xml_is_well_formed_content", "xml_is_well_formed_document", "xmlagg", "xmlcomment",
|
||||
"xmlconcat", "xmlelement", "xmlexists", "xmlforest", "xmlparse", "xmlpi", "xmlroot", "xmlserialize", "xpath", "xpath_exists"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^"]+/, 'identifier'],
|
||||
[/""/, 'identifier'],
|
||||
[/"/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '--',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sql',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' }
|
||||
],
|
||||
keywords: [
|
||||
"AES128", "AES256", "ALL", "ALLOWOVERWRITE", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY", "AS", "ASC", "AUTHORIZATION",
|
||||
"BACKUP", "BETWEEN", "BINARY", "BLANKSASNULL", "BOTH", "BYTEDICT", "BZIP2", "CASE", "CAST", "CHECK", "COLLATE", "COLUMN",
|
||||
"CONSTRAINT", "CREATE", "CREDENTIALS", "CROSS", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER",
|
||||
"CURRENT_USER_ID", "DEFAULT", "DEFERRABLE", "DEFLATE", "DEFRAG", "DELTA", "DELTA32K", "DESC", "DISABLE", "DISTINCT", "DO",
|
||||
"ELSE", "EMPTYASNULL", "ENABLE", "ENCODE", "ENCRYPT", "ENCRYPTION", "END", "EXCEPT", "EXPLICIT", "FALSE", "FOR", "FOREIGN",
|
||||
"FREEZE", "FROM", "FULL", "GLOBALDICT256", "GLOBALDICT64K", "GRANT", "GROUP", "GZIP", "HAVING", "IDENTITY", "IGNORE", "ILIKE",
|
||||
"IN", "INITIALLY", "INNER", "INTERSECT", "INTO", "IS", "ISNULL", "JOIN", "LEADING", "LEFT", "LIKE", "LIMIT", "LOCALTIME",
|
||||
"LOCALTIMESTAMP", "LUN", "LUNS", "LZO", "LZOP", "MINUS", "MOSTLY13", "MOSTLY32", "MOSTLY8", "NATURAL", "NEW", "NOT", "NOTNULL",
|
||||
"NULL", "NULLS", "OFF", "OFFLINE", "OFFSET", "OID", "OLD", "ON", "ONLY", "OPEN", "OR", "ORDER", "OUTER", "OVERLAPS", "PARALLEL",
|
||||
"PARTITION", "PERCENT", "PERMISSIONS", "PLACING", "PRIMARY", "RAW", "READRATIO", "RECOVER", "REFERENCES", "RESPECT", "REJECTLOG",
|
||||
"RESORT", "RESTORE", "RIGHT", "SELECT", "SESSION_USER", "SIMILAR", "SNAPSHOT", "SOME", "SYSDATE", "SYSTEM", "TABLE", "TAG",
|
||||
"TDES", "TEXT255", "TEXT32K", "THEN", "TIMESTAMP", "TO", "TOP", "TRAILING", "TRUE", "TRUNCATECOLUMNS", "UNION", "UNIQUE", "USER",
|
||||
"USING", "VERBOSE", "WALLET", "WHEN", "WHERE", "WITH", "WITHOUT"
|
||||
],
|
||||
operators: [
|
||||
"AND", "BETWEEN", "IN", "LIKE", "NOT", "OR", "IS", "NULL", "INTERSECT", "UNION", "INNER", "JOIN", "LEFT", "OUTER", "RIGHT"
|
||||
],
|
||||
builtinFunctions: [
|
||||
"current_schema", "current_schemas", "has_database_privilege", "has_schema_privilege", "has_table_privilege", "age",
|
||||
"current_time", "current_timestamp", "localtime", "isfinite", "now", "ascii", "get_bit", "get_byte", "set_bit", "set_byte",
|
||||
"to_ascii", "approximate percentile_disc", "avg", "count", "listagg", "max", "median", "min", "percentile_cont", "stddev_samp",
|
||||
"stddev_pop", "sum", "var_samp", "var_pop", "bit_and", "bit_or", "bool_and", "bool_or", "cume_dist", "first_value", "lag",
|
||||
"last_value", "lead", "nth_value", "ratio_to_report", "dense_rank", "ntile", "percent_rank", "rank", "row_number", "case",
|
||||
"coalesce", "decode", "greatest", "least", "nvl", "nvl2", "nullif", "add_months", "at time zone", "convert_timezone",
|
||||
"current_date", "date_cmp", "date_cmp_timestamp", "date_cmp_timestamptz", "date_part_year", "dateadd", "datediff",
|
||||
"date_part", "date_trunc", "extract", "getdate", "interval_cmp", "last_day", "months_between", "next_day", "sysdate",
|
||||
"timeofday", "timestamp_cmp", "timestamp_cmp_date", "timestamp_cmp_timestamptz", "timestamptz_cmp", "timestamptz_cmp_date",
|
||||
"timestamptz_cmp_timestamp", "timezone", "to_timestamp", "trunc", "abs", "acos", "asin", "atan", "atan2", "cbrt", "ceil",
|
||||
"ceiling", "checksum", "cos", "cot", "degrees", "dexp", "dlog1", "dlog10", "exp", "floor", "ln", "log", "mod", "pi", "power",
|
||||
"radians", "random", "round", "sin", "sign", "sqrt", "tan", "to_hex", "bpcharcmp", "btrim", "bttext_pattern_cmp", "char_length",
|
||||
"character_length", "charindex", "chr", "concat", "crc32", "func_sha1", "initcap", "left and rights", "len", "length", "lower",
|
||||
"lpad and rpads", "ltrim", "md5", "octet_length", "position", "quote_ident", "quote_literal", "regexp_count", "regexp_instr",
|
||||
"regexp_replace", "regexp_substr", "repeat", "replace", "replicate", "reverse", "rtrim", "split_part", "strpos", "strtol",
|
||||
"substring", "textlen", "translate", "trim", "upper", "cast", "convert", "to_char", "to_date", "to_number", "json_array_length",
|
||||
"json_extract_array_element_text", "json_extract_path_text", "current_setting", "pg_cancel_backend", "pg_terminate_backend",
|
||||
"set_config", "current_database", "current_user", "current_user_id", "pg_backend_pid", "pg_last_copy_count", "pg_last_copy_id",
|
||||
"pg_last_query_id", "pg_last_unload_count", "session_user", "slice_num", "user", "version", "abbrev", "acosd", "any", "area",
|
||||
"array_agg", "array_append", "array_cat", "array_dims", "array_fill", "array_length", "array_lower", "array_ndims",
|
||||
"array_position", "array_positions", "array_prepend", "array_remove", "array_replace", "array_to_json", "array_to_string",
|
||||
"array_to_tsvector", "array_upper", "asind", "atan2d", "atand", "bit", "bit_length", "bound_box", "box",
|
||||
"brin_summarize_new_values", "broadcast", "cardinality", "center", "circle", "clock_timestamp", "col_description", "concat_ws",
|
||||
"convert_from", "convert_to", "corr", "cosd", "cotd", "covar_pop", "covar_samp", "current_catalog", "current_query",
|
||||
"current_role", "currval", "cursor_to_xml", "diameter", "div", "encode", "enum_first", "enum_last", "enum_range", "every",
|
||||
"family", "format", "format_type", "generate_series", "generate_subscripts", "get_current_ts_config", "gin_clean_pending_list",
|
||||
"grouping", "has_any_column_privilege", "has_column_privilege", "has_foreign_data_wrapper_privilege", "has_function_privilege",
|
||||
"has_language_privilege", "has_sequence_privilege", "has_server_privilege", "has_tablespace_privilege", "has_type_privilege",
|
||||
"height", "host", "hostmask", "inet_client_addr", "inet_client_port", "inet_merge", "inet_same_family", "inet_server_addr",
|
||||
"inet_server_port", "isclosed", "isempty", "isopen", "json_agg", "json_object", "json_object_agg", "json_populate_record",
|
||||
"json_populate_recordset", "json_to_record", "json_to_recordset", "jsonb_agg", "jsonb_object_agg", "justify_days", "justify_hours",
|
||||
"justify_interval", "lastval", "left", "line", "localtimestamp", "lower_inc", "lower_inf", "lpad", "lseg", "make_date",
|
||||
"make_interval", "make_time", "make_timestamp", "make_timestamptz", "masklen", "mode", "netmask", "network", "nextval", "npoints",
|
||||
"num_nonnulls", "num_nulls", "numnode", "obj_description", "overlay", "parse_ident", "path", "pclose", "percentile_disc",
|
||||
"pg_advisory_lock", "pg_advisory_lock_shared", "pg_advisory_unlock", "pg_advisory_unlock_all", "pg_advisory_unlock_shared",
|
||||
"pg_advisory_xact_lock", "pg_advisory_xact_lock_shared", "pg_backup_start_time", "pg_blocking_pids", "pg_client_encoding",
|
||||
"pg_collation_is_visible", "pg_column_size", "pg_conf_load_time", "pg_control_checkpoint", "pg_control_init", "pg_control_recovery",
|
||||
"pg_control_system", "pg_conversion_is_visible", "pg_create_logical_replication_slot", "pg_create_physical_replication_slot",
|
||||
"pg_create_restore_point", "pg_current_xlog_flush_location", "pg_current_xlog_insert_location", "pg_current_xlog_location",
|
||||
"pg_database_size", "pg_describe_object", "pg_drop_replication_slot", "pg_export_snapshot", "pg_filenode_relation",
|
||||
"pg_function_is_visible", "pg_get_constraintdef", "pg_get_expr", "pg_get_function_arguments", "pg_get_function_identity_arguments",
|
||||
"pg_get_function_result", "pg_get_functiondef", "pg_get_indexdef", "pg_get_keywords", "pg_get_object_address",
|
||||
"pg_get_owned_sequence", "pg_get_ruledef", "pg_get_serial_sequence", "pg_get_triggerdef", "pg_get_userbyid", "pg_get_viewdef",
|
||||
"pg_has_role", "pg_identify_object", "pg_identify_object_as_address", "pg_index_column_has_property", "pg_index_has_property",
|
||||
"pg_indexam_has_property", "pg_indexes_size", "pg_is_in_backup", "pg_is_in_recovery", "pg_is_other_temp_schema",
|
||||
"pg_is_xlog_replay_paused", "pg_last_committed_xact", "pg_last_xact_replay_timestamp", "pg_last_xlog_receive_location",
|
||||
"pg_last_xlog_replay_location", "pg_listening_channels", "pg_logical_emit_message", "pg_logical_slot_get_binary_changes",
|
||||
"pg_logical_slot_get_changes", "pg_logical_slot_peek_binary_changes", "pg_logical_slot_peek_changes", "pg_ls_dir",
|
||||
"pg_my_temp_schema", "pg_notification_queue_usage", "pg_opclass_is_visible", "pg_operator_is_visible", "pg_opfamily_is_visible",
|
||||
"pg_options_to_table", "pg_postmaster_start_time", "pg_read_binary_file", "pg_read_file", "pg_relation_filenode",
|
||||
"pg_relation_filepath", "pg_relation_size", "pg_reload_conf", "pg_replication_origin_create", "pg_replication_origin_drop",
|
||||
"pg_replication_origin_oid", "pg_replication_origin_progress", "pg_replication_origin_session_is_setup",
|
||||
"pg_replication_origin_session_progress", "pg_replication_origin_session_reset", "pg_replication_origin_session_setup",
|
||||
"pg_replication_origin_xact_reset", "pg_replication_origin_xact_setup", "pg_rotate_logfile", "pg_size_bytes", "pg_size_pretty",
|
||||
"pg_sleep", "pg_sleep_for", "pg_sleep_until", "pg_start_backup", "pg_stat_file", "pg_stop_backup", "pg_switch_xlog",
|
||||
"pg_table_is_visible", "pg_table_size", "pg_tablespace_databases", "pg_tablespace_location", "pg_tablespace_size",
|
||||
"pg_total_relation_size", "pg_trigger_depth", "pg_try_advisory_lock", "pg_try_advisory_lock_shared", "pg_try_advisory_xact_lock",
|
||||
"pg_try_advisory_xact_lock_shared", "pg_ts_config_is_visible", "pg_ts_dict_is_visible", "pg_ts_parser_is_visible",
|
||||
"pg_ts_template_is_visible", "pg_type_is_visible", "pg_typeof", "pg_xact_commit_timestamp", "pg_xlog_location_diff",
|
||||
"pg_xlog_replay_pause", "pg_xlog_replay_resume", "pg_xlogfile_name", "pg_xlogfile_name_offset", "phraseto_tsquery",
|
||||
"plainto_tsquery", "point", "polygon", "popen", "pqserverversion", "query_to_xml", "querytree", "quote_nullable", "radius",
|
||||
"range_merge", "regexp_matches", "regexp_split_to_array", "regexp_split_to_table", "regr_avgx", "regr_avgy", "regr_count",
|
||||
"regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "right", "row_security_active", "row_to_json",
|
||||
"rpad", "scale", "set_masklen", "setseed", "setval", "setweight", "shobj_description", "sind", "sprintf", "statement_timestamp",
|
||||
"stddev", "string_agg", "string_to_array", "strip", "substr", "table_to_xml", "table_to_xml_and_xmlschema", "tand", "text",
|
||||
"to_json", "to_regclass", "to_regnamespace", "to_regoper", "to_regoperator", "to_regproc", "to_regprocedure", "to_regrole",
|
||||
"to_regtype", "to_tsquery", "to_tsvector", "transaction_timestamp", "ts_debug", "ts_delete", "ts_filter", "ts_headline",
|
||||
"ts_lexize", "ts_parse", "ts_rank", "ts_rank_cd", "ts_rewrite", "ts_stat", "ts_token_type", "tsquery_phrase", "tsvector_to_array",
|
||||
"tsvector_update_trigger", "tsvector_update_trigger_column", "txid_current", "txid_current_snapshot", "txid_snapshot_xip",
|
||||
"txid_snapshot_xmax", "txid_snapshot_xmin", "txid_visible_in_snapshot", "unnest", "upper_inc", "upper_inf", "variance", "width",
|
||||
"width_bucket", "xml_is_well_formed", "xml_is_well_formed_content", "xml_is_well_formed_document", "xmlagg", "xmlcomment",
|
||||
"xmlconcat", "xmlelement", "xmlexists", "xmlforest", "xmlparse", "xmlpi", "xmlroot", "xmlserialize", "xpath", "xpath_exists"
|
||||
],
|
||||
builtinVariables: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
pseudoColumns: [
|
||||
// NOT SUPPORTED
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@pseudoColumns' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@complexIdentifiers' },
|
||||
{ include: '@scopes' },
|
||||
[/[;,.]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/[\w@#$]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[<>=!%&+\-*/|~^]/, 'operator'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white']
|
||||
],
|
||||
comments: [
|
||||
[/--+.*/, 'comment'],
|
||||
[/\/\*/, { token: 'comment.quote', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^*/]+/, 'comment'],
|
||||
// Not supporting nested comments, as nested comments seem to not be standard?
|
||||
// i.e. http://stackoverflow.com/questions/728172/are-there-multiline-comment-delimiters-in-sql-that-are-vendor-agnostic
|
||||
// [/\/\*/, { token: 'comment.quote', next: '@push' }], // nested comment not allowed :-(
|
||||
[/\*\//, { token: 'comment.quote', next: '@pop' }],
|
||||
[/./, 'comment']
|
||||
],
|
||||
pseudoColumns: [
|
||||
[/[$][A-Za-z_][\w@#$]*/, {
|
||||
cases: {
|
||||
'@pseudoColumns': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
],
|
||||
numbers: [
|
||||
[/0[xX][0-9a-fA-F]*/, 'number'],
|
||||
[/[$][+-]*\d*(\.\d*)?/, 'number'],
|
||||
[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']
|
||||
],
|
||||
strings: [
|
||||
[/'/, { token: 'string', next: '@string' }],
|
||||
],
|
||||
string: [
|
||||
[/[^']+/, 'string'],
|
||||
[/''/, 'string'],
|
||||
[/'/, { token: 'string', next: '@pop' }]
|
||||
],
|
||||
complexIdentifiers: [
|
||||
[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]
|
||||
],
|
||||
quotedIdentifier: [
|
||||
[/[^"]+/, 'identifier'],
|
||||
[/""/, 'identifier'],
|
||||
[/"/, { token: 'identifier.quote', next: '@pop' }]
|
||||
],
|
||||
scopes: [
|
||||
// NOT SUPPORTED
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,149 +13,149 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>', notIn: ['string'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.rst',
|
||||
control: /[\\`*_\[\]{}()#+\-\.!]/,
|
||||
escapes: /\\(?:@control)/,
|
||||
empty: [
|
||||
'area', 'base', 'basefont', 'br', 'col', 'frame',
|
||||
'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'
|
||||
],
|
||||
alphanumerics: /[A-Za-z0-9]/,
|
||||
alphanumericsplus: /[A-Za-z0-9-_+:.]/,
|
||||
simpleRefNameWithoutBq: /(?:@alphanumerics@alphanumericsplus*@alphanumerics)+|(?:@alphanumerics+)/,
|
||||
simpleRefName: /(?:`@simpleRefNameWithoutBq`|@simpleRefNameWithoutBq)/,
|
||||
phrase: /@simpleRefName(?:\s@simpleRefName)*/,
|
||||
citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
|
||||
blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
|
||||
precedingChars: /(?:[ -:/'"<([{])/,
|
||||
followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
|
||||
punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
//sections
|
||||
[/^(@punctuation{3,}$){1,1}?/, 'keyword'],
|
||||
//line-blocks
|
||||
//No rules on it
|
||||
//bullet-lists
|
||||
[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, 'keyword'],
|
||||
//literal-blocks
|
||||
[/([ ]::)\s*$/, 'keyword', '@blankLineOfLiteralBlocks'],
|
||||
[/(::)\s*$/, 'keyword', '@blankLineOfLiteralBlocks'],
|
||||
{ include: '@tables' },
|
||||
{ include: '@explicitMarkupBlocks' },
|
||||
{ include: '@inlineMarkup' },
|
||||
],
|
||||
explicitMarkupBlocks: [
|
||||
//citations
|
||||
{ include: '@citations' },
|
||||
//footnotes
|
||||
{ include: '@footnotes' },
|
||||
//directives
|
||||
[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/, [{ token: '', next: 'subsequentLines' }, 'keyword', '', '']],
|
||||
//hyperlink-targets
|
||||
[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/, [{ token: '', next: 'hyperlinks' }, '', '', 'string.link', '', '', 'string.link']],
|
||||
//anonymous-hyperlinks
|
||||
[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/, [{ token: '', next: 'subsequentLines' }, '', '', '', 'string.link']],
|
||||
[/^(__\s+)(.+)/, ['', 'string.link']],
|
||||
//substitution-definitions
|
||||
[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/, [{ token: '', next: 'subsequentLines' }, '', 'string.link', '', 'keyword', ''], '@rawBlocks'],
|
||||
[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ['', 'string.link', '']],
|
||||
//comments
|
||||
[/^(\.\.)([ ].*)$/, [{ token: '', next: '@comments' }, 'comment']],
|
||||
],
|
||||
inlineMarkup: [
|
||||
{ include: '@citationsReference' },
|
||||
{ include: '@footnotesReference' },
|
||||
//hyperlink-references
|
||||
[/(@simpleRefName)(_{1,2})/, ['string.link', '']],
|
||||
//embedded-uris-and-aliases
|
||||
[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ['', 'string.link', '', 'string.link', '', '', '']],
|
||||
//emphasis
|
||||
[/\*\*([^\\*]|\*(?!\*))+\*\*/, 'strong'],
|
||||
[/\*[^*]+\*/, 'emphasis'],
|
||||
//inline-literals
|
||||
[/(``)((?:[^`]|\`(?!`))+)(``)/, ['', 'keyword', '']],
|
||||
[/(__\s+)(.+)/, ['', 'keyword']],
|
||||
//interpreted-text
|
||||
[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ['', 'keyword', '', '', '']],
|
||||
[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ['', '', '', 'keyword', '']],
|
||||
[/(`)([^`]+)(`)/, ''],
|
||||
//inline-internal-targets
|
||||
[/(_`)(@phrase)(`)/, ['', 'string.link', '']],
|
||||
],
|
||||
citations: [
|
||||
[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
],
|
||||
citationsReference: [
|
||||
[/(\[)(@citationName)(\]_)/, ['', 'string.link', '']],
|
||||
],
|
||||
footnotes: [
|
||||
[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '']],
|
||||
[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
],
|
||||
footnotesReference: [
|
||||
[/(\[)([0-9]+)(\])(_)/, ['', 'string.link', '', '']],
|
||||
[/(\[)(#@simpleRefName?)(\])(_)/, ['', 'string.link', '', '']],
|
||||
[/(\[)(\*)(\])(_)/, ['', 'string.link', '', '']]
|
||||
],
|
||||
blankLineOfLiteralBlocks: [
|
||||
[/^$/, '', '@subsequentLinesOfLiteralBlocks'],
|
||||
[/^.*$/, '', '@pop'],
|
||||
],
|
||||
subsequentLinesOfLiteralBlocks: [
|
||||
[/(@blockLiteralStart+)(.*)/, ['keyword', '']],
|
||||
[/^(?!blockLiteralStart)/, '', '@popall']
|
||||
],
|
||||
subsequentLines: [
|
||||
[/^[\s]+.*/, ''],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
hyperlinks: [
|
||||
[/^[\s]+.*/, 'string.link'],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
comments: [
|
||||
[/^[\s]+.*/, 'comment'],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
tables: [
|
||||
[/\+-[+-]+/, 'keyword'],
|
||||
[/\+=[+=]+/, 'keyword'],
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '<', close: '>', notIn: ['string'] }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
|
||||
end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.rst',
|
||||
control: /[\\`*_\[\]{}()#+\-\.!]/,
|
||||
escapes: /\\(?:@control)/,
|
||||
empty: [
|
||||
'area', 'base', 'basefont', 'br', 'col', 'frame',
|
||||
'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'
|
||||
],
|
||||
alphanumerics: /[A-Za-z0-9]/,
|
||||
alphanumericsplus: /[A-Za-z0-9-_+:.]/,
|
||||
simpleRefNameWithoutBq: /(?:@alphanumerics@alphanumericsplus*@alphanumerics)+|(?:@alphanumerics+)/,
|
||||
simpleRefName: /(?:`@simpleRefNameWithoutBq`|@simpleRefNameWithoutBq)/,
|
||||
phrase: /@simpleRefName(?:\s@simpleRefName)*/,
|
||||
citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
|
||||
blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
|
||||
precedingChars: /(?:[ -:/'"<([{])/,
|
||||
followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
|
||||
punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
//sections
|
||||
[/^(@punctuation{3,}$){1,1}?/, 'keyword'],
|
||||
//line-blocks
|
||||
//No rules on it
|
||||
//bullet-lists
|
||||
[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, 'keyword'],
|
||||
//literal-blocks
|
||||
[/([ ]::)\s*$/, 'keyword', '@blankLineOfLiteralBlocks'],
|
||||
[/(::)\s*$/, 'keyword', '@blankLineOfLiteralBlocks'],
|
||||
{ include: '@tables' },
|
||||
{ include: '@explicitMarkupBlocks' },
|
||||
{ include: '@inlineMarkup' },
|
||||
],
|
||||
explicitMarkupBlocks: [
|
||||
//citations
|
||||
{ include: '@citations' },
|
||||
//footnotes
|
||||
{ include: '@footnotes' },
|
||||
//directives
|
||||
[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/, [{ token: '', next: 'subsequentLines' }, 'keyword', '', '']],
|
||||
//hyperlink-targets
|
||||
[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/, [{ token: '', next: 'hyperlinks' }, '', '', 'string.link', '', '', 'string.link']],
|
||||
//anonymous-hyperlinks
|
||||
[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/, [{ token: '', next: 'subsequentLines' }, '', '', '', 'string.link']],
|
||||
[/^(__\s+)(.+)/, ['', 'string.link']],
|
||||
//substitution-definitions
|
||||
[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/, [{ token: '', next: 'subsequentLines' }, '', 'string.link', '', 'keyword', ''], '@rawBlocks'],
|
||||
[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ['', 'string.link', '']],
|
||||
//comments
|
||||
[/^(\.\.)([ ].*)$/, [{ token: '', next: '@comments' }, 'comment']],
|
||||
],
|
||||
inlineMarkup: [
|
||||
{ include: '@citationsReference' },
|
||||
{ include: '@footnotesReference' },
|
||||
//hyperlink-references
|
||||
[/(@simpleRefName)(_{1,2})/, ['string.link', '']],
|
||||
//embedded-uris-and-aliases
|
||||
[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ['', 'string.link', '', 'string.link', '', '', '']],
|
||||
//emphasis
|
||||
[/\*\*([^\\*]|\*(?!\*))+\*\*/, 'strong'],
|
||||
[/\*[^*]+\*/, 'emphasis'],
|
||||
//inline-literals
|
||||
[/(``)((?:[^`]|\`(?!`))+)(``)/, ['', 'keyword', '']],
|
||||
[/(__\s+)(.+)/, ['', 'keyword']],
|
||||
//interpreted-text
|
||||
[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ['', 'keyword', '', '', '']],
|
||||
[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ['', '', '', 'keyword', '']],
|
||||
[/(`)([^`]+)(`)/, ''],
|
||||
//inline-internal-targets
|
||||
[/(_`)(@phrase)(`)/, ['', 'string.link', '']],
|
||||
],
|
||||
citations: [
|
||||
[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
],
|
||||
citationsReference: [
|
||||
[/(\[)(@citationName)(\]_)/, ['', 'string.link', '']],
|
||||
],
|
||||
footnotes: [
|
||||
[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '']],
|
||||
[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/, [{ token: '', next: '@subsequentLines' }, 'string.link', '', '']],
|
||||
],
|
||||
footnotesReference: [
|
||||
[/(\[)([0-9]+)(\])(_)/, ['', 'string.link', '', '']],
|
||||
[/(\[)(#@simpleRefName?)(\])(_)/, ['', 'string.link', '', '']],
|
||||
[/(\[)(\*)(\])(_)/, ['', 'string.link', '', '']]
|
||||
],
|
||||
blankLineOfLiteralBlocks: [
|
||||
[/^$/, '', '@subsequentLinesOfLiteralBlocks'],
|
||||
[/^.*$/, '', '@pop'],
|
||||
],
|
||||
subsequentLinesOfLiteralBlocks: [
|
||||
[/(@blockLiteralStart+)(.*)/, ['keyword', '']],
|
||||
[/^(?!blockLiteralStart)/, '', '@popall']
|
||||
],
|
||||
subsequentLines: [
|
||||
[/^[\s]+.*/, ''],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
hyperlinks: [
|
||||
[/^[\s]+.*/, 'string.link'],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
comments: [
|
||||
[/^[\s]+.*/, 'comment'],
|
||||
[/^(?!\s)/, '', '@pop'],
|
||||
],
|
||||
tables: [
|
||||
[/\+-[+-]+/, 'keyword'],
|
||||
[/\+=[+=]+/, 'keyword'],
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,397 +13,397 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['=begin', '=end'],
|
||||
},
|
||||
brackets: [
|
||||
['(', ')'],
|
||||
['{', '}'],
|
||||
['[', ']']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
indentationRules: {
|
||||
increaseIndentPattern: new RegExp('^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|\'|\/).*\\4)*(#.*)?$'),
|
||||
decreaseIndentPattern: new RegExp('^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)'),
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Ruby language definition
|
||||
*
|
||||
* Quite a complex language due to elaborate escape sequences
|
||||
* and quoting of literate strings/regular expressions, and
|
||||
* an 'end' keyword that does not always apply to modifiers like until and while,
|
||||
* and a 'do' keyword that sometimes starts a block, but sometimes is part of
|
||||
* another statement (like 'while').
|
||||
*
|
||||
* (1) end blocks:
|
||||
* 'end' may end declarations like if or until, but sometimes 'if' or 'until'
|
||||
* are modifiers where there is no 'end'. Also, 'do' sometimes starts a block
|
||||
* that is ended by 'end', but sometimes it is part of a 'while', 'for', or 'until'
|
||||
* To do proper brace matching we do some elaborate state manipulation.
|
||||
* some examples:
|
||||
*
|
||||
* until bla do
|
||||
* work until tired
|
||||
* list.each do
|
||||
* something if test
|
||||
* end
|
||||
* end
|
||||
*
|
||||
* or
|
||||
*
|
||||
* if test
|
||||
* something (if test then x end)
|
||||
* bar if bla
|
||||
* end
|
||||
*
|
||||
* or, how about using class as a property..
|
||||
*
|
||||
* class Test
|
||||
* def endpoint
|
||||
* self.class.endpoint || routes
|
||||
* end
|
||||
* end
|
||||
*
|
||||
* (2) quoting:
|
||||
* there are many kinds of strings and escape sequences. But also, one can
|
||||
* start many string-like things as '%qx' where q specifies the kind of string
|
||||
* (like a command, escape expanded, regular expression, symbol etc.), and x is
|
||||
* some character and only another 'x' ends the sequence. Except for brackets
|
||||
* where the closing bracket ends the sequence.. and except for a nested bracket
|
||||
* inside the string like entity. Also, such strings can contain interpolated
|
||||
* ruby expressions again (and span multiple lines). Moreover, expanded
|
||||
* regular expression can also contain comments.
|
||||
*/
|
||||
var language = {
|
||||
tokenPostfix: '.ruby',
|
||||
keywords: [
|
||||
'__LINE__', '__ENCODING__', '__FILE__', 'BEGIN', 'END', 'alias', 'and', 'begin',
|
||||
'break', 'case', 'class', 'def', 'defined?', 'do', 'else', 'elsif', 'end',
|
||||
'ensure', 'for', 'false', 'if', 'in', 'module', 'next', 'nil', 'not', 'or', 'redo',
|
||||
'rescue', 'retry', 'return', 'self', 'super', 'then', 'true', 'undef', 'unless',
|
||||
'until', 'when', 'while', 'yield',
|
||||
],
|
||||
keywordops: [
|
||||
'::', '..', '...', '?', ':', '=>'
|
||||
],
|
||||
builtins: [
|
||||
'require', 'public', 'private', 'include', 'extend', 'attr_reader',
|
||||
'protected', 'private_class_method', 'protected_class_method', 'new'
|
||||
],
|
||||
// these are closed by 'end' (if, while and until are handled separately)
|
||||
declarations: [
|
||||
'module', 'class', 'def', 'case', 'do', 'begin', 'for', 'if', 'while', 'until', 'unless'
|
||||
],
|
||||
linedecls: [
|
||||
'def', 'case', 'do', 'begin', 'for', 'if', 'while', 'until', 'unless'
|
||||
],
|
||||
operators: [
|
||||
'^', '&', '|', '<=>', '==', '===', '!~', '=~', '>', '>=', '<', '<=', '<<', '>>', '+',
|
||||
'-', '*', '/', '%', '**', '~', '+@', '-@', '[]', '[]=', '`',
|
||||
'+=', '-=', '*=', '**=', '/=', '^=', '%=', '<<=', '>>=', '&=', '&&=', '||=', '|='
|
||||
],
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' }
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
|
||||
// escape sequences
|
||||
escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
|
||||
escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
|
||||
decpart: /\d(_?\d)*/,
|
||||
decimal: /0|@decpart/,
|
||||
delim: /[^a-zA-Z0-9\s\n\r]/,
|
||||
heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
// Main entry.
|
||||
// root.<decl> where decl is the current opening declaration (like 'class')
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
// most complexity here is due to matching 'end' correctly with declarations.
|
||||
// We distinguish a declaration that comes first on a line, versus declarations further on a line (which are most likey modifiers)
|
||||
[/^(\s*)([a-z_]\w*[!?=]?)/, ['white',
|
||||
{
|
||||
cases: {
|
||||
'for|until|while': { token: 'keyword.$2', next: '@dodecl.$2' },
|
||||
'@declarations': { token: 'keyword.$2', next: '@root.$2' },
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]],
|
||||
[/[a-z_]\w*[!?=]?/,
|
||||
{
|
||||
cases: {
|
||||
'if|unless|while|until': { token: 'keyword.$0x', next: '@modifier.$0x' },
|
||||
'for': { token: 'keyword.$2', next: '@dodecl.$2' },
|
||||
'@linedecls': { token: 'keyword.$0', next: '@root.$0' },
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'],
|
||||
[/\$[\w]*/, 'global.constant'],
|
||||
[/@[\w]*/, 'namespace.instance.identifier'],
|
||||
[/@@[\w]*/, 'namespace.class.identifier'],
|
||||
// here document
|
||||
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/[ \t\r\n]+<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/^<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// strings
|
||||
[/"/, { token: 'string.d.delim', next: '@dstring.d."' }],
|
||||
[/'/, { token: 'string.sq.delim', next: '@sstring.sq' }],
|
||||
// % literals. For efficiency, rematch in the 'pstring' state
|
||||
[/%([rsqxwW]|Q?)/, { token: '@rematch', next: 'pstring' }],
|
||||
// commands and symbols
|
||||
[/`/, { token: 'string.x.delim', next: '@dstring.x.`' }],
|
||||
[/:(\w|[$@])\w*[!?=]?/, 'string.s'],
|
||||
[/:"/, { token: 'string.s.delim', next: '@dstring.s."' }],
|
||||
[/:'/, { token: 'string.s.delim', next: '@sstring.s' }],
|
||||
// regular expressions. Lookahead for a (not escaped) closing forwardslash on the same line
|
||||
[/\/(?=(\\\/|[^\/\n])+\/)/, { token: 'regexp.delim', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@keywordops': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
[/[;,]/, 'delimiter'],
|
||||
// numbers
|
||||
[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, 'number.hex'],
|
||||
[/0[_oO][0-7](_?[0-7])*/, 'number.octal'],
|
||||
[/0[bB][01](_?[01])*/, 'number.binary'],
|
||||
[/0[dD]@decpart/, 'number'],
|
||||
[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/, {
|
||||
cases: {
|
||||
'$1': 'number.float',
|
||||
'@default': 'number'
|
||||
}
|
||||
}],
|
||||
],
|
||||
// used to not treat a 'do' as a block opener if it occurs on the same
|
||||
// line as a 'do' statement: 'while|until|for'
|
||||
// dodecl.<decl> where decl is the declarations started, like 'while'
|
||||
dodecl: [
|
||||
[/^/, { token: '', switchTo: '@root.$S2' }],
|
||||
[/[a-z_]\w*[!?=]?/, {
|
||||
cases: {
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'do': { token: 'keyword', switchTo: '@root.$S2' },
|
||||
'@linedecls': { token: '@rematch', switchTo: '@root.$S2' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@root' }
|
||||
],
|
||||
// used to prevent potential modifiers ('if|until|while|unless') to match
|
||||
// with 'end' keywords.
|
||||
// modifier.<decl>x where decl is the declaration starter, like 'if'
|
||||
modifier: [
|
||||
[/^/, '', '@pop'],
|
||||
[/[a-z_]\w*[!?=]?/, {
|
||||
cases: {
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'then|else|elsif|do': { token: 'keyword', switchTo: '@root.$S2' },
|
||||
'@linedecls': { token: '@rematch', switchTo: '@root.$S2' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@root' }
|
||||
],
|
||||
// single quote strings (also used for symbols)
|
||||
// sstring.<kind> where kind is 'sq' (single quote) or 's' (symbol)
|
||||
sstring: [
|
||||
[/[^\\']+/, 'string.$S2'],
|
||||
[/\\\\|\\'|\\$/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.invalid'],
|
||||
[/'/, { token: 'string.$S2.delim', next: '@pop' }]
|
||||
],
|
||||
// double quoted "string".
|
||||
// dstring.<kind>.<delim> where kind is 'd' (double quoted), 'x' (command), or 's' (symbol)
|
||||
// and delim is the ending delimiter (" or `)
|
||||
dstring: [
|
||||
[/[^\\`"#]+/, 'string.$S2'],
|
||||
[/#/, 'string.$S2.escape', '@interpolated'],
|
||||
[/\\$/, 'string.$S2.escape'],
|
||||
[/@escapes/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.escape.invalid'],
|
||||
[/[`"]/, {
|
||||
cases: {
|
||||
'$#==$S3': { token: 'string.$S2.delim', next: '@pop' },
|
||||
'@default': 'string.$S2'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// literal documents
|
||||
// heredoc.<close> where close is the closing delimiter
|
||||
heredoc: [
|
||||
[/^(\s*)(@heredelim)$/, {
|
||||
cases: {
|
||||
'$2==$S2': ['string.heredoc', { token: 'string.heredoc.delimiter', next: '@pop' }],
|
||||
'@default': ['string.heredoc', 'string.heredoc']
|
||||
}
|
||||
}],
|
||||
[/.*/, 'string.heredoc'],
|
||||
],
|
||||
// interpolated sequence
|
||||
interpolated: [
|
||||
[/\$\w*/, 'global.constant', '@pop'],
|
||||
[/@\w*/, 'namespace.class.identifier', '@pop'],
|
||||
[/@@\w*/, 'namespace.instance.identifier', '@pop'],
|
||||
[/[{]/, { token: 'string.escape.curly', switchTo: '@interpolated_compound' }],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
// any code
|
||||
interpolated_compound: [
|
||||
[/[}]/, { token: 'string.escape.curly', next: '@pop' }],
|
||||
{ include: '@root' },
|
||||
],
|
||||
// %r quoted regexp
|
||||
// pregexp.<open>.<close> where open/close are the open/close delimiter
|
||||
pregexp: [
|
||||
{ include: '@whitespace' },
|
||||
// turns out that you can quote using regex control characters, aargh!
|
||||
// for example; %r|kgjgaj| is ok (even though | is used for alternation)
|
||||
// so, we need to match those first
|
||||
[/[^\(\{\[\\]/, {
|
||||
cases: {
|
||||
'$#==$S3': { token: 'regexp.delim', next: '@pop' },
|
||||
'$#==$S2': { token: 'regexp.delim', next: '@push' },
|
||||
'~[)}\\]]': '@brackets.regexp.escape.control',
|
||||
'~@regexpctl': 'regexp.escape.control',
|
||||
'@default': 'regexp'
|
||||
}
|
||||
}],
|
||||
{ include: '@regexcontrol' },
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
{ include: '@regexcontrol' },
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
['/[ixmp]*', { token: 'regexp.delim' }, '@pop'],
|
||||
],
|
||||
regexcontrol: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['@brackets.regexp.escape.control', 'regexp.escape.control', '@brackets.regexp.escape.control']],
|
||||
[/(\[)(\^?)/, ['@brackets.regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?[:=!])/, ['@brackets.regexp.escape.control', 'regexp.escape.control']],
|
||||
[/\(\?#/, { token: 'regexp.escape.control', next: '@regexpcomment' }],
|
||||
[/[()]/, '@brackets.regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/\\$/, 'regexp.escape'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/#/, 'regexp.escape', '@interpolated'],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/\\$/, 'regexp.escape'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, '@brackets.regexp.escape.control', '@pop'],
|
||||
],
|
||||
regexpcomment: [
|
||||
[/[^)]+/, 'comment'],
|
||||
[/\)/, { token: 'regexp.escape.control', next: '@pop' }]
|
||||
],
|
||||
// % quoted strings
|
||||
// A bit repetitive since we need to often special case the kind of ending delimiter
|
||||
pstring: [
|
||||
[/%([qws])\(/, { token: 'string.$1.delim', switchTo: '@qstring.$1.(.)' }],
|
||||
[/%([qws])\[/, { token: 'string.$1.delim', switchTo: '@qstring.$1.[.]' }],
|
||||
[/%([qws])\{/, { token: 'string.$1.delim', switchTo: '@qstring.$1.{.}' }],
|
||||
[/%([qws])</, { token: 'string.$1.delim', switchTo: '@qstring.$1.<.>' }],
|
||||
[/%([qws])(@delim)/, { token: 'string.$1.delim', switchTo: '@qstring.$1.$2.$2' }],
|
||||
[/%r\(/, { token: 'regexp.delim', switchTo: '@pregexp.(.)' }],
|
||||
[/%r\[/, { token: 'regexp.delim', switchTo: '@pregexp.[.]' }],
|
||||
[/%r\{/, { token: 'regexp.delim', switchTo: '@pregexp.{.}' }],
|
||||
[/%r</, { token: 'regexp.delim', switchTo: '@pregexp.<.>' }],
|
||||
[/%r(@delim)/, { token: 'regexp.delim', switchTo: '@pregexp.$1.$1' }],
|
||||
[/%(x|W|Q?)\(/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.(.)' }],
|
||||
[/%(x|W|Q?)\[/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.[.]' }],
|
||||
[/%(x|W|Q?)\{/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.{.}' }],
|
||||
[/%(x|W|Q?)</, { token: 'string.$1.delim', switchTo: '@qqstring.$1.<.>' }],
|
||||
[/%(x|W|Q?)(@delim)/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.$2.$2' }],
|
||||
[/%([rqwsxW]|Q?)./, { token: 'invalid', next: '@pop' }],
|
||||
[/./, { token: 'invalid', next: '@pop' }],
|
||||
],
|
||||
// non-expanded quoted string.
|
||||
// qstring.<kind>.<open>.<close>
|
||||
// kind = q|w|s (single quote, array, symbol)
|
||||
// open = open delimiter
|
||||
// close = close delimiter
|
||||
qstring: [
|
||||
[/\\$/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.escape'],
|
||||
[/./, {
|
||||
cases: {
|
||||
'$#==$S4': { token: 'string.$S2.delim', next: '@pop' },
|
||||
'$#==$S3': { token: 'string.$S2.delim', next: '@push' },
|
||||
'@default': 'string.$S2'
|
||||
}
|
||||
}],
|
||||
],
|
||||
// expanded quoted string.
|
||||
// qqstring.<kind>.<open>.<close>
|
||||
// kind = Q|W|x (double quote, array, command)
|
||||
// open = open delimiter
|
||||
// close = close delimiter
|
||||
qqstring: [
|
||||
[/#/, 'string.$S2.escape', '@interpolated'],
|
||||
{ include: '@qstring' }
|
||||
],
|
||||
// whitespace & comments
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\s*=begin\b/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^=]+/, 'comment'],
|
||||
[/^\s*=begin\b/, 'comment.invalid'],
|
||||
[/^\s*=end\b.*/, 'comment', '@pop'],
|
||||
[/[=]/, 'comment']
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
blockComment: ['=begin', '=end'],
|
||||
},
|
||||
brackets: [
|
||||
['(', ')'],
|
||||
['{', '}'],
|
||||
['[', ']']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
indentationRules: {
|
||||
increaseIndentPattern: new RegExp('^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|\'|\/).*\\4)*(#.*)?$'),
|
||||
decreaseIndentPattern: new RegExp('^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)'),
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Ruby language definition
|
||||
*
|
||||
* Quite a complex language due to elaborate escape sequences
|
||||
* and quoting of literate strings/regular expressions, and
|
||||
* an 'end' keyword that does not always apply to modifiers like until and while,
|
||||
* and a 'do' keyword that sometimes starts a block, but sometimes is part of
|
||||
* another statement (like 'while').
|
||||
*
|
||||
* (1) end blocks:
|
||||
* 'end' may end declarations like if or until, but sometimes 'if' or 'until'
|
||||
* are modifiers where there is no 'end'. Also, 'do' sometimes starts a block
|
||||
* that is ended by 'end', but sometimes it is part of a 'while', 'for', or 'until'
|
||||
* To do proper brace matching we do some elaborate state manipulation.
|
||||
* some examples:
|
||||
*
|
||||
* until bla do
|
||||
* work until tired
|
||||
* list.each do
|
||||
* something if test
|
||||
* end
|
||||
* end
|
||||
*
|
||||
* or
|
||||
*
|
||||
* if test
|
||||
* something (if test then x end)
|
||||
* bar if bla
|
||||
* end
|
||||
*
|
||||
* or, how about using class as a property..
|
||||
*
|
||||
* class Test
|
||||
* def endpoint
|
||||
* self.class.endpoint || routes
|
||||
* end
|
||||
* end
|
||||
*
|
||||
* (2) quoting:
|
||||
* there are many kinds of strings and escape sequences. But also, one can
|
||||
* start many string-like things as '%qx' where q specifies the kind of string
|
||||
* (like a command, escape expanded, regular expression, symbol etc.), and x is
|
||||
* some character and only another 'x' ends the sequence. Except for brackets
|
||||
* where the closing bracket ends the sequence.. and except for a nested bracket
|
||||
* inside the string like entity. Also, such strings can contain interpolated
|
||||
* ruby expressions again (and span multiple lines). Moreover, expanded
|
||||
* regular expression can also contain comments.
|
||||
*/
|
||||
var language = {
|
||||
tokenPostfix: '.ruby',
|
||||
keywords: [
|
||||
'__LINE__', '__ENCODING__', '__FILE__', 'BEGIN', 'END', 'alias', 'and', 'begin',
|
||||
'break', 'case', 'class', 'def', 'defined?', 'do', 'else', 'elsif', 'end',
|
||||
'ensure', 'for', 'false', 'if', 'in', 'module', 'next', 'nil', 'not', 'or', 'redo',
|
||||
'rescue', 'retry', 'return', 'self', 'super', 'then', 'true', 'undef', 'unless',
|
||||
'until', 'when', 'while', 'yield',
|
||||
],
|
||||
keywordops: [
|
||||
'::', '..', '...', '?', ':', '=>'
|
||||
],
|
||||
builtins: [
|
||||
'require', 'public', 'private', 'include', 'extend', 'attr_reader',
|
||||
'protected', 'private_class_method', 'protected_class_method', 'new'
|
||||
],
|
||||
// these are closed by 'end' (if, while and until are handled separately)
|
||||
declarations: [
|
||||
'module', 'class', 'def', 'case', 'do', 'begin', 'for', 'if', 'while', 'until', 'unless'
|
||||
],
|
||||
linedecls: [
|
||||
'def', 'case', 'do', 'begin', 'for', 'if', 'while', 'until', 'unless'
|
||||
],
|
||||
operators: [
|
||||
'^', '&', '|', '<=>', '==', '===', '!~', '=~', '>', '>=', '<', '<=', '<<', '>>', '+',
|
||||
'-', '*', '/', '%', '**', '~', '+@', '-@', '[]', '[]=', '`',
|
||||
'+=', '-=', '*=', '**=', '/=', '^=', '%=', '<<=', '>>=', '&=', '&&=', '||=', '|='
|
||||
],
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' }
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
|
||||
// escape sequences
|
||||
escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
|
||||
escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
|
||||
decpart: /\d(_?\d)*/,
|
||||
decimal: /0|@decpart/,
|
||||
delim: /[^a-zA-Z0-9\s\n\r]/,
|
||||
heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
// Main entry.
|
||||
// root.<decl> where decl is the current opening declaration (like 'class')
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
// most complexity here is due to matching 'end' correctly with declarations.
|
||||
// We distinguish a declaration that comes first on a line, versus declarations further on a line (which are most likey modifiers)
|
||||
[/^(\s*)([a-z_]\w*[!?=]?)/, ['white',
|
||||
{
|
||||
cases: {
|
||||
'for|until|while': { token: 'keyword.$2', next: '@dodecl.$2' },
|
||||
'@declarations': { token: 'keyword.$2', next: '@root.$2' },
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]],
|
||||
[/[a-z_]\w*[!?=]?/,
|
||||
{
|
||||
cases: {
|
||||
'if|unless|while|until': { token: 'keyword.$0x', next: '@modifier.$0x' },
|
||||
'for': { token: 'keyword.$2', next: '@dodecl.$2' },
|
||||
'@linedecls': { token: 'keyword.$0', next: '@root.$0' },
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'],
|
||||
[/\$[\w]*/, 'global.constant'],
|
||||
[/@[\w]*/, 'namespace.instance.identifier'],
|
||||
[/@@[\w]*/, 'namespace.class.identifier'],
|
||||
// here document
|
||||
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/[ \t\r\n]+<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/^<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// strings
|
||||
[/"/, { token: 'string.d.delim', next: '@dstring.d."' }],
|
||||
[/'/, { token: 'string.sq.delim', next: '@sstring.sq' }],
|
||||
// % literals. For efficiency, rematch in the 'pstring' state
|
||||
[/%([rsqxwW]|Q?)/, { token: '@rematch', next: 'pstring' }],
|
||||
// commands and symbols
|
||||
[/`/, { token: 'string.x.delim', next: '@dstring.x.`' }],
|
||||
[/:(\w|[$@])\w*[!?=]?/, 'string.s'],
|
||||
[/:"/, { token: 'string.s.delim', next: '@dstring.s."' }],
|
||||
[/:'/, { token: 'string.s.delim', next: '@sstring.s' }],
|
||||
// regular expressions. Lookahead for a (not escaped) closing forwardslash on the same line
|
||||
[/\/(?=(\\\/|[^\/\n])+\/)/, { token: 'regexp.delim', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@keywordops': 'keyword',
|
||||
'@operators': 'operator',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
[/[;,]/, 'delimiter'],
|
||||
// numbers
|
||||
[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, 'number.hex'],
|
||||
[/0[_oO][0-7](_?[0-7])*/, 'number.octal'],
|
||||
[/0[bB][01](_?[01])*/, 'number.binary'],
|
||||
[/0[dD]@decpart/, 'number'],
|
||||
[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/, {
|
||||
cases: {
|
||||
'$1': 'number.float',
|
||||
'@default': 'number'
|
||||
}
|
||||
}],
|
||||
],
|
||||
// used to not treat a 'do' as a block opener if it occurs on the same
|
||||
// line as a 'do' statement: 'while|until|for'
|
||||
// dodecl.<decl> where decl is the declarations started, like 'while'
|
||||
dodecl: [
|
||||
[/^/, { token: '', switchTo: '@root.$S2' }],
|
||||
[/[a-z_]\w*[!?=]?/, {
|
||||
cases: {
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'do': { token: 'keyword', switchTo: '@root.$S2' },
|
||||
'@linedecls': { token: '@rematch', switchTo: '@root.$S2' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@root' }
|
||||
],
|
||||
// used to prevent potential modifiers ('if|until|while|unless') to match
|
||||
// with 'end' keywords.
|
||||
// modifier.<decl>x where decl is the declaration starter, like 'if'
|
||||
modifier: [
|
||||
[/^/, '', '@pop'],
|
||||
[/[a-z_]\w*[!?=]?/, {
|
||||
cases: {
|
||||
'end': { token: 'keyword.$S2', next: '@pop' },
|
||||
'then|else|elsif|do': { token: 'keyword', switchTo: '@root.$S2' },
|
||||
'@linedecls': { token: '@rematch', switchTo: '@root.$S2' },
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@root' }
|
||||
],
|
||||
// single quote strings (also used for symbols)
|
||||
// sstring.<kind> where kind is 'sq' (single quote) or 's' (symbol)
|
||||
sstring: [
|
||||
[/[^\\']+/, 'string.$S2'],
|
||||
[/\\\\|\\'|\\$/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.invalid'],
|
||||
[/'/, { token: 'string.$S2.delim', next: '@pop' }]
|
||||
],
|
||||
// double quoted "string".
|
||||
// dstring.<kind>.<delim> where kind is 'd' (double quoted), 'x' (command), or 's' (symbol)
|
||||
// and delim is the ending delimiter (" or `)
|
||||
dstring: [
|
||||
[/[^\\`"#]+/, 'string.$S2'],
|
||||
[/#/, 'string.$S2.escape', '@interpolated'],
|
||||
[/\\$/, 'string.$S2.escape'],
|
||||
[/@escapes/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.escape.invalid'],
|
||||
[/[`"]/, {
|
||||
cases: {
|
||||
'$#==$S3': { token: 'string.$S2.delim', next: '@pop' },
|
||||
'@default': 'string.$S2'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// literal documents
|
||||
// heredoc.<close> where close is the closing delimiter
|
||||
heredoc: [
|
||||
[/^(\s*)(@heredelim)$/, {
|
||||
cases: {
|
||||
'$2==$S2': ['string.heredoc', { token: 'string.heredoc.delimiter', next: '@pop' }],
|
||||
'@default': ['string.heredoc', 'string.heredoc']
|
||||
}
|
||||
}],
|
||||
[/.*/, 'string.heredoc'],
|
||||
],
|
||||
// interpolated sequence
|
||||
interpolated: [
|
||||
[/\$\w*/, 'global.constant', '@pop'],
|
||||
[/@\w*/, 'namespace.class.identifier', '@pop'],
|
||||
[/@@\w*/, 'namespace.instance.identifier', '@pop'],
|
||||
[/[{]/, { token: 'string.escape.curly', switchTo: '@interpolated_compound' }],
|
||||
['', '', '@pop'],
|
||||
],
|
||||
// any code
|
||||
interpolated_compound: [
|
||||
[/[}]/, { token: 'string.escape.curly', next: '@pop' }],
|
||||
{ include: '@root' },
|
||||
],
|
||||
// %r quoted regexp
|
||||
// pregexp.<open>.<close> where open/close are the open/close delimiter
|
||||
pregexp: [
|
||||
{ include: '@whitespace' },
|
||||
// turns out that you can quote using regex control characters, aargh!
|
||||
// for example; %r|kgjgaj| is ok (even though | is used for alternation)
|
||||
// so, we need to match those first
|
||||
[/[^\(\{\[\\]/, {
|
||||
cases: {
|
||||
'$#==$S3': { token: 'regexp.delim', next: '@pop' },
|
||||
'$#==$S2': { token: 'regexp.delim', next: '@push' },
|
||||
'~[)}\\]]': '@brackets.regexp.escape.control',
|
||||
'~@regexpctl': 'regexp.escape.control',
|
||||
'@default': 'regexp'
|
||||
}
|
||||
}],
|
||||
{ include: '@regexcontrol' },
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
{ include: '@regexcontrol' },
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
['/[ixmp]*', { token: 'regexp.delim' }, '@pop'],
|
||||
],
|
||||
regexcontrol: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['@brackets.regexp.escape.control', 'regexp.escape.control', '@brackets.regexp.escape.control']],
|
||||
[/(\[)(\^?)/, ['@brackets.regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?[:=!])/, ['@brackets.regexp.escape.control', 'regexp.escape.control']],
|
||||
[/\(\?#/, { token: 'regexp.escape.control', next: '@regexpcomment' }],
|
||||
[/[()]/, '@brackets.regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/\\$/, 'regexp.escape'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/#/, 'regexp.escape', '@interpolated'],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/\\$/, 'regexp.escape'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, '@brackets.regexp.escape.control', '@pop'],
|
||||
],
|
||||
regexpcomment: [
|
||||
[/[^)]+/, 'comment'],
|
||||
[/\)/, { token: 'regexp.escape.control', next: '@pop' }]
|
||||
],
|
||||
// % quoted strings
|
||||
// A bit repetitive since we need to often special case the kind of ending delimiter
|
||||
pstring: [
|
||||
[/%([qws])\(/, { token: 'string.$1.delim', switchTo: '@qstring.$1.(.)' }],
|
||||
[/%([qws])\[/, { token: 'string.$1.delim', switchTo: '@qstring.$1.[.]' }],
|
||||
[/%([qws])\{/, { token: 'string.$1.delim', switchTo: '@qstring.$1.{.}' }],
|
||||
[/%([qws])</, { token: 'string.$1.delim', switchTo: '@qstring.$1.<.>' }],
|
||||
[/%([qws])(@delim)/, { token: 'string.$1.delim', switchTo: '@qstring.$1.$2.$2' }],
|
||||
[/%r\(/, { token: 'regexp.delim', switchTo: '@pregexp.(.)' }],
|
||||
[/%r\[/, { token: 'regexp.delim', switchTo: '@pregexp.[.]' }],
|
||||
[/%r\{/, { token: 'regexp.delim', switchTo: '@pregexp.{.}' }],
|
||||
[/%r</, { token: 'regexp.delim', switchTo: '@pregexp.<.>' }],
|
||||
[/%r(@delim)/, { token: 'regexp.delim', switchTo: '@pregexp.$1.$1' }],
|
||||
[/%(x|W|Q?)\(/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.(.)' }],
|
||||
[/%(x|W|Q?)\[/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.[.]' }],
|
||||
[/%(x|W|Q?)\{/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.{.}' }],
|
||||
[/%(x|W|Q?)</, { token: 'string.$1.delim', switchTo: '@qqstring.$1.<.>' }],
|
||||
[/%(x|W|Q?)(@delim)/, { token: 'string.$1.delim', switchTo: '@qqstring.$1.$2.$2' }],
|
||||
[/%([rqwsxW]|Q?)./, { token: 'invalid', next: '@pop' }],
|
||||
[/./, { token: 'invalid', next: '@pop' }],
|
||||
],
|
||||
// non-expanded quoted string.
|
||||
// qstring.<kind>.<open>.<close>
|
||||
// kind = q|w|s (single quote, array, symbol)
|
||||
// open = open delimiter
|
||||
// close = close delimiter
|
||||
qstring: [
|
||||
[/\\$/, 'string.$S2.escape'],
|
||||
[/\\./, 'string.$S2.escape'],
|
||||
[/./, {
|
||||
cases: {
|
||||
'$#==$S4': { token: 'string.$S2.delim', next: '@pop' },
|
||||
'$#==$S3': { token: 'string.$S2.delim', next: '@push' },
|
||||
'@default': 'string.$S2'
|
||||
}
|
||||
}],
|
||||
],
|
||||
// expanded quoted string.
|
||||
// qqstring.<kind>.<open>.<close>
|
||||
// kind = Q|W|x (double quote, array, command)
|
||||
// open = open delimiter
|
||||
// close = close delimiter
|
||||
qqstring: [
|
||||
[/#/, 'string.$S2.escape', '@interpolated'],
|
||||
{ include: '@qstring' }
|
||||
],
|
||||
// whitespace & comments
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/^\s*=begin\b/, 'comment', '@comment'],
|
||||
[/#.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^=]+/, 'comment'],
|
||||
[/^\s*=begin\b/, 'comment.invalid'],
|
||||
[/^\s*=end\b.*/, 'comment', '@pop'],
|
||||
[/[=]/, 'comment']
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,160 +13,160 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.rust',
|
||||
defaultToken: 'invalid',
|
||||
keywords: [
|
||||
'as', 'box', 'break', 'const', 'continue', 'crate', 'else', 'enum',
|
||||
'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop',
|
||||
'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self',
|
||||
'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use',
|
||||
'where', 'while', 'catch', 'default', 'union', 'static', 'abstract',
|
||||
'alignof', 'become', 'do', 'final', 'macro', 'offsetof', 'override',
|
||||
'priv', 'proc', 'pure', 'sizeof', 'typeof', 'unsized', 'virtual',
|
||||
'yield',
|
||||
],
|
||||
typeKeywords: [
|
||||
'Self', 'm32', 'm64', 'm128', 'f80', 'f16', 'f128', 'int', 'uint',
|
||||
'float', 'char', 'bool', 'u8', 'u16', 'u32', 'u64', 'f32', 'f64', 'i8',
|
||||
'i16', 'i32', 'i64', 'str', 'Option', 'Either', 'c_float', 'c_double',
|
||||
'c_void', 'FILE', 'fpos_t', 'DIR', 'dirent', 'c_char', 'c_schar',
|
||||
'c_uchar', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long',
|
||||
'c_ulong', 'size_t', 'ptrdiff_t', 'clock_t', 'time_t', 'c_longlong',
|
||||
'c_ulonglong', 'intptr_t', 'uintptr_t', 'off_t', 'dev_t', 'ino_t',
|
||||
'pid_t', 'mode_t', 'ssize_t',
|
||||
],
|
||||
constants: [
|
||||
'true', 'false', 'Some', 'None', 'Left', 'Right', 'Ok', 'Err',
|
||||
],
|
||||
supportConstants: [
|
||||
'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'EOF', 'SEEK_SET',
|
||||
'SEEK_CUR', 'SEEK_END', '_IOFBF', '_IONBF', '_IOLBF', 'BUFSIZ',
|
||||
'FOPEN_MAX', 'FILENAME_MAX', 'L_tmpnam', 'TMP_MAX', 'O_RDONLY',
|
||||
'O_WRONLY', 'O_RDWR', 'O_APPEND', 'O_CREAT', 'O_EXCL', 'O_TRUNC',
|
||||
'S_IFIFO', 'S_IFCHR', 'S_IFBLK', 'S_IFDIR', 'S_IFREG', 'S_IFMT',
|
||||
'S_IEXEC', 'S_IWRITE', 'S_IREAD', 'S_IRWXU', 'S_IXUSR', 'S_IWUSR',
|
||||
'S_IRUSR', 'F_OK', 'R_OK', 'W_OK', 'X_OK', 'STDIN_FILENO',
|
||||
'STDOUT_FILENO', 'STDERR_FILENO',
|
||||
],
|
||||
supportMacros: [
|
||||
'format!', 'print!', 'println!', 'panic!', 'format_args!', 'unreachable!',
|
||||
'write!', 'writeln!'
|
||||
],
|
||||
operators: [
|
||||
'!', '!=', '%', '%=', '&', '&=', '&&', '*', '*=', '+', '+=', '-', '-=',
|
||||
'->', '.', '..', '...', '/', '/=', ':', ';', '<<', '<<=', '<', '<=', '=',
|
||||
'==', '=>', '>', '>=', '>>', '>>=', '@', '^', '^=', '|', '|=', '||', '_',
|
||||
'?', '#'
|
||||
],
|
||||
escapes: /\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,
|
||||
delimiters: /[,]/,
|
||||
symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,
|
||||
intSuffixes: /[iu](8|16|32|64|128|size)/,
|
||||
floatSuffixes: /f(32|64)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,
|
||||
{
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword.type',
|
||||
'@keywords': 'keyword',
|
||||
'@supportConstants': 'keyword',
|
||||
'@supportMacros': 'keyword',
|
||||
'@constants': 'keyword',
|
||||
'@default': 'identifier',
|
||||
}
|
||||
}
|
||||
],
|
||||
// Designator
|
||||
[/\$/, 'identifier'],
|
||||
// Lifetime annotations
|
||||
[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/, 'identifier'],
|
||||
// Byte literal
|
||||
[/'\S'/, 'string.byteliteral'],
|
||||
// Strings
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
|
||||
{ include: '@numbers' },
|
||||
// Whitespace + comments
|
||||
{ include: '@whitespace' },
|
||||
[/@delimiters/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'delimiter'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]<>]/, '@brackets'],
|
||||
[/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@push'],
|
||||
["\\*/", 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
numbers: [
|
||||
//Octal
|
||||
[/(0o[0-7_]+)(@intSuffixes)?/, { token: 'number' }],
|
||||
//Binary
|
||||
[/(0b[0-1_]+)(@intSuffixes)?/, { token: 'number' }],
|
||||
//Exponent
|
||||
[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/, { token: 'number' }],
|
||||
//Float
|
||||
[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/, { token: 'number' }],
|
||||
//Hexadecimal
|
||||
[/(0x[\da-fA-F]+)_?(@intSuffixes)?/, { token: 'number' }],
|
||||
//Integer
|
||||
[/[\d][\d_]*(@intSuffixes?)?/, { token: 'number' }],
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.rust',
|
||||
defaultToken: 'invalid',
|
||||
keywords: [
|
||||
'as', 'box', 'break', 'const', 'continue', 'crate', 'else', 'enum',
|
||||
'extern', 'false', 'fn', 'for', 'if', 'impl', 'in', 'let', 'loop',
|
||||
'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return', 'self',
|
||||
'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use',
|
||||
'where', 'while', 'catch', 'default', 'union', 'static', 'abstract',
|
||||
'alignof', 'become', 'do', 'final', 'macro', 'offsetof', 'override',
|
||||
'priv', 'proc', 'pure', 'sizeof', 'typeof', 'unsized', 'virtual',
|
||||
'yield',
|
||||
],
|
||||
typeKeywords: [
|
||||
'Self', 'm32', 'm64', 'm128', 'f80', 'f16', 'f128', 'int', 'uint',
|
||||
'float', 'char', 'bool', 'u8', 'u16', 'u32', 'u64', 'f32', 'f64', 'i8',
|
||||
'i16', 'i32', 'i64', 'str', 'Option', 'Either', 'c_float', 'c_double',
|
||||
'c_void', 'FILE', 'fpos_t', 'DIR', 'dirent', 'c_char', 'c_schar',
|
||||
'c_uchar', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long',
|
||||
'c_ulong', 'size_t', 'ptrdiff_t', 'clock_t', 'time_t', 'c_longlong',
|
||||
'c_ulonglong', 'intptr_t', 'uintptr_t', 'off_t', 'dev_t', 'ino_t',
|
||||
'pid_t', 'mode_t', 'ssize_t',
|
||||
],
|
||||
constants: [
|
||||
'true', 'false', 'Some', 'None', 'Left', 'Right', 'Ok', 'Err',
|
||||
],
|
||||
supportConstants: [
|
||||
'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'EOF', 'SEEK_SET',
|
||||
'SEEK_CUR', 'SEEK_END', '_IOFBF', '_IONBF', '_IOLBF', 'BUFSIZ',
|
||||
'FOPEN_MAX', 'FILENAME_MAX', 'L_tmpnam', 'TMP_MAX', 'O_RDONLY',
|
||||
'O_WRONLY', 'O_RDWR', 'O_APPEND', 'O_CREAT', 'O_EXCL', 'O_TRUNC',
|
||||
'S_IFIFO', 'S_IFCHR', 'S_IFBLK', 'S_IFDIR', 'S_IFREG', 'S_IFMT',
|
||||
'S_IEXEC', 'S_IWRITE', 'S_IREAD', 'S_IRWXU', 'S_IXUSR', 'S_IWUSR',
|
||||
'S_IRUSR', 'F_OK', 'R_OK', 'W_OK', 'X_OK', 'STDIN_FILENO',
|
||||
'STDOUT_FILENO', 'STDERR_FILENO',
|
||||
],
|
||||
supportMacros: [
|
||||
'format!', 'print!', 'println!', 'panic!', 'format_args!', 'unreachable!',
|
||||
'write!', 'writeln!'
|
||||
],
|
||||
operators: [
|
||||
'!', '!=', '%', '%=', '&', '&=', '&&', '*', '*=', '+', '+=', '-', '-=',
|
||||
'->', '.', '..', '...', '/', '/=', ':', ';', '<<', '<<=', '<', '<=', '=',
|
||||
'==', '=>', '>', '>=', '>>', '>>=', '@', '^', '^=', '|', '|=', '||', '_',
|
||||
'?', '#'
|
||||
],
|
||||
escapes: /\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,
|
||||
delimiters: /[,]/,
|
||||
symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,
|
||||
intSuffixes: /[iu](8|16|32|64|128|size)/,
|
||||
floatSuffixes: /f(32|64)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,
|
||||
{
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword.type',
|
||||
'@keywords': 'keyword',
|
||||
'@supportConstants': 'keyword',
|
||||
'@supportMacros': 'keyword',
|
||||
'@constants': 'keyword',
|
||||
'@default': 'identifier',
|
||||
}
|
||||
}
|
||||
],
|
||||
// Designator
|
||||
[/\$/, 'identifier'],
|
||||
// Lifetime annotations
|
||||
[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/, 'identifier'],
|
||||
// Byte literal
|
||||
[/'\S'/, 'string.byteliteral'],
|
||||
// Strings
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string' }],
|
||||
{ include: '@numbers' },
|
||||
// Whitespace + comments
|
||||
{ include: '@whitespace' },
|
||||
[/@delimiters/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'delimiter'
|
||||
}
|
||||
}],
|
||||
[/[{}()\[\]<>]/, '@brackets'],
|
||||
[/@symbols/, { cases: { '@operators': 'operator', '@default': '' } }],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@push'],
|
||||
["\\*/", 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
numbers: [
|
||||
//Octal
|
||||
[/(0o[0-7_]+)(@intSuffixes)?/, { token: 'number' }],
|
||||
//Binary
|
||||
[/(0b[0-1_]+)(@intSuffixes)?/, { token: 'number' }],
|
||||
//Exponent
|
||||
[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/, { token: 'number' }],
|
||||
//Float
|
||||
[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/, { token: 'number' }],
|
||||
//Hexadecimal
|
||||
[/(0x[\da-fA-F]+)_?(@intSuffixes)?/, { token: 'number' }],
|
||||
//Integer
|
||||
[/[\d][\d_]*(@intSuffixes?)?/, { token: 'number' }],
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,102 +13,102 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '\'',
|
||||
},
|
||||
brackets: [
|
||||
['(', ')'], ['[', ']'],
|
||||
['If', 'EndIf'],
|
||||
['While', 'EndWhile'],
|
||||
['For', 'EndFor'],
|
||||
['Sub', 'EndSub']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sb',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
// Special bracket statement pairs
|
||||
{ token: 'keyword.tag-if', open: 'If', close: 'EndIf' },
|
||||
{ token: 'keyword.tag-while', open: 'While', close: 'EndWhile' },
|
||||
{ token: 'keyword.tag-for', open: 'For', close: 'EndFor' },
|
||||
{ token: 'keyword.tag-sub', open: 'Sub', close: 'EndSub' },
|
||||
],
|
||||
keywords: [
|
||||
'Else', 'ElseIf', 'EndFor', 'EndIf', 'EndSub', 'EndWhile',
|
||||
'For', 'Goto', 'If', 'Step', 'Sub', 'Then', 'To', 'While'
|
||||
],
|
||||
tagwords: [
|
||||
'If', 'Sub', 'While', 'For'
|
||||
],
|
||||
operators: ['>', '<', '<>', '<=', '>=', 'And', 'Or', '+', '-', '*', '/', '='],
|
||||
// we include these common regular expressions
|
||||
identifier: /[a-zA-Z_][\w]*/,
|
||||
symbols: /[=><:+\-*\/%\.,]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// classes
|
||||
[/(@identifier)(?=[.])/, 'type'],
|
||||
// identifiers, tagwords, and keywords
|
||||
[/@identifier/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@operators': 'operator',
|
||||
'@default': 'variable.name'
|
||||
}
|
||||
}],
|
||||
// methods, properties, and events
|
||||
[/([.])(@identifier)/, {
|
||||
cases: {
|
||||
'$2': ['delimiter', 'type.member'],
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+/, 'number.float'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'operator',
|
||||
'@default': 'delimiter'
|
||||
}
|
||||
}],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(\').*$/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"C?/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '\'',
|
||||
},
|
||||
brackets: [
|
||||
['(', ')'], ['[', ']'],
|
||||
['If', 'EndIf'],
|
||||
['While', 'EndWhile'],
|
||||
['For', 'EndFor'],
|
||||
['Sub', 'EndSub']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.sb',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
// Special bracket statement pairs
|
||||
{ token: 'keyword.tag-if', open: 'If', close: 'EndIf' },
|
||||
{ token: 'keyword.tag-while', open: 'While', close: 'EndWhile' },
|
||||
{ token: 'keyword.tag-for', open: 'For', close: 'EndFor' },
|
||||
{ token: 'keyword.tag-sub', open: 'Sub', close: 'EndSub' },
|
||||
],
|
||||
keywords: [
|
||||
'Else', 'ElseIf', 'EndFor', 'EndIf', 'EndSub', 'EndWhile',
|
||||
'For', 'Goto', 'If', 'Step', 'Sub', 'Then', 'To', 'While'
|
||||
],
|
||||
tagwords: [
|
||||
'If', 'Sub', 'While', 'For'
|
||||
],
|
||||
operators: ['>', '<', '<>', '<=', '>=', 'And', 'Or', '+', '-', '*', '/', '='],
|
||||
// we include these common regular expressions
|
||||
identifier: /[a-zA-Z_][\w]*/,
|
||||
symbols: /[=><:+\-*\/%\.,]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// classes
|
||||
[/(@identifier)(?=[.])/, 'type'],
|
||||
// identifiers, tagwords, and keywords
|
||||
[/@identifier/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@operators': 'operator',
|
||||
'@default': 'variable.name'
|
||||
}
|
||||
}],
|
||||
// methods, properties, and events
|
||||
[/([.])(@identifier)/, {
|
||||
cases: {
|
||||
'$2': ['delimiter', 'type.member'],
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\.\d+/, 'number.float'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'operator',
|
||||
'@default': 'delimiter'
|
||||
}
|
||||
}],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(\').*$/, 'comment']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"C?/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,112 +13,112 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: ';',
|
||||
blockComment: ['#|', '|#'],
|
||||
},
|
||||
brackets: [['(', ')'], ['{', '}'], ['[', ']']],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.scheme',
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
],
|
||||
keywords: [
|
||||
'case',
|
||||
'do',
|
||||
'let',
|
||||
'loop',
|
||||
'if',
|
||||
'else',
|
||||
'when',
|
||||
'cons',
|
||||
'car',
|
||||
'cdr',
|
||||
'cond',
|
||||
'lambda',
|
||||
'lambda*',
|
||||
'syntax-rules',
|
||||
'format',
|
||||
'set!',
|
||||
'quote',
|
||||
'eval',
|
||||
'append',
|
||||
'list',
|
||||
'list?',
|
||||
'member?',
|
||||
'load',
|
||||
],
|
||||
constants: ['#t', '#f'],
|
||||
operators: ['eq?', 'eqv?', 'equal?', 'and', 'or', 'not', 'null?'],
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/#[xXoObB][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/, 'number.float'],
|
||||
[
|
||||
/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,
|
||||
['keyword', 'white', 'variable'],
|
||||
],
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@strings' },
|
||||
[
|
||||
/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@constants': 'constant',
|
||||
'@operators': 'operators',
|
||||
'@default': 'identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
comment: [
|
||||
[/[^\|#]+/, 'comment'],
|
||||
[/#\|/, 'comment', '@push'],
|
||||
[/\|#/, 'comment', '@pop'],
|
||||
[/[\|#]/, 'comment'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/#\|/, 'comment', '@comment'],
|
||||
[/;.*$/, 'comment'],
|
||||
],
|
||||
strings: [
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"(?=.)/, 'string', '@multiLineString'],
|
||||
],
|
||||
multiLineString: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string.escape'],
|
||||
[/"/, 'string', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: ';',
|
||||
blockComment: ['#|', '|#'],
|
||||
},
|
||||
brackets: [['(', ')'], ['{', '}'], ['[', ']']],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.scheme',
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' },
|
||||
],
|
||||
keywords: [
|
||||
'case',
|
||||
'do',
|
||||
'let',
|
||||
'loop',
|
||||
'if',
|
||||
'else',
|
||||
'when',
|
||||
'cons',
|
||||
'car',
|
||||
'cdr',
|
||||
'cond',
|
||||
'lambda',
|
||||
'lambda*',
|
||||
'syntax-rules',
|
||||
'format',
|
||||
'set!',
|
||||
'quote',
|
||||
'eval',
|
||||
'append',
|
||||
'list',
|
||||
'list?',
|
||||
'member?',
|
||||
'load',
|
||||
],
|
||||
constants: ['#t', '#f'],
|
||||
operators: ['eq?', 'eqv?', 'equal?', 'and', 'or', 'not', 'null?'],
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/#[xXoObB][0-9a-fA-F]+/, 'number.hex'],
|
||||
[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/, 'number.float'],
|
||||
[
|
||||
/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,
|
||||
['keyword', 'white', 'variable'],
|
||||
],
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@strings' },
|
||||
[
|
||||
/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@constants': 'constant',
|
||||
'@operators': 'operators',
|
||||
'@default': 'identifier',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
comment: [
|
||||
[/[^\|#]+/, 'comment'],
|
||||
[/#\|/, 'comment', '@push'],
|
||||
[/\|#/, 'comment', '@pop'],
|
||||
[/[\|#]/, 'comment'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/#\|/, 'comment', '@comment'],
|
||||
[/;.*$/, 'comment'],
|
||||
],
|
||||
strings: [
|
||||
[/"$/, 'string', '@popall'],
|
||||
[/"(?=.)/, 'string', '@multiLineString'],
|
||||
],
|
||||
multiLineString: [
|
||||
[/[^\\"]+$/, 'string', '@popall'],
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/\\./, 'string.escape'],
|
||||
[/"/, 'string', '@popall'],
|
||||
[/\\$/, 'string']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,249 +13,249 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.scss',
|
||||
ws: '[ \t\n\r\f]*',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@selector' },
|
||||
],
|
||||
selector: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@import' },
|
||||
{ include: '@variabledeclaration' },
|
||||
{ include: '@warndebug' },
|
||||
['[@](include)', { token: 'keyword', next: '@includedeclaration' }],
|
||||
['[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)', { token: 'keyword', next: '@keyframedeclaration' }],
|
||||
['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],
|
||||
['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['[@](function)', { token: 'keyword', next: '@functiondeclaration' }],
|
||||
['[@](mixin)', { token: 'keyword', next: '@mixindeclaration' }],
|
||||
['url(\\-prefix)?\\(', { token: 'meta', next: '@urldeclaration' }],
|
||||
{ include: '@controlstatement' },
|
||||
{ include: '@selectorname' },
|
||||
['[&\\*]', 'tag'],
|
||||
['[>\\+,]', 'delimiter'],
|
||||
['\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],
|
||||
['{', { token: 'delimiter.curly', next: '@selectorbody' }],
|
||||
],
|
||||
selectorbody: [
|
||||
['[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],
|
||||
{ include: '@selector' },
|
||||
['[@](extend)', { token: 'keyword', next: '@extendbody' }],
|
||||
['[@](return)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
selectorname: [
|
||||
['#{', { token: 'meta', next: '@variableinterpolation' }],
|
||||
['(\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'],
|
||||
],
|
||||
selectorattribute: [
|
||||
{ include: '@term' },
|
||||
[']', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
term: [
|
||||
{ include: '@comments' },
|
||||
['url(\\-prefix)?\\(', { token: 'meta', next: '@urldeclaration' }],
|
||||
{ include: '@functioninvocation' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@variablereference' },
|
||||
['(and\\b|or\\b|not\\b)', 'operator'],
|
||||
{ include: '@name' },
|
||||
['([<>=\\+\\-\\*\\/\\^\\|\\~,])', 'operator'],
|
||||
[',', 'delimiter'],
|
||||
['!default', 'literal'],
|
||||
['\\(', { token: 'delimiter.parenthesis', next: '@parenthizedterm' }],
|
||||
],
|
||||
rulevalue: [
|
||||
{ include: '@term' },
|
||||
['!important', 'literal'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@nestedproperty' }],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
nestedproperty: [
|
||||
['[*_]?@identifier@ws:', 'attribute.name', '@rulevalue'],
|
||||
{ include: '@comments' },
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
warndebug: [
|
||||
['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }],
|
||||
],
|
||||
import: [
|
||||
['[@](import)', { token: 'keyword', next: '@declarationbody' }],
|
||||
],
|
||||
variabledeclaration: [
|
||||
['\\$@identifier@ws:', 'variable.decl', '@declarationbody'],
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
parenthizedterm: [
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }],
|
||||
],
|
||||
declarationbody: [
|
||||
{ include: '@term' },
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
extendbody: [
|
||||
{ include: '@selectorname' },
|
||||
['!optional', 'literal'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
variablereference: [
|
||||
['\\$@identifier', 'variable.ref'],
|
||||
['\\.\\.\\.', 'operator'],
|
||||
['#{', { token: 'meta', next: '@variableinterpolation' }],
|
||||
],
|
||||
variableinterpolation: [
|
||||
{ include: '@variablereference' },
|
||||
['}', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment'],
|
||||
],
|
||||
name: [
|
||||
['@identifier', 'attribute.value'],
|
||||
],
|
||||
numbers: [
|
||||
['(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'number.hex'],
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'number', '@pop']
|
||||
],
|
||||
functiondeclaration: [
|
||||
['@identifier@ws\\(', { token: 'meta', next: '@parameterdeclaration' }],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@functionbody' }],
|
||||
],
|
||||
mixindeclaration: [
|
||||
// mixin with parameters
|
||||
['@identifier@ws\\(', { token: 'meta', next: '@parameterdeclaration' }],
|
||||
// mixin without parameters
|
||||
['@identifier', 'meta'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
parameterdeclaration: [
|
||||
['\\$@identifier@ws:', 'variable.decl'],
|
||||
['\\.\\.\\.', 'operator'],
|
||||
[',', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
includedeclaration: [
|
||||
{ include: '@functioninvocation' },
|
||||
['@identifier', 'meta'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
keyframedeclaration: [
|
||||
['@identifier', 'meta'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@keyframebody' }],
|
||||
],
|
||||
keyframebody: [
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.curly', next: '@selectorbody' }],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
controlstatement: [
|
||||
['[@](if|else|for|while|each|media)', { token: 'keyword.flow', next: '@controlstatementdeclaration' }],
|
||||
],
|
||||
controlstatementdeclaration: [
|
||||
['(in|from|through|if|to)\\b', { token: 'keyword.flow' }],
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
functionbody: [
|
||||
['[@](return)', { token: 'keyword' }],
|
||||
{ include: '@variabledeclaration' },
|
||||
{ include: '@term' },
|
||||
{ include: '@controlstatement' },
|
||||
[';', 'delimiter'],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
functioninvocation: [
|
||||
['@identifier\\(', { token: 'meta', next: '@functionarguments' }],
|
||||
],
|
||||
functionarguments: [
|
||||
['\\$@identifier@ws:', 'attribute.name'],
|
||||
['[,]', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string.delimiter', next: '@stringenddoublequote' }],
|
||||
['~?\'', { token: 'string.delimiter', next: '@stringendquote' }]
|
||||
],
|
||||
stringenddoublequote: [
|
||||
['\\\\.', 'string'],
|
||||
['"', { token: 'string.delimiter', next: '@pop' }],
|
||||
['.', 'string']
|
||||
],
|
||||
stringendquote: [
|
||||
['\\\\.', 'string'],
|
||||
['\'', { token: 'string.delimiter', next: '@pop' }],
|
||||
['.', 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),
|
||||
end: new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.scss',
|
||||
ws: '[ \t\n\r\f]*',
|
||||
identifier: '-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*',
|
||||
brackets: [
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.bracket' },
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '<', close: '>', token: 'delimiter.angle' }
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@selector' },
|
||||
],
|
||||
selector: [
|
||||
{ include: '@comments' },
|
||||
{ include: '@import' },
|
||||
{ include: '@variabledeclaration' },
|
||||
{ include: '@warndebug' },
|
||||
['[@](include)', { token: 'keyword', next: '@includedeclaration' }],
|
||||
['[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)', { token: 'keyword', next: '@keyframedeclaration' }],
|
||||
['[@](page|content|font-face|-moz-document)', { token: 'keyword' }],
|
||||
['[@](charset|namespace)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['[@](function)', { token: 'keyword', next: '@functiondeclaration' }],
|
||||
['[@](mixin)', { token: 'keyword', next: '@mixindeclaration' }],
|
||||
['url(\\-prefix)?\\(', { token: 'meta', next: '@urldeclaration' }],
|
||||
{ include: '@controlstatement' },
|
||||
{ include: '@selectorname' },
|
||||
['[&\\*]', 'tag'],
|
||||
['[>\\+,]', 'delimiter'],
|
||||
['\\[', { token: 'delimiter.bracket', next: '@selectorattribute' }],
|
||||
['{', { token: 'delimiter.curly', next: '@selectorbody' }],
|
||||
],
|
||||
selectorbody: [
|
||||
['[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))', 'attribute.name', '@rulevalue'],
|
||||
{ include: '@selector' },
|
||||
['[@](extend)', { token: 'keyword', next: '@extendbody' }],
|
||||
['[@](return)', { token: 'keyword', next: '@declarationbody' }],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
selectorname: [
|
||||
['#{', { token: 'meta', next: '@variableinterpolation' }],
|
||||
['(\\.|#(?=[^{])|%|(@identifier)|:)+', 'tag'],
|
||||
],
|
||||
selectorattribute: [
|
||||
{ include: '@term' },
|
||||
[']', { token: 'delimiter.bracket', next: '@pop' }],
|
||||
],
|
||||
term: [
|
||||
{ include: '@comments' },
|
||||
['url(\\-prefix)?\\(', { token: 'meta', next: '@urldeclaration' }],
|
||||
{ include: '@functioninvocation' },
|
||||
{ include: '@numbers' },
|
||||
{ include: '@strings' },
|
||||
{ include: '@variablereference' },
|
||||
['(and\\b|or\\b|not\\b)', 'operator'],
|
||||
{ include: '@name' },
|
||||
['([<>=\\+\\-\\*\\/\\^\\|\\~,])', 'operator'],
|
||||
[',', 'delimiter'],
|
||||
['!default', 'literal'],
|
||||
['\\(', { token: 'delimiter.parenthesis', next: '@parenthizedterm' }],
|
||||
],
|
||||
rulevalue: [
|
||||
{ include: '@term' },
|
||||
['!important', 'literal'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@nestedproperty' }],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
nestedproperty: [
|
||||
['[*_]?@identifier@ws:', 'attribute.name', '@rulevalue'],
|
||||
{ include: '@comments' },
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
warndebug: [
|
||||
['[@](warn|debug)', { token: 'keyword', next: '@declarationbody' }],
|
||||
],
|
||||
import: [
|
||||
['[@](import)', { token: 'keyword', next: '@declarationbody' }],
|
||||
],
|
||||
variabledeclaration: [
|
||||
['\\$@identifier@ws:', 'variable.decl', '@declarationbody'],
|
||||
],
|
||||
urldeclaration: [
|
||||
{ include: '@strings' },
|
||||
['[^)\r\n]+', 'string'],
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
parenthizedterm: [
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'delimiter.parenthesis', next: '@pop' }],
|
||||
],
|
||||
declarationbody: [
|
||||
{ include: '@term' },
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
extendbody: [
|
||||
{ include: '@selectorname' },
|
||||
['!optional', 'literal'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
],
|
||||
variablereference: [
|
||||
['\\$@identifier', 'variable.ref'],
|
||||
['\\.\\.\\.', 'operator'],
|
||||
['#{', { token: 'meta', next: '@variableinterpolation' }],
|
||||
],
|
||||
variableinterpolation: [
|
||||
{ include: '@variablereference' },
|
||||
['}', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
comments: [
|
||||
['\\/\\*', 'comment', '@comment'],
|
||||
['\\/\\/+.*', 'comment'],
|
||||
],
|
||||
comment: [
|
||||
['\\*\\/', 'comment', '@pop'],
|
||||
['.', 'comment'],
|
||||
],
|
||||
name: [
|
||||
['@identifier', 'attribute.value'],
|
||||
],
|
||||
numbers: [
|
||||
['(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?', { token: 'number', next: '@units' }],
|
||||
['#[0-9a-fA-F_]+(?!\\w)', 'number.hex'],
|
||||
],
|
||||
units: [
|
||||
['(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?', 'number', '@pop']
|
||||
],
|
||||
functiondeclaration: [
|
||||
['@identifier@ws\\(', { token: 'meta', next: '@parameterdeclaration' }],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@functionbody' }],
|
||||
],
|
||||
mixindeclaration: [
|
||||
// mixin with parameters
|
||||
['@identifier@ws\\(', { token: 'meta', next: '@parameterdeclaration' }],
|
||||
// mixin without parameters
|
||||
['@identifier', 'meta'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
parameterdeclaration: [
|
||||
['\\$@identifier@ws:', 'variable.decl'],
|
||||
['\\.\\.\\.', 'operator'],
|
||||
[',', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
includedeclaration: [
|
||||
{ include: '@functioninvocation' },
|
||||
['@identifier', 'meta'],
|
||||
[';', 'delimiter', '@pop'],
|
||||
['(?=})', { token: '', next: '@pop' }],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
keyframedeclaration: [
|
||||
['@identifier', 'meta'],
|
||||
['{', { token: 'delimiter.curly', switchTo: '@keyframebody' }],
|
||||
],
|
||||
keyframebody: [
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.curly', next: '@selectorbody' }],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
controlstatement: [
|
||||
['[@](if|else|for|while|each|media)', { token: 'keyword.flow', next: '@controlstatementdeclaration' }],
|
||||
],
|
||||
controlstatementdeclaration: [
|
||||
['(in|from|through|if|to)\\b', { token: 'keyword.flow' }],
|
||||
{ include: '@term' },
|
||||
['{', { token: 'delimiter.curly', switchTo: '@selectorbody' }],
|
||||
],
|
||||
functionbody: [
|
||||
['[@](return)', { token: 'keyword' }],
|
||||
{ include: '@variabledeclaration' },
|
||||
{ include: '@term' },
|
||||
{ include: '@controlstatement' },
|
||||
[';', 'delimiter'],
|
||||
['}', { token: 'delimiter.curly', next: '@pop' }],
|
||||
],
|
||||
functioninvocation: [
|
||||
['@identifier\\(', { token: 'meta', next: '@functionarguments' }],
|
||||
],
|
||||
functionarguments: [
|
||||
['\\$@identifier@ws:', 'attribute.name'],
|
||||
['[,]', 'delimiter'],
|
||||
{ include: '@term' },
|
||||
['\\)', { token: 'meta', next: '@pop' }],
|
||||
],
|
||||
strings: [
|
||||
['~?"', { token: 'string.delimiter', next: '@stringenddoublequote' }],
|
||||
['~?\'', { token: 'string.delimiter', next: '@stringendquote' }]
|
||||
],
|
||||
stringenddoublequote: [
|
||||
['\\\\.', 'string'],
|
||||
['"', { token: 'string.delimiter', next: '@pop' }],
|
||||
['.', 'string']
|
||||
],
|
||||
stringendquote: [
|
||||
['\\\\.', 'string'],
|
||||
['\'', { token: 'string.delimiter', next: '@pop' }],
|
||||
['.', 'string']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,213 +13,213 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: "'", close: "'" },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: "'", close: "'" },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.shell',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
],
|
||||
keywords: [
|
||||
'if',
|
||||
'then',
|
||||
'do',
|
||||
'else',
|
||||
'elif',
|
||||
'while',
|
||||
'until',
|
||||
'for',
|
||||
'in',
|
||||
'esac',
|
||||
'fi',
|
||||
'fin',
|
||||
'fil',
|
||||
'done',
|
||||
'exit',
|
||||
'set',
|
||||
'unset',
|
||||
'export',
|
||||
'function',
|
||||
],
|
||||
builtins: [
|
||||
'ab',
|
||||
'awk',
|
||||
'bash',
|
||||
'beep',
|
||||
'cat',
|
||||
'cc',
|
||||
'cd',
|
||||
'chown',
|
||||
'chmod',
|
||||
'chroot',
|
||||
'clear',
|
||||
'cp',
|
||||
'curl',
|
||||
'cut',
|
||||
'diff',
|
||||
'echo',
|
||||
'find',
|
||||
'gawk',
|
||||
'gcc',
|
||||
'get',
|
||||
'git',
|
||||
'grep',
|
||||
'hg',
|
||||
'kill',
|
||||
'killall',
|
||||
'ln',
|
||||
'ls',
|
||||
'make',
|
||||
'mkdir',
|
||||
'openssl',
|
||||
'mv',
|
||||
'nc',
|
||||
'node',
|
||||
'npm',
|
||||
'ping',
|
||||
'ps',
|
||||
'restart',
|
||||
'rm',
|
||||
'rmdir',
|
||||
'sed',
|
||||
'service',
|
||||
'sh',
|
||||
'shopt',
|
||||
'shred',
|
||||
'source',
|
||||
'sort',
|
||||
'sleep',
|
||||
'ssh',
|
||||
'start',
|
||||
'stop',
|
||||
'su',
|
||||
'sudo',
|
||||
'svn',
|
||||
'tee',
|
||||
'telnet',
|
||||
'top',
|
||||
'touch',
|
||||
'vi',
|
||||
'vim',
|
||||
'wall',
|
||||
'wc',
|
||||
'wget',
|
||||
'who',
|
||||
'write',
|
||||
'yes',
|
||||
'zsh',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
[
|
||||
/[a-zA-Z]\w*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'type.identifier',
|
||||
'@default': ''
|
||||
},
|
||||
},
|
||||
],
|
||||
{ include: '@strings' },
|
||||
{ include: '@parameters' },
|
||||
{ include: '@heredoc' },
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
[/-+\w+/, 'attribute.name'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
{ include: '@numbers' },
|
||||
[/[,;]/, 'delimiter'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/(^#!.*$)/, 'metatag'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
],
|
||||
numbers: [
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
],
|
||||
// Recognize strings, including those broken across lines
|
||||
strings: [
|
||||
[/'/, 'string', '@stringBody'],
|
||||
[/"/, 'string', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/'/, 'string', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
dblStringBody: [
|
||||
[/"/, 'string', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
heredoc: [
|
||||
[/(<<[-<]?)(\s*)(['"`]?)([\w\-]+)(['"`]?)/, ['constants', 'white', 'string.heredoc.delimiter', 'string.heredoc', 'string.heredoc.delimiter']]
|
||||
],
|
||||
parameters: [
|
||||
[/\$\d+/, 'variable.predefined'],
|
||||
[/\$\w+/, 'variable'],
|
||||
[/\$[*@#?\-$!0_]/, 'variable'],
|
||||
[/\$'/, 'variable', '@parameterBodyQuote'],
|
||||
[/\$"/, 'variable', '@parameterBodyDoubleQuote'],
|
||||
[/\$\(/, 'variable', '@parameterBodyParen'],
|
||||
[/\$\{/, 'variable', '@parameterBodyCurlyBrace'],
|
||||
],
|
||||
parameterBodyQuote: [
|
||||
[/[^#:%*@\-!_']+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[']/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyDoubleQuote: [
|
||||
[/[^#:%*@\-!_"]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/["]/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyParen: [
|
||||
[/[^#:%*@\-!_)]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[)]/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyCurlyBrace: [
|
||||
[/[^#:%*@\-!_}]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[}]/, 'variable', '@pop'],
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#',
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')']],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: "'", close: "'" },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: "'", close: "'" },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
ignoreCase: true,
|
||||
tokenPostfix: '.shell',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
],
|
||||
keywords: [
|
||||
'if',
|
||||
'then',
|
||||
'do',
|
||||
'else',
|
||||
'elif',
|
||||
'while',
|
||||
'until',
|
||||
'for',
|
||||
'in',
|
||||
'esac',
|
||||
'fi',
|
||||
'fin',
|
||||
'fil',
|
||||
'done',
|
||||
'exit',
|
||||
'set',
|
||||
'unset',
|
||||
'export',
|
||||
'function',
|
||||
],
|
||||
builtins: [
|
||||
'ab',
|
||||
'awk',
|
||||
'bash',
|
||||
'beep',
|
||||
'cat',
|
||||
'cc',
|
||||
'cd',
|
||||
'chown',
|
||||
'chmod',
|
||||
'chroot',
|
||||
'clear',
|
||||
'cp',
|
||||
'curl',
|
||||
'cut',
|
||||
'diff',
|
||||
'echo',
|
||||
'find',
|
||||
'gawk',
|
||||
'gcc',
|
||||
'get',
|
||||
'git',
|
||||
'grep',
|
||||
'hg',
|
||||
'kill',
|
||||
'killall',
|
||||
'ln',
|
||||
'ls',
|
||||
'make',
|
||||
'mkdir',
|
||||
'openssl',
|
||||
'mv',
|
||||
'nc',
|
||||
'node',
|
||||
'npm',
|
||||
'ping',
|
||||
'ps',
|
||||
'restart',
|
||||
'rm',
|
||||
'rmdir',
|
||||
'sed',
|
||||
'service',
|
||||
'sh',
|
||||
'shopt',
|
||||
'shred',
|
||||
'source',
|
||||
'sort',
|
||||
'sleep',
|
||||
'ssh',
|
||||
'start',
|
||||
'stop',
|
||||
'su',
|
||||
'sudo',
|
||||
'svn',
|
||||
'tee',
|
||||
'telnet',
|
||||
'top',
|
||||
'touch',
|
||||
'vi',
|
||||
'vim',
|
||||
'wall',
|
||||
'wc',
|
||||
'wget',
|
||||
'who',
|
||||
'write',
|
||||
'yes',
|
||||
'zsh',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
[
|
||||
/[a-zA-Z]\w*/,
|
||||
{
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@builtins': 'type.identifier',
|
||||
'@default': ''
|
||||
},
|
||||
},
|
||||
],
|
||||
{ include: '@strings' },
|
||||
{ include: '@parameters' },
|
||||
{ include: '@heredoc' },
|
||||
[/[{}\[\]()]/, '@brackets'],
|
||||
[/-+\w+/, 'attribute.name'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
{ include: '@numbers' },
|
||||
[/[,;]/, 'delimiter'],
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/(^#!.*$)/, 'metatag'],
|
||||
[/(^#.*$)/, 'comment'],
|
||||
],
|
||||
numbers: [
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
|
||||
[/\d+/, 'number'],
|
||||
],
|
||||
// Recognize strings, including those broken across lines
|
||||
strings: [
|
||||
[/'/, 'string', '@stringBody'],
|
||||
[/"/, 'string', '@dblStringBody']
|
||||
],
|
||||
stringBody: [
|
||||
[/'/, 'string', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
dblStringBody: [
|
||||
[/"/, 'string', '@popall'],
|
||||
[/./, 'string'],
|
||||
],
|
||||
heredoc: [
|
||||
[/(<<[-<]?)(\s*)(['"`]?)([\w\-]+)(['"`]?)/, ['constants', 'white', 'string.heredoc.delimiter', 'string.heredoc', 'string.heredoc.delimiter']]
|
||||
],
|
||||
parameters: [
|
||||
[/\$\d+/, 'variable.predefined'],
|
||||
[/\$\w+/, 'variable'],
|
||||
[/\$[*@#?\-$!0_]/, 'variable'],
|
||||
[/\$'/, 'variable', '@parameterBodyQuote'],
|
||||
[/\$"/, 'variable', '@parameterBodyDoubleQuote'],
|
||||
[/\$\(/, 'variable', '@parameterBodyParen'],
|
||||
[/\$\{/, 'variable', '@parameterBodyCurlyBrace'],
|
||||
],
|
||||
parameterBodyQuote: [
|
||||
[/[^#:%*@\-!_']+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[']/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyDoubleQuote: [
|
||||
[/[^#:%*@\-!_"]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/["]/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyParen: [
|
||||
[/[^#:%*@\-!_)]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[)]/, 'variable', '@pop'],
|
||||
],
|
||||
parameterBodyCurlyBrace: [
|
||||
[/[^#:%*@\-!_}]+/, 'variable'],
|
||||
[/[#:%*@\-!_]/, 'delimiter'],
|
||||
[/[}]/, 'variable', '@pop'],
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -13,162 +13,162 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')'], ['<', '>']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.aes',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' }
|
||||
],
|
||||
keywords: [
|
||||
// Main keywords
|
||||
'contract',
|
||||
'library',
|
||||
'entrypoint',
|
||||
'function',
|
||||
'stateful',
|
||||
'state',
|
||||
'hash',
|
||||
'signature',
|
||||
'tuple',
|
||||
'list',
|
||||
'address',
|
||||
'string',
|
||||
'bool',
|
||||
'int',
|
||||
'record',
|
||||
'datatype',
|
||||
'type',
|
||||
'option',
|
||||
'oracle',
|
||||
'oracle_query',
|
||||
'Call',
|
||||
'Bits',
|
||||
'Bytes',
|
||||
'Oracle',
|
||||
'String',
|
||||
'Crypto',
|
||||
'Address',
|
||||
'Auth',
|
||||
'Chain',
|
||||
'None',
|
||||
'Some',
|
||||
'bits',
|
||||
'bytes',
|
||||
'event',
|
||||
'let',
|
||||
'map',
|
||||
'private',
|
||||
'public',
|
||||
'true',
|
||||
'false',
|
||||
'var',
|
||||
'if',
|
||||
'else',
|
||||
'throw'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', '::', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
|
||||
floatsuffix: /[fFlL]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
//DataTypes
|
||||
[/int\d*/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],
|
||||
[/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],
|
||||
[/\d[\d']*\d(@integersuffix)/, 'number'],
|
||||
[/\d(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [['{', '}'], ['[', ']'], ['(', ')'], ['<', '>']],
|
||||
autoClosingPairs: [
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.aes',
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' }
|
||||
],
|
||||
keywords: [
|
||||
// Main keywords
|
||||
'contract',
|
||||
'library',
|
||||
'entrypoint',
|
||||
'function',
|
||||
'stateful',
|
||||
'state',
|
||||
'hash',
|
||||
'signature',
|
||||
'tuple',
|
||||
'list',
|
||||
'address',
|
||||
'string',
|
||||
'bool',
|
||||
'int',
|
||||
'record',
|
||||
'datatype',
|
||||
'type',
|
||||
'option',
|
||||
'oracle',
|
||||
'oracle_query',
|
||||
'Call',
|
||||
'Bits',
|
||||
'Bytes',
|
||||
'Oracle',
|
||||
'String',
|
||||
'Crypto',
|
||||
'Address',
|
||||
'Auth',
|
||||
'Chain',
|
||||
'None',
|
||||
'Some',
|
||||
'bits',
|
||||
'bytes',
|
||||
'event',
|
||||
'let',
|
||||
'map',
|
||||
'private',
|
||||
'public',
|
||||
'true',
|
||||
'false',
|
||||
'var',
|
||||
'if',
|
||||
'else',
|
||||
'throw'
|
||||
],
|
||||
operators: [
|
||||
'=', '>', '<', '!', '~', '?', '::', ':',
|
||||
'==', '<=', '>=', '!=', '&&', '||', '++', '--',
|
||||
'+', '-', '*', '/', '&', '|', '^', '%', '<<',
|
||||
'>>', '>>>', '+=', '-=', '*=', '/=', '&=', '|=',
|
||||
'^=', '%=', '<<=', '>>=', '>>>='
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,
|
||||
floatsuffix: /[fFlL]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// [[ attributes ]].
|
||||
[/\[\[.*\]\]/, 'annotation'],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
//DataTypes
|
||||
[/int\d*/, 'keyword'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, 'number.hex'],
|
||||
[/0[0-7']*[0-7](@integersuffix)/, 'number.octal'],
|
||||
[/0[bB][0-1']*[0-1](@integersuffix)/, 'number.binary'],
|
||||
[/\d[\d']*\d(@integersuffix)/, 'number'],
|
||||
[/\d(@integersuffix)/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string'],
|
||||
// characters
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
//Identical copy of comment above, except for the addition of .doc
|
||||
doccomment: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
2272
74.21aa9877.async.js
2272
74.21aa9877.async.js
File diff suppressed because it is too large
Load Diff
|
|
@ -13,243 +13,243 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['var', 'end_var'],
|
||||
['var_input', 'end_var'],
|
||||
['var_output', 'end_var'],
|
||||
['var_in_out', 'end_var'],
|
||||
['var_temp', 'end_var'],
|
||||
['var_global', 'end_var'],
|
||||
['var_access', 'end_var'],
|
||||
['var_external', 'end_var'],
|
||||
['type', 'end_type'],
|
||||
['struct', 'end_struct'],
|
||||
['program', 'end_program'],
|
||||
['function', 'end_function'],
|
||||
['function_block', 'end_function_block'],
|
||||
['action', 'end_action'],
|
||||
['step', 'end_step'],
|
||||
['initial_step', 'end_step'],
|
||||
['transaction', 'end_transaction'],
|
||||
['configuration', 'end_configuration'],
|
||||
['tcp', 'end_tcp'],
|
||||
['recource', 'end_recource'],
|
||||
['channel', 'end_channel'],
|
||||
['library', 'end_library'],
|
||||
['folder', 'end_folder'],
|
||||
['binaries', 'end_binaries'],
|
||||
['includes', 'end_includes'],
|
||||
['sources', 'end_sources']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '/*', close: '*/' },
|
||||
{ open: '\'', close: '\'', notIn: ['string_sq'] },
|
||||
{ open: '"', close: '"', notIn: ['string_dq'] },
|
||||
{ open: 'var_input', close: 'end_var' },
|
||||
{ open: 'var_output', close: 'end_var' },
|
||||
{ open: 'var_in_out', close: 'end_var' },
|
||||
{ open: 'var_temp', close: 'end_var' },
|
||||
{ open: 'var_global', close: 'end_var' },
|
||||
{ open: 'var_access', close: 'end_var' },
|
||||
{ open: 'var_external', close: 'end_var' },
|
||||
{ open: 'type', close: 'end_type' },
|
||||
{ open: 'struct', close: 'end_struct' },
|
||||
{ open: 'program', close: 'end_program' },
|
||||
{ open: 'function', close: 'end_function' },
|
||||
{ open: 'function_block', close: 'end_function_block' },
|
||||
{ open: 'action', close: 'end_action' },
|
||||
{ open: 'step', close: 'end_step' },
|
||||
{ open: 'initial_step', close: 'end_step' },
|
||||
{ open: 'transaction', close: 'end_transaction' },
|
||||
{ open: 'configuration', close: 'end_configuration' },
|
||||
{ open: 'tcp', close: 'end_tcp' },
|
||||
{ open: 'recource', close: 'end_recource' },
|
||||
{ open: 'channel', close: 'end_channel' },
|
||||
{ open: 'library', close: 'end_library' },
|
||||
{ open: 'folder', close: 'end_folder' },
|
||||
{ open: 'binaries', close: 'end_binaries' },
|
||||
{ open: 'includes', close: 'end_includes' },
|
||||
{ open: 'sources', close: 'end_sources' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: 'var', close: 'end_var' },
|
||||
{ open: 'var_input', close: 'end_var' },
|
||||
{ open: 'var_output', close: 'end_var' },
|
||||
{ open: 'var_in_out', close: 'end_var' },
|
||||
{ open: 'var_temp', close: 'end_var' },
|
||||
{ open: 'var_global', close: 'end_var' },
|
||||
{ open: 'var_access', close: 'end_var' },
|
||||
{ open: 'var_external', close: 'end_var' },
|
||||
{ open: 'type', close: 'end_type' },
|
||||
{ open: 'struct', close: 'end_struct' },
|
||||
{ open: 'program', close: 'end_program' },
|
||||
{ open: 'function', close: 'end_function' },
|
||||
{ open: 'function_block', close: 'end_function_block' },
|
||||
{ open: 'action', close: 'end_action' },
|
||||
{ open: 'step', close: 'end_step' },
|
||||
{ open: 'initial_step', close: 'end_step' },
|
||||
{ open: 'transaction', close: 'end_transaction' },
|
||||
{ open: 'configuration', close: 'end_configuration' },
|
||||
{ open: 'tcp', close: 'end_tcp' },
|
||||
{ open: 'recource', close: 'end_recource' },
|
||||
{ open: 'channel', close: 'end_channel' },
|
||||
{ open: 'library', close: 'end_library' },
|
||||
{ open: 'folder', close: 'end_folder' },
|
||||
{ open: 'binaries', close: 'end_binaries' },
|
||||
{ open: 'includes', close: 'end_includes' },
|
||||
{ open: 'sources', close: 'end_sources' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.st',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: ['if', 'end_if', 'elsif', 'else', 'case', 'of', 'to', '__try', '__catch', '__finally',
|
||||
'do', 'with', 'by', 'while', 'repeat', 'end_while', 'end_repeat', 'end_case',
|
||||
'for', 'end_for', 'task', 'retain', 'non_retain', 'constant', 'with', 'at',
|
||||
'exit', 'return', 'interval', 'priority', 'address', 'port', 'on_channel',
|
||||
'then', 'iec', 'file', 'uses', 'version', 'packagetype', 'displayname',
|
||||
'copyright', 'summary', 'vendor', 'common_source', 'from', 'extends'],
|
||||
constant: ['false', 'true', 'null'],
|
||||
defineKeywords: [
|
||||
'var', 'var_input', 'var_output', 'var_in_out', 'var_temp', 'var_global',
|
||||
'var_access', 'var_external', 'end_var',
|
||||
'type', 'end_type', 'struct', 'end_struct', 'program', 'end_program',
|
||||
'function', 'end_function', 'function_block', 'end_function_block',
|
||||
'interface', 'end_interface', 'method', 'end_method',
|
||||
'property', 'end_property', 'namespace', 'end_namespace',
|
||||
'configuration', 'end_configuration', 'tcp', 'end_tcp', 'resource',
|
||||
'end_resource', 'channel', 'end_channel', 'library', 'end_library',
|
||||
'folder', 'end_folder', 'binaries', 'end_binaries', 'includes',
|
||||
'end_includes', 'sources', 'end_sources',
|
||||
'action', 'end_action', 'step', 'initial_step', 'end_step', 'transaction', 'end_transaction'
|
||||
],
|
||||
typeKeywords: ['int', 'sint', 'dint', 'lint', 'usint', 'uint', 'udint', 'ulint',
|
||||
'real', 'lreal', 'time', 'date', 'time_of_day', 'date_and_time', 'string',
|
||||
'bool', 'byte', 'word', 'dword', 'array', 'pointer', 'lword'],
|
||||
operators: ['=', '>', '<', ':', ':=', '<=', '>=', '<>', '&', '+', '-', '*', '**',
|
||||
'MOD', '^', 'or', 'and', 'not', 'xor', 'abs', 'acos', 'asin', 'atan', 'cos',
|
||||
'exp', 'expt', 'ln', 'log', 'sin', 'sqrt', 'tan', 'sel', 'max', 'min', 'limit',
|
||||
'mux', 'shl', 'shr', 'rol', 'ror', 'indexof', 'sizeof', 'adr', 'adrinst',
|
||||
'bitadr', 'is_valid', 'ref', 'ref_to'],
|
||||
builtinVariables: [],
|
||||
builtinFunctions: ['sr', 'rs', 'tp', 'ton', 'tof', 'eq', 'ge', 'le', 'lt',
|
||||
'ne', 'round', 'trunc', 'ctd', 'сtu', 'ctud', 'r_trig', 'f_trig',
|
||||
'move', 'concat', 'delete', 'find', 'insert', 'left', 'len', 'replace',
|
||||
'right', 'rtc'],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
// C# style strings
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/(\.\.)/, 'delimiter'],
|
||||
[/\b(16#[0-9A-Fa-f\_]*)+\b/, 'number.hex'],
|
||||
[/\b(2#[01\_]+)+\b/, 'number.binary'],
|
||||
[/\b(8#[0-9\_]*)+\b/, 'number.octal'],
|
||||
[/\b\d*\.\d+([eE][\-+]?\d+)?\b/, 'number.float'],
|
||||
[/\b(L?REAL)#[0-9\_\.e]+\b/, 'number.float'],
|
||||
[/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9\_]+\b/, 'number'],
|
||||
[/\d+/, 'number'],
|
||||
[/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, 'tag'],
|
||||
[/\%(I|Q|M)(X|B|W|D|L)[0-9\.]+/, 'tag'],
|
||||
[/\%(I|Q|M)[0-9\.]*/, 'tag'],
|
||||
[/\b[A-Za-z]{1,6}#[0-9]+\b/, 'tag'],
|
||||
[/\b(TO_|CTU_|CTD_|CTUD_|MUX_|SEL_)[A_Za-z]+\b/, 'predefined'],
|
||||
[/\b[A_Za-z]+(_TO_)[A_Za-z]+\b/, 'predefined'],
|
||||
[/[;]/, 'delimiter'],
|
||||
[/[.]/, { token: 'delimiter', next: '@params' }],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@operators': 'operators',
|
||||
'@keywords': 'keyword',
|
||||
'@typeKeywords': 'type',
|
||||
'@defineKeywords': 'variable',
|
||||
'@constant': 'constant',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@whitespace' },
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string_dq' }],
|
||||
[/'/, { token: 'string.quote', bracket: '@open', next: '@string_sq' }],
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
params: [
|
||||
[/\b[A-Za-z0-9_]+\b(?=\()/, { token: 'identifier', next: '@pop' }],
|
||||
[/\b[A-Za-z0-9_]+\b/, 'variable.name', '@pop']
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@push'],
|
||||
["\\*/", 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
comment2: [
|
||||
[/[^\(*]+/, 'comment'],
|
||||
[/\(\*/, 'comment', '@push'],
|
||||
["\\*\\)", 'comment', '@pop'],
|
||||
[/[\(*]/, 'comment']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\(\*/, 'comment', '@comment2'],
|
||||
],
|
||||
string_dq: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
string_sq: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['(*', '*)'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')'],
|
||||
['var', 'end_var'],
|
||||
['var_input', 'end_var'],
|
||||
['var_output', 'end_var'],
|
||||
['var_in_out', 'end_var'],
|
||||
['var_temp', 'end_var'],
|
||||
['var_global', 'end_var'],
|
||||
['var_access', 'end_var'],
|
||||
['var_external', 'end_var'],
|
||||
['type', 'end_type'],
|
||||
['struct', 'end_struct'],
|
||||
['program', 'end_program'],
|
||||
['function', 'end_function'],
|
||||
['function_block', 'end_function_block'],
|
||||
['action', 'end_action'],
|
||||
['step', 'end_step'],
|
||||
['initial_step', 'end_step'],
|
||||
['transaction', 'end_transaction'],
|
||||
['configuration', 'end_configuration'],
|
||||
['tcp', 'end_tcp'],
|
||||
['recource', 'end_recource'],
|
||||
['channel', 'end_channel'],
|
||||
['library', 'end_library'],
|
||||
['folder', 'end_folder'],
|
||||
['binaries', 'end_binaries'],
|
||||
['includes', 'end_includes'],
|
||||
['sources', 'end_sources']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '/*', close: '*/' },
|
||||
{ open: '\'', close: '\'', notIn: ['string_sq'] },
|
||||
{ open: '"', close: '"', notIn: ['string_dq'] },
|
||||
{ open: 'var_input', close: 'end_var' },
|
||||
{ open: 'var_output', close: 'end_var' },
|
||||
{ open: 'var_in_out', close: 'end_var' },
|
||||
{ open: 'var_temp', close: 'end_var' },
|
||||
{ open: 'var_global', close: 'end_var' },
|
||||
{ open: 'var_access', close: 'end_var' },
|
||||
{ open: 'var_external', close: 'end_var' },
|
||||
{ open: 'type', close: 'end_type' },
|
||||
{ open: 'struct', close: 'end_struct' },
|
||||
{ open: 'program', close: 'end_program' },
|
||||
{ open: 'function', close: 'end_function' },
|
||||
{ open: 'function_block', close: 'end_function_block' },
|
||||
{ open: 'action', close: 'end_action' },
|
||||
{ open: 'step', close: 'end_step' },
|
||||
{ open: 'initial_step', close: 'end_step' },
|
||||
{ open: 'transaction', close: 'end_transaction' },
|
||||
{ open: 'configuration', close: 'end_configuration' },
|
||||
{ open: 'tcp', close: 'end_tcp' },
|
||||
{ open: 'recource', close: 'end_recource' },
|
||||
{ open: 'channel', close: 'end_channel' },
|
||||
{ open: 'library', close: 'end_library' },
|
||||
{ open: 'folder', close: 'end_folder' },
|
||||
{ open: 'binaries', close: 'end_binaries' },
|
||||
{ open: 'includes', close: 'end_includes' },
|
||||
{ open: 'sources', close: 'end_sources' }
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: 'var', close: 'end_var' },
|
||||
{ open: 'var_input', close: 'end_var' },
|
||||
{ open: 'var_output', close: 'end_var' },
|
||||
{ open: 'var_in_out', close: 'end_var' },
|
||||
{ open: 'var_temp', close: 'end_var' },
|
||||
{ open: 'var_global', close: 'end_var' },
|
||||
{ open: 'var_access', close: 'end_var' },
|
||||
{ open: 'var_external', close: 'end_var' },
|
||||
{ open: 'type', close: 'end_type' },
|
||||
{ open: 'struct', close: 'end_struct' },
|
||||
{ open: 'program', close: 'end_program' },
|
||||
{ open: 'function', close: 'end_function' },
|
||||
{ open: 'function_block', close: 'end_function_block' },
|
||||
{ open: 'action', close: 'end_action' },
|
||||
{ open: 'step', close: 'end_step' },
|
||||
{ open: 'initial_step', close: 'end_step' },
|
||||
{ open: 'transaction', close: 'end_transaction' },
|
||||
{ open: 'configuration', close: 'end_configuration' },
|
||||
{ open: 'tcp', close: 'end_tcp' },
|
||||
{ open: 'recource', close: 'end_recource' },
|
||||
{ open: 'channel', close: 'end_channel' },
|
||||
{ open: 'library', close: 'end_library' },
|
||||
{ open: 'folder', close: 'end_folder' },
|
||||
{ open: 'binaries', close: 'end_binaries' },
|
||||
{ open: 'includes', close: 'end_includes' },
|
||||
{ open: 'sources', close: 'end_sources' }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#pragma\\s+region\\b"),
|
||||
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.st',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.curly', open: '{', close: '}' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: ['if', 'end_if', 'elsif', 'else', 'case', 'of', 'to', '__try', '__catch', '__finally',
|
||||
'do', 'with', 'by', 'while', 'repeat', 'end_while', 'end_repeat', 'end_case',
|
||||
'for', 'end_for', 'task', 'retain', 'non_retain', 'constant', 'with', 'at',
|
||||
'exit', 'return', 'interval', 'priority', 'address', 'port', 'on_channel',
|
||||
'then', 'iec', 'file', 'uses', 'version', 'packagetype', 'displayname',
|
||||
'copyright', 'summary', 'vendor', 'common_source', 'from', 'extends'],
|
||||
constant: ['false', 'true', 'null'],
|
||||
defineKeywords: [
|
||||
'var', 'var_input', 'var_output', 'var_in_out', 'var_temp', 'var_global',
|
||||
'var_access', 'var_external', 'end_var',
|
||||
'type', 'end_type', 'struct', 'end_struct', 'program', 'end_program',
|
||||
'function', 'end_function', 'function_block', 'end_function_block',
|
||||
'interface', 'end_interface', 'method', 'end_method',
|
||||
'property', 'end_property', 'namespace', 'end_namespace',
|
||||
'configuration', 'end_configuration', 'tcp', 'end_tcp', 'resource',
|
||||
'end_resource', 'channel', 'end_channel', 'library', 'end_library',
|
||||
'folder', 'end_folder', 'binaries', 'end_binaries', 'includes',
|
||||
'end_includes', 'sources', 'end_sources',
|
||||
'action', 'end_action', 'step', 'initial_step', 'end_step', 'transaction', 'end_transaction'
|
||||
],
|
||||
typeKeywords: ['int', 'sint', 'dint', 'lint', 'usint', 'uint', 'udint', 'ulint',
|
||||
'real', 'lreal', 'time', 'date', 'time_of_day', 'date_and_time', 'string',
|
||||
'bool', 'byte', 'word', 'dword', 'array', 'pointer', 'lword'],
|
||||
operators: ['=', '>', '<', ':', ':=', '<=', '>=', '<>', '&', '+', '-', '*', '**',
|
||||
'MOD', '^', 'or', 'and', 'not', 'xor', 'abs', 'acos', 'asin', 'atan', 'cos',
|
||||
'exp', 'expt', 'ln', 'log', 'sin', 'sqrt', 'tan', 'sel', 'max', 'min', 'limit',
|
||||
'mux', 'shl', 'shr', 'rol', 'ror', 'indexof', 'sizeof', 'adr', 'adrinst',
|
||||
'bitadr', 'is_valid', 'ref', 'ref_to'],
|
||||
builtinVariables: [],
|
||||
builtinFunctions: ['sr', 'rs', 'tp', 'ton', 'tof', 'eq', 'ge', 'le', 'lt',
|
||||
'ne', 'round', 'trunc', 'ctd', 'сtu', 'ctud', 'r_trig', 'f_trig',
|
||||
'move', 'concat', 'delete', 'find', 'insert', 'left', 'len', 'replace',
|
||||
'right', 'rtc'],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
// C# style strings
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/(\.\.)/, 'delimiter'],
|
||||
[/\b(16#[0-9A-Fa-f\_]*)+\b/, 'number.hex'],
|
||||
[/\b(2#[01\_]+)+\b/, 'number.binary'],
|
||||
[/\b(8#[0-9\_]*)+\b/, 'number.octal'],
|
||||
[/\b\d*\.\d+([eE][\-+]?\d+)?\b/, 'number.float'],
|
||||
[/\b(L?REAL)#[0-9\_\.e]+\b/, 'number.float'],
|
||||
[/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9\_]+\b/, 'number'],
|
||||
[/\d+/, 'number'],
|
||||
[/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, 'tag'],
|
||||
[/\%(I|Q|M)(X|B|W|D|L)[0-9\.]+/, 'tag'],
|
||||
[/\%(I|Q|M)[0-9\.]*/, 'tag'],
|
||||
[/\b[A-Za-z]{1,6}#[0-9]+\b/, 'tag'],
|
||||
[/\b(TO_|CTU_|CTD_|CTUD_|MUX_|SEL_)[A_Za-z]+\b/, 'predefined'],
|
||||
[/\b[A_Za-z]+(_TO_)[A_Za-z]+\b/, 'predefined'],
|
||||
[/[;]/, 'delimiter'],
|
||||
[/[.]/, { token: 'delimiter', next: '@params' }],
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@operators': 'operators',
|
||||
'@keywords': 'keyword',
|
||||
'@typeKeywords': 'type',
|
||||
'@defineKeywords': 'variable',
|
||||
'@constant': 'constant',
|
||||
'@builtinVariables': 'predefined',
|
||||
'@builtinFunctions': 'predefined',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
{ include: '@whitespace' },
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@string_dq' }],
|
||||
[/'/, { token: 'string.quote', bracket: '@open', next: '@string_sq' }],
|
||||
[/'[^\\']'/, 'string'],
|
||||
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
|
||||
[/'/, 'string.invalid']
|
||||
],
|
||||
params: [
|
||||
[/\b[A-Za-z0-9_]+\b(?=\()/, { token: 'identifier', next: '@pop' }],
|
||||
[/\b[A-Za-z0-9_]+\b/, 'variable.name', '@pop']
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\/\*/, 'comment', '@push'],
|
||||
["\\*/", 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
comment2: [
|
||||
[/[^\(*]+/, 'comment'],
|
||||
[/\(\*/, 'comment', '@push'],
|
||||
["\\*\\)", 'comment', '@pop'],
|
||||
[/[\(*]/, 'comment']
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\(\*/, 'comment', '@comment2'],
|
||||
],
|
||||
string_dq: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
string_sq: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,165 +13,165 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*!---------------------------------------------------------------------------------------------
|
||||
* Copyright (C) David Owens II, owensd.io. All rights reserved.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '`', close: '`' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.swift',
|
||||
// TODO(owensd): Support the full range of unicode valid identifiers.
|
||||
identifier: /[a-zA-Z_][\w$]*/,
|
||||
// TODO(owensd): Support the @availability macro properly.
|
||||
attributes: [
|
||||
'@autoclosure', '@noescape', '@noreturn', '@NSApplicationMain', '@NSCopying', '@NSManaged',
|
||||
'@objc', '@UIApplicationMain', '@noreturn', '@availability', '@IBAction', '@IBDesignable', '@IBInspectable', '@IBOutlet'
|
||||
],
|
||||
accessmodifiers: ['public', 'private', 'internal'],
|
||||
keywords: [
|
||||
'__COLUMN__', '__FILE__', '__FUNCTION__', '__LINE__', 'as', 'as!', 'as?', 'associativity', 'break', 'case', 'catch',
|
||||
'class', 'continue', 'convenience', 'default', 'deinit', 'didSet', 'do', 'dynamic', 'dynamicType',
|
||||
'else', 'enum', 'extension', 'fallthrough', 'final', 'for', 'func', 'get', 'guard', 'if', 'import', 'in', 'infix',
|
||||
'init', 'inout', 'internal', 'is', 'lazy', 'left', 'let', 'mutating', 'nil', 'none', 'nonmutating', 'operator',
|
||||
'optional', 'override', 'postfix', 'precedence', 'prefix', 'private', 'protocol', 'Protocol', 'public',
|
||||
'repeat', 'required', 'return', 'right', 'self', 'Self', 'set', 'static', 'struct', 'subscript', 'super', 'switch',
|
||||
'throw', 'throws', 'try', 'try!', 'Type', 'typealias', 'unowned', 'var', 'weak', 'where', 'while', 'willSet', 'FALSE', 'TRUE'
|
||||
],
|
||||
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
|
||||
// Moved . to operatorstart so it can be a delimiter
|
||||
operatorstart: /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,
|
||||
operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,
|
||||
operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/,
|
||||
// TODO(owensd): These are borrowed from C#; need to validate correctness for Swift.
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
{ include: '@attribute' },
|
||||
{ include: '@literal' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@invokedmethod' },
|
||||
{ include: '@symbol' },
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/"""/, 'string.quote', '@endDblDocString']
|
||||
],
|
||||
endDblDocString: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/\\"/, 'string'],
|
||||
[/"""/, 'string.quote', '@popall'],
|
||||
[/"/, 'string']
|
||||
],
|
||||
symbol: [
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/[.]/, 'delimiter'],
|
||||
[/@operators/, 'operator'],
|
||||
[/@symbols/, 'operator']
|
||||
],
|
||||
comment: [
|
||||
[/\/\/\/.*$/, 'comment.doc'],
|
||||
[/\/\*\*/, 'comment.doc', '@commentdocbody'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
[/\/\*/, 'comment', '@commentbody']
|
||||
],
|
||||
commentdocbody: [
|
||||
[/\/\*/, 'comment', '@commentbody'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/\:[a-zA-Z]+\:/, 'comment.doc.param'],
|
||||
[/./, 'comment.doc']
|
||||
],
|
||||
commentbody: [
|
||||
[/\/\*/, 'comment', '@commentbody'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/./, 'comment']
|
||||
],
|
||||
attribute: [
|
||||
[/\@@identifier/, {
|
||||
cases: {
|
||||
'@attributes': 'keyword.control',
|
||||
'@default': ''
|
||||
}
|
||||
}]
|
||||
],
|
||||
literal: [
|
||||
[/"/, { token: 'string.quote', next: '@stringlit' }],
|
||||
[/0[b]([01]_?)+/, 'number.binary'],
|
||||
[/0[o]([0-7]_?)+/, 'number.octal'],
|
||||
[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/, 'number.hex'],
|
||||
[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/, 'number.float'],
|
||||
[/(\d_?)+/, 'number']
|
||||
],
|
||||
stringlit: [
|
||||
[/\\\(/, { token: 'operator', next: '@interpolatedexpression' }],
|
||||
[/@escapes/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }],
|
||||
[/./, 'string']
|
||||
],
|
||||
interpolatedexpression: [
|
||||
[/\(/, { token: 'operator', next: '@interpolatedexpression' }],
|
||||
[/\)/, { token: 'operator', next: '@pop' }],
|
||||
{ include: '@literal' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@symbol' }
|
||||
],
|
||||
keyword: [
|
||||
[/`/, { token: 'operator', next: '@escapedkeyword' }],
|
||||
[/@identifier/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword', '[A-Z][\a-zA-Z0-9$]*': 'type.identifier',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
escapedkeyword: [
|
||||
[/`/, { token: 'operator', next: '@pop' }],
|
||||
[/./, 'identifier']
|
||||
],
|
||||
// symbol: [
|
||||
// [ /@symbols/, 'operator' ],
|
||||
// [ /@operators/, 'operator' ]
|
||||
// ],
|
||||
invokedmethod: [
|
||||
[/([.])(@identifier)/, {
|
||||
cases: {
|
||||
'$2': ['delimeter', 'type.identifier'],
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
]
|
||||
}
|
||||
};
|
||||
/*!---------------------------------------------------------------------------------------------
|
||||
* Copyright (C) David Owens II, owensd.io. All rights reserved.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '`', close: '`' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '`', close: '`' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.swift',
|
||||
// TODO(owensd): Support the full range of unicode valid identifiers.
|
||||
identifier: /[a-zA-Z_][\w$]*/,
|
||||
// TODO(owensd): Support the @availability macro properly.
|
||||
attributes: [
|
||||
'@autoclosure', '@noescape', '@noreturn', '@NSApplicationMain', '@NSCopying', '@NSManaged',
|
||||
'@objc', '@UIApplicationMain', '@noreturn', '@availability', '@IBAction', '@IBDesignable', '@IBInspectable', '@IBOutlet'
|
||||
],
|
||||
accessmodifiers: ['public', 'private', 'internal'],
|
||||
keywords: [
|
||||
'__COLUMN__', '__FILE__', '__FUNCTION__', '__LINE__', 'as', 'as!', 'as?', 'associativity', 'break', 'case', 'catch',
|
||||
'class', 'continue', 'convenience', 'default', 'deinit', 'didSet', 'do', 'dynamic', 'dynamicType',
|
||||
'else', 'enum', 'extension', 'fallthrough', 'final', 'for', 'func', 'get', 'guard', 'if', 'import', 'in', 'infix',
|
||||
'init', 'inout', 'internal', 'is', 'lazy', 'left', 'let', 'mutating', 'nil', 'none', 'nonmutating', 'operator',
|
||||
'optional', 'override', 'postfix', 'precedence', 'prefix', 'private', 'protocol', 'Protocol', 'public',
|
||||
'repeat', 'required', 'return', 'right', 'self', 'Self', 'set', 'static', 'struct', 'subscript', 'super', 'switch',
|
||||
'throw', 'throws', 'try', 'try!', 'Type', 'typealias', 'unowned', 'var', 'weak', 'where', 'while', 'willSet', 'FALSE', 'TRUE'
|
||||
],
|
||||
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
|
||||
// Moved . to operatorstart so it can be a delimiter
|
||||
operatorstart: /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,
|
||||
operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,
|
||||
operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/,
|
||||
// TODO(owensd): These are borrowed from C#; need to validate correctness for Swift.
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
{ include: '@attribute' },
|
||||
{ include: '@literal' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@invokedmethod' },
|
||||
{ include: '@symbol' },
|
||||
],
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/"""/, 'string.quote', '@endDblDocString']
|
||||
],
|
||||
endDblDocString: [
|
||||
[/[^"]+/, 'string'],
|
||||
[/\\"/, 'string'],
|
||||
[/"""/, 'string.quote', '@popall'],
|
||||
[/"/, 'string']
|
||||
],
|
||||
symbol: [
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/[.]/, 'delimiter'],
|
||||
[/@operators/, 'operator'],
|
||||
[/@symbols/, 'operator']
|
||||
],
|
||||
comment: [
|
||||
[/\/\/\/.*$/, 'comment.doc'],
|
||||
[/\/\*\*/, 'comment.doc', '@commentdocbody'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
[/\/\*/, 'comment', '@commentbody']
|
||||
],
|
||||
commentdocbody: [
|
||||
[/\/\*/, 'comment', '@commentbody'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/\:[a-zA-Z]+\:/, 'comment.doc.param'],
|
||||
[/./, 'comment.doc']
|
||||
],
|
||||
commentbody: [
|
||||
[/\/\*/, 'comment', '@commentbody'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/./, 'comment']
|
||||
],
|
||||
attribute: [
|
||||
[/\@@identifier/, {
|
||||
cases: {
|
||||
'@attributes': 'keyword.control',
|
||||
'@default': ''
|
||||
}
|
||||
}]
|
||||
],
|
||||
literal: [
|
||||
[/"/, { token: 'string.quote', next: '@stringlit' }],
|
||||
[/0[b]([01]_?)+/, 'number.binary'],
|
||||
[/0[o]([0-7]_?)+/, 'number.octal'],
|
||||
[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/, 'number.hex'],
|
||||
[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/, 'number.float'],
|
||||
[/(\d_?)+/, 'number']
|
||||
],
|
||||
stringlit: [
|
||||
[/\\\(/, { token: 'operator', next: '@interpolatedexpression' }],
|
||||
[/@escapes/, 'string'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, { token: 'string.quote', next: '@pop' }],
|
||||
[/./, 'string']
|
||||
],
|
||||
interpolatedexpression: [
|
||||
[/\(/, { token: 'operator', next: '@interpolatedexpression' }],
|
||||
[/\)/, { token: 'operator', next: '@pop' }],
|
||||
{ include: '@literal' },
|
||||
{ include: '@keyword' },
|
||||
{ include: '@symbol' }
|
||||
],
|
||||
keyword: [
|
||||
[/`/, { token: 'operator', next: '@escapedkeyword' }],
|
||||
[/@identifier/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword', '[A-Z][\a-zA-Z0-9$]*': 'type.identifier',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}]
|
||||
],
|
||||
escapedkeyword: [
|
||||
[/`/, { token: 'operator', next: '@pop' }],
|
||||
[/./, 'identifier']
|
||||
],
|
||||
// symbol: [
|
||||
// [ /@symbols/, 'operator' ],
|
||||
// [ /@operators/, 'operator' ]
|
||||
// ],
|
||||
invokedmethod: [
|
||||
[/([.])(@identifier)/, {
|
||||
cases: {
|
||||
'$2': ['delimeter', 'type.identifier'],
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,137 +13,137 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.tcl',
|
||||
specialFunctions: [
|
||||
'set', 'unset', 'rename', 'variable', 'proc', 'coroutine',
|
||||
'foreach',
|
||||
'incr', 'append',
|
||||
'lappend', 'linsert', 'lreplace'
|
||||
],
|
||||
mainFunctions: [
|
||||
'if', 'then', 'elseif', 'else', 'case', 'switch', 'while', 'for',
|
||||
'break', 'continue', 'return',
|
||||
'package', 'namespace',
|
||||
'catch', 'exit',
|
||||
'eval', 'expr', 'uplevel', 'upvar'
|
||||
],
|
||||
builtinFunctions: [
|
||||
'file', 'info', 'concat', 'join', 'lindex',
|
||||
'list', 'llength', 'lrange', 'lsearch', 'lsort', 'split',
|
||||
'array', 'parray', 'binary', 'format', 'regexp', 'regsub', 'scan', 'string',
|
||||
'subst', 'dict', 'cd', 'clock', 'exec', 'glob', 'pid', 'pwd', 'close', 'eof', 'fblocked',
|
||||
'fconfigure', 'fcopy', 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek',
|
||||
'socket', 'tell', 'interp', 'after', 'auto_execok',
|
||||
'auto_load', 'auto_mkindex', 'auto_reset', 'bgerror', 'error',
|
||||
'global', 'history', 'load', 'source', 'time', 'trace',
|
||||
'unknown', 'unset', 'update', 'vwait', 'winfo', 'wm', 'bind', 'event',
|
||||
'pack', 'place', 'grid', 'font', 'bell', 'clipboard', 'destroy', 'focus', 'grab', 'lower',
|
||||
'option', 'raise', 'selection', 'send', 'tk', 'tkwait', 'tk_bisque', 'tk_focusNext',
|
||||
'tk_focusPrev', 'tk_focusFollowsMouse', 'tk_popup', 'tk_setPalette'
|
||||
],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' }
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
variables: /(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, { cases: {
|
||||
'@specialFunctions': { token: 'keyword.flow', next: '@specialFunc' },
|
||||
'@mainFunctions': 'keyword',
|
||||
'@builtinFunctions': 'variable',
|
||||
'@default': 'operator.scss'
|
||||
} }],
|
||||
[/\s+\-+(?!\d|\.)\w*|{\*}/, 'metatag'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'operator'],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/\.(?!\d|\.)[\w\-]*/, 'operator.sql'],
|
||||
// numbers
|
||||
[/\d+(\.\d+)?/, 'number'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter
|
||||
[/;/, 'delimiter'],
|
||||
// strings
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@dstring' }],
|
||||
[/'/, { token: 'string.quote', bracket: '@open', next: '@sstring' }]
|
||||
],
|
||||
dstring: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/[^\\$\[\]"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
|
||||
],
|
||||
sstring: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/[^\\$\[\]']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/#.*\\$/, { token: 'comment', next: '@newlineComment' }],
|
||||
[/#.*(?!\\)$/, 'comment']
|
||||
],
|
||||
newlineComment: [
|
||||
[/.*\\$/, 'comment'],
|
||||
[/.*(?!\\)$/, { token: 'comment', next: '@pop' }]
|
||||
],
|
||||
nestedVariable: [
|
||||
[/[^\{\}\$]+/, 'type.identifier'],
|
||||
[/\}/, { token: 'identifier', next: '@pop' }]
|
||||
],
|
||||
nestedCall: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\]/, { token: '@brackets', next: '@pop' }],
|
||||
{ include: 'root' }
|
||||
],
|
||||
specialFunc: [
|
||||
[/"/, { token: 'string', next: '@dstring' }],
|
||||
[/'/, { token: 'string', next: '@sstring' }],
|
||||
[/\S+/, { token: 'type', next: '@pop' }],
|
||||
]
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.tcl',
|
||||
specialFunctions: [
|
||||
'set', 'unset', 'rename', 'variable', 'proc', 'coroutine',
|
||||
'foreach',
|
||||
'incr', 'append',
|
||||
'lappend', 'linsert', 'lreplace'
|
||||
],
|
||||
mainFunctions: [
|
||||
'if', 'then', 'elseif', 'else', 'case', 'switch', 'while', 'for',
|
||||
'break', 'continue', 'return',
|
||||
'package', 'namespace',
|
||||
'catch', 'exit',
|
||||
'eval', 'expr', 'uplevel', 'upvar'
|
||||
],
|
||||
builtinFunctions: [
|
||||
'file', 'info', 'concat', 'join', 'lindex',
|
||||
'list', 'llength', 'lrange', 'lsearch', 'lsort', 'split',
|
||||
'array', 'parray', 'binary', 'format', 'regexp', 'regsub', 'scan', 'string',
|
||||
'subst', 'dict', 'cd', 'clock', 'exec', 'glob', 'pid', 'pwd', 'close', 'eof', 'fblocked',
|
||||
'fconfigure', 'fcopy', 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek',
|
||||
'socket', 'tell', 'interp', 'after', 'auto_execok',
|
||||
'auto_load', 'auto_mkindex', 'auto_reset', 'bgerror', 'error',
|
||||
'global', 'history', 'load', 'source', 'time', 'trace',
|
||||
'unknown', 'unset', 'update', 'vwait', 'winfo', 'wm', 'bind', 'event',
|
||||
'pack', 'place', 'grid', 'font', 'bell', 'clipboard', 'destroy', 'focus', 'grab', 'lower',
|
||||
'option', 'raise', 'selection', 'send', 'tk', 'tkwait', 'tk_bisque', 'tk_focusNext',
|
||||
'tk_focusPrev', 'tk_focusFollowsMouse', 'tk_popup', 'tk_setPalette'
|
||||
],
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
brackets: [
|
||||
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
||||
{ open: '{', close: '}', token: 'delimiter.curly' },
|
||||
{ open: '[', close: ']', token: 'delimiter.square' }
|
||||
],
|
||||
escapes: /\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
variables: /(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
// identifiers and keywords
|
||||
[/[a-zA-Z_]\w*/, { cases: {
|
||||
'@specialFunctions': { token: 'keyword.flow', next: '@specialFunc' },
|
||||
'@mainFunctions': 'keyword',
|
||||
'@builtinFunctions': 'variable',
|
||||
'@default': 'operator.scss'
|
||||
} }],
|
||||
[/\s+\-+(?!\d|\.)\w*|{\*}/, 'metatag'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'operator'],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/\.(?!\d|\.)[\w\-]*/, 'operator.sql'],
|
||||
// numbers
|
||||
[/\d+(\.\d+)?/, 'number'],
|
||||
[/\d+/, 'number'],
|
||||
// delimiter
|
||||
[/;/, 'delimiter'],
|
||||
// strings
|
||||
[/"/, { token: 'string.quote', bracket: '@open', next: '@dstring' }],
|
||||
[/'/, { token: 'string.quote', bracket: '@open', next: '@sstring' }]
|
||||
],
|
||||
dstring: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/[^\\$\[\]"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/"/, { token: 'string.quote', bracket: '@close', next: '@pop' }],
|
||||
],
|
||||
sstring: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\$+(?:\:\:)?\{/, { token: 'identifier', next: '@nestedVariable' }],
|
||||
[/@variables/, 'type.identifier'],
|
||||
[/[^\\$\[\]']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/'/, { token: 'string.quote', bracket: '@close', next: '@pop' }]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/#.*\\$/, { token: 'comment', next: '@newlineComment' }],
|
||||
[/#.*(?!\\)$/, 'comment']
|
||||
],
|
||||
newlineComment: [
|
||||
[/.*\\$/, 'comment'],
|
||||
[/.*(?!\\)$/, { token: 'comment', next: '@pop' }]
|
||||
],
|
||||
nestedVariable: [
|
||||
[/[^\{\}\$]+/, 'type.identifier'],
|
||||
[/\}/, { token: 'identifier', next: '@pop' }]
|
||||
],
|
||||
nestedCall: [
|
||||
[/\[/, { token: '@brackets', next: '@nestedCall' }],
|
||||
[/\]/, { token: '@brackets', next: '@pop' }],
|
||||
{ include: 'root' }
|
||||
],
|
||||
specialFunc: [
|
||||
[/"/, { token: 'string', next: '@dstring' }],
|
||||
[/'/, { token: 'string', next: '@sstring' }],
|
||||
[/\S+/, { token: 'type', next: '@pop' }],
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,279 +13,279 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['{#', '#}'],
|
||||
},
|
||||
brackets: [
|
||||
['{#', '#}'],
|
||||
['{%', '%}'],
|
||||
['{{', '}}'],
|
||||
['(', ')'],
|
||||
['[', ']'],
|
||||
// HTML
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{# ', close: ' #}' },
|
||||
{ open: '{% ', close: ' %}' },
|
||||
{ open: '{{ ', close: ' }}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
// HTML
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
ignoreCase: true,
|
||||
keywords: [
|
||||
// (opening) tags
|
||||
'apply', 'autoescape', 'block', 'deprecated', 'do', 'embed', 'extends',
|
||||
'flush', 'for', 'from', 'if', 'import', 'include', 'macro', 'sandbox',
|
||||
'set', 'use', 'verbatim', 'with',
|
||||
// closing tags
|
||||
'endapply', 'endautoescape', 'endblock', 'endembed', 'endfor', 'endif',
|
||||
'endmacro', 'endsandbox', 'endset', 'endwith',
|
||||
// literals
|
||||
'true', 'false',
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// Twig Tag Delimiters
|
||||
[/{#/, 'comment.twig', '@commentState'],
|
||||
[/{%[-~]?/, 'delimiter.twig', '@blockState'],
|
||||
[/{{[-~]?/, 'delimiter.twig', '@variableState'],
|
||||
// HTML
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ['delimiter.html', 'tag.html', '', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[^<]+/],
|
||||
],
|
||||
/**
|
||||
* Comment Tag Handling
|
||||
*/
|
||||
commentState: [
|
||||
[/#}/, 'comment.twig', '@pop'],
|
||||
[/./, 'comment.twig'],
|
||||
],
|
||||
/**
|
||||
* Block Tag Handling
|
||||
*/
|
||||
blockState: [
|
||||
[/[-~]?%}/, 'delimiter.twig', '@pop'],
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// verbatim
|
||||
// Unlike other blocks, verbatim ehas its own state
|
||||
// transition to ensure we mark its contents as strings.
|
||||
[/(verbatim)(\s*)([-~]?%})/, [
|
||||
'keyword.twig',
|
||||
'',
|
||||
{ token: 'delimiter.twig', next: '@rawDataState' },
|
||||
]],
|
||||
{ include: 'expression' }
|
||||
],
|
||||
rawDataState: [
|
||||
// endverbatim
|
||||
[/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/, [
|
||||
'delimiter.twig',
|
||||
'',
|
||||
'keyword.twig',
|
||||
'',
|
||||
{ token: 'delimiter.twig', next: '@popall' },
|
||||
]],
|
||||
[/./, 'string.twig'],
|
||||
],
|
||||
/**
|
||||
* Variable Tag Handling
|
||||
*/
|
||||
variableState: [
|
||||
[/[-~]?}}/, 'delimiter.twig', '@pop'],
|
||||
{ include: 'expression' },
|
||||
],
|
||||
stringState: [
|
||||
// closing double quoted string
|
||||
[/"/, 'string.twig', '@pop'],
|
||||
// interpolation start
|
||||
[/#{\s*/, 'string.twig', '@interpolationState'],
|
||||
// string part
|
||||
[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, 'string.twig'],
|
||||
],
|
||||
interpolationState: [
|
||||
// interpolation end
|
||||
[/}/, 'string.twig', '@pop'],
|
||||
{ include: 'expression' },
|
||||
],
|
||||
/**
|
||||
* Expression Handling
|
||||
*/
|
||||
expression: [
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// operators - math
|
||||
[/\+|-|\/{1,2}|%|\*{1,2}/, 'operators.twig'],
|
||||
// operators - logic
|
||||
[/(and|or|not|b-and|b-xor|b-or)(\s+)/, ['operators.twig', '']],
|
||||
// operators - comparison (symbols)
|
||||
[/==|!=|<|>|>=|<=/, 'operators.twig'],
|
||||
// operators - comparison (words)
|
||||
[/(starts with|ends with|matches)(\s+)/, ['operators.twig', '']],
|
||||
// operators - containment
|
||||
[/(in)(\s+)/, ['operators.twig', '']],
|
||||
// operators - test
|
||||
[/(is)(\s+)/, ['operators.twig', '']],
|
||||
// operators - misc
|
||||
[/\||~|:|\.{1,2}|\?{1,2}/, 'operators.twig'],
|
||||
// names
|
||||
[/[^\W\d][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword.twig',
|
||||
'@default': 'variable.twig'
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d+(\.\d+)?/, 'number.twig'],
|
||||
// punctuation
|
||||
[/\(|\)|\[|\]|{|}|,/, 'delimiter.twig'],
|
||||
// strings
|
||||
[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, 'string.twig'],
|
||||
// opening double quoted string
|
||||
[/"/, 'string.twig', '@stringState'],
|
||||
// misc syntactic constructs
|
||||
// These are not operators per se, but for the purposes of lexical analysis we
|
||||
// can treat them as such.
|
||||
// arrow functions
|
||||
[/=>/, 'operators.twig'],
|
||||
// assignment
|
||||
[/=/, 'operators.twig'],
|
||||
],
|
||||
/**
|
||||
* HTML
|
||||
*/
|
||||
doctype: [
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/type/, 'attribute.name.html', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/=/, 'delimiter.html', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value.html', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value.html', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/type/, 'attribute.name.html', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/=/, 'delimiter.html', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value.html', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value.html', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
}
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
|
||||
comments: {
|
||||
blockComment: ['{#', '#}'],
|
||||
},
|
||||
brackets: [
|
||||
['{#', '#}'],
|
||||
['{%', '%}'],
|
||||
['{{', '}}'],
|
||||
['(', ')'],
|
||||
['[', ']'],
|
||||
// HTML
|
||||
['<!--', '-->'],
|
||||
['<', '>'],
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{# ', close: ' #}' },
|
||||
{ open: '{% ', close: ' %}' },
|
||||
{ open: '{{ ', close: ' }}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
// HTML
|
||||
{ open: '<', close: '>' },
|
||||
],
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '',
|
||||
ignoreCase: true,
|
||||
keywords: [
|
||||
// (opening) tags
|
||||
'apply', 'autoescape', 'block', 'deprecated', 'do', 'embed', 'extends',
|
||||
'flush', 'for', 'from', 'if', 'import', 'include', 'macro', 'sandbox',
|
||||
'set', 'use', 'verbatim', 'with',
|
||||
// closing tags
|
||||
'endapply', 'endautoescape', 'endblock', 'endembed', 'endfor', 'endif',
|
||||
'endmacro', 'endsandbox', 'endset', 'endwith',
|
||||
// literals
|
||||
'true', 'false',
|
||||
],
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// Twig Tag Delimiters
|
||||
[/{#/, 'comment.twig', '@commentState'],
|
||||
[/{%[-~]?/, 'delimiter.twig', '@blockState'],
|
||||
[/{{[-~]?/, 'delimiter.twig', '@variableState'],
|
||||
// HTML
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, ['delimiter.html', 'tag.html', '', 'delimiter.html']],
|
||||
[/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]],
|
||||
[/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]],
|
||||
[/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]],
|
||||
[/</, 'delimiter.html'],
|
||||
[/[^<]+/],
|
||||
],
|
||||
/**
|
||||
* Comment Tag Handling
|
||||
*/
|
||||
commentState: [
|
||||
[/#}/, 'comment.twig', '@pop'],
|
||||
[/./, 'comment.twig'],
|
||||
],
|
||||
/**
|
||||
* Block Tag Handling
|
||||
*/
|
||||
blockState: [
|
||||
[/[-~]?%}/, 'delimiter.twig', '@pop'],
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// verbatim
|
||||
// Unlike other blocks, verbatim ehas its own state
|
||||
// transition to ensure we mark its contents as strings.
|
||||
[/(verbatim)(\s*)([-~]?%})/, [
|
||||
'keyword.twig',
|
||||
'',
|
||||
{ token: 'delimiter.twig', next: '@rawDataState' },
|
||||
]],
|
||||
{ include: 'expression' }
|
||||
],
|
||||
rawDataState: [
|
||||
// endverbatim
|
||||
[/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/, [
|
||||
'delimiter.twig',
|
||||
'',
|
||||
'keyword.twig',
|
||||
'',
|
||||
{ token: 'delimiter.twig', next: '@popall' },
|
||||
]],
|
||||
[/./, 'string.twig'],
|
||||
],
|
||||
/**
|
||||
* Variable Tag Handling
|
||||
*/
|
||||
variableState: [
|
||||
[/[-~]?}}/, 'delimiter.twig', '@pop'],
|
||||
{ include: 'expression' },
|
||||
],
|
||||
stringState: [
|
||||
// closing double quoted string
|
||||
[/"/, 'string.twig', '@pop'],
|
||||
// interpolation start
|
||||
[/#{\s*/, 'string.twig', '@interpolationState'],
|
||||
// string part
|
||||
[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/, 'string.twig'],
|
||||
],
|
||||
interpolationState: [
|
||||
// interpolation end
|
||||
[/}/, 'string.twig', '@pop'],
|
||||
{ include: 'expression' },
|
||||
],
|
||||
/**
|
||||
* Expression Handling
|
||||
*/
|
||||
expression: [
|
||||
// whitespace
|
||||
[/\s+/],
|
||||
// operators - math
|
||||
[/\+|-|\/{1,2}|%|\*{1,2}/, 'operators.twig'],
|
||||
// operators - logic
|
||||
[/(and|or|not|b-and|b-xor|b-or)(\s+)/, ['operators.twig', '']],
|
||||
// operators - comparison (symbols)
|
||||
[/==|!=|<|>|>=|<=/, 'operators.twig'],
|
||||
// operators - comparison (words)
|
||||
[/(starts with|ends with|matches)(\s+)/, ['operators.twig', '']],
|
||||
// operators - containment
|
||||
[/(in)(\s+)/, ['operators.twig', '']],
|
||||
// operators - test
|
||||
[/(is)(\s+)/, ['operators.twig', '']],
|
||||
// operators - misc
|
||||
[/\||~|:|\.{1,2}|\?{1,2}/, 'operators.twig'],
|
||||
// names
|
||||
[/[^\W\d][\w]*/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword.twig',
|
||||
'@default': 'variable.twig'
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/\d+(\.\d+)?/, 'number.twig'],
|
||||
// punctuation
|
||||
[/\(|\)|\[|\]|{|}|,/, 'delimiter.twig'],
|
||||
// strings
|
||||
[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/, 'string.twig'],
|
||||
// opening double quoted string
|
||||
[/"/, 'string.twig', '@stringState'],
|
||||
// misc syntactic constructs
|
||||
// These are not operators per se, but for the purposes of lexical analysis we
|
||||
// can treat them as such.
|
||||
// arrow functions
|
||||
[/=>/, 'operators.twig'],
|
||||
// assignment
|
||||
[/=/, 'operators.twig'],
|
||||
],
|
||||
/**
|
||||
* HTML
|
||||
*/
|
||||
doctype: [
|
||||
[/[^>]+/, 'metatag.content.html'],
|
||||
[/>/, 'metatag.html', '@pop'],
|
||||
],
|
||||
comment: [
|
||||
[/-->/, 'comment.html', '@pop'],
|
||||
[/[^-]+/, 'comment.content.html'],
|
||||
[/./, 'comment.content.html']
|
||||
],
|
||||
otherTag: [
|
||||
[/\/?>/, 'delimiter.html', '@pop'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
],
|
||||
// -- BEGIN <script> tags handling
|
||||
// After <script
|
||||
script: [
|
||||
[/type/, 'attribute.name.html', '@scriptAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(script\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <script ... type
|
||||
scriptAfterType: [
|
||||
[/=/, 'delimiter.html', '@scriptAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type =
|
||||
scriptAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value.html', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value.html', switchTo: '@scriptWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded', nextEmbedded: 'text/javascript' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <script ... type = $S2
|
||||
scriptWithCustomType: [
|
||||
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
scriptEmbedded: [
|
||||
[/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
// -- END <script> tags handling
|
||||
// -- BEGIN <style> tags handling
|
||||
// After <style
|
||||
style: [
|
||||
[/type/, 'attribute.name.html', '@styleAfterType'],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/(<\/)(style\s*)(>)/, ['delimiter.html', 'tag.html', { token: 'delimiter.html', next: '@pop' }]]
|
||||
],
|
||||
// After <style ... type
|
||||
styleAfterType: [
|
||||
[/=/, 'delimiter.html', '@styleAfterTypeEquals'],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type =
|
||||
styleAfterTypeEquals: [
|
||||
[/"([^"]*)"/, { token: 'attribute.value.html', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/'([^']*)'/, { token: 'attribute.value.html', switchTo: '@styleWithCustomType.$1' }],
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded', nextEmbedded: 'text/css' }],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
// After <style ... type = $S2
|
||||
styleWithCustomType: [
|
||||
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.$S2', nextEmbedded: '$S2' }],
|
||||
[/"([^"]*)"/, 'attribute.value.html'],
|
||||
[/'([^']*)'/, 'attribute.value.html'],
|
||||
[/[\w\-]+/, 'attribute.name.html'],
|
||||
[/=/, 'delimiter.html'],
|
||||
[/[ \t\r\n]+/],
|
||||
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
||||
],
|
||||
styleEmbedded: [
|
||||
[/<\/style/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }],
|
||||
[/[^<]+/, '']
|
||||
],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,205 +13,205 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
// e.g. /** | */
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
afterText: /^\s*\*\/$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: '* ' }
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, removeText: 1 }
|
||||
}
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
||||
{ open: "/**", close: " */", notIn: ["string"] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
||||
end: new RegExp("^\\s*//\\s*#?endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.ts',
|
||||
keywords: [
|
||||
'abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else',
|
||||
'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface',
|
||||
'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package',
|
||||
'private', 'protected', 'public', 'readonly', 'require', 'global', 'return',
|
||||
'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try',
|
||||
'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async',
|
||||
'await', 'of'
|
||||
],
|
||||
typeKeywords: [
|
||||
'any', 'boolean', 'number', 'object', 'string', 'undefined'
|
||||
],
|
||||
operators: [
|
||||
'<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**',
|
||||
'*', '/', '%', '++', '--', '<<', '</', '>>', '>>>', '&',
|
||||
'|', '^', '!', '~', '&&', '||', '??', '?', ':', '=', '+=', '-=',
|
||||
'*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=',
|
||||
'^=', '@',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[{}]/, 'delimiter.bracket'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
common: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// [/[A-Z][\w\$]*/, 'identifier'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
||||
[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/!(?=([^=]|$))/, 'delimiter'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)n?/, 'number.hex'],
|
||||
[/0[oO]?(@octaldigits)n?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)n?/, 'number.binary'],
|
||||
[/(@digits)n?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string_double'],
|
||||
[/'/, 'string', '@string_single'],
|
||||
[/`/, 'string', '@string_backtick'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
jsdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']],
|
||||
[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/, ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
|
||||
[/[()]/, 'regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, { token: 'regexp.escape.control', next: '@pop', bracket: '@close' }]
|
||||
],
|
||||
string_double: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
string_single: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, 'string', '@pop']
|
||||
],
|
||||
string_backtick: [
|
||||
[/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
|
||||
[/[^\\`$]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/`/, 'string', '@pop']
|
||||
],
|
||||
bracketCounting: [
|
||||
[/\{/, 'delimiter.bracket', '@bracketCounting'],
|
||||
[/\}/, 'delimiter.bracket', '@pop'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
var _monaco = (typeof monaco === 'undefined' ? self.monaco : monaco);
|
||||
var conf = {
|
||||
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
||||
comments: {
|
||||
lineComment: '//',
|
||||
blockComment: ['/*', '*/']
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
onEnterRules: [
|
||||
{
|
||||
// e.g. /** | */
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
afterText: /^\s*\*\/$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.IndentOutdent, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. /** ...|
|
||||
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: ' * ' }
|
||||
},
|
||||
{
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, appendText: '* ' }
|
||||
},
|
||||
{
|
||||
// e.g. */|
|
||||
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
||||
action: { indentAction: _monaco.languages.IndentAction.None, removeText: 1 }
|
||||
}
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"', notIn: ['string'] },
|
||||
{ open: '\'', close: '\'', notIn: ['string', 'comment'] },
|
||||
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
||||
{ open: "/**", close: " */", notIn: ["string"] }
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
||||
end: new RegExp("^\\s*//\\s*#?endregion\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||
defaultToken: 'invalid',
|
||||
tokenPostfix: '.ts',
|
||||
keywords: [
|
||||
'abstract', 'as', 'break', 'case', 'catch', 'class', 'continue', 'const',
|
||||
'constructor', 'debugger', 'declare', 'default', 'delete', 'do', 'else',
|
||||
'enum', 'export', 'extends', 'false', 'finally', 'for', 'from', 'function',
|
||||
'get', 'if', 'implements', 'import', 'in', 'infer', 'instanceof', 'interface',
|
||||
'is', 'keyof', 'let', 'module', 'namespace', 'never', 'new', 'null', 'package',
|
||||
'private', 'protected', 'public', 'readonly', 'require', 'global', 'return',
|
||||
'set', 'static', 'super', 'switch', 'symbol', 'this', 'throw', 'true', 'try',
|
||||
'type', 'typeof', 'unique', 'var', 'void', 'while', 'with', 'yield', 'async',
|
||||
'await', 'of'
|
||||
],
|
||||
typeKeywords: [
|
||||
'any', 'boolean', 'number', 'object', 'string', 'undefined'
|
||||
],
|
||||
operators: [
|
||||
'<=', '>=', '==', '!=', '===', '!==', '=>', '+', '-', '**',
|
||||
'*', '/', '%', '++', '--', '<<', '</', '>>', '>>>', '&',
|
||||
'|', '^', '!', '~', '&&', '||', '??', '?', ':', '=', '+=', '-=',
|
||||
'*=', '**=', '/=', '%=', '<<=', '>>=', '>>>=', '&=', '|=',
|
||||
'^=', '@',
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
digits: /\d+(_+\d+)*/,
|
||||
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
||||
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
||||
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
||||
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
||||
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[{}]/, 'delimiter.bracket'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
common: [
|
||||
// identifiers and keywords
|
||||
[/[a-z_$][\w$]*/, {
|
||||
cases: {
|
||||
'@typeKeywords': 'keyword',
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
[/[A-Z][\w\$]*/, 'type.identifier'],
|
||||
// [/[A-Z][\w\$]*/, 'identifier'],
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
||||
[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/, { token: 'regexp', bracket: '@open', next: '@regexp' }],
|
||||
// delimiters and operators
|
||||
[/[()\[\]]/, '@brackets'],
|
||||
[/[<>](?!@symbols)/, '@brackets'],
|
||||
[/!(?=([^=]|$))/, 'delimiter'],
|
||||
[/@symbols/, {
|
||||
cases: {
|
||||
'@operators': 'delimiter',
|
||||
'@default': ''
|
||||
}
|
||||
}],
|
||||
// numbers
|
||||
[/(@digits)[eE]([\-+]?(@digits))?/, 'number.float'],
|
||||
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, 'number.float'],
|
||||
[/0[xX](@hexdigits)n?/, 'number.hex'],
|
||||
[/0[oO]?(@octaldigits)n?/, 'number.octal'],
|
||||
[/0[bB](@binarydigits)n?/, 'number.binary'],
|
||||
[/(@digits)n?/, 'number'],
|
||||
// delimiter: after number because of .\d floats
|
||||
[/[;,.]/, 'delimiter'],
|
||||
// strings
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/"/, 'string', '@string_double'],
|
||||
[/'/, 'string', '@string_single'],
|
||||
[/`/, 'string', '@string_backtick'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/\/\*\*(?!\/)/, 'comment.doc', '@jsdoc'],
|
||||
[/\/\*/, 'comment', '@comment'],
|
||||
[/\/\/.*$/, 'comment'],
|
||||
],
|
||||
comment: [
|
||||
[/[^\/*]+/, 'comment'],
|
||||
[/\*\//, 'comment', '@pop'],
|
||||
[/[\/*]/, 'comment']
|
||||
],
|
||||
jsdoc: [
|
||||
[/[^\/*]+/, 'comment.doc'],
|
||||
[/\*\//, 'comment.doc', '@pop'],
|
||||
[/[\/*]/, 'comment.doc']
|
||||
],
|
||||
// We match regular expression quite precisely
|
||||
regexp: [
|
||||
[/(\{)(\d+(?:,\d*)?)(\})/, ['regexp.escape.control', 'regexp.escape.control', 'regexp.escape.control']],
|
||||
[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/, ['regexp.escape.control', { token: 'regexp.escape.control', next: '@regexrange' }]],
|
||||
[/(\()(\?:|\?=|\?!)/, ['regexp.escape.control', 'regexp.escape.control']],
|
||||
[/[()]/, 'regexp.escape.control'],
|
||||
[/@regexpctl/, 'regexp.escape.control'],
|
||||
[/[^\\\/]/, 'regexp'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/\\\./, 'regexp.invalid'],
|
||||
[/(\/)([gimsuy]*)/, [{ token: 'regexp', bracket: '@close', next: '@pop' }, 'keyword.other']],
|
||||
],
|
||||
regexrange: [
|
||||
[/-/, 'regexp.escape.control'],
|
||||
[/\^/, 'regexp.invalid'],
|
||||
[/@regexpesc/, 'regexp.escape'],
|
||||
[/[^\]]/, 'regexp'],
|
||||
[/\]/, { token: 'regexp.escape.control', next: '@pop', bracket: '@close' }]
|
||||
],
|
||||
string_double: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
string_single: [
|
||||
[/[^\\']+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/'/, 'string', '@pop']
|
||||
],
|
||||
string_backtick: [
|
||||
[/\$\{/, { token: 'delimiter.bracket', next: '@bracketCounting' }],
|
||||
[/[^\\`$]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/`/, 'string', '@pop']
|
||||
],
|
||||
bracketCounting: [
|
||||
[/\{/, 'delimiter.bracket', '@bracketCounting'],
|
||||
[/\}/, 'delimiter.bracket', '@pop'],
|
||||
{ include: 'common' }
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,169 +13,169 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '\'',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'], ['[', ']'], ['(', ')'], ['<', '>'],
|
||||
['addhandler', 'end addhandler'],
|
||||
['class', 'end class'],
|
||||
['enum', 'end enum'],
|
||||
['event', 'end event'],
|
||||
['function', 'end function'],
|
||||
['get', 'end get'],
|
||||
['if', 'end if'],
|
||||
['interface', 'end interface'],
|
||||
['module', 'end module'],
|
||||
['namespace', 'end namespace'],
|
||||
['operator', 'end operator'],
|
||||
['property', 'end property'],
|
||||
['raiseevent', 'end raiseevent'],
|
||||
['removehandler', 'end removehandler'],
|
||||
['select', 'end select'],
|
||||
['set', 'end set'],
|
||||
['structure', 'end structure'],
|
||||
['sub', 'end sub'],
|
||||
['synclock', 'end synclock'],
|
||||
['try', 'end try'],
|
||||
['while', 'end while'],
|
||||
['with', 'end with'],
|
||||
['using', 'end using'],
|
||||
['do', 'loop'],
|
||||
['for', 'next']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '<', close: '>', notIn: ['string', 'comment'] },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#Region\\b"),
|
||||
end: new RegExp("^\\s*#End Region\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.vb',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' },
|
||||
// Special bracket statement pairs
|
||||
// according to https://msdn.microsoft.com/en-us/library/tsw2a11z.aspx
|
||||
{ token: 'keyword.tag-addhandler', open: 'addhandler', close: 'end addhandler' },
|
||||
{ token: 'keyword.tag-class', open: 'class', close: 'end class' },
|
||||
{ token: 'keyword.tag-enum', open: 'enum', close: 'end enum' },
|
||||
{ token: 'keyword.tag-event', open: 'event', close: 'end event' },
|
||||
{ token: 'keyword.tag-function', open: 'function', close: 'end function' },
|
||||
{ token: 'keyword.tag-get', open: 'get', close: 'end get' },
|
||||
{ token: 'keyword.tag-if', open: 'if', close: 'end if' },
|
||||
{ token: 'keyword.tag-interface', open: 'interface', close: 'end interface' },
|
||||
{ token: 'keyword.tag-module', open: 'module', close: 'end module' },
|
||||
{ token: 'keyword.tag-namespace', open: 'namespace', close: 'end namespace' },
|
||||
{ token: 'keyword.tag-operator', open: 'operator', close: 'end operator' },
|
||||
{ token: 'keyword.tag-property', open: 'property', close: 'end property' },
|
||||
{ token: 'keyword.tag-raiseevent', open: 'raiseevent', close: 'end raiseevent' },
|
||||
{ token: 'keyword.tag-removehandler', open: 'removehandler', close: 'end removehandler' },
|
||||
{ token: 'keyword.tag-select', open: 'select', close: 'end select' },
|
||||
{ token: 'keyword.tag-set', open: 'set', close: 'end set' },
|
||||
{ token: 'keyword.tag-structure', open: 'structure', close: 'end structure' },
|
||||
{ token: 'keyword.tag-sub', open: 'sub', close: 'end sub' },
|
||||
{ token: 'keyword.tag-synclock', open: 'synclock', close: 'end synclock' },
|
||||
{ token: 'keyword.tag-try', open: 'try', close: 'end try' },
|
||||
{ token: 'keyword.tag-while', open: 'while', close: 'end while' },
|
||||
{ token: 'keyword.tag-with', open: 'with', close: 'end with' },
|
||||
// Other pairs
|
||||
{ token: 'keyword.tag-using', open: 'using', close: 'end using' },
|
||||
{ token: 'keyword.tag-do', open: 'do', close: 'loop' },
|
||||
{ token: 'keyword.tag-for', open: 'for', close: 'next' }
|
||||
],
|
||||
keywords: [
|
||||
'AddHandler', 'AddressOf', 'Alias', 'And', 'AndAlso', 'As', 'Async', 'Boolean', 'ByRef', 'Byte', 'ByVal', 'Call',
|
||||
'Case', 'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDbl', 'CDec', 'Char', 'CInt', 'Class', 'CLng',
|
||||
'CObj', 'Const', 'Continue', 'CSByte', 'CShort', 'CSng', 'CStr', 'CType', 'CUInt', 'CULng', 'CUShort',
|
||||
'Date', 'Decimal', 'Declare', 'Default', 'Delegate', 'Dim', 'DirectCast', 'Do', 'Double', 'Each', 'Else',
|
||||
'ElseIf', 'End', 'EndIf', 'Enum', 'Erase', 'Error', 'Event', 'Exit', 'False', 'Finally', 'For', 'Friend',
|
||||
'Function', 'Get', 'GetType', 'GetXMLNamespace', 'Global', 'GoSub', 'GoTo', 'Handles', 'If', 'Implements',
|
||||
'Imports', 'In', 'Inherits', 'Integer', 'Interface', 'Is', 'IsNot', 'Let', 'Lib', 'Like', 'Long', 'Loop',
|
||||
'Me', 'Mod', 'Module', 'MustInherit', 'MustOverride', 'MyBase', 'MyClass', 'NameOf', 'Namespace', 'Narrowing', 'New',
|
||||
'Next', 'Not', 'Nothing', 'NotInheritable', 'NotOverridable', 'Object', 'Of', 'On', 'Operator', 'Option',
|
||||
'Optional', 'Or', 'OrElse', 'Out', 'Overloads', 'Overridable', 'Overrides', 'ParamArray', 'Partial',
|
||||
'Private', 'Property', 'Protected', 'Public', 'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume',
|
||||
'Return', 'SByte', 'Select', 'Set', 'Shadows', 'Shared', 'Short', 'Single', 'Static', 'Step', 'Stop',
|
||||
'String', 'Structure', 'Sub', 'SyncLock', 'Then', 'Throw', 'To', 'True', 'Try', 'TryCast', 'TypeOf',
|
||||
'UInteger', 'ULong', 'UShort', 'Using', 'Variant', 'Wend', 'When', 'While', 'Widening', 'With', 'WithEvents',
|
||||
'WriteOnly', 'Xor'
|
||||
],
|
||||
tagwords: [
|
||||
'If', 'Sub', 'Select', 'Try', 'Class', 'Enum',
|
||||
'Function', 'Get', 'Interface', 'Module', 'Namespace', 'Operator', 'Set', 'Structure', 'Using', 'While', 'With',
|
||||
'Do', 'Loop', 'For', 'Next', 'Property', 'Continue', 'AddHandler', 'RemoveHandler', 'Event', 'RaiseEvent', 'SyncLock'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?;\.,:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /U?[DI%L&S@]?/,
|
||||
floatsuffix: /[R#F!]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// special ending tag-words
|
||||
[/next(?!\w)/, { token: 'keyword.tag-for' }],
|
||||
[/loop(?!\w)/, { token: 'keyword.tag-do' }],
|
||||
// usual ending tags
|
||||
[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/, { token: 'keyword.tag-$1' }],
|
||||
// identifiers, tagwords, and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@tagwords': { token: 'keyword.tag-$0' },
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
// numbers
|
||||
[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/&H[0-9a-f]+(@integersuffix)/, 'number.hex'],
|
||||
[/&0[0-7]+(@integersuffix)/, 'number.octal'],
|
||||
[/\d+(@integersuffix)/, 'number'],
|
||||
// date literal
|
||||
[/#.*#/, 'number'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// strings
|
||||
[/"/, 'string', '@string'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(\'|REM(?!\w)).*$/, 'comment'],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"C?/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '\'',
|
||||
blockComment: ['/*', '*/'],
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'], ['[', ']'], ['(', ')'], ['<', '>'],
|
||||
['addhandler', 'end addhandler'],
|
||||
['class', 'end class'],
|
||||
['enum', 'end enum'],
|
||||
['event', 'end event'],
|
||||
['function', 'end function'],
|
||||
['get', 'end get'],
|
||||
['if', 'end if'],
|
||||
['interface', 'end interface'],
|
||||
['module', 'end module'],
|
||||
['namespace', 'end namespace'],
|
||||
['operator', 'end operator'],
|
||||
['property', 'end property'],
|
||||
['raiseevent', 'end raiseevent'],
|
||||
['removehandler', 'end removehandler'],
|
||||
['select', 'end select'],
|
||||
['set', 'end set'],
|
||||
['structure', 'end structure'],
|
||||
['sub', 'end sub'],
|
||||
['synclock', 'end synclock'],
|
||||
['try', 'end try'],
|
||||
['while', 'end while'],
|
||||
['with', 'end with'],
|
||||
['using', 'end using'],
|
||||
['do', 'loop'],
|
||||
['for', 'next']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}', notIn: ['string', 'comment'] },
|
||||
{ open: '[', close: ']', notIn: ['string', 'comment'] },
|
||||
{ open: '(', close: ')', notIn: ['string', 'comment'] },
|
||||
{ open: '"', close: '"', notIn: ['string', 'comment'] },
|
||||
{ open: '<', close: '>', notIn: ['string', 'comment'] },
|
||||
],
|
||||
folding: {
|
||||
markers: {
|
||||
start: new RegExp("^\\s*#Region\\b"),
|
||||
end: new RegExp("^\\s*#End Region\\b")
|
||||
}
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.vb',
|
||||
ignoreCase: true,
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.array', open: '[', close: ']' },
|
||||
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
|
||||
{ token: 'delimiter.angle', open: '<', close: '>' },
|
||||
// Special bracket statement pairs
|
||||
// according to https://msdn.microsoft.com/en-us/library/tsw2a11z.aspx
|
||||
{ token: 'keyword.tag-addhandler', open: 'addhandler', close: 'end addhandler' },
|
||||
{ token: 'keyword.tag-class', open: 'class', close: 'end class' },
|
||||
{ token: 'keyword.tag-enum', open: 'enum', close: 'end enum' },
|
||||
{ token: 'keyword.tag-event', open: 'event', close: 'end event' },
|
||||
{ token: 'keyword.tag-function', open: 'function', close: 'end function' },
|
||||
{ token: 'keyword.tag-get', open: 'get', close: 'end get' },
|
||||
{ token: 'keyword.tag-if', open: 'if', close: 'end if' },
|
||||
{ token: 'keyword.tag-interface', open: 'interface', close: 'end interface' },
|
||||
{ token: 'keyword.tag-module', open: 'module', close: 'end module' },
|
||||
{ token: 'keyword.tag-namespace', open: 'namespace', close: 'end namespace' },
|
||||
{ token: 'keyword.tag-operator', open: 'operator', close: 'end operator' },
|
||||
{ token: 'keyword.tag-property', open: 'property', close: 'end property' },
|
||||
{ token: 'keyword.tag-raiseevent', open: 'raiseevent', close: 'end raiseevent' },
|
||||
{ token: 'keyword.tag-removehandler', open: 'removehandler', close: 'end removehandler' },
|
||||
{ token: 'keyword.tag-select', open: 'select', close: 'end select' },
|
||||
{ token: 'keyword.tag-set', open: 'set', close: 'end set' },
|
||||
{ token: 'keyword.tag-structure', open: 'structure', close: 'end structure' },
|
||||
{ token: 'keyword.tag-sub', open: 'sub', close: 'end sub' },
|
||||
{ token: 'keyword.tag-synclock', open: 'synclock', close: 'end synclock' },
|
||||
{ token: 'keyword.tag-try', open: 'try', close: 'end try' },
|
||||
{ token: 'keyword.tag-while', open: 'while', close: 'end while' },
|
||||
{ token: 'keyword.tag-with', open: 'with', close: 'end with' },
|
||||
// Other pairs
|
||||
{ token: 'keyword.tag-using', open: 'using', close: 'end using' },
|
||||
{ token: 'keyword.tag-do', open: 'do', close: 'loop' },
|
||||
{ token: 'keyword.tag-for', open: 'for', close: 'next' }
|
||||
],
|
||||
keywords: [
|
||||
'AddHandler', 'AddressOf', 'Alias', 'And', 'AndAlso', 'As', 'Async', 'Boolean', 'ByRef', 'Byte', 'ByVal', 'Call',
|
||||
'Case', 'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDbl', 'CDec', 'Char', 'CInt', 'Class', 'CLng',
|
||||
'CObj', 'Const', 'Continue', 'CSByte', 'CShort', 'CSng', 'CStr', 'CType', 'CUInt', 'CULng', 'CUShort',
|
||||
'Date', 'Decimal', 'Declare', 'Default', 'Delegate', 'Dim', 'DirectCast', 'Do', 'Double', 'Each', 'Else',
|
||||
'ElseIf', 'End', 'EndIf', 'Enum', 'Erase', 'Error', 'Event', 'Exit', 'False', 'Finally', 'For', 'Friend',
|
||||
'Function', 'Get', 'GetType', 'GetXMLNamespace', 'Global', 'GoSub', 'GoTo', 'Handles', 'If', 'Implements',
|
||||
'Imports', 'In', 'Inherits', 'Integer', 'Interface', 'Is', 'IsNot', 'Let', 'Lib', 'Like', 'Long', 'Loop',
|
||||
'Me', 'Mod', 'Module', 'MustInherit', 'MustOverride', 'MyBase', 'MyClass', 'NameOf', 'Namespace', 'Narrowing', 'New',
|
||||
'Next', 'Not', 'Nothing', 'NotInheritable', 'NotOverridable', 'Object', 'Of', 'On', 'Operator', 'Option',
|
||||
'Optional', 'Or', 'OrElse', 'Out', 'Overloads', 'Overridable', 'Overrides', 'ParamArray', 'Partial',
|
||||
'Private', 'Property', 'Protected', 'Public', 'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume',
|
||||
'Return', 'SByte', 'Select', 'Set', 'Shadows', 'Shared', 'Short', 'Single', 'Static', 'Step', 'Stop',
|
||||
'String', 'Structure', 'Sub', 'SyncLock', 'Then', 'Throw', 'To', 'True', 'Try', 'TryCast', 'TypeOf',
|
||||
'UInteger', 'ULong', 'UShort', 'Using', 'Variant', 'Wend', 'When', 'While', 'Widening', 'With', 'WithEvents',
|
||||
'WriteOnly', 'Xor'
|
||||
],
|
||||
tagwords: [
|
||||
'If', 'Sub', 'Select', 'Try', 'Class', 'Enum',
|
||||
'Function', 'Get', 'Interface', 'Module', 'Namespace', 'Operator', 'Set', 'Structure', 'Using', 'While', 'With',
|
||||
'Do', 'Loop', 'For', 'Next', 'Property', 'Continue', 'AddHandler', 'RemoveHandler', 'Event', 'RaiseEvent', 'SyncLock'
|
||||
],
|
||||
// we include these common regular expressions
|
||||
symbols: /[=><!~?;\.,:&|+\-*\/\^%]+/,
|
||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||
integersuffix: /U?[DI%L&S@]?/,
|
||||
floatsuffix: /[R#F!]?/,
|
||||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
// special ending tag-words
|
||||
[/next(?!\w)/, { token: 'keyword.tag-for' }],
|
||||
[/loop(?!\w)/, { token: 'keyword.tag-do' }],
|
||||
// usual ending tags
|
||||
[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/, { token: 'keyword.tag-$1' }],
|
||||
// identifiers, tagwords, and keywords
|
||||
[/[a-zA-Z_]\w*/, {
|
||||
cases: {
|
||||
'@tagwords': { token: 'keyword.tag-$0' },
|
||||
'@keywords': { token: 'keyword.$0' },
|
||||
'@default': 'identifier'
|
||||
}
|
||||
}],
|
||||
// Preprocessor directive
|
||||
[/^\s*#\w+/, 'keyword'],
|
||||
// numbers
|
||||
[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/, 'number.float'],
|
||||
[/&H[0-9a-f]+(@integersuffix)/, 'number.hex'],
|
||||
[/&0[0-7]+(@integersuffix)/, 'number.octal'],
|
||||
[/\d+(@integersuffix)/, 'number'],
|
||||
// date literal
|
||||
[/#.*#/, 'number'],
|
||||
// delimiters and operators
|
||||
[/[{}()\[\]]/, '@brackets'],
|
||||
[/@symbols/, 'delimiter'],
|
||||
// strings
|
||||
[/"/, 'string', '@string'],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(\'|REM(?!\w)).*$/, 'comment'],
|
||||
],
|
||||
string: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"C?/, 'string', '@pop']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,95 +13,95 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->'],
|
||||
},
|
||||
brackets: [
|
||||
['<', '>']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.xml',
|
||||
ignoreCase: true,
|
||||
// Useful regular expressions
|
||||
qualifiedName: /(?:[\w\.\-]+:)?[\w\.\-]+/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[^<&]+/, ''],
|
||||
{ include: '@whitespace' },
|
||||
// Standard opening tag
|
||||
[/(<)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag', next: '@tag' }
|
||||
]],
|
||||
// Standard closing tag
|
||||
[/(<\/)(@qualifiedName)(\s*)(>)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag' },
|
||||
'',
|
||||
{ token: 'delimiter' }
|
||||
]],
|
||||
// Meta tags - instruction
|
||||
[/(<\?)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }
|
||||
]],
|
||||
// Meta tags - declaration
|
||||
[/(<\!)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }
|
||||
]],
|
||||
// CDATA
|
||||
[/<\!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }],
|
||||
[/&\w+;/, 'string.escape'],
|
||||
],
|
||||
cdata: [
|
||||
[/[^\]]+/, ''],
|
||||
[/\]\]>/, { token: 'delimiter.cdata', next: '@pop' }],
|
||||
[/\]/, '']
|
||||
],
|
||||
tag: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name', '', 'attribute.value']],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/@qualifiedName/, 'attribute.name'],
|
||||
[/\?>/, { token: 'delimiter', next: '@pop' }],
|
||||
[/(\/)(>)/, [
|
||||
{ token: 'tag' },
|
||||
{ token: 'delimiter', next: '@pop' }
|
||||
]],
|
||||
[/>/, { token: 'delimiter', next: '@pop' }],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/<!--/, { token: 'comment', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, { token: 'comment', next: '@pop' }],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
},
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var conf = {
|
||||
comments: {
|
||||
blockComment: ['<!--', '-->'],
|
||||
},
|
||||
brackets: [
|
||||
['<', '>']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '<', close: '>' },
|
||||
{ open: '\'', close: '\'' },
|
||||
{ open: '"', close: '"' },
|
||||
]
|
||||
};
|
||||
var language = {
|
||||
defaultToken: '',
|
||||
tokenPostfix: '.xml',
|
||||
ignoreCase: true,
|
||||
// Useful regular expressions
|
||||
qualifiedName: /(?:[\w\.\-]+:)?[\w\.\-]+/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/[^<&]+/, ''],
|
||||
{ include: '@whitespace' },
|
||||
// Standard opening tag
|
||||
[/(<)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag', next: '@tag' }
|
||||
]],
|
||||
// Standard closing tag
|
||||
[/(<\/)(@qualifiedName)(\s*)(>)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag' },
|
||||
'',
|
||||
{ token: 'delimiter' }
|
||||
]],
|
||||
// Meta tags - instruction
|
||||
[/(<\?)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }
|
||||
]],
|
||||
// Meta tags - declaration
|
||||
[/(<\!)(@qualifiedName)/, [
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }
|
||||
]],
|
||||
// CDATA
|
||||
[/<\!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }],
|
||||
[/&\w+;/, 'string.escape'],
|
||||
],
|
||||
cdata: [
|
||||
[/[^\]]+/, ''],
|
||||
[/\]\]>/, { token: 'delimiter.cdata', next: '@pop' }],
|
||||
[/\]/, '']
|
||||
],
|
||||
tag: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name', '', 'attribute.value']],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/@qualifiedName/, 'attribute.name'],
|
||||
[/\?>/, { token: 'delimiter', next: '@pop' }],
|
||||
[/(\/)(>)/, [
|
||||
{ token: 'tag' },
|
||||
{ token: 'delimiter', next: '@pop' }
|
||||
]],
|
||||
[/>/, { token: 'delimiter', next: '@pop' }],
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, ''],
|
||||
[/<!--/, { token: 'comment', next: '@comment' }]
|
||||
],
|
||||
comment: [
|
||||
[/[^<\-]+/, 'comment.content'],
|
||||
[/-->/, { token: 'comment', next: '@pop' }],
|
||||
[/<!--/, 'comment.content.invalid'],
|
||||
[/[<\-]/, 'comment.content']
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
|
|
@ -13,193 +13,193 @@
|
|||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.yaml',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: ['true', 'True', 'TRUE', 'false', 'False', 'FALSE', 'null', 'Null', 'Null', '~'],
|
||||
numberInteger: /(?:0|[+-]?[0-9]+)/,
|
||||
numberFloat: /(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,
|
||||
numberOctal: /0o[0-7]+/,
|
||||
numberHex: /0x[0-9a-fA-F]+/,
|
||||
numberInfinity: /[+-]?\.(?:inf|Inf|INF)/,
|
||||
numberNaN: /\.(?:nan|Nan|NAN)/,
|
||||
numberDate: /\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,
|
||||
escapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Directive
|
||||
[/%[^ ]+.*$/, 'meta.directive'],
|
||||
// Document Markers
|
||||
[/---/, 'operators.directivesEnd'],
|
||||
[/\.{3}/, 'operators.documentEnd'],
|
||||
// Block Structure Indicators
|
||||
[/[-?:](?= )/, 'operators'],
|
||||
{ include: '@anchor' },
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@blockStyle' },
|
||||
// Numbers
|
||||
[/@numberInteger(?![ \t]*\S+)/, 'number'],
|
||||
[/@numberFloat(?![ \t]*\S+)/, 'number.float'],
|
||||
[/@numberOctal(?![ \t]*\S+)/, 'number.octal'],
|
||||
[/@numberHex(?![ \t]*\S+)/, 'number.hex'],
|
||||
[/@numberInfinity(?![ \t]*\S+)/, 'number.infinity'],
|
||||
[/@numberNaN(?![ \t]*\S+)/, 'number.nan'],
|
||||
[/@numberDate(?![ \t]*\S+)/, 'number.date'],
|
||||
// Key:Value pair
|
||||
[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
|
||||
{ include: '@flowScalars' },
|
||||
// String nodes
|
||||
[/.+$/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Flow Collection: Flow Mapping
|
||||
object: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Flow Mapping termination
|
||||
[/\}/, '@brackets', '@pop'],
|
||||
// Flow Mapping delimiter
|
||||
[/,/, 'delimiter.comma'],
|
||||
// Flow Mapping Key:Value delimiter
|
||||
[/:(?= )/, 'operators'],
|
||||
// Flow Mapping Key:Value key
|
||||
[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/, 'type'],
|
||||
// Start Flow Style
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@flowScalars' },
|
||||
// Scalar Data types
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@anchor' },
|
||||
{ include: '@flowNumber' },
|
||||
// Other value (keyword or string)
|
||||
[/[^\},]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Flow Collection: Flow Sequence
|
||||
array: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Flow Sequence termination
|
||||
[/\]/, '@brackets', '@pop'],
|
||||
// Flow Sequence delimiter
|
||||
[/,/, 'delimiter.comma'],
|
||||
// Start Flow Style
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@flowScalars' },
|
||||
// Scalar Data types
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@anchor' },
|
||||
{ include: '@flowNumber' },
|
||||
// Other value (keyword or string)
|
||||
[/[^\],]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// First line of a Block Style
|
||||
multiString: [
|
||||
[/^( +).+$/, 'string', '@multiStringContinued.$1']
|
||||
],
|
||||
// Further lines of a Block Style
|
||||
// Workaround for indentation detection
|
||||
multiStringContinued: [
|
||||
[/^( *).+$/, {
|
||||
cases: {
|
||||
'$1==$S2': 'string',
|
||||
'@default': { token: '@rematch', next: '@popall' }
|
||||
}
|
||||
}]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white']
|
||||
],
|
||||
// Only line comments
|
||||
comment: [
|
||||
[/#.*$/, 'comment']
|
||||
],
|
||||
// Start Flow Collections
|
||||
flowCollections: [
|
||||
[/\[/, '@brackets', '@array'],
|
||||
[/\{/, '@brackets', '@object']
|
||||
],
|
||||
// Start Flow Scalars (quoted strings)
|
||||
flowScalars: [
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'[^']*'/, 'string'],
|
||||
[/"/, 'string', '@doubleQuotedString']
|
||||
],
|
||||
doubleQuotedString: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
// Start Block Scalar
|
||||
blockStyle: [
|
||||
[/[>|][0-9]*[+-]?$/, 'operators', '@multiString']
|
||||
],
|
||||
// Numbers in Flow Collections (terminate with ,]})
|
||||
flowNumber: [
|
||||
[/@numberInteger(?=[ \t]*[,\]\}])/, 'number'],
|
||||
[/@numberFloat(?=[ \t]*[,\]\}])/, 'number.float'],
|
||||
[/@numberOctal(?=[ \t]*[,\]\}])/, 'number.octal'],
|
||||
[/@numberHex(?=[ \t]*[,\]\}])/, 'number.hex'],
|
||||
[/@numberInfinity(?=[ \t]*[,\]\}])/, 'number.infinity'],
|
||||
[/@numberNaN(?=[ \t]*[,\]\}])/, 'number.nan'],
|
||||
[/@numberDate(?=[ \t]*[,\]\}])/, 'number.date']
|
||||
],
|
||||
tagHandle: [
|
||||
[/\![^ ]*/, 'tag']
|
||||
],
|
||||
anchor: [
|
||||
[/[&*][^ ]+/, 'namespace']
|
||||
]
|
||||
}
|
||||
};
|
||||
var conf = {
|
||||
comments: {
|
||||
lineComment: '#'
|
||||
},
|
||||
brackets: [
|
||||
['{', '}'],
|
||||
['[', ']'],
|
||||
['(', ')']
|
||||
],
|
||||
autoClosingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
surroundingPairs: [
|
||||
{ open: '{', close: '}' },
|
||||
{ open: '[', close: ']' },
|
||||
{ open: '(', close: ')' },
|
||||
{ open: '"', close: '"' },
|
||||
{ open: '\'', close: '\'' },
|
||||
],
|
||||
folding: {
|
||||
offSide: true
|
||||
}
|
||||
};
|
||||
var language = {
|
||||
tokenPostfix: '.yaml',
|
||||
brackets: [
|
||||
{ token: 'delimiter.bracket', open: '{', close: '}' },
|
||||
{ token: 'delimiter.square', open: '[', close: ']' }
|
||||
],
|
||||
keywords: ['true', 'True', 'TRUE', 'false', 'False', 'FALSE', 'null', 'Null', 'Null', '~'],
|
||||
numberInteger: /(?:0|[+-]?[0-9]+)/,
|
||||
numberFloat: /(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,
|
||||
numberOctal: /0o[0-7]+/,
|
||||
numberHex: /0x[0-9a-fA-F]+/,
|
||||
numberInfinity: /[+-]?\.(?:inf|Inf|INF)/,
|
||||
numberNaN: /\.(?:nan|Nan|NAN)/,
|
||||
numberDate: /\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,
|
||||
escapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
|
||||
tokenizer: {
|
||||
root: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Directive
|
||||
[/%[^ ]+.*$/, 'meta.directive'],
|
||||
// Document Markers
|
||||
[/---/, 'operators.directivesEnd'],
|
||||
[/\.{3}/, 'operators.documentEnd'],
|
||||
// Block Structure Indicators
|
||||
[/[-?:](?= )/, 'operators'],
|
||||
{ include: '@anchor' },
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@blockStyle' },
|
||||
// Numbers
|
||||
[/@numberInteger(?![ \t]*\S+)/, 'number'],
|
||||
[/@numberFloat(?![ \t]*\S+)/, 'number.float'],
|
||||
[/@numberOctal(?![ \t]*\S+)/, 'number.octal'],
|
||||
[/@numberHex(?![ \t]*\S+)/, 'number.hex'],
|
||||
[/@numberInfinity(?![ \t]*\S+)/, 'number.infinity'],
|
||||
[/@numberNaN(?![ \t]*\S+)/, 'number.nan'],
|
||||
[/@numberDate(?![ \t]*\S+)/, 'number.date'],
|
||||
// Key:Value pair
|
||||
[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
|
||||
{ include: '@flowScalars' },
|
||||
// String nodes
|
||||
[/.+$/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Flow Collection: Flow Mapping
|
||||
object: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Flow Mapping termination
|
||||
[/\}/, '@brackets', '@pop'],
|
||||
// Flow Mapping delimiter
|
||||
[/,/, 'delimiter.comma'],
|
||||
// Flow Mapping Key:Value delimiter
|
||||
[/:(?= )/, 'operators'],
|
||||
// Flow Mapping Key:Value key
|
||||
[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/, 'type'],
|
||||
// Start Flow Style
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@flowScalars' },
|
||||
// Scalar Data types
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@anchor' },
|
||||
{ include: '@flowNumber' },
|
||||
// Other value (keyword or string)
|
||||
[/[^\},]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// Flow Collection: Flow Sequence
|
||||
array: [
|
||||
{ include: '@whitespace' },
|
||||
{ include: '@comment' },
|
||||
// Flow Sequence termination
|
||||
[/\]/, '@brackets', '@pop'],
|
||||
// Flow Sequence delimiter
|
||||
[/,/, 'delimiter.comma'],
|
||||
// Start Flow Style
|
||||
{ include: '@flowCollections' },
|
||||
{ include: '@flowScalars' },
|
||||
// Scalar Data types
|
||||
{ include: '@tagHandle' },
|
||||
{ include: '@anchor' },
|
||||
{ include: '@flowNumber' },
|
||||
// Other value (keyword or string)
|
||||
[/[^\],]+/, {
|
||||
cases: {
|
||||
'@keywords': 'keyword',
|
||||
'@default': 'string'
|
||||
}
|
||||
}]
|
||||
],
|
||||
// First line of a Block Style
|
||||
multiString: [
|
||||
[/^( +).+$/, 'string', '@multiStringContinued.$1']
|
||||
],
|
||||
// Further lines of a Block Style
|
||||
// Workaround for indentation detection
|
||||
multiStringContinued: [
|
||||
[/^( *).+$/, {
|
||||
cases: {
|
||||
'$1==$S2': 'string',
|
||||
'@default': { token: '@rematch', next: '@popall' }
|
||||
}
|
||||
}]
|
||||
],
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white']
|
||||
],
|
||||
// Only line comments
|
||||
comment: [
|
||||
[/#.*$/, 'comment']
|
||||
],
|
||||
// Start Flow Collections
|
||||
flowCollections: [
|
||||
[/\[/, '@brackets', '@array'],
|
||||
[/\{/, '@brackets', '@object']
|
||||
],
|
||||
// Start Flow Scalars (quoted strings)
|
||||
flowScalars: [
|
||||
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||
[/'[^']*'/, 'string'],
|
||||
[/"/, 'string', '@doubleQuotedString']
|
||||
],
|
||||
doubleQuotedString: [
|
||||
[/[^\\"]+/, 'string'],
|
||||
[/@escapes/, 'string.escape'],
|
||||
[/\\./, 'string.escape.invalid'],
|
||||
[/"/, 'string', '@pop']
|
||||
],
|
||||
// Start Block Scalar
|
||||
blockStyle: [
|
||||
[/[>|][0-9]*[+-]?$/, 'operators', '@multiString']
|
||||
],
|
||||
// Numbers in Flow Collections (terminate with ,]})
|
||||
flowNumber: [
|
||||
[/@numberInteger(?=[ \t]*[,\]\}])/, 'number'],
|
||||
[/@numberFloat(?=[ \t]*[,\]\}])/, 'number.float'],
|
||||
[/@numberOctal(?=[ \t]*[,\]\}])/, 'number.octal'],
|
||||
[/@numberHex(?=[ \t]*[,\]\}])/, 'number.hex'],
|
||||
[/@numberInfinity(?=[ \t]*[,\]\}])/, 'number.infinity'],
|
||||
[/@numberNaN(?=[ \t]*[,\]\}])/, 'number.nan'],
|
||||
[/@numberDate(?=[ \t]*[,\]\}])/, 'number.date']
|
||||
],
|
||||
tagHandle: [
|
||||
[/\![^ ]*/, 'tag']
|
||||
],
|
||||
anchor: [
|
||||
[/[&*][^ ]+/, 'namespace']
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
|||
2308
83.c048402c.async.js
2308
83.c048402c.async.js
File diff suppressed because it is too large
Load Diff
20206
css.worker.js
20206
css.worker.js
File diff suppressed because one or more lines are too long
16290
editor.worker.js
16290
editor.worker.js
File diff suppressed because one or more lines are too long
20188
html.worker.js
20188
html.worker.js
File diff suppressed because one or more lines are too long
20194
json.worker.js
20194
json.worker.js
File diff suppressed because one or more lines are too long
|
|
@ -79537,18 +79537,18 @@ var _typeof3 = _interopRequireDefault(_typeof2);
|
|||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/*
|
||||
* Date Format 1.2.3
|
||||
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
|
||||
* MIT license
|
||||
*
|
||||
* Includes enhancements by Scott Trenda <scott.trenda.net>
|
||||
* and Kris Kowal <cixar.com/~kris.kowal/>
|
||||
*
|
||||
* Accepts a date, a mask, or a date and a mask.
|
||||
* Returns a formatted version of the given date.
|
||||
* The date defaults to the current date/time.
|
||||
* The mask defaults to dateFormat.masks.default.
|
||||
/*
|
||||
* Date Format 1.2.3
|
||||
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
|
||||
* MIT license
|
||||
*
|
||||
* Includes enhancements by Scott Trenda <scott.trenda.net>
|
||||
* and Kris Kowal <cixar.com/~kris.kowal/>
|
||||
*
|
||||
* Accepts a date, a mask, or a date and a mask.
|
||||
* Returns a formatted version of the given date.
|
||||
* The date defaults to the current date/time.
|
||||
* The mask defaults to dateFormat.masks.default.
|
||||
*/
|
||||
|
||||
(function (global) {
|
||||
|
|
@ -79674,13 +79674,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||
return val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ISO 8601 week number
|
||||
* Based on comments from
|
||||
* http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html
|
||||
*
|
||||
* @param {Object} `date`
|
||||
* @return {Number}
|
||||
/**
|
||||
* Get the ISO 8601 week number
|
||||
* Based on comments from
|
||||
* http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html
|
||||
*
|
||||
* @param {Object} `date`
|
||||
* @return {Number}
|
||||
*/
|
||||
function getWeek(date) {
|
||||
// Remove time components of date
|
||||
|
|
@ -79704,12 +79704,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||
return 1 + Math.floor(weekDiff);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ISO-8601 numeric representation of the day of the week
|
||||
* 1 (for Monday) through 7 (for Sunday)
|
||||
*
|
||||
* @param {Object} `date`
|
||||
* @return {Number}
|
||||
/**
|
||||
* Get ISO-8601 numeric representation of the day of the week
|
||||
* 1 (for Monday) through 7 (for Sunday)
|
||||
*
|
||||
* @param {Object} `date`
|
||||
* @return {Number}
|
||||
*/
|
||||
function getDayOfWeek(date) {
|
||||
var dow = date.getDay();
|
||||
|
|
@ -79719,10 +79719,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||
return dow;
|
||||
}
|
||||
|
||||
/**
|
||||
* kind-of shortcut
|
||||
* @param {*} val
|
||||
* @return {String}
|
||||
/**
|
||||
* kind-of shortcut
|
||||
* @param {*} val
|
||||
* @return {String}
|
||||
*/
|
||||
function kindOf(val) {
|
||||
if (val === null) {
|
||||
|
|
@ -96142,26 +96142,26 @@ module.exports = { hash: hash };
|
|||
},{"buffer":73}],286:[function(require,module,exports){
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
||||
* Digest Algorithm, as defined in RFC 1321.
|
||||
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
|
||||
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
||||
* Distributed under the BSD License
|
||||
* See http://pajhome.org.uk/crypt/md5 for more info.
|
||||
/*
|
||||
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
||||
* Digest Algorithm, as defined in RFC 1321.
|
||||
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
|
||||
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
||||
* Distributed under the BSD License
|
||||
* See http://pajhome.org.uk/crypt/md5 for more info.
|
||||
*/
|
||||
|
||||
var helpers = require('./helpers');
|
||||
|
||||
/*
|
||||
* Perform a simple self-test to see if the VM is working
|
||||
/*
|
||||
* Perform a simple self-test to see if the VM is working
|
||||
*/
|
||||
function md5_vm_test() {
|
||||
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate the MD5 of an array of little-endian words, and a bit length
|
||||
/*
|
||||
* Calculate the MD5 of an array of little-endian words, and a bit length
|
||||
*/
|
||||
function core_md5(x, len) {
|
||||
/* append padding */
|
||||
|
|
@ -96255,8 +96255,8 @@ function core_md5(x, len) {
|
|||
return Array(a, b, c, d);
|
||||
}
|
||||
|
||||
/*
|
||||
* These functions implement the four basic operations the algorithm uses.
|
||||
/*
|
||||
* These functions implement the four basic operations the algorithm uses.
|
||||
*/
|
||||
function md5_cmn(q, a, b, x, s, t) {
|
||||
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
|
||||
|
|
@ -96274,9 +96274,9 @@ function md5_ii(a, b, c, d, x, s, t) {
|
|||
return md5_cmn(c ^ (b | ~d), a, b, x, s, t);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
||||
* to work around bugs in some JS interpreters.
|
||||
/*
|
||||
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
||||
* to work around bugs in some JS interpreters.
|
||||
*/
|
||||
function safe_add(x, y) {
|
||||
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
|
||||
|
|
@ -96284,8 +96284,8 @@ function safe_add(x, y) {
|
|||
return msw << 16 | lsw & 0xFFFF;
|
||||
}
|
||||
|
||||
/*
|
||||
* Bitwise rotate a 32-bit number to the left.
|
||||
/*
|
||||
* Bitwise rotate a 32-bit number to the left.
|
||||
*/
|
||||
function bit_rol(num, cnt) {
|
||||
return num << cnt | num >>> 32 - cnt;
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#fff" d="M302.1,207.7c-16.5,0-29.8,13.3-29.8,29.8v603.6c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V237.5
|
||||
C332,221,318.6,207.7,302.1,207.7z"/>
|
||||
<path fill="#fff" d="M92.9,319.5c-16.5,0-29.8,13.3-29.8,29.8V707c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V349.3
|
||||
C122.7,332.8,109.4,319.5,92.9,319.5z"/>
|
||||
<path fill="#fff" d="M511.3,88.5c-16.5,0-29.8,13.3-29.8,29.8v789.9c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V118.3
|
||||
C541.1,101.8,527.8,88.5,511.3,88.5z"/>
|
||||
<path fill="#fff" d="M720.5,207.7c-16.5,0-29.8,13.3-29.8,29.8v603.6c0,16.5,13.3,29.8,29.8,29.8c16.5,0,29.8-13.3,29.8-29.8V237.5
|
||||
C750.3,221,737,207.7,720.5,207.7z"/>
|
||||
<path fill="#fff" d="M929.7,319.5c-16.5,0-29.8,13.3-29.8,29.8V707c0,16.5,13.3,29.8,29.8,29.8c16.5,0,29.8-13.3,29.8-29.8V349.3
|
||||
C959.5,332.8,946.2,319.5,929.7,319.5z"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="12px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#fff" d="M302.1,207.7c-16.5,0-29.8,13.3-29.8,29.8v603.6c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V237.5
|
||||
C332,221,318.6,207.7,302.1,207.7z"/>
|
||||
<path fill="#fff" d="M92.9,319.5c-16.5,0-29.8,13.3-29.8,29.8V707c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V349.3
|
||||
C122.7,332.8,109.4,319.5,92.9,319.5z"/>
|
||||
<path fill="#fff" d="M511.3,88.5c-16.5,0-29.8,13.3-29.8,29.8v789.9c0,16.5,13.3,29.8,29.8,29.8s29.8-13.3,29.8-29.8V118.3
|
||||
C541.1,101.8,527.8,88.5,511.3,88.5z"/>
|
||||
<path fill="#fff" d="M720.5,207.7c-16.5,0-29.8,13.3-29.8,29.8v603.6c0,16.5,13.3,29.8,29.8,29.8c16.5,0,29.8-13.3,29.8-29.8V237.5
|
||||
C750.3,221,737,207.7,720.5,207.7z"/>
|
||||
<path fill="#fff" d="M929.7,319.5c-16.5,0-29.8,13.3-29.8,29.8V707c0,16.5,13.3,29.8,29.8,29.8c16.5,0,29.8-13.3,29.8-29.8V349.3
|
||||
C959.5,332.8,946.2,319.5,929.7,319.5z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,25 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" widt="12px" height="12px">
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#fff" d="M701,959.4H325c-116.4,0-211.1-100.4-211.1-223.8V357.9c0-117.6,86.8-215.6,197.6-223.1l2.7,39.1
|
||||
c-90.3,6.1-161.1,87-161.1,184v377.7c0,101.8,77.2,184.6,172,184.6H701c94.8,0,172-82.8,172-184.6V357.9
|
||||
c0-97.1-70.7-177.9-161.1-184l2.7-39.1c110.8,7.5,197.6,105.5,197.6,223.1v377.7C912.1,859,817.4,959.4,701,959.4z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M741.5,429.3L485.8,736.1c-9.8,11.7-27.2,13.2-38.7,3.3L276.5,593.2c-11.5-9.8-12.8-27.1-3-38.5h0
|
||||
c9.8-11.4,27.1-12.8,38.5-3l128.5,110.1c11.6,9.9,29,8.4,38.7-3.3l220.2-264.3c9.7-11.6,26.9-13.2,38.5-3.5l0,0
|
||||
C749.6,400.4,751.2,417.7,741.5,429.3z M759,408.3"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M513,262.1"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M640.8,239.8H385.2c-48.4,0-87.8-39.4-87.8-87.8s39.4-87.8,87.8-87.8h255.7c48.4,0,87.8,39.4,87.8,87.8
|
||||
S689.2,239.8,640.8,239.8z M385.2,103.4c-26.8,0-48.6,21.8-48.6,48.6s21.8,48.6,48.6,48.6h255.7c26.8,0,48.6-21.8,48.6-48.6
|
||||
s-21.8-48.6-48.6-48.6H385.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" widt="12px" height="12px">
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#fff" d="M701,959.4H325c-116.4,0-211.1-100.4-211.1-223.8V357.9c0-117.6,86.8-215.6,197.6-223.1l2.7,39.1
|
||||
c-90.3,6.1-161.1,87-161.1,184v377.7c0,101.8,77.2,184.6,172,184.6H701c94.8,0,172-82.8,172-184.6V357.9
|
||||
c0-97.1-70.7-177.9-161.1-184l2.7-39.1c110.8,7.5,197.6,105.5,197.6,223.1v377.7C912.1,859,817.4,959.4,701,959.4z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M741.5,429.3L485.8,736.1c-9.8,11.7-27.2,13.2-38.7,3.3L276.5,593.2c-11.5-9.8-12.8-27.1-3-38.5h0
|
||||
c9.8-11.4,27.1-12.8,38.5-3l128.5,110.1c11.6,9.9,29,8.4,38.7-3.3l220.2-264.3c9.7-11.6,26.9-13.2,38.5-3.5l0,0
|
||||
C749.6,400.4,751.2,417.7,741.5,429.3z M759,408.3"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M513,262.1"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#fff" d="M640.8,239.8H385.2c-48.4,0-87.8-39.4-87.8-87.8s39.4-87.8,87.8-87.8h255.7c48.4,0,87.8,39.4,87.8,87.8
|
||||
S689.2,239.8,640.8,239.8z M385.2,103.4c-26.8,0-48.6,21.8-48.6,48.6s21.8,48.6,48.6,48.6h255.7c26.8,0,48.6-21.8,48.6-48.6
|
||||
s-21.8-48.6-48.6-48.6H385.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" width="60px" height="80px">
|
||||
<g>
|
||||
<path fill="#fff" d="M749.4,373.9H710v-78.8c0-108.7-88.2-197-197-197c-108.7,0-197,88.2-197,197v78.8h-39.4c-43.5,0-78.8,35.3-78.8,78.8v393.9
|
||||
c0,43.5,35.3,78.8,78.8,78.8h472.7c43.5,0,78.8-35.3,78.8-78.8V452.7C828.2,409.2,792.9,373.9,749.4,373.9L749.4,373.9z M513,728.5
|
||||
c-43.5,0-78.8-35.3-78.8-78.8c0-43.5,35.3-78.8,78.8-78.8c43.5,0,78.8,35.3,78.8,78.8C591.8,693.2,556.5,728.5,513,728.5L513,728.5
|
||||
z M635.1,373.9H390.9v-78.8c0-67.4,54.8-122.1,122.1-122.1c67.4,0,122.1,54.8,122.1,122.1V373.9z M635.1,373.9"/>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve" width="60px" height="80px">
|
||||
<g>
|
||||
<path fill="#fff" d="M749.4,373.9H710v-78.8c0-108.7-88.2-197-197-197c-108.7,0-197,88.2-197,197v78.8h-39.4c-43.5,0-78.8,35.3-78.8,78.8v393.9
|
||||
c0,43.5,35.3,78.8,78.8,78.8h472.7c43.5,0,78.8-35.3,78.8-78.8V452.7C828.2,409.2,792.9,373.9,749.4,373.9L749.4,373.9z M513,728.5
|
||||
c-43.5,0-78.8-35.3-78.8-78.8c0-43.5,35.3-78.8,78.8-78.8c43.5,0,78.8,35.3,78.8,78.8C591.8,693.2,556.5,728.5,513,728.5L513,728.5
|
||||
z M635.1,373.9H390.9v-78.8c0-67.4,54.8-122.1,122.1-122.1c67.4,0,122.1,54.8,122.1,122.1V373.9z M635.1,373.9"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 919 B |
16730
ts.worker.js
16730
ts.worker.js
File diff suppressed because one or more lines are too long
2136
umi.c4dd2590.js
2136
umi.c4dd2590.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -8117,94 +8117,94 @@ function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,
|
|||
undefined;
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || from);
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* global Reflect, Promise */
|
||||
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
|
||||
function __extends(d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
function __spreadArray(to, from, pack) {
|
||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||||
if (ar || !(i in from)) {
|
||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||||
ar[i] = from[i];
|
||||
}
|
||||
}
|
||||
return to.concat(ar || from);
|
||||
}
|
||||
|
||||
var Bounds = /** @class */ (function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue