@kusto/monaco-kusto 12.0.0 → 12.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/package.json +1 -1
- package/release/dev/kustoMode.js +131 -117
- package/release/dev/kustoWorker.js +2 -2
- package/release/dev/{main-b690e47e.js → main-de9bc066.js} +2 -2
- package/release/dev/monaco.contribution.js +53 -53
- package/release/dev/{schema-957f5e9b.js → schema-ea01b133.js} +2 -2
- package/release/dev/{globals-0aacfe72.js → types-8a990554.js} +4 -4
- package/release/esm/{globals-88d92b64.js → globals-0865238a.js} +1 -1
- package/release/esm/kusto.worker.js +2 -2
- package/release/esm/kustoMode.js +4 -27
- package/release/esm/{schema-66580db4.js → schema-a96574e6.js} +1 -1
- package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.d.ts +6 -0
- package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.js +71 -0
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +2 -2
- package/release/min/{main-13659fc4.js → main-b1d46c4f.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/{schema-ab3cbb28.js → schema-0d256352.js} +2 -2
- package/release/min/types-0c686717.js +7 -0
- package/release/min/globals-cce7b304.js +0 -7
package/release/dev/kustoMode.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 12.0.
|
|
3
|
+
* monaco-kusto version: 12.0.2(ba4a7496a706f790046400993d1050040ea93494)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-
|
|
8
|
+
define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-de9bc066', './types-8a990554'], (function (exports, monaco, main, types$1) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -27,14 +27,14 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
27
27
|
var monaco__namespace = /*#__PURE__*/_interopNamespaceDefault(monaco);
|
|
28
28
|
|
|
29
29
|
var _excluded = ["onDidProvideCompletionItems"];
|
|
30
|
-
function _typeof$
|
|
30
|
+
function _typeof$9(o) { "@babel/helpers - typeof"; return _typeof$9 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$9(o); }
|
|
31
31
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
32
32
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
33
33
|
function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
34
34
|
function _defineProperties$2(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$3(o.key), o); } }
|
|
35
35
|
function _createClass$2(e, r, t) { return r && _defineProperties$2(e.prototype, r), t && _defineProperties$2(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
36
|
-
function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$
|
|
37
|
-
function _toPrimitive$3(t, r) { if ("object" != _typeof$
|
|
36
|
+
function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$9(i) ? i : i + ""; }
|
|
37
|
+
function _toPrimitive$3(t, r) { if ("object" != _typeof$9(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$9(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
38
38
|
var WorkerManager = /*#__PURE__*/function () {
|
|
39
39
|
function WorkerManager(_monacoInstance, defaults) {
|
|
40
40
|
var _this = this;
|
|
@@ -147,7 +147,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
147
147
|
}]);
|
|
148
148
|
}();
|
|
149
149
|
|
|
150
|
-
function _typeof$
|
|
150
|
+
function _typeof$8(o) { "@babel/helpers - typeof"; return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$8(o); }
|
|
151
151
|
/**
|
|
152
152
|
* Checks if `value` is the
|
|
153
153
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
@@ -174,19 +174,19 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
174
174
|
* // => false
|
|
175
175
|
*/
|
|
176
176
|
function isObject(value) {
|
|
177
|
-
var type = _typeof$
|
|
177
|
+
var type = _typeof$8(value);
|
|
178
178
|
return value != null && (type == 'object' || type == 'function');
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function _typeof$
|
|
181
|
+
function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
|
|
182
182
|
/** Detect free variable `global` from Node.js. */
|
|
183
|
-
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof$
|
|
183
|
+
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof$7(global)) == 'object' && global && global.Object === Object && global;
|
|
184
184
|
var freeGlobal$1 = freeGlobal;
|
|
185
185
|
|
|
186
|
-
function _typeof$
|
|
186
|
+
function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
|
|
187
187
|
|
|
188
188
|
/** Detect free variable `self`. */
|
|
189
|
-
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof$
|
|
189
|
+
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof$6(self)) == 'object' && self && self.Object === Object && self;
|
|
190
190
|
|
|
191
191
|
/** Used as a reference to the global object. */
|
|
192
192
|
var root = freeGlobal$1 || freeSelf || Function('return this')();
|
|
@@ -331,7 +331,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
331
331
|
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
function _typeof$
|
|
334
|
+
function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
|
|
335
335
|
/**
|
|
336
336
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
337
337
|
* and has a `typeof` result of "object".
|
|
@@ -357,10 +357,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
357
357
|
* // => false
|
|
358
358
|
*/
|
|
359
359
|
function isObjectLike(value) {
|
|
360
|
-
return value != null && _typeof$
|
|
360
|
+
return value != null && _typeof$5(value) == 'object';
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
function _typeof$
|
|
363
|
+
function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
|
|
364
364
|
|
|
365
365
|
/** `Object#toString` result references. */
|
|
366
366
|
var symbolTag = '[object Symbol]';
|
|
@@ -383,7 +383,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
383
383
|
* // => false
|
|
384
384
|
*/
|
|
385
385
|
function isSymbol(value) {
|
|
386
|
-
return _typeof$
|
|
386
|
+
return _typeof$4(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
/** Used as references for various `Number` constants. */
|
|
@@ -644,22 +644,22 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
647
|
-
function _typeof$
|
|
647
|
+
function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
|
|
648
648
|
function _toConsumableArray$1(r) { return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); }
|
|
649
649
|
function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
650
650
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
651
651
|
function _iterableToArray$1(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
652
652
|
function _arrayWithoutHoles$1(r) { if (Array.isArray(r)) return _arrayLikeToArray$1(r); }
|
|
653
653
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
654
|
-
function _regeneratorRuntime$
|
|
655
|
-
function asyncGeneratorStep$
|
|
656
|
-
function _asyncToGenerator$
|
|
654
|
+
function _regeneratorRuntime$3() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$3 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$3(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$3(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
655
|
+
function asyncGeneratorStep$3(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
656
|
+
function _asyncToGenerator$3(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$3(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$3(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
657
657
|
function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
658
658
|
function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
|
|
659
659
|
function _createClass$1(e, r, t) { return r && _defineProperties$1(e.prototype, r), t && _defineProperties$1(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
660
660
|
function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
661
|
-
function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$
|
|
662
|
-
function _toPrimitive$2(t, r) { if ("object" != _typeof$
|
|
661
|
+
function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$3(i) ? i : i + ""; }
|
|
662
|
+
function _toPrimitive$2(t, r) { if ("object" != _typeof$3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
663
663
|
|
|
664
664
|
// --- diagnostics ---
|
|
665
665
|
|
|
@@ -749,9 +749,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
749
749
|
if (this.defaults.languageSettings.enableQuickFixes) {
|
|
750
750
|
this._disposables.push(monaco__namespace.languages.registerCodeActionProvider(this._languageId, {
|
|
751
751
|
provideCodeActions: function () {
|
|
752
|
-
var _provideCodeActions = _asyncToGenerator$
|
|
752
|
+
var _provideCodeActions = _asyncToGenerator$3( /*#__PURE__*/_regeneratorRuntime$3().mark(function _callee(model, range, context, _token) {
|
|
753
753
|
var startOffset, endOffset, showQuickFix, actions;
|
|
754
|
-
return _regeneratorRuntime$
|
|
754
|
+
return _regeneratorRuntime$3().wrap(function _callee$(_context) {
|
|
755
755
|
while (1) switch (_context.prev = _context.next) {
|
|
756
756
|
case 0:
|
|
757
757
|
startOffset = model.getOffsetAt(range.getStartPosition());
|
|
@@ -804,10 +804,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
804
804
|
return _createClass$1(DiagnosticsAdapter, [{
|
|
805
805
|
key: "getMonacoCodeActions",
|
|
806
806
|
value: function () {
|
|
807
|
-
var _getMonacoCodeActions = _asyncToGenerator$
|
|
807
|
+
var _getMonacoCodeActions = _asyncToGenerator$3( /*#__PURE__*/_regeneratorRuntime$3().mark(function _callee2(model, startOffset, endOffset, enableQuickFix) {
|
|
808
808
|
var _this2 = this;
|
|
809
809
|
var actions, worker, resource, codeActions, _loop, _ret, i;
|
|
810
|
-
return _regeneratorRuntime$
|
|
810
|
+
return _regeneratorRuntime$3().wrap(function _callee2$(_context3) {
|
|
811
811
|
while (1) switch (_context3.prev = _context3.next) {
|
|
812
812
|
case 0:
|
|
813
813
|
actions = [];
|
|
@@ -820,10 +820,10 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
820
820
|
return worker.getResultActions(resource.toString(), startOffset, endOffset);
|
|
821
821
|
case 7:
|
|
822
822
|
codeActions = _context3.sent;
|
|
823
|
-
_loop = /*#__PURE__*/_regeneratorRuntime$
|
|
823
|
+
_loop = /*#__PURE__*/_regeneratorRuntime$3().mark(function _loop() {
|
|
824
824
|
var _this2$defaults$langu;
|
|
825
825
|
var codeAction, codeActionKind, changes, edits;
|
|
826
|
-
return _regeneratorRuntime$
|
|
826
|
+
return _regeneratorRuntime$3().wrap(function _loop$(_context2) {
|
|
827
827
|
while (1) switch (_context2.prev = _context2.next) {
|
|
828
828
|
case 0:
|
|
829
829
|
codeAction = codeActions[i];
|
|
@@ -1138,9 +1138,9 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1138
1138
|
_classCallCheck$1(this, CompletionAdapter);
|
|
1139
1139
|
this.languageSettings = languageSettings;
|
|
1140
1140
|
var getFromLanguageService = /*#__PURE__*/function () {
|
|
1141
|
-
var _ref = _asyncToGenerator$
|
|
1141
|
+
var _ref = _asyncToGenerator$3( /*#__PURE__*/_regeneratorRuntime$3().mark(function _callee3(resource, position) {
|
|
1142
1142
|
var worker;
|
|
1143
|
-
return _regeneratorRuntime$
|
|
1143
|
+
return _regeneratorRuntime$3().wrap(function _callee3$(_context4) {
|
|
1144
1144
|
while (1) switch (_context4.prev = _context4.next) {
|
|
1145
1145
|
case 0:
|
|
1146
1146
|
_context4.next = 2;
|
|
@@ -1248,7 +1248,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1248
1248
|
}]);
|
|
1249
1249
|
}();
|
|
1250
1250
|
function isMarkupContent(thing) {
|
|
1251
|
-
return thing && _typeof$
|
|
1251
|
+
return thing && _typeof$3(thing) === 'object' && typeof thing.kind === 'string';
|
|
1252
1252
|
}
|
|
1253
1253
|
function toMarkdownString(entry) {
|
|
1254
1254
|
if (typeof entry === 'string') {
|
|
@@ -1478,15 +1478,47 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1478
1478
|
}]);
|
|
1479
1479
|
}();
|
|
1480
1480
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1481
|
+
var queryOperators = ['as', 'consume', 'distinct', 'evaluate', 'extend', 'getschema', 'graph-match', 'graph-merge', 'graph-to-table', 'invoke', 'join', 'limit', 'lookup', 'make-graph', 'make-series', 'mv-apply', 'mv-expand', 'order', 'parse', 'parse-kv', 'parse-where', 'project', 'project-away', 'project-keep', 'project-rename', 'project-reorder', 'range', 'reduce', 'render', 'sample', 'sample-distinct', 'scan', 'serialize', 'sort', 'summarize', 'take', 'top', 'top-hitters', 'top-nested', 'union', 'where', 'filter', 'fork', 'facet', 'range', 'consume', 'find', 'search', 'print', 'partition', 'lookup'];
|
|
1482
|
+
var queryParameters = ['kind'];
|
|
1483
|
+
var types = ['bool', 'datetime', 'decimal', 'double', 'dynamic', 'guid', 'int', 'long', 'real', 'string', 'timespan'];
|
|
1484
|
+
var commands = ['.add', '.alter', '.alter-merge', '.append', '.as', '.assert', '.attach', '.consume', '.count', '.create', '.create-merge', '.create-or-alter', '.create-set', '.datatable', '.default', '.define', '.delete', '.detach', '.distinct', '.drop', '.drop-pretend', '.dup-next-failed-ingest', '.dup-next-ingest', '.evaluate', '.export', '.extend', '.externaldata', '.filter', '.find', '.fork', '.getschema', '.ingest', '.join', '.limit', '.load', '.make-series', '.materialize', '.move', '.mv-expand', '.order', '.parse', '.parse-where', '.partition', '.pivot', '.print', '.project', '.project-away', '.project-keep', '.project-rename', '.reduce', '.remove', '.rename', '.replace', '.restrict', '.run', '.sample', '.sample-distinct', '.save', '.search', '.serialize', '.set', '.set-or-append', '.set-or-replace', '.show', '.sort', '.summarize', '.take', '.top', '.top-hitters', '.top-nested', '.union'];
|
|
1485
|
+
var functions = ['abs', 'acos', 'ago', 'array_concat', 'array_length', 'array_slice', 'array_split', 'asin', 'atan', 'atan2', 'avg', 'bag_keys', 'base64_decodestring', 'base64_encodestring', 'bin', 'bin_at', 'binary_and', 'binary_not', 'binary_or', 'binary_shift_left', 'binary_shift_right', 'binary_xor', 'case', 'ceiling', 'coalesce', 'columnifexists', 'cos', 'count', 'countof', 'cot', 'cursor_after', 'datatable', 'datepart', 'datetime_add', 'datetime_diff', 'datetime_part', 'dayofmonth', 'dayofweek', 'dayofyear', 'dcount', 'dcount_hll', 'degrees', 'endofday', 'endofmonth', 'endofweek', 'endofyear', 'exp', 'exp10', 'exp2', 'extract', 'extractall', 'extractjson', 'format_datetime', 'format_timespan', 'floor', 'gamma', 'geo_distance_2points', 'geo_geohash_to_central_point', 'geo_point_in_circle', 'geo_point_in_polygon', 'geo_point_to_geohash', 'getmonth', 'gettype', 'getyear', 'hash', 'hash_sha256', 'hll_merge', 'iif', 'indexof', 'isempty', 'isfinite', 'isinf', 'isascii', 'isnan', 'isnotempty', 'isnotnull', 'isnull', 'isutf8', 'log', 'log10', 'log2', 'loggamma', 'make_datetime', 'make_string', 'make_timespan', 'materialize', 'max', 'max_of', 'min', 'min_of', 'monthofyear', 'next', 'not', 'pack', 'pack_array', 'pack_dictionary', 'parse_csv', 'parse_ipv4', 'parse_json', 'parse_path', 'parse_url', 'parse_urlquery', 'parse_user_agent', 'parse_version', 'parse_xml', 'parsejson', 'percentrank_tdigest', 'percentile_tdigest', 'pow', 'prev', 'radians', 'rand', 'rank_tdigest', 'repeat', 'replace', 'reverse', 'round', 'row_cumsum', 'row_window_session', 'series_add', 'series_decompose', 'series_decompose_anomalies', 'series_decompose_forecast', 'series_divide', 'series_equals', 'series_fill_backward', 'series_fill_const', 'series_fill_forward', 'series_fill_linear', 'series_fir', 'series_fit_2lines', 'series_fit_2lines_dynamic', 'series_fit_line', 'series_fit_line_dynamic', 'series_greater', 'series_greater_equals', 'series_iir', 'series_less', 'series_less_equals', 'series_multiply', 'series_not_equals', 'series_outliers', 'series_pearson_correlation', 'series_periods_detect', 'series_periods_validate', 'series_seasonal', 'series_stats', 'series_stats_dynamic', 'series_subtract', 'sign', 'sin', 'split', 'sqrt', 'startofday', 'startofmonth', 'startofweek', 'startofyear', 'strcat', 'strcat_array', 'strcat_delim', 'strcmp', 'strlen', 'strrep', 'string_size', 'substring', 'sum', 'tan', 'tdigest_merge', 'tobool', 'toboolean', 'todecimal', 'todouble', 'todynamic', 'tofloat', 'toguid', 'tohex', 'toint', 'tolong', 'tolower', 'toobject', 'toreal', 'toscalar', 'tostring', 'totimespan', 'toupper', 'translate', 'trim', 'trim_end', 'trim_start', 'typeof', 'url_decode', 'url_encode', 'week_of_year', 'welch_test'];
|
|
1486
|
+
var keywords = ['and', 'as', 'asc', 'between', 'by', 'contains', 'count', 'desc', 'extend', 'false', 'filter', 'find', 'from', 'has', 'in', 'inner', 'join', 'leftouter', 'let', 'not', 'on', 'or', 'policy', 'project', 'project-away', 'project-rename', 'project-reorder', 'project-keep', 'range', 'rename', 'retention', 'summarize', 'table', 'take', 'to', 'true', 'where', 'with'];
|
|
1487
|
+
var kustoLanguageDefinition = {
|
|
1488
|
+
name: types$1.LANGUAGE_ID,
|
|
1489
|
+
mimeTypes: ['text/kusto'],
|
|
1490
|
+
displayName: 'Kusto',
|
|
1491
|
+
defaultToken: 'invalid',
|
|
1492
|
+
queryOperators: queryOperators,
|
|
1493
|
+
queryParameters: queryParameters,
|
|
1494
|
+
types: types,
|
|
1495
|
+
commands: commands,
|
|
1496
|
+
functions: functions,
|
|
1497
|
+
keywords: keywords,
|
|
1498
|
+
tokenizer: {
|
|
1499
|
+
root: [[/(\/\/.*$)/, types$1.Token.Comment], [/[\(\)\{\}\|\[\]\:\=\,\<|\.\..]/, types$1.Token.Punctuation], [/[\+\-\*\/\%\!\<\<=\>\>=\=\==\!=\<>\:\;\,\=~\@\?\=>\!~]/, types$1.Token.MathOperator], [/"([^"\\]*(\\.[^"\\]*)*)"/, types$1.Token.StringLiteral], [/'([^"\\]*(\\.[^"\\]*)*)'/, types$1.Token.StringLiteral], [/[\w@#\-$\.]+/, {
|
|
1500
|
+
cases: {
|
|
1501
|
+
'@queryOperators': types$1.Token.QueryOperator,
|
|
1502
|
+
'@queryParameters': types$1.Token.QueryParameter,
|
|
1503
|
+
'@types': types$1.Token.Type,
|
|
1504
|
+
'@commands': types$1.Token.Command,
|
|
1505
|
+
'@functions': types$1.Token.Function,
|
|
1506
|
+
'@keywords': types$1.Token.Keyword,
|
|
1507
|
+
'@default': 'identifier'
|
|
1508
|
+
}
|
|
1509
|
+
}]]
|
|
1510
|
+
}
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1513
|
+
function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
|
|
1514
|
+
function _regeneratorRuntime$2() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$2 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$2(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$2(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1515
|
+
function asyncGeneratorStep$2(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
1516
|
+
function _asyncToGenerator$2(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
1485
1517
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
1486
1518
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o); } }
|
|
1487
1519
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
1488
|
-
function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$
|
|
1489
|
-
function _toPrimitive$1(t, r) { if ("object" != _typeof$
|
|
1520
|
+
function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; }
|
|
1521
|
+
function _toPrimitive$1(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1490
1522
|
var SemanticTokensProvider = /*#__PURE__*/function () {
|
|
1491
1523
|
function SemanticTokensProvider(classificationsGetter) {
|
|
1492
1524
|
_classCallCheck(this, SemanticTokensProvider);
|
|
@@ -1496,16 +1528,16 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1496
1528
|
key: "getLegend",
|
|
1497
1529
|
value: function getLegend() {
|
|
1498
1530
|
return {
|
|
1499
|
-
tokenTypes:
|
|
1531
|
+
tokenTypes: types$1.tokenTypes,
|
|
1500
1532
|
tokenModifiers: []
|
|
1501
1533
|
};
|
|
1502
1534
|
}
|
|
1503
1535
|
}, {
|
|
1504
1536
|
key: "provideDocumentSemanticTokens",
|
|
1505
1537
|
value: function () {
|
|
1506
|
-
var _provideDocumentSemanticTokens = _asyncToGenerator$
|
|
1538
|
+
var _provideDocumentSemanticTokens = _asyncToGenerator$2( /*#__PURE__*/_regeneratorRuntime$2().mark(function _callee(model) {
|
|
1507
1539
|
var resource, classifications, semanticTokens;
|
|
1508
|
-
return _regeneratorRuntime$
|
|
1540
|
+
return _regeneratorRuntime$2().wrap(function _callee$(_context) {
|
|
1509
1541
|
while (1) switch (_context.prev = _context.next) {
|
|
1510
1542
|
case 0:
|
|
1511
1543
|
resource = model.uri;
|
|
@@ -1554,37 +1586,52 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1554
1586
|
return [deltaLine, deltaStart, length, kind, 0];
|
|
1555
1587
|
}
|
|
1556
1588
|
|
|
1557
|
-
|
|
1558
|
-
var
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1589
|
+
function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
|
|
1590
|
+
function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof$1(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof$1(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1591
|
+
function asyncGeneratorStep$1(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
1592
|
+
function _asyncToGenerator$1(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$1(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
1593
|
+
// Registers semantic token provider that utilizes the language service
|
|
1594
|
+
// for more context-relevant syntax highlighting.
|
|
1595
|
+
function semanticTokensProviderRegistrarCreator() {
|
|
1596
|
+
var semanticTokensProviderRegistrar = semanticTokensProviderRegistrarCreatorForTest();
|
|
1597
|
+
return function (monacoInstance, workerAccessor) {
|
|
1598
|
+
var semanticTokensProvider = semanticTokensProviderMaker(workerAccessor);
|
|
1599
|
+
semanticTokensProviderRegistrar(monacoInstance, semanticTokensProvider);
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1602
|
+
function semanticTokensProviderRegistrarCreatorForTest() {
|
|
1603
|
+
var semanticTokensDisposable;
|
|
1604
|
+
return function (monacoInstance, semanticTokensProvider) {
|
|
1605
|
+
if (semanticTokensDisposable) {
|
|
1606
|
+
semanticTokensDisposable.dispose();
|
|
1607
|
+
}
|
|
1608
|
+
semanticTokensDisposable = monacoInstance.languages.registerDocumentSemanticTokensProvider(types$1.LANGUAGE_ID, semanticTokensProvider);
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
function semanticTokensProviderMaker(workerAccessor) {
|
|
1612
|
+
var classificationsGetter = /*#__PURE__*/function () {
|
|
1613
|
+
var _ref = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(resource) {
|
|
1614
|
+
var worker;
|
|
1615
|
+
return _regeneratorRuntime$1().wrap(function _callee$(_context) {
|
|
1616
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1617
|
+
case 0:
|
|
1618
|
+
_context.next = 2;
|
|
1619
|
+
return workerAccessor(resource);
|
|
1620
|
+
case 2:
|
|
1621
|
+
worker = _context.sent;
|
|
1622
|
+
return _context.abrupt("return", worker.getClassifications(resource.toString()));
|
|
1623
|
+
case 4:
|
|
1624
|
+
case "end":
|
|
1625
|
+
return _context.stop();
|
|
1626
|
+
}
|
|
1627
|
+
}, _callee);
|
|
1628
|
+
}));
|
|
1629
|
+
return function classificationsGetter(_x) {
|
|
1630
|
+
return _ref.apply(this, arguments);
|
|
1631
|
+
};
|
|
1632
|
+
}();
|
|
1633
|
+
return new SemanticTokensProvider(classificationsGetter);
|
|
1634
|
+
}
|
|
1588
1635
|
|
|
1589
1636
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1590
1637
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -1615,6 +1662,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1615
1662
|
var onSchemaChange = new monaco__namespace.Emitter();
|
|
1616
1663
|
// TODO: when should we dispose of these? seems like monaco-css and monaco-typescript don't dispose of these.
|
|
1617
1664
|
var disposables = [];
|
|
1665
|
+
var semanticTokensProviderRegistrar = semanticTokensProviderRegistrarCreator();
|
|
1618
1666
|
var client = new WorkerManager(monacoInstance, defaults);
|
|
1619
1667
|
disposables.push(client);
|
|
1620
1668
|
var workerAccessor = function workerAccessor(first) {
|
|
@@ -1630,6 +1678,8 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1630
1678
|
onSchemaChange.fire(schema);
|
|
1631
1679
|
});
|
|
1632
1680
|
case 3:
|
|
1681
|
+
semanticTokensProviderRegistrar(monacoInstance, workerAccessor);
|
|
1682
|
+
case 4:
|
|
1633
1683
|
case "end":
|
|
1634
1684
|
return _context.stop();
|
|
1635
1685
|
}
|
|
@@ -1673,22 +1723,21 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1673
1723
|
});
|
|
1674
1724
|
});
|
|
1675
1725
|
};
|
|
1676
|
-
disposables.push(monacoInstance.languages.registerCompletionItemProvider(
|
|
1677
|
-
setMonarchTokensProvider(
|
|
1678
|
-
|
|
1679
|
-
disposables.push(
|
|
1680
|
-
disposables.push(monacoInstance.languages.
|
|
1681
|
-
disposables.push(monacoInstance.languages.
|
|
1682
|
-
disposables.push(monacoInstance.languages.
|
|
1683
|
-
disposables.push(monacoInstance.languages.
|
|
1684
|
-
disposables.push(monacoInstance.languages.registerReferenceProvider(globals.LANGUAGE_ID, new ReferenceAdapter(workerAccessor)));
|
|
1726
|
+
disposables.push(monacoInstance.languages.registerCompletionItemProvider(types$1.LANGUAGE_ID, new CompletionAdapter(workerAccessor, defaults.languageSettings)));
|
|
1727
|
+
monacoInstance.languages.setMonarchTokensProvider(types$1.LANGUAGE_ID, kustoLanguageDefinition);
|
|
1728
|
+
disposables.push(new DiagnosticsAdapter(monacoInstance, types$1.LANGUAGE_ID, workerAccessor, defaults, onSchemaChange.event));
|
|
1729
|
+
disposables.push(monacoInstance.languages.registerDocumentRangeFormattingEditProvider(types$1.LANGUAGE_ID, new FormatAdapter(workerAccessor)));
|
|
1730
|
+
disposables.push(monacoInstance.languages.registerFoldingRangeProvider(types$1.LANGUAGE_ID, new FoldingAdapter(workerAccessor)));
|
|
1731
|
+
disposables.push(monacoInstance.languages.registerDefinitionProvider(types$1.LANGUAGE_ID, new DefinitionAdapter(workerAccessor)));
|
|
1732
|
+
disposables.push(monacoInstance.languages.registerRenameProvider(types$1.LANGUAGE_ID, new RenameAdapter(workerAccessor)));
|
|
1733
|
+
disposables.push(monacoInstance.languages.registerReferenceProvider(types$1.LANGUAGE_ID, new ReferenceAdapter(workerAccessor)));
|
|
1685
1734
|
if (defaults.languageSettings.enableHover) {
|
|
1686
|
-
disposables.push(monacoInstance.languages.registerHoverProvider(
|
|
1735
|
+
disposables.push(monacoInstance.languages.registerHoverProvider(types$1.LANGUAGE_ID, new HoverAdapter(workerAccessor)));
|
|
1687
1736
|
}
|
|
1688
|
-
monacoInstance.languages.registerDocumentFormattingEditProvider(
|
|
1737
|
+
monacoInstance.languages.registerDocumentFormattingEditProvider(types$1.LANGUAGE_ID, new DocumentFormatAdapter(workerAccessor));
|
|
1689
1738
|
kustoWorker = workerAccessor;
|
|
1690
1739
|
resolveWorker(workerAccessor);
|
|
1691
|
-
monacoInstance.languages.setLanguageConfiguration(
|
|
1740
|
+
monacoInstance.languages.setLanguageConfiguration(types$1.LANGUAGE_ID, {
|
|
1692
1741
|
folding: {
|
|
1693
1742
|
offSide: false,
|
|
1694
1743
|
markers: {
|
|
@@ -1727,41 +1776,6 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
|
|
|
1727
1776
|
});
|
|
1728
1777
|
}
|
|
1729
1778
|
|
|
1730
|
-
// This function sets the Monarch token provider,
|
|
1731
|
-
// enabling fast syntax highlighting before the language service is called for semantic coloring.
|
|
1732
|
-
function setMonarchTokensProvider(monacoInstance, disposables) {
|
|
1733
|
-
var monarchTokensProvider = monacoInstance.languages.setMonarchTokensProvider(globals.LANGUAGE_ID, kustoLanguageDefinition);
|
|
1734
|
-
disposables.push(monarchTokensProvider);
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
// This function registers a semantic token provider that utilizes the language service
|
|
1738
|
-
// for more context-relevant syntax highlighting.
|
|
1739
|
-
function registerDocumentSemanticTokensProvider(workerAccessor, monacoInstance) {
|
|
1740
|
-
var classificationsGetter = /*#__PURE__*/function () {
|
|
1741
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resource) {
|
|
1742
|
-
var worker;
|
|
1743
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1744
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
1745
|
-
case 0:
|
|
1746
|
-
_context3.next = 2;
|
|
1747
|
-
return workerAccessor(resource);
|
|
1748
|
-
case 2:
|
|
1749
|
-
worker = _context3.sent;
|
|
1750
|
-
return _context3.abrupt("return", worker.getClassifications(resource.toString()));
|
|
1751
|
-
case 4:
|
|
1752
|
-
case "end":
|
|
1753
|
-
return _context3.stop();
|
|
1754
|
-
}
|
|
1755
|
-
}, _callee3);
|
|
1756
|
-
}));
|
|
1757
|
-
return function classificationsGetter(_x3) {
|
|
1758
|
-
return _ref2.apply(this, arguments);
|
|
1759
|
-
};
|
|
1760
|
-
}();
|
|
1761
|
-
var semanticTokenProvider = new SemanticTokensProvider(classificationsGetter);
|
|
1762
|
-
monacoInstance.languages.registerDocumentSemanticTokensProvider(globals.LANGUAGE_ID, semanticTokenProvider);
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
1779
|
exports.getKustoWorker = getKustoWorker;
|
|
1766
1780
|
exports.setupMode = setupMode;
|
|
1767
1781
|
|