Created
January 19, 2021 07:01
-
-
Save arajkumar/c3043adc19030ad07b271f190af8e2f9 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = | |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; | |
/******/ } | |
/******/ // Create a new module (and put it into the cache) | |
/******/ var module = installedModules[moduleId] = { | |
/******/ i: moduleId, | |
/******/ l: false, | |
/******/ exports: {} | |
/******/ }; | |
/******/ | |
/******/ // Execute the module function | |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
/******/ | |
/******/ // Flag the module as loaded | |
/******/ module.l = true; | |
/******/ | |
/******/ // Return the exports of the module | |
/******/ return module.exports; | |
/******/ } | |
/******/ | |
/******/ | |
/******/ // expose the modules object (__webpack_modules__) | |
/******/ __webpack_require__.m = modules; | |
/******/ | |
/******/ // expose the module cache | |
/******/ __webpack_require__.c = installedModules; | |
/******/ | |
/******/ // define getter function for harmony exports | |
/******/ __webpack_require__.d = function(exports, name, getter) { | |
/******/ if(!__webpack_require__.o(exports, name)) { | |
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | |
/******/ } | |
/******/ }; | |
/******/ | |
/******/ // define __esModule on exports | |
/******/ __webpack_require__.r = function(exports) { | |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
/******/ } | |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
/******/ }; | |
/******/ | |
/******/ // create a fake namespace object | |
/******/ // mode & 1: value is a module id, require it | |
/******/ // mode & 2: merge all properties of value into the ns | |
/******/ // mode & 4: return value when already ns object | |
/******/ // mode & 8|1: behave like require | |
/******/ __webpack_require__.t = function(value, mode) { | |
/******/ if(mode & 1) value = __webpack_require__(value); | |
/******/ if(mode & 8) return value; | |
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | |
/******/ var ns = Object.create(null); | |
/******/ __webpack_require__.r(ns); | |
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | |
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | |
/******/ return ns; | |
/******/ }; | |
/******/ | |
/******/ // getDefaultExport function for compatibility with non-harmony modules | |
/******/ __webpack_require__.n = function(module) { | |
/******/ var getter = module && module.__esModule ? | |
/******/ function getDefault() { return module['default']; } : | |
/******/ function getModuleExports() { return module; }; | |
/******/ __webpack_require__.d(getter, 'a', getter); | |
/******/ return getter; | |
/******/ }; | |
/******/ | |
/******/ // Object.prototype.hasOwnProperty.call | |
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | |
/******/ | |
/******/ // __webpack_public_path__ | |
/******/ __webpack_require__.p = ""; | |
/******/ | |
/******/ | |
/******/ // Load entry module and return exports | |
/******/ return __webpack_require__(__webpack_require__.s = "../fabric8-analytics-lsp-server/output/server.js"); | |
/******/ }) | |
/************************************************************************/ | |
/******/ ({ | |
/***/ "../fabric8-analytics-lsp-server/node_modules/lru-cache/index.js": | |
/*!***********************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/node_modules/lru-cache/index.js ***! | |
\***********************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
// A linked list to keep track of recently-used-ness | |
const Yallist = __webpack_require__(/*! yallist */ "../fabric8-analytics-lsp-server/node_modules/yallist/yallist.js") | |
const MAX = Symbol('max') | |
const LENGTH = Symbol('length') | |
const LENGTH_CALCULATOR = Symbol('lengthCalculator') | |
const ALLOW_STALE = Symbol('allowStale') | |
const MAX_AGE = Symbol('maxAge') | |
const DISPOSE = Symbol('dispose') | |
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') | |
const LRU_LIST = Symbol('lruList') | |
const CACHE = Symbol('cache') | |
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') | |
const naiveLength = () => 1 | |
// lruList is a yallist where the head is the youngest | |
// item, and the tail is the oldest. the list contains the Hit | |
// objects as the entries. | |
// Each Hit object has a reference to its Yallist.Node. This | |
// never changes. | |
// | |
// cache is a Map (or PseudoMap) that matches the keys to | |
// the Yallist.Node object. | |
class LRUCache { | |
constructor (options) { | |
if (typeof options === 'number') | |
options = { max: options } | |
if (!options) | |
options = {} | |
if (options.max && (typeof options.max !== 'number' || options.max < 0)) | |
throw new TypeError('max must be a non-negative number') | |
// Kind of weird to have a default max of Infinity, but oh well. | |
const max = this[MAX] = options.max || Infinity | |
const lc = options.length || naiveLength | |
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc | |
this[ALLOW_STALE] = options.stale || false | |
if (options.maxAge && typeof options.maxAge !== 'number') | |
throw new TypeError('maxAge must be a number') | |
this[MAX_AGE] = options.maxAge || 0 | |
this[DISPOSE] = options.dispose | |
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false | |
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false | |
this.reset() | |
} | |
// resize the cache when the max changes. | |
set max (mL) { | |
if (typeof mL !== 'number' || mL < 0) | |
throw new TypeError('max must be a non-negative number') | |
this[MAX] = mL || Infinity | |
trim(this) | |
} | |
get max () { | |
return this[MAX] | |
} | |
set allowStale (allowStale) { | |
this[ALLOW_STALE] = !!allowStale | |
} | |
get allowStale () { | |
return this[ALLOW_STALE] | |
} | |
set maxAge (mA) { | |
if (typeof mA !== 'number') | |
throw new TypeError('maxAge must be a non-negative number') | |
this[MAX_AGE] = mA | |
trim(this) | |
} | |
get maxAge () { | |
return this[MAX_AGE] | |
} | |
// resize the cache when the lengthCalculator changes. | |
set lengthCalculator (lC) { | |
if (typeof lC !== 'function') | |
lC = naiveLength | |
if (lC !== this[LENGTH_CALCULATOR]) { | |
this[LENGTH_CALCULATOR] = lC | |
this[LENGTH] = 0 | |
this[LRU_LIST].forEach(hit => { | |
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) | |
this[LENGTH] += hit.length | |
}) | |
} | |
trim(this) | |
} | |
get lengthCalculator () { return this[LENGTH_CALCULATOR] } | |
get length () { return this[LENGTH] } | |
get itemCount () { return this[LRU_LIST].length } | |
rforEach (fn, thisp) { | |
thisp = thisp || this | |
for (let walker = this[LRU_LIST].tail; walker !== null;) { | |
const prev = walker.prev | |
forEachStep(this, fn, walker, thisp) | |
walker = prev | |
} | |
} | |
forEach (fn, thisp) { | |
thisp = thisp || this | |
for (let walker = this[LRU_LIST].head; walker !== null;) { | |
const next = walker.next | |
forEachStep(this, fn, walker, thisp) | |
walker = next | |
} | |
} | |
keys () { | |
return this[LRU_LIST].toArray().map(k => k.key) | |
} | |
values () { | |
return this[LRU_LIST].toArray().map(k => k.value) | |
} | |
reset () { | |
if (this[DISPOSE] && | |
this[LRU_LIST] && | |
this[LRU_LIST].length) { | |
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) | |
} | |
this[CACHE] = new Map() // hash of items by key | |
this[LRU_LIST] = new Yallist() // list of items in order of use recency | |
this[LENGTH] = 0 // length of items in the list | |
} | |
dump () { | |
return this[LRU_LIST].map(hit => | |
isStale(this, hit) ? false : { | |
k: hit.key, | |
v: hit.value, | |
e: hit.now + (hit.maxAge || 0) | |
}).toArray().filter(h => h) | |
} | |
dumpLru () { | |
return this[LRU_LIST] | |
} | |
set (key, value, maxAge) { | |
maxAge = maxAge || this[MAX_AGE] | |
if (maxAge && typeof maxAge !== 'number') | |
throw new TypeError('maxAge must be a number') | |
const now = maxAge ? Date.now() : 0 | |
const len = this[LENGTH_CALCULATOR](value, key) | |
if (this[CACHE].has(key)) { | |
if (len > this[MAX]) { | |
del(this, this[CACHE].get(key)) | |
return false | |
} | |
const node = this[CACHE].get(key) | |
const item = node.value | |
// dispose of the old one before overwriting | |
// split out into 2 ifs for better coverage tracking | |
if (this[DISPOSE]) { | |
if (!this[NO_DISPOSE_ON_SET]) | |
this[DISPOSE](key, item.value) | |
} | |
item.now = now | |
item.maxAge = maxAge | |
item.value = value | |
this[LENGTH] += len - item.length | |
item.length = len | |
this.get(key) | |
trim(this) | |
return true | |
} | |
const hit = new Entry(key, value, len, now, maxAge) | |
// oversized objects fall out of cache automatically. | |
if (hit.length > this[MAX]) { | |
if (this[DISPOSE]) | |
this[DISPOSE](key, value) | |
return false | |
} | |
this[LENGTH] += hit.length | |
this[LRU_LIST].unshift(hit) | |
this[CACHE].set(key, this[LRU_LIST].head) | |
trim(this) | |
return true | |
} | |
has (key) { | |
if (!this[CACHE].has(key)) return false | |
const hit = this[CACHE].get(key).value | |
return !isStale(this, hit) | |
} | |
get (key) { | |
return get(this, key, true) | |
} | |
peek (key) { | |
return get(this, key, false) | |
} | |
pop () { | |
const node = this[LRU_LIST].tail | |
if (!node) | |
return null | |
del(this, node) | |
return node.value | |
} | |
del (key) { | |
del(this, this[CACHE].get(key)) | |
} | |
load (arr) { | |
// reset the cache | |
this.reset() | |
const now = Date.now() | |
// A previous serialized cache has the most recent items first | |
for (let l = arr.length - 1; l >= 0; l--) { | |
const hit = arr[l] | |
const expiresAt = hit.e || 0 | |
if (expiresAt === 0) | |
// the item was created without expiration in a non aged cache | |
this.set(hit.k, hit.v) | |
else { | |
const maxAge = expiresAt - now | |
// dont add already expired items | |
if (maxAge > 0) { | |
this.set(hit.k, hit.v, maxAge) | |
} | |
} | |
} | |
} | |
prune () { | |
this[CACHE].forEach((value, key) => get(this, key, false)) | |
} | |
} | |
const get = (self, key, doUse) => { | |
const node = self[CACHE].get(key) | |
if (node) { | |
const hit = node.value | |
if (isStale(self, hit)) { | |
del(self, node) | |
if (!self[ALLOW_STALE]) | |
return undefined | |
} else { | |
if (doUse) { | |
if (self[UPDATE_AGE_ON_GET]) | |
node.value.now = Date.now() | |
self[LRU_LIST].unshiftNode(node) | |
} | |
} | |
return hit.value | |
} | |
} | |
const isStale = (self, hit) => { | |
if (!hit || (!hit.maxAge && !self[MAX_AGE])) | |
return false | |
const diff = Date.now() - hit.now | |
return hit.maxAge ? diff > hit.maxAge | |
: self[MAX_AGE] && (diff > self[MAX_AGE]) | |
} | |
const trim = self => { | |
if (self[LENGTH] > self[MAX]) { | |
for (let walker = self[LRU_LIST].tail; | |
self[LENGTH] > self[MAX] && walker !== null;) { | |
// We know that we're about to delete this one, and also | |
// what the next least recently used key will be, so just | |
// go ahead and set it now. | |
const prev = walker.prev | |
del(self, walker) | |
walker = prev | |
} | |
} | |
} | |
const del = (self, node) => { | |
if (node) { | |
const hit = node.value | |
if (self[DISPOSE]) | |
self[DISPOSE](hit.key, hit.value) | |
self[LENGTH] -= hit.length | |
self[CACHE].delete(hit.key) | |
self[LRU_LIST].removeNode(node) | |
} | |
} | |
class Entry { | |
constructor (key, value, length, now, maxAge) { | |
this.key = key | |
this.value = value | |
this.length = length | |
this.now = now | |
this.maxAge = maxAge || 0 | |
} | |
} | |
const forEachStep = (self, fn, node, thisp) => { | |
let hit = node.value | |
if (isStale(self, hit)) { | |
del(self, node) | |
if (!self[ALLOW_STALE]) | |
hit = undefined | |
} | |
if (hit) | |
fn.call(thisp, hit.value, hit.key, self) | |
} | |
module.exports = LRUCache | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/node_modules/yallist/iterator.js": | |
/*!************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/node_modules/yallist/iterator.js ***! | |
\************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
module.exports = function (Yallist) { | |
Yallist.prototype[Symbol.iterator] = function* () { | |
for (let walker = this.head; walker; walker = walker.next) { | |
yield walker.value | |
} | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/node_modules/yallist/yallist.js": | |
/*!***********************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/node_modules/yallist/yallist.js ***! | |
\***********************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
module.exports = Yallist | |
Yallist.Node = Node | |
Yallist.create = Yallist | |
function Yallist (list) { | |
var self = this | |
if (!(self instanceof Yallist)) { | |
self = new Yallist() | |
} | |
self.tail = null | |
self.head = null | |
self.length = 0 | |
if (list && typeof list.forEach === 'function') { | |
list.forEach(function (item) { | |
self.push(item) | |
}) | |
} else if (arguments.length > 0) { | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
self.push(arguments[i]) | |
} | |
} | |
return self | |
} | |
Yallist.prototype.removeNode = function (node) { | |
if (node.list !== this) { | |
throw new Error('removing node which does not belong to this list') | |
} | |
var next = node.next | |
var prev = node.prev | |
if (next) { | |
next.prev = prev | |
} | |
if (prev) { | |
prev.next = next | |
} | |
if (node === this.head) { | |
this.head = next | |
} | |
if (node === this.tail) { | |
this.tail = prev | |
} | |
node.list.length-- | |
node.next = null | |
node.prev = null | |
node.list = null | |
return next | |
} | |
Yallist.prototype.unshiftNode = function (node) { | |
if (node === this.head) { | |
return | |
} | |
if (node.list) { | |
node.list.removeNode(node) | |
} | |
var head = this.head | |
node.list = this | |
node.next = head | |
if (head) { | |
head.prev = node | |
} | |
this.head = node | |
if (!this.tail) { | |
this.tail = node | |
} | |
this.length++ | |
} | |
Yallist.prototype.pushNode = function (node) { | |
if (node === this.tail) { | |
return | |
} | |
if (node.list) { | |
node.list.removeNode(node) | |
} | |
var tail = this.tail | |
node.list = this | |
node.prev = tail | |
if (tail) { | |
tail.next = node | |
} | |
this.tail = node | |
if (!this.head) { | |
this.head = node | |
} | |
this.length++ | |
} | |
Yallist.prototype.push = function () { | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
push(this, arguments[i]) | |
} | |
return this.length | |
} | |
Yallist.prototype.unshift = function () { | |
for (var i = 0, l = arguments.length; i < l; i++) { | |
unshift(this, arguments[i]) | |
} | |
return this.length | |
} | |
Yallist.prototype.pop = function () { | |
if (!this.tail) { | |
return undefined | |
} | |
var res = this.tail.value | |
this.tail = this.tail.prev | |
if (this.tail) { | |
this.tail.next = null | |
} else { | |
this.head = null | |
} | |
this.length-- | |
return res | |
} | |
Yallist.prototype.shift = function () { | |
if (!this.head) { | |
return undefined | |
} | |
var res = this.head.value | |
this.head = this.head.next | |
if (this.head) { | |
this.head.prev = null | |
} else { | |
this.tail = null | |
} | |
this.length-- | |
return res | |
} | |
Yallist.prototype.forEach = function (fn, thisp) { | |
thisp = thisp || this | |
for (var walker = this.head, i = 0; walker !== null; i++) { | |
fn.call(thisp, walker.value, i, this) | |
walker = walker.next | |
} | |
} | |
Yallist.prototype.forEachReverse = function (fn, thisp) { | |
thisp = thisp || this | |
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { | |
fn.call(thisp, walker.value, i, this) | |
walker = walker.prev | |
} | |
} | |
Yallist.prototype.get = function (n) { | |
for (var i = 0, walker = this.head; walker !== null && i < n; i++) { | |
// abort out of the list early if we hit a cycle | |
walker = walker.next | |
} | |
if (i === n && walker !== null) { | |
return walker.value | |
} | |
} | |
Yallist.prototype.getReverse = function (n) { | |
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { | |
// abort out of the list early if we hit a cycle | |
walker = walker.prev | |
} | |
if (i === n && walker !== null) { | |
return walker.value | |
} | |
} | |
Yallist.prototype.map = function (fn, thisp) { | |
thisp = thisp || this | |
var res = new Yallist() | |
for (var walker = this.head; walker !== null;) { | |
res.push(fn.call(thisp, walker.value, this)) | |
walker = walker.next | |
} | |
return res | |
} | |
Yallist.prototype.mapReverse = function (fn, thisp) { | |
thisp = thisp || this | |
var res = new Yallist() | |
for (var walker = this.tail; walker !== null;) { | |
res.push(fn.call(thisp, walker.value, this)) | |
walker = walker.prev | |
} | |
return res | |
} | |
Yallist.prototype.reduce = function (fn, initial) { | |
var acc | |
var walker = this.head | |
if (arguments.length > 1) { | |
acc = initial | |
} else if (this.head) { | |
walker = this.head.next | |
acc = this.head.value | |
} else { | |
throw new TypeError('Reduce of empty list with no initial value') | |
} | |
for (var i = 0; walker !== null; i++) { | |
acc = fn(acc, walker.value, i) | |
walker = walker.next | |
} | |
return acc | |
} | |
Yallist.prototype.reduceReverse = function (fn, initial) { | |
var acc | |
var walker = this.tail | |
if (arguments.length > 1) { | |
acc = initial | |
} else if (this.tail) { | |
walker = this.tail.prev | |
acc = this.tail.value | |
} else { | |
throw new TypeError('Reduce of empty list with no initial value') | |
} | |
for (var i = this.length - 1; walker !== null; i--) { | |
acc = fn(acc, walker.value, i) | |
walker = walker.prev | |
} | |
return acc | |
} | |
Yallist.prototype.toArray = function () { | |
var arr = new Array(this.length) | |
for (var i = 0, walker = this.head; walker !== null; i++) { | |
arr[i] = walker.value | |
walker = walker.next | |
} | |
return arr | |
} | |
Yallist.prototype.toArrayReverse = function () { | |
var arr = new Array(this.length) | |
for (var i = 0, walker = this.tail; walker !== null; i++) { | |
arr[i] = walker.value | |
walker = walker.prev | |
} | |
return arr | |
} | |
Yallist.prototype.slice = function (from, to) { | |
to = to || this.length | |
if (to < 0) { | |
to += this.length | |
} | |
from = from || 0 | |
if (from < 0) { | |
from += this.length | |
} | |
var ret = new Yallist() | |
if (to < from || to < 0) { | |
return ret | |
} | |
if (from < 0) { | |
from = 0 | |
} | |
if (to > this.length) { | |
to = this.length | |
} | |
for (var i = 0, walker = this.head; walker !== null && i < from; i++) { | |
walker = walker.next | |
} | |
for (; walker !== null && i < to; i++, walker = walker.next) { | |
ret.push(walker.value) | |
} | |
return ret | |
} | |
Yallist.prototype.sliceReverse = function (from, to) { | |
to = to || this.length | |
if (to < 0) { | |
to += this.length | |
} | |
from = from || 0 | |
if (from < 0) { | |
from += this.length | |
} | |
var ret = new Yallist() | |
if (to < from || to < 0) { | |
return ret | |
} | |
if (from < 0) { | |
from = 0 | |
} | |
if (to > this.length) { | |
to = this.length | |
} | |
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { | |
walker = walker.prev | |
} | |
for (; walker !== null && i > from; i--, walker = walker.prev) { | |
ret.push(walker.value) | |
} | |
return ret | |
} | |
Yallist.prototype.splice = function (start, deleteCount, ...nodes) { | |
if (start > this.length) { | |
start = this.length - 1 | |
} | |
if (start < 0) { | |
start = this.length + start; | |
} | |
for (var i = 0, walker = this.head; walker !== null && i < start; i++) { | |
walker = walker.next | |
} | |
var ret = [] | |
for (var i = 0; walker && i < deleteCount; i++) { | |
ret.push(walker.value) | |
walker = this.removeNode(walker) | |
} | |
if (walker === null) { | |
walker = this.tail | |
} | |
if (walker !== this.head && walker !== this.tail) { | |
walker = walker.prev | |
} | |
for (var i = 0; i < nodes.length; i++) { | |
walker = insert(this, walker, nodes[i]) | |
} | |
return ret; | |
} | |
Yallist.prototype.reverse = function () { | |
var head = this.head | |
var tail = this.tail | |
for (var walker = head; walker !== null; walker = walker.prev) { | |
var p = walker.prev | |
walker.prev = walker.next | |
walker.next = p | |
} | |
this.head = tail | |
this.tail = head | |
return this | |
} | |
function insert (self, node, value) { | |
var inserted = node === self.head ? | |
new Node(value, null, node, self) : | |
new Node(value, node, node.next, self) | |
if (inserted.next === null) { | |
self.tail = inserted | |
} | |
if (inserted.prev === null) { | |
self.head = inserted | |
} | |
self.length++ | |
return inserted | |
} | |
function push (self, item) { | |
self.tail = new Node(item, self.tail, null, self) | |
if (!self.head) { | |
self.head = self.tail | |
} | |
self.length++ | |
} | |
function unshift (self, item) { | |
self.head = new Node(item, null, self.head, self) | |
if (!self.tail) { | |
self.tail = self.head | |
} | |
self.length++ | |
} | |
function Node (value, prev, next, list) { | |
if (!(this instanceof Node)) { | |
return new Node(value, prev, next, list) | |
} | |
this.list = list | |
this.value = value | |
if (prev) { | |
prev.next = this | |
this.prev = prev | |
} else { | |
this.prev = null | |
} | |
if (next) { | |
next.prev = this | |
this.next = next | |
} else { | |
this.next = null | |
} | |
} | |
try { | |
// add if support for Symbol.iterator is present | |
__webpack_require__(/*! ./iterator.js */ "../fabric8-analytics-lsp-server/node_modules/yallist/iterator.js")(Yallist) | |
} catch (er) {} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/aggregators.js": | |
/*!*************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/aggregators.js ***! | |
\*************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* -------------------------------------------------------------------------------------------- | |
* Copyright (c) Red Hat, Dharmendra Patel 2020 | |
* Licensed under the Apache-2.0 License. See License.txt in the project root for license information. | |
* ------------------------------------------------------------------------------------------ */ | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.GolangVulnerabilityAggregator = exports.NoopVulnerabilityAggregator = void 0; | |
const compareVersions = __webpack_require__(/*! compare-versions */ "../fabric8-analytics-lsp-server/output/node_modules/compare-versions/index.js"); | |
const severity = ["low", "medium", "high", "critical"]; | |
/* Noop Vulnerability aggregator class */ | |
class NoopVulnerabilityAggregator { | |
aggregate(newVulnerability) { | |
// Make it a new vulnerability always and set ecosystem for vulnerability. | |
this.isNewVulnerability = true; | |
newVulnerability.ecosystem = ""; | |
return newVulnerability; | |
} | |
} | |
exports.NoopVulnerabilityAggregator = NoopVulnerabilityAggregator; | |
/* Golang Vulnerability aggregator class */ | |
class GolangVulnerabilityAggregator { | |
constructor() { | |
this.vulnerabilities = Array(); | |
} | |
aggregate(newVulnerability) { | |
// Set ecosystem for new vulnerability from aggregator | |
newVulnerability.ecosystem = "golang"; | |
// Check if module / package exists in the list. | |
this.isNewVulnerability = true; | |
var existingVulnerabilityIndex = 0; | |
this.vulnerabilities.forEach((pckg, index) => { | |
// Merge vulnerabilities for same modules. | |
if (this.getModuleName(newVulnerability.name) == this.getModuleName(pckg.name)) { | |
// Module / package exists, so aggregate the data and update Diagnostic message and code action. | |
this.mergeVulnerability(index, newVulnerability); | |
this.isNewVulnerability = false; | |
existingVulnerabilityIndex = index; | |
} | |
}); | |
if (this.isNewVulnerability) { | |
this.vulnerabilities.push(newVulnerability); | |
return newVulnerability; | |
} | |
return this.vulnerabilities[existingVulnerabilityIndex]; | |
} | |
getModuleName(vulnerabilityName) { | |
const parts = vulnerabilityName.split('@'); | |
return parts.length == 2 ? parts[1] : vulnerabilityName; | |
} | |
mergeVulnerability(existingIndex, newVulnerability) { | |
// Between current name and new name, smallest will be the module name. | |
// So, assign the smallest as package name. | |
if (newVulnerability.name.length < this.vulnerabilities[existingIndex].name.length) | |
this.vulnerabilities[existingIndex].name = newVulnerability.name; | |
// Merge other informations | |
this.vulnerabilities[existingIndex].packageCount += newVulnerability.packageCount; | |
this.vulnerabilities[existingIndex].vulnerabilityCount += newVulnerability.vulnerabilityCount; | |
this.vulnerabilities[existingIndex].advisoryCount += newVulnerability.advisoryCount; | |
this.vulnerabilities[existingIndex].exploitCount += newVulnerability.exploitCount; | |
this.vulnerabilities[existingIndex].highestSeverity = this.getMaxSeverity(this.vulnerabilities[existingIndex].highestSeverity, newVulnerability.highestSeverity); | |
this.vulnerabilities[existingIndex].recommendedVersion = this.getMaxRecVersion(this.vulnerabilities[existingIndex].recommendedVersion, newVulnerability.recommendedVersion); | |
} | |
getMaxSeverity(oldSeverity, newSeverity) { | |
const newSeverityIndex = Math.max(severity.indexOf(oldSeverity), severity.indexOf(newSeverity)); | |
return severity[newSeverityIndex]; | |
} | |
getMaxRecVersion(oldRecVersion, newRecVersion) { | |
// Compute maximium recommended version. | |
var maxRecVersion = oldRecVersion; | |
if (oldRecVersion == "" || oldRecVersion == null) { | |
maxRecVersion = newRecVersion; | |
} | |
else if (newRecVersion != "" && newRecVersion != null) { | |
if (compareVersions(oldRecVersion, newRecVersion) == -1) { | |
maxRecVersion = newRecVersion; | |
} | |
} | |
return maxRecVersion; | |
} | |
} | |
exports.GolangVulnerabilityAggregator = GolangVulnerabilityAggregator; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/cache.js": | |
/*!*******************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/cache.js ***! | |
\*******************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.globalCache = exports.Cache = void 0; | |
const LRUCache = __webpack_require__(/*! lru-cache */ "../fabric8-analytics-lsp-server/node_modules/lru-cache/index.js"); | |
const collector_1 = __webpack_require__(/*! ./collector */ "../fabric8-analytics-lsp-server/output/collector.js"); | |
; | |
class Cache { | |
constructor(max, maxAge) { | |
this.cache = new LRUCache({ max, maxAge }); | |
} | |
// returns null as a value for dependency which is not in the cache. | |
get(deps) { | |
return deps.map(d => { | |
const cached = this.cache.get(d.key()); | |
return { K: d, V: cached }; | |
}); | |
} | |
add(items) { | |
items.forEach(item => { | |
// FIXME: response field is inconsistent when unknown is included. | |
const dep = new collector_1.SimpleDependency(item.package || item.name, item.version); | |
this.cache.set(dep.key(), item); | |
}); | |
} | |
} | |
exports.Cache = Cache; | |
exports.globalCache = (() => { | |
const cache = new Map(); | |
return (key, max, maxAge) => { | |
var _a; | |
const c = (_a = cache.get(key)) !== null && _a !== void 0 ? _a : cache.set(key, new Cache(max, maxAge)).get(key); | |
return c; | |
}; | |
})(); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/collector.js": | |
/*!***********************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/collector.js ***! | |
\***********************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* -------------------------------------------------------------------------------------------- | |
* Copyright (c) Pavel Odvody 2016 | |
* Licensed under the Apache-2.0 License. See License.txt in the project root for license information. | |
* ------------------------------------------------------------------------------------------ */ | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.DependencyMap = exports.SimpleDependency = exports.Dependency = exports.Variant = exports.KeyValueEntry = exports.ValueType = void 0; | |
/* Determine what is the value */ | |
var ValueType; | |
(function (ValueType) { | |
ValueType[ValueType["Invalid"] = 0] = "Invalid"; | |
ValueType[ValueType["String"] = 1] = "String"; | |
ValueType[ValueType["Integer"] = 2] = "Integer"; | |
ValueType[ValueType["Float"] = 3] = "Float"; | |
ValueType[ValueType["Array"] = 4] = "Array"; | |
ValueType[ValueType["Object"] = 5] = "Object"; | |
ValueType[ValueType["Boolean"] = 6] = "Boolean"; | |
ValueType[ValueType["Null"] = 7] = "Null"; | |
})(ValueType = exports.ValueType || (exports.ValueType = {})); | |
; | |
; | |
; | |
class KeyValueEntry { | |
constructor(k, pos, v, v_pos) { | |
this.key = k; | |
this.key_position = pos; | |
this.value = v; | |
this.value_position = v_pos; | |
} | |
} | |
exports.KeyValueEntry = KeyValueEntry; | |
class Variant { | |
constructor(type, object) { | |
this.type = type; | |
this.object = object; | |
} | |
} | |
exports.Variant = Variant; | |
/* Dependency class that can be created from `IKeyValueEntry` */ | |
class Dependency { | |
constructor(dependency) { | |
this.name = { | |
value: dependency.key, | |
position: dependency.key_position | |
}; | |
this.version = { | |
value: dependency.value.object, | |
position: dependency.value_position | |
}; | |
} | |
key() { | |
return `${this.name.value}@${this.version.value}`; | |
} | |
} | |
exports.Dependency = Dependency; | |
/* Dependency from name, version without position */ | |
class SimpleDependency extends Dependency { | |
constructor(name, version) { | |
super(new KeyValueEntry(name, null, new Variant(ValueType.String, version), null)); | |
} | |
} | |
exports.SimpleDependency = SimpleDependency; | |
class DependencyMap { | |
constructor(deps) { | |
this.mapper = new Map(deps.map(d => [d.key(), d])); | |
} | |
get(dep) { | |
return this.mapper.get(dep.key()); | |
} | |
} | |
exports.DependencyMap = DependencyMap; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/collector/go.mod.js": | |
/*!******************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/collector/go.mod.js ***! | |
\******************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var __awaiter = (this && this.__awaiter) || function (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()); | |
}); | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.DependencyCollector = void 0; | |
const collector_1 = __webpack_require__(/*! ../collector */ "../fabric8-analytics-lsp-server/output/collector.js"); | |
const utils_1 = __webpack_require__(/*! ../utils */ "../fabric8-analytics-lsp-server/output/utils.js"); | |
const config_1 = __webpack_require__(/*! ../config */ "../fabric8-analytics-lsp-server/output/config.js"); | |
const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); | |
/* Please note :: There was issue with semverRegex usage in the code. During run time, it extracts | |
* version with 'v' prefix, but this is not be behavior of semver in CLI and test environment. | |
* At the moment, using regex directly to extract version information without 'v' prefix. */ | |
//import semverRegex = require('semver-regex'); | |
function semVerRegExp(line) { | |
const regExp = /(?<=^v?|\sv?)(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9]\d*|[\da-z-]*[a-z-][\da-z-]*)(?:\.(?:0|[1-9]\d*|[\da-z-]*[a-z-][\da-z-]*))*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?(?=$|\s)/ig; | |
return regExp.exec(line); | |
} | |
class NaiveGomodParser { | |
constructor(contents, goImports) { | |
this.dependencies = NaiveGomodParser.parseDependencies(contents, goImports); | |
} | |
static getReplaceMap(line, index) { | |
// split the replace statements by '=>' | |
const parts = line.replace('replace', '').replace('(', '').replace(')', '').trim().split('=>'); | |
const replaceWithVersion = semVerRegExp(parts[1]); | |
// Skip lines without final version string | |
if (replaceWithVersion && replaceWithVersion.length > 0) { | |
const replaceTo = (parts[0] || '').trim().split(' '); | |
const replaceToVersion = semVerRegExp(replaceTo[1]); | |
const replaceWith = (parts[1] || '').trim().split(' '); | |
const replaceWithIndex = line.lastIndexOf(parts[1]); | |
const replaceEntry = new collector_1.KeyValueEntry(replaceWith[0].trim(), { line: 0, column: 0 }); | |
replaceEntry.value = new collector_1.Variant(collector_1.ValueType.String, 'v' + replaceWithVersion[0]); | |
replaceEntry.value_position = { line: index + 1, column: (replaceWithIndex + replaceWithVersion.index) }; | |
const replaceDependency = new collector_1.Dependency(replaceEntry); | |
const isReplaceToVersion = replaceToVersion && replaceToVersion.length > 0; | |
return { key: replaceTo[0].trim() + (isReplaceToVersion ? ('@v' + replaceToVersion[0]) : ''), value: replaceDependency }; | |
} | |
return null; | |
} | |
static applyReplaceMap(dep, replaceMap) { | |
let replaceDependency = replaceMap.get(dep.name.value + "@" + dep.version.value); | |
if (replaceDependency === undefined) { | |
replaceDependency = replaceMap.get(dep.name.value); | |
if (replaceDependency === undefined) { | |
return dep; | |
} | |
} | |
return replaceDependency; | |
} | |
static parseDependencies(contents, goImports) { | |
let replaceMap = new Map(); | |
let goModDeps = contents.split("\n").reduce((dependencies, line, index) => { | |
// skip any text after '//' | |
if (line.includes("//")) { | |
line = line.split("//")[0]; | |
} | |
if (line.includes("=>")) { | |
let replaceEntry = NaiveGomodParser.getReplaceMap(line, index); | |
if (replaceEntry) { | |
replaceMap.set(replaceEntry.key, replaceEntry.value); | |
} | |
} | |
else { | |
// Not using semver directly, look at comment on import statement. | |
//const version = semverRegex().exec(line) | |
const version = semVerRegExp(line); | |
// Skip lines without version string | |
if (version && version.length > 0) { | |
const parts = line.replace('require', '').replace('(', '').replace(')', '').trim().split(' '); | |
const pkgName = (parts[0] || '').trim(); | |
// Ignore line starting with replace clause and empty package | |
if (pkgName.length > 0) { | |
const entry = new collector_1.KeyValueEntry(pkgName, { line: 0, column: 0 }); | |
entry.value = new collector_1.Variant(collector_1.ValueType.String, 'v' + version[0]); | |
entry.value_position = { line: index + 1, column: version.index }; | |
// Push all direct and indirect modules present in go.mod (manifest) | |
dependencies.push(new collector_1.Dependency(entry)); | |
} | |
} | |
} | |
return dependencies; | |
}, []); | |
let goPackageDeps = []; | |
goImports.forEach(importStatement => { | |
let exactMatchDep = null; | |
let moduleMatchDep = null; | |
goModDeps.forEach(goModDep => { | |
if (importStatement == goModDep.name.value) { | |
// Software stack uses the module | |
exactMatchDep = goModDep; | |
} | |
else if (importStatement.startsWith(goModDep.name.value + "/")) { | |
// Find longest module name that matches the import statement | |
if (moduleMatchDep == null) { | |
moduleMatchDep = goModDep; | |
} | |
else if (moduleMatchDep.name.value.length < goModDep.name.value.length) { | |
moduleMatchDep = goModDep; | |
} | |
} | |
}); | |
if (exactMatchDep == null && moduleMatchDep != null) { | |
// Software stack uses a package from the module | |
let replaceDependency = NaiveGomodParser.applyReplaceMap(moduleMatchDep, replaceMap); | |
if (replaceDependency !== moduleMatchDep) { | |
importStatement = importStatement.replace(moduleMatchDep.name.value, replaceDependency.name.value); | |
} | |
const entry = new collector_1.KeyValueEntry(importStatement + '@' + replaceDependency.name.value, replaceDependency.name.position); | |
entry.value = new collector_1.Variant(collector_1.ValueType.String, replaceDependency.version.value); | |
entry.value_position = replaceDependency.version.position; | |
goPackageDeps.push(new collector_1.Dependency(entry)); | |
} | |
}); | |
goModDeps = goModDeps.map(goModDep => NaiveGomodParser.applyReplaceMap(goModDep, replaceMap)); | |
// Return modules present in go.mod and packages used in imports. | |
return [...goModDeps, ...goPackageDeps]; | |
} | |
parse() { | |
return this.dependencies; | |
} | |
} | |
/* Process entries found in the go.mod file and collect all dependency | |
* related information */ | |
class DependencyCollector { | |
constructor(manifestFile, classes = ["dependencies"]) { | |
this.manifestFile = manifestFile; | |
this.classes = classes; | |
this.manifestFile = manifestFile; | |
} | |
collect(contents) { | |
return __awaiter(this, void 0, void 0, function* () { | |
let promiseExec = new Promise((resolve, reject) => { | |
const vscodeRootpath = this.manifestFile.replace("file://", "").replace("/go.mod", ""); | |
child_process_1.exec(utils_1.getGoLangImportsCmd(), { shell: process.env["SHELL"], windowsHide: true, cwd: vscodeRootpath, maxBuffer: 1024 * 1200 }, (error, stdout, stderr) => { | |
if (error) { | |
console.error(`Command failed, environment SHELL: [${process.env["SHELL"]}] PATH: [${process.env["PATH"]}] CWD: [${process.env["CWD"]}]`); | |
if (error.code == 127) { // Invalid command, go executable not found | |
reject(`Unable to locate '${config_1.config.golang_executable}'`); | |
} | |
else { | |
reject(`Unable to execute '${config_1.config.golang_executable} list' command, run '${config_1.config.golang_executable} mod tidy' to know more`); | |
} | |
} | |
else { | |
resolve(new Set(stdout.toString().split("\n"))); | |
} | |
}); | |
}); | |
const goImports = yield promiseExec; | |
let parser = new NaiveGomodParser(contents, goImports); | |
return parser.parse(); | |
}); | |
} | |
} | |
exports.DependencyCollector = DependencyCollector; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/collector/package.json.js": | |
/*!************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/collector/package.json.js ***! | |
\************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var __awaiter = (this && this.__awaiter) || function (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()); | |
}); | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.DependencyCollector = void 0; | |
const json_to_ast_1 = __webpack_require__(/*! json-to-ast */ "../fabric8-analytics-lsp-server/output/node_modules/json-to-ast/build.js"); | |
const collector_1 = __webpack_require__(/*! ../collector */ "../fabric8-analytics-lsp-server/output/collector.js"); | |
class DependencyCollector { | |
constructor(classes = ["dependencies"]) { | |
this.classes = classes; | |
} | |
collect(contents) { | |
return __awaiter(this, void 0, void 0, function* () { | |
const ast = json_to_ast_1.default(contents); | |
return ast.children. | |
filter(c => this.classes.includes(c.key.value)). | |
flatMap(c => c.value.children). | |
map(c => { | |
let entry = new collector_1.KeyValueEntry(c.key.value, { line: c.key.loc.start.line, column: c.key.loc.start.column + 1 }); | |
entry.value = new collector_1.Variant(collector_1.ValueType.String, c.value.value); | |
entry.value_position = { line: c.value.loc.start.line, column: c.value.loc.start.column + 1 }; | |
return new collector_1.Dependency(entry); | |
}); | |
}); | |
} | |
} | |
exports.DependencyCollector = DependencyCollector; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/collector/pom.xml.js": | |
/*!*******************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/collector/pom.xml.js ***! | |
\*******************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var __awaiter = (this && this.__awaiter) || function (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()); | |
}); | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.DependencyCollector = void 0; | |
const collector_1 = __webpack_require__(/*! ../collector */ "../fabric8-analytics-lsp-server/output/collector.js"); | |
const parser_1 = __webpack_require__(/*! @xml-tools/parser */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/api.js"); | |
const ast_1 = __webpack_require__(/*! @xml-tools/ast */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/api.js"); | |
class DependencyCollector { | |
constructor(classes = ["dependencies"]) { | |
this.classes = classes; | |
} | |
findRootNodes(rootElementName) { | |
const properties = []; | |
const propertiesElement = { | |
// Will be invoked once for each Element node in the AST. | |
visitXMLElement: (node) => { | |
if (node.name === rootElementName) { | |
properties.push(node); | |
} | |
}, | |
}; | |
ast_1.accept(this.xmlDocAst, propertiesElement); | |
return properties; | |
} | |
parseXml(contents) { | |
const { cst, tokenVector } = parser_1.parse(contents); | |
this.xmlDocAst = ast_1.buildAst(cst, tokenVector); | |
} | |
mapToDependency(dependenciesNode) { | |
class PomDependency { | |
constructor(e) { | |
this.groupId = e.subElements.find(e => e.name === 'groupId'); | |
this.artifactId = e.subElements.find(e => e.name === 'artifactId'); | |
this.version = e.subElements.find(e => e.name === 'version'); | |
} | |
isValid() { | |
// none should have a empty text. | |
return [this.groupId, this.artifactId, this.version].find(e => { var _a; return !((_a = e.textContents[0]) === null || _a === void 0 ? void 0 : _a.text); }) === undefined; | |
} | |
toDependency() { | |
const dep = new collector_1.KeyValueEntry(`${this.groupId.textContents[0].text}:${this.artifactId.textContents[0].text}`, { line: 0, column: 0 }); | |
const versionVal = this.version.textContents[0]; | |
dep.value = new collector_1.Variant(collector_1.ValueType.String, versionVal.text); | |
dep.value_position = { line: versionVal.position.startLine, column: versionVal.position.startColumn }; | |
return new collector_1.Dependency(dep); | |
} | |
} | |
; | |
const validElementNames = ['groupId', 'artifactId', 'version']; | |
const dependencies = dependenciesNode.subElements. | |
filter(e => e.name === 'dependency'). | |
// must include all validElementNames | |
filter(e => e.subElements.filter(e => validElementNames.includes(e.name)).length == validElementNames.length). | |
// no test dependencies | |
filter(e => !e.subElements.find(e => (e.name === 'scope' && e.textContents[0].text === 'test'))). | |
map(e => new PomDependency(e)). | |
filter(d => d.isValid()). | |
map(d => d.toDependency()); | |
return dependencies; | |
} | |
createPropertySubstitution(e) { | |
var _a; | |
return new Map((_a = e === null || e === void 0 ? void 0 : e.subElements) === null || _a === void 0 ? void 0 : _a.filter(e => { var _a; return (_a = e.textContents[0]) === null || _a === void 0 ? void 0 : _a.text; }).map(e => { | |
const propertyValue = e.textContents[0]; | |
const position = { line: propertyValue.position.startLine, column: propertyValue.position.startColumn }; | |
const value = { value: propertyValue.text, position: position }; | |
// key should be equivalent to pom.xml property format. i.e ${property.value} | |
return [`\$\{${e.name}\}`, value]; | |
})); | |
} | |
applyProperty(dependency, map) { | |
var _a; | |
// FIXME: Do the groupId and artifactId will also be expressed through properties? | |
dependency.version = (_a = map.get(dependency.version.value)) !== null && _a !== void 0 ? _a : dependency.version; | |
return dependency; | |
} | |
collect(contents) { | |
return __awaiter(this, void 0, void 0, function* () { | |
this.parseXml(contents); | |
const deps = this.findRootNodes("dependencies"); | |
// lazy eval | |
const getPropertyMap = (() => { | |
let propertyMap = null; | |
return () => { | |
propertyMap = propertyMap !== null && propertyMap !== void 0 ? propertyMap : this.createPropertySubstitution(this.findRootNodes("properties")[0]); | |
return propertyMap; | |
}; | |
})(); | |
return deps.flatMap(dep => this.mapToDependency(dep)).map(d => this.applyProperty(d, getPropertyMap())); | |
}); | |
} | |
} | |
exports.DependencyCollector = DependencyCollector; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/collector/requirements.txt.js": | |
/*!****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/collector/requirements.txt.js ***! | |
\****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var __awaiter = (this && this.__awaiter) || function (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()); | |
}); | |
}; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.DependencyCollector = void 0; | |
const collector_1 = __webpack_require__(/*! ../collector */ "../fabric8-analytics-lsp-server/output/collector.js"); | |
class NaivePyParser { | |
constructor(contents) { | |
this.dependencies = NaivePyParser.parseDependencies(contents); | |
} | |
static parseDependencies(contents) { | |
const requirements = contents.split("\n"); | |
return requirements.reduce((dependencies, req, index) => { | |
// skip any text after # | |
if (req.includes('#')) { | |
req = req.split('#')[0]; | |
} | |
const parsedRequirement = req.split(/[==,>=,<=]+/); | |
const pkgName = (parsedRequirement[0] || '').trim(); | |
// skip empty lines | |
if (pkgName.length > 0) { | |
const version = (parsedRequirement[1] || '').trim(); | |
const entry = new collector_1.KeyValueEntry(pkgName, { line: 0, column: 0 }); | |
entry.value = new collector_1.Variant(collector_1.ValueType.String, version); | |
entry.value_position = { line: index + 1, column: req.indexOf(version) + 1 }; | |
dependencies.push(new collector_1.Dependency(entry)); | |
} | |
return dependencies; | |
}, []); | |
} | |
parse() { | |
return this.dependencies; | |
} | |
} | |
/* Process entries found in the txt files and collect all dependency | |
* related information */ | |
class DependencyCollector { | |
constructor(classes = ["dependencies"]) { | |
this.classes = classes; | |
} | |
collect(contents) { | |
return __awaiter(this, void 0, void 0, function* () { | |
let parser = new NaivePyParser(contents); | |
return parser.parse(); | |
}); | |
} | |
} | |
exports.DependencyCollector = DependencyCollector; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/config.js": | |
/*!********************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/config.js ***! | |
\********************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* -------------------------------------------------------------------------------------------- | |
* Copyright (c) Dharmendra Patel 2020 | |
* Licensed under the Apache-2.0 License. See License.txt in the project root for | |
* license information. | |
* ------------------------------------------------------------------------------------------ */ | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.config = void 0; | |
class Config { | |
constructor() { | |
// TODO: this needs to be configurable | |
this.server_url = process.env.RECOMMENDER_API_URL || "api-url-not-available-in-lsp"; | |
this.api_token = process.env.RECOMMENDER_API_TOKEN || "token-not-available-in-lsp"; | |
this.three_scale_user_token = process.env.THREE_SCALE_USER_TOKEN || ""; | |
this.provide_fullstack_action = (process.env.PROVIDE_FULLSTACK_ACTION || "") === "true"; | |
this.forbidden_licenses = []; | |
this.no_crypto = false; | |
this.home_dir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; | |
this.uuid = process.env.UUID || ""; | |
this.golang_executable = process.env.GOLANG_EXECUTABLE || 'go'; | |
} | |
} | |
; | |
const config = new Config(); | |
exports.config = config; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/consumers.js": | |
/*!***********************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/consumers.js ***! | |
\***********************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* -------------------------------------------------------------------------------------------- | |
* Copyright (c) Pavel Odvody 2016 | |
* Licensed under the Apache-2.0 License. See License.txt in the project root for license information. | |
* ------------------------------------------------------------------------------------------ */ | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.codeActionsMap = exports.SecurityEngine = exports.DiagnosticsPipeline = void 0; | |
const utils_1 = __webpack_require__(/*! ./utils */ "../fabric8-analytics-lsp-server/output/utils.js"); | |
const vulnerability_1 = __webpack_require__(/*! ./vulnerability */ "../fabric8-analytics-lsp-server/output/vulnerability.js"); | |
const vscode_languageserver_1 = __webpack_require__(/*! vscode-languageserver */ "../fabric8-analytics-lsp-server/output/node_modules/vscode-languageserver/lib/main.js"); | |
; | |
/* Bind & return the part of `obj` as described by `desc` */ | |
let bind_object = (obj, desc) => { | |
let bind = obj; | |
for (let elem of desc.path) { | |
if (elem in bind) { | |
bind = bind[elem]; | |
} | |
else { | |
return null; | |
} | |
} | |
return bind; | |
}; | |
; | |
; | |
; | |
; | |
/* Diagnostics pipeline implementation */ | |
class DiagnosticsPipeline { | |
constructor(classes, dependency, config, diags, vulnerabilityAggregator, uri) { | |
this.items = classes.map((i) => { return new i(dependency, config); }); | |
this.dependency = dependency; | |
this.config = config; | |
this.diagnostics = diags; | |
this.uri = uri; | |
this.vulnerabilityAggregator = vulnerabilityAggregator; | |
} | |
run(data) { | |
for (let item of this.items) { | |
if (item.consume(data)) { | |
for (let d of item.produce()) { | |
const aggVulnerability = this.vulnerabilityAggregator.aggregate(d); | |
const aggDiagnostic = aggVulnerability.getDiagnostic(); | |
// Add/Update quick action for given aggregated diangnostic | |
// TODO: this can be done lazily | |
if (aggVulnerability.recommendedVersion && (aggVulnerability.vulnerabilityCount > 0 || aggVulnerability.exploitCount != null)) { | |
let codeAction = { | |
title: `Switch to recommended version ${aggVulnerability.recommendedVersion}`, | |
diagnostics: [aggDiagnostic], | |
kind: vscode_languageserver_1.CodeActionKind.QuickFix, | |
edit: { | |
changes: {} | |
} | |
}; | |
codeAction.edit.changes[this.uri] = [{ | |
range: aggDiagnostic.range, | |
newText: aggVulnerability.recommendedVersion | |
}]; | |
// We will have line|start as key instead of message | |
codeActionsMap[aggDiagnostic.range.start.line + "|" + aggDiagnostic.range.start.character] = codeAction; | |
} | |
if (this.vulnerabilityAggregator.isNewVulnerability) { | |
this.diagnostics.push(aggDiagnostic); | |
} | |
else { | |
// Update the existing diagnostic object based on range values | |
this.diagnostics.forEach((diag, index) => { | |
if (diag.range.start.line == aggVulnerability.range.start.line && | |
diag.range.start.character == aggVulnerability.range.start.character) { | |
this.diagnostics[index] = aggDiagnostic; | |
return; | |
} | |
}); | |
} | |
} | |
} | |
} | |
// This is not used by any one. | |
return []; | |
} | |
} | |
exports.DiagnosticsPipeline = DiagnosticsPipeline; | |
; | |
/* A consumer that uses the binding interface to consume a metadata object */ | |
class AnalysisConsumer { | |
constructor(config) { | |
this.config = config; | |
this.package = null; | |
this.version = null; | |
this.changeTo = null; | |
this.message = null; | |
this.vulnerabilityCount = 0; | |
this.advisoryCount = 0; | |
this.highestSeverity = null; | |
} | |
consume(data) { | |
if (this.binding != null) { | |
this.item = bind_object(data, this.binding); | |
} | |
else { | |
this.item = data; | |
} | |
if (this.packageBinding != null) { | |
this.package = bind_object(data, this.packageBinding); | |
} | |
if (this.versionBinding != null) { | |
this.version = bind_object(data, this.versionBinding); | |
} | |
if (this.changeToBinding != null) { | |
this.changeTo = bind_object(data, this.changeToBinding); | |
} | |
if (this.messageBinding != null) { | |
this.message = bind_object(data, this.messageBinding); | |
} | |
if (this.vulnerabilityCountBinding != null) { | |
this.vulnerabilityCount = bind_object(data, this.vulnerabilityCountBinding); | |
} | |
if (this.advisoryCountBinding != null) { | |
this.advisoryCount = bind_object(data, this.advisoryCountBinding); | |
} | |
if (this.exploitCountBinding != null) { | |
this.exploitCount = bind_object(data, this.exploitCountBinding); | |
} | |
if (this.highestSeverityBinding != null) { | |
this.highestSeverity = bind_object(data, this.highestSeverityBinding); | |
} | |
return this.item != null; | |
} | |
} | |
; | |
/* Report CVEs in found dependencies */ | |
class SecurityEngine extends AnalysisConsumer { | |
constructor(context, config) { | |
super(config); | |
this.context = context; | |
this.binding = { path: ['vulnerability'] }; | |
this.packageBinding = { path: ['package'] }; | |
this.versionBinding = { path: ['version'] }; | |
/* recommendation to use a different version */ | |
this.changeToBinding = { path: ['recommended_versions'] }; | |
/* Diagnostic message */ | |
this.messageBinding = { path: ['message'] }; | |
/* Publicly known Security Vulnerability count */ | |
this.vulnerabilityCountBinding = { path: ['known_security_vulnerability_count'] }; | |
/* Private Security Advisory count */ | |
this.advisoryCountBinding = { path: ['security_advisory_count'] }; | |
/* Exloitable vulnerability count */ | |
this.exploitCountBinding = { path: ['exploitable_vulnerabilities_count'] }; | |
/* Highest Severity */ | |
this.highestSeverityBinding = { path: ['highest_severity'] }; | |
} | |
produce() { | |
if (this.item.length > 0) { | |
return [new vulnerability_1.Vulnerability(this.package, this.version, 1, this.vulnerabilityCount, this.advisoryCount, this.exploitCount, this.highestSeverity, this.changeTo, utils_1.get_range(this.context.version))]; | |
} | |
else { | |
return []; | |
} | |
} | |
} | |
exports.SecurityEngine = SecurityEngine; | |
; | |
let codeActionsMap = new Map(); | |
exports.codeActionsMap = codeActionsMap; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/api.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/api.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { buildAst } = __webpack_require__(/*! ./build-ast */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/build-ast.js"); | |
const { accept } = __webpack_require__(/*! ./visit-ast */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/visit-ast.js"); | |
const { DEFAULT_NS } = __webpack_require__(/*! ./constants */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/constants.js"); | |
module.exports = { | |
buildAst: buildAst, | |
accept: accept, | |
DEFAULT_NS: DEFAULT_NS, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/build-ast.js": | |
/*!*******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/build-ast.js ***! | |
\*******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { BaseXmlCstVisitor } = __webpack_require__(/*! @xml-tools/parser */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/api.js"); | |
const { | |
last, | |
forEach, | |
reduce, | |
map, | |
pick, | |
sortBy, | |
isEmpty, | |
isArray, | |
assign, | |
} = __webpack_require__(/*! lodash */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/lodash.js"); | |
const { | |
findNextTextualToken, | |
isXMLNamespaceKey, | |
getXMLNamespaceKeyPrefix, | |
} = __webpack_require__(/*! @xml-tools/common */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/api.js"); | |
const { getAstChildrenReflective } = __webpack_require__(/*! ./utils */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/utils.js"); | |
const { DEFAULT_NS } = __webpack_require__(/*! ./constants */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/constants.js"); | |
/** | |
* @param {DocumentCstNode} docCst | |
* @param {IToken[]} tokenVector | |
* @returns {XMLDocument} | |
*/ | |
function buildAst(docCst, tokenVector) { | |
AstBuilder.setState({ tokenVector }); | |
const xmlDocAst = AstBuilder.visit(docCst); | |
if (xmlDocAst.rootElement !== invalidSyntax) { | |
updateNamespaces(xmlDocAst.rootElement); | |
} | |
return xmlDocAst; | |
} | |
class CstToAstVisitor extends BaseXmlCstVisitor { | |
constructor() { | |
super(); | |
} | |
setState({ tokenVector }) { | |
this.tokenVector = tokenVector; | |
} | |
visit(cstNode, params = {}) { | |
return super.visit(cstNode, { location: cstNode.location, ...params }); | |
} | |
/** | |
* @param ctx {DocumentCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
* | |
* @returns {XMLDocument} | |
*/ | |
document(ctx, { location }) { | |
const astNode = { | |
type: "XMLDocument", | |
rootElement: invalidSyntax, | |
position: location, | |
}; | |
if (ctx.prolog !== undefined) { | |
astNode.prolog = this.visit(ctx.prolog[0]); | |
} | |
if ( | |
ctx.element !== undefined && | |
isEmpty(ctx.element[0].children) === false | |
) { | |
astNode.rootElement = this.visit(ctx.element[0]); | |
} | |
setChildrenParent(astNode); | |
return astNode; | |
} | |
/** | |
* @param ctx {PrologCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
*/ | |
prolog(ctx, { location }) { | |
const astNode = { | |
type: "XMLProlog", | |
attributes: [], | |
position: location, | |
}; | |
if (ctx.attribute !== undefined) { | |
astNode.attributes = map(ctx.attribute, (_) => | |
this.visit(_, { isPrologParent: true }) | |
); | |
} | |
setChildrenParent(astNode); | |
return astNode; | |
} | |
/** | |
* @param {docTypeDeclCtx} ctx | |
*/ | |
/* istanbul ignore next - place holder*/ | |
docTypeDecl(ctx, astNode) {} | |
/** | |
* @param {ExternalIDCtx} ctx | |
*/ | |
/* istanbul ignore next - place holder*/ | |
externalID(ctx, astNode) {} | |
/** | |
* @param ctx {ContentCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
* | |
* @return {{elements, textContents}} | |
*/ | |
content(ctx, { location }) { | |
let elements = []; | |
let textContents = []; | |
if (ctx.element !== undefined) { | |
elements = map(ctx.element, this.visit.bind(this)); | |
} | |
if (ctx.chardata !== undefined) { | |
textContents = map(ctx.chardata, this.visit.bind(this)); | |
} | |
return { elements, textContents }; | |
} | |
/** | |
* @param ctx {ElementCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
*/ | |
element(ctx, { location }) { | |
const astNode = { | |
type: "XMLElement", | |
// Avoid Accidental Keys in this map | |
namespaces: Object.create(null), | |
name: invalidSyntax, | |
attributes: [], | |
subElements: [], | |
textContents: [], | |
position: location, | |
syntax: {}, | |
}; | |
if (ctx.attribute !== undefined) { | |
astNode.attributes = map(ctx.attribute, this.visit.bind(this)); | |
} | |
if (ctx.content !== undefined) { | |
const { elements, textContents } = this.visit(ctx.content[0]); | |
astNode.subElements = elements; | |
astNode.textContents = textContents; | |
} | |
handleElementOpenCloseNameRanges(astNode, ctx); | |
handleElementOpenCloseBodyRanges(astNode, ctx); | |
handleElementAttributeRanges(astNode, ctx, this.tokenVector); | |
setChildrenParent(astNode); | |
return astNode; | |
} | |
/** | |
* @param ctx {ReferenceCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
*/ | |
/* istanbul ignore next - place holder*/ | |
reference(ctx, { location }) { | |
// Irrelevant for the AST at this time | |
} | |
/** | |
* @param ctx {AttributeCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
* @param opts.isPrologParent {boolean} | |
*/ | |
attribute(ctx, { location, isPrologParent }) { | |
const astNode = { | |
type: isPrologParent ? "XMLPrologAttribute" : "XMLAttribute", | |
position: location, | |
key: invalidSyntax, | |
value: invalidSyntax, | |
syntax: {}, | |
}; | |
/* istanbul ignore else - Defensive Coding, not actually possible else branch */ | |
if (ctx.Name !== undefined && ctx.Name[0].isInsertedInRecovery !== true) { | |
const keyToken = ctx.Name[0]; | |
astNode.key = keyToken.image; | |
astNode.syntax.key = toXMLToken(keyToken); | |
} | |
if ( | |
ctx.STRING !== undefined && | |
ctx.STRING[0].isInsertedInRecovery !== true | |
) { | |
const valueToken = ctx.STRING[0]; | |
astNode.value = stripQuotes(valueToken.image); | |
astNode.syntax.value = toXMLToken(valueToken); | |
} | |
setChildrenParent(astNode); | |
return astNode; | |
} | |
/** | |
* @param ctx {ChardataCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
*/ | |
chardata(ctx, { location }) { | |
const astNode = { | |
type: "XMLTextContent", | |
position: location, | |
text: invalidSyntax, | |
}; | |
let allTokens = []; | |
if (ctx.SEA_WS !== undefined) { | |
allTokens = allTokens.concat(ctx.SEA_WS); | |
} | |
if (ctx.TEXT !== undefined) { | |
allTokens = allTokens.concat(ctx.TEXT); | |
} | |
const sortedTokens = sortBy(allTokens, ["startOffset"]); | |
const fullText = map(sortedTokens, "image").join(""); | |
astNode.text = fullText; | |
return astNode; | |
} | |
/** | |
* @param ctx {MiscCtx} | |
* @param opts {Object} | |
* @param opts.location {SourcePosition} | |
*/ | |
/* istanbul ignore next - place holder*/ | |
misc(ctx, { location }) { | |
// Irrelevant for the AST at this time | |
} | |
} | |
const AstBuilder = new CstToAstVisitor(); | |
function setChildrenParent(astParent) { | |
const astChildren = getAstChildrenReflective(astParent); | |
forEach(astChildren, (child) => (child.parent = astParent)); | |
} | |
/** | |
* @param {XMLElement} element | |
* @param {Record<Prefix, Uri>} prevNamespaces | |
*/ | |
function updateNamespaces(element, prevNamespaces = []) { | |
const currElemNamespaces = reduce( | |
element.attributes, | |
(result, attrib) => { | |
/* istanbul ignore else - Defensive Coding, not actually possible branch */ | |
if (attrib.key !== invalidSyntax) { | |
if ( | |
isXMLNamespaceKey({ key: attrib.key, includeEmptyPrefix: false }) === | |
true | |
) { | |
const prefix = getXMLNamespaceKeyPrefix(attrib.key); | |
// TODO: Support un-defining namespaces (including the default one) | |
if (attrib.value) { | |
const uri = attrib.value; | |
if (prefix !== "") { | |
result[prefix] = uri; | |
} else { | |
// default namespace | |
result[DEFAULT_NS] = uri; | |
} | |
} | |
} | |
} | |
return result; | |
}, | |
{} | |
); | |
const emptyMap = Object.create(null); | |
// "newer" (closer scope) namespaces definitions will overwrite "older" ones. | |
element.namespaces = assign(emptyMap, prevNamespaces, currElemNamespaces); | |
forEach(element.subElements, (subElem) => | |
updateNamespaces(subElem, element.namespaces) | |
); | |
} | |
/** | |
* @param {chevrotain.IToken} token | |
*/ | |
function toXMLToken(token) { | |
return pick(token, [ | |
"image", | |
"startOffset", | |
"endOffset", | |
"startLine", | |
"endLine", | |
"startColumn", | |
"endColumn", | |
]); | |
} | |
function startOfXMLToken(token) { | |
return pick(token, ["startOffset", "startLine", "startColumn"]); | |
} | |
function endOfXMLToken(token) { | |
return pick(token, ["endOffset", "endLine", "endColumn"]); | |
} | |
function exists(tokArr) { | |
return ( | |
isArray(tokArr) && | |
tokArr.length === 1 && | |
tokArr[0].isInsertedInRecovery !== true | |
); | |
} | |
function stripQuotes(quotedText) { | |
return quotedText.substring(1, quotedText.length - 1); | |
} | |
/** | |
* @param {string} text | |
*/ | |
function nsToParts(text) { | |
const matchResult = /^([^:]+):([^:]+)$/.exec(text); | |
if (matchResult === null) { | |
return null; | |
} | |
const ns = matchResult[1]; | |
const name = matchResult[2]; | |
return { ns, name }; | |
} | |
/** | |
* @type {InvalidSyntax} | |
*/ | |
const invalidSyntax = null; | |
/** | |
* @param {XMLElement} astNode | |
* @param {ElementCtx} ctx | |
*/ | |
function handleElementOpenCloseNameRanges(astNode, ctx) { | |
if (ctx.Name !== undefined && ctx.Name[0].isInsertedInRecovery !== true) { | |
const openNameToken = ctx.Name[0]; | |
astNode.syntax.openName = toXMLToken(openNameToken); | |
const nsParts = nsToParts(openNameToken.image); | |
if (nsParts !== null) { | |
astNode.ns = nsParts.ns; | |
astNode.name = nsParts.name; | |
} else { | |
astNode.name = openNameToken.image; | |
} | |
} | |
if ( | |
ctx.END_NAME !== undefined && | |
ctx.END_NAME[0].isInsertedInRecovery !== true | |
) { | |
astNode.syntax.closeName = toXMLToken(ctx.END_NAME[0]); | |
} | |
} | |
/** | |
* @param {XMLElement} astNode | |
* @param {ElementCtx} ctx | |
*/ | |
function handleElementOpenCloseBodyRanges(astNode, ctx) { | |
/* istanbul ignore else - Defensive Coding */ | |
if (exists(ctx.OPEN)) { | |
let openBodyCloseTok = undefined; | |
/* istanbul ignore else - Defensive Coding */ | |
if (exists(ctx.START_CLOSE)) { | |
openBodyCloseTok = ctx.START_CLOSE[0]; | |
astNode.syntax.isSelfClosing = false; | |
} else if (exists(ctx.SLASH_CLOSE)) { | |
openBodyCloseTok = ctx.SLASH_CLOSE[0]; | |
astNode.syntax.isSelfClosing = true; | |
} | |
if (openBodyCloseTok !== undefined) { | |
astNode.syntax.openBody = { | |
...startOfXMLToken(ctx.OPEN[0]), | |
...endOfXMLToken(openBodyCloseTok), | |
}; | |
} | |
if (exists(ctx.SLASH_OPEN) && exists(ctx.END)) { | |
astNode.syntax.closeBody = { | |
...startOfXMLToken(ctx.SLASH_OPEN[0]), | |
...endOfXMLToken(ctx.END[0]), | |
}; | |
} | |
} | |
} | |
/** | |
* @param {XMLElement} astNode | |
* @param {ElementCtx} ctx | |
* @param {IToken[]} tokenVector | |
*/ | |
function handleElementAttributeRanges(astNode, ctx, tokenVector) { | |
if (exists(ctx.Name)) { | |
const startOffset = ctx.Name[0].endOffset + 2; | |
// Valid `attributesRange` exists | |
if (exists(ctx.START_CLOSE) || exists(ctx.SLASH_CLOSE)) { | |
const endOffset = | |
(exists(ctx.START_CLOSE) | |
? ctx.START_CLOSE[0].startOffset | |
: ctx.SLASH_CLOSE[0].startOffset) - 1; | |
astNode.syntax.attributesRange = { startOffset, endOffset }; | |
} | |
// Have to scan-ahead and guess where the attributes range ends | |
else { | |
const hasAttributes = isArray(ctx.attribute); | |
const lastKnownAttribRangeTokenEnd = hasAttributes | |
? last(ctx.attribute).location.endOffset | |
: ctx.Name[0].endOffset; | |
const nextTextualToken = findNextTextualToken( | |
tokenVector, | |
lastKnownAttribRangeTokenEnd | |
); | |
if (nextTextualToken !== null) { | |
astNode.syntax.guessedAttributesRange = { | |
startOffset, | |
endOffset: nextTextualToken.endOffset - 1, | |
}; | |
} | |
} | |
} | |
} | |
module.exports = { | |
buildAst: buildAst, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/constants.js": | |
/*!*******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/constants.js ***! | |
\*******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module.exports = { | |
DEFAULT_NS: "::DEFAULT", | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/utils.js": | |
/*!***************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/utils.js ***! | |
\***************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { values, reduce, has, isArray } = __webpack_require__(/*! lodash */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/lodash.js"); | |
function getAstChildrenReflective(astParent) { | |
const astChildren = reduce( | |
astParent, | |
(result, prop, name) => { | |
if (name === "parent") { | |
// parent property is never a child... | |
} else if (has(prop, "type")) { | |
result.push(prop); | |
} else if (isArray(prop) && prop.length > 0 && has(prop[0], "type")) { | |
result = result.concat(prop); | |
} | |
return result; | |
}, | |
[] | |
); | |
return astChildren; | |
} | |
module.exports = { | |
getAstChildrenReflective: getAstChildrenReflective, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/visit-ast.js": | |
/*!*******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/visit-ast.js ***! | |
\*******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { forEach, isFunction } = __webpack_require__(/*! lodash */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/lodash.js"); | |
const { getAstChildrenReflective } = __webpack_require__(/*! ./utils */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/ast/lib/utils.js"); | |
/** | |
* @param {XMLAstNode} node | |
* @param {XMLAstVisitor} visitor | |
* | |
* @returns {void} | |
*/ | |
function accept(node, visitor) { | |
switch (node.type) { | |
case "XMLDocument": { | |
if (isFunction(visitor.visitXMLDocument)) { | |
visitor.visitXMLDocument(node); | |
} | |
break; | |
} | |
case "XMLProlog": { | |
if (isFunction(visitor.visitXMLProlog)) { | |
visitor.visitXMLProlog(node); | |
} | |
break; | |
} | |
case "XMLPrologAttribute": { | |
if (isFunction(visitor.visitXMLPrologAttribute)) { | |
visitor.visitXMLPrologAttribute(node); | |
} | |
break; | |
} | |
case "XMLElement": { | |
if (isFunction(visitor.visitXMLElement)) { | |
visitor.visitXMLElement(node); | |
} | |
break; | |
} | |
case "XMLAttribute": { | |
if (isFunction(visitor.visitXMLAttribute)) { | |
visitor.visitXMLAttribute(node); | |
} | |
break; | |
} | |
case "XMLTextContent": { | |
if (isFunction(visitor.visitXMLTextContent)) { | |
visitor.visitXMLTextContent(node); | |
} | |
break; | |
} | |
/* istanbul ignore next defensive programming */ | |
default: | |
throw Error("None Exhaustive Match"); | |
} | |
const astChildren = getAstChildrenReflective(node); | |
forEach(astChildren, (childNode) => { | |
accept(childNode, visitor); | |
}); | |
} | |
module.exports = { | |
accept: accept, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/api.js": | |
/*!****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/api.js ***! | |
\****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { findNextTextualToken } = __webpack_require__(/*! ./find-next-textual-token */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/find-next-textual-token.js"); | |
const { | |
isXMLNamespaceKey, | |
getXMLNamespaceKeyPrefix, | |
} = __webpack_require__(/*! ./xml-ns-key.js */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/xml-ns-key.js"); | |
module.exports = { | |
findNextTextualToken: findNextTextualToken, | |
isXMLNamespaceKey: isXMLNamespaceKey, | |
getXMLNamespaceKeyPrefix: getXMLNamespaceKeyPrefix, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/find-next-textual-token.js": | |
/*!************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/find-next-textual-token.js ***! | |
\************************************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { findIndex } = __webpack_require__(/*! lodash */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/lodash.js"); | |
function findNextTextualToken(tokenVector, prevTokenEndOffset) { | |
// The TokenVector is sorted, so we could use a BinarySearch to optimize performance | |
const prevTokenIdx = findIndex( | |
tokenVector, | |
(tok) => tok.endOffset === prevTokenEndOffset | |
); | |
let nextTokenIdx = prevTokenIdx; | |
let found = false; | |
while (found === false) { | |
nextTokenIdx++; | |
const nextPossibleToken = tokenVector[nextTokenIdx]; | |
// No Next textualToken | |
if (nextPossibleToken === undefined) { | |
return null; | |
} | |
/* istanbul ignore next | |
* I don't think this scenario can be created, however defensive coding never killed anyone... | |
* Basically SEA_WS can only only appear in "OUTSIDE" mode, and we need a CLOSE/SLASH_CLOSE to get back to outside | |
* mode, however if we had those this function would never have been called... | |
*/ | |
if (nextPossibleToken.tokenType.name === "SEA_WS") { | |
// skip pure WS tokens as they do not contain any actual text | |
} else { | |
return nextPossibleToken; | |
} | |
} | |
} | |
module.exports = { | |
findNextTextualToken: findNextTextualToken, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/xml-ns-key.js": | |
/*!***********************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/common/lib/xml-ns-key.js ***! | |
\***********************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
// The xml parser takes care of validating the attribute name. | |
// If the user started the attribute name with "xmlns:" we can assume that | |
// they meant for it to be an xml namespace attribute. | |
// xmlns attributes explicitly can't contain ":" after the "xmlns:" part. | |
const namespaceRegex = /^xmlns(?<prefixWithColon>:(?<prefix>[^:]*))?$/; | |
/** | |
* See comment in api.d.ts. | |
* | |
* @param {string} key | |
* @param {boolean} includeEmptyPrefix | |
* @returns {boolean} | |
*/ | |
function isXMLNamespaceKey({ key, includeEmptyPrefix }) { | |
if (typeof key !== "string") { | |
return false; | |
} | |
const matchArr = key.match(namespaceRegex); | |
// No match - this is not an xmlns key | |
if (matchArr === null) { | |
return false; | |
} | |
return !!( | |
includeEmptyPrefix === true || | |
// "xmlns" case | |
!matchArr.groups.prefixWithColon || | |
// "xmlns:<prefix>" case | |
matchArr.groups.prefix | |
); | |
} | |
/** | |
* See comment in api.d.ts. | |
* | |
* @param {string} key | |
* @returns {string|undefined} | |
*/ | |
function getXMLNamespaceKeyPrefix(key) { | |
if (typeof key !== "string") { | |
return undefined; | |
} | |
const matchArr = key.match(namespaceRegex); | |
if (matchArr === null) { | |
return undefined; | |
} | |
return (matchArr.groups && matchArr.groups.prefix) || ""; | |
} | |
module.exports = { | |
isXMLNamespaceKey: isXMLNamespaceKey, | |
getXMLNamespaceKeyPrefix: getXMLNamespaceKeyPrefix, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/api.js": | |
/*!****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/api.js ***! | |
\****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { xmlLexer } = __webpack_require__(/*! ./lexer */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/lexer.js"); | |
const { xmlParser } = __webpack_require__(/*! ./parser */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/parser.js"); | |
module.exports = { | |
parse: function parse(text) { | |
const lexResult = xmlLexer.tokenize(text); | |
// setting a new input will RESET the parser instance's state. | |
xmlParser.input = lexResult.tokens; | |
// any top level rule may be used as an entry point | |
const cst = xmlParser.document(); | |
return { | |
cst: cst, | |
tokenVector: lexResult.tokens, | |
lexErrors: lexResult.errors, | |
parseErrors: xmlParser.errors, | |
}; | |
}, | |
BaseXmlCstVisitor: xmlParser.getBaseCstVisitorConstructor(), | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/lexer.js": | |
/*!******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/lexer.js ***! | |
\******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { createToken: createTokenOrg, Lexer } = __webpack_require__(/*! chevrotain */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/api.js"); | |
// A little mini DSL for easier lexer definition. | |
const fragments = {}; | |
const f = fragments; | |
function FRAGMENT(name, def) { | |
fragments[name] = typeof def === "string" ? def : def.source; | |
} | |
function makePattern(strings, ...args) { | |
let combined = ""; | |
for (let i = 0; i < strings.length; i++) { | |
combined += strings[i]; | |
if (i < args.length) { | |
let pattern = args[i]; | |
// By wrapping in a RegExp (none) capturing group | |
// We enabled the safe usage of qualifiers and assertions. | |
combined += `(?:${pattern})`; | |
} | |
} | |
return new RegExp(combined); | |
} | |
const tokensArray = []; | |
const tokensDictionary = {}; | |
function createToken(options) { | |
const newTokenType = createTokenOrg(options); | |
tokensArray.push(newTokenType); | |
tokensDictionary[options.name] = newTokenType; | |
return newTokenType; | |
} | |
FRAGMENT( | |
"NameStartChar", | |
"(:|[a-zA-Z]|_|\\u2070-\\u218F|\\u2C00-\\u2FEF|\\u3001-\\uD7FF|\\uF900-\\uFDCF|\\uFDF0-\\uFFFD)" | |
); | |
FRAGMENT( | |
"NameChar", | |
makePattern`${f.NameStartChar}|-|\\.|\\d|\\u00B7||[\\u0300-\\u036F]|[\\u203F-\\u2040]` | |
); | |
FRAGMENT("Name", makePattern`${f.NameStartChar}(${f.NameChar})*`); | |
const Comment = createToken({ | |
name: "Comment", | |
pattern: /<!--(.|\r?\n)*?-->/, | |
// A Comment may span multiple lines. | |
line_breaks: true, | |
}); | |
const CData = createToken({ | |
name: "CData", | |
pattern: /<!\[CDATA\[(.|\r?\n)*?]]>/, | |
line_breaks: true, | |
}); | |
const DocType = createToken({ | |
name: "DocType", | |
pattern: /<!DOCTYPE/, | |
push_mode: "INSIDE", | |
}); | |
const IgnoredDTD = createToken({ | |
name: "DTD", | |
pattern: /<!.*?>/, | |
group: Lexer.SKIPPED, | |
}); | |
const EntityRef = createToken({ | |
name: "EntityRef", | |
pattern: makePattern`&${f.Name};`, | |
}); | |
const CharRef = createToken({ | |
name: "CharRef", | |
pattern: /&#\d+;|&#x[a-fA-F0-9]/, | |
}); | |
const SEA_WS = createToken({ | |
name: "SEA_WS", | |
pattern: /( |\t|\n|\r\n)+/, | |
}); | |
const XMLDeclOpen = createToken({ | |
name: "XMLDeclOpen", | |
pattern: /<\?xml[ \t\r\n]/, | |
push_mode: "INSIDE", | |
}); | |
const SLASH_OPEN = createToken({ | |
name: "SLASH_OPEN", | |
pattern: /<\//, | |
push_mode: "INSIDE", | |
}); | |
const INVALID_SLASH_OPEN = createToken({ | |
name: "INVALID_SLASH_OPEN", | |
pattern: /<\//, | |
categories: [SLASH_OPEN], | |
}); | |
const PROCESSING_INSTRUCTION = createToken({ | |
name: "PROCESSING_INSTRUCTION", | |
pattern: makePattern`<\\?${f.Name}.*\\?>`, | |
}); | |
const OPEN = createToken({ name: "OPEN", pattern: /</, push_mode: "INSIDE" }); | |
// Meant to avoid skipping '<' token in a partial sequence of elements. | |
// Example of the problem this solves: | |
// < | |
// <from>john</from> | |
// - The second '<' will be skipped because in the mode "INSIDE" '<' is not recognized. | |
// - This means the AST will include only a single element instead of two | |
const INVALID_OPEN_INSIDE = createToken({ | |
name: "INVALID_OPEN_INSIDE", | |
pattern: /</, | |
categories: [OPEN], | |
}); | |
const TEXT = createToken({ name: "TEXT", pattern: /[^<&]+/ }); | |
const CLOSE = createToken({ name: "CLOSE", pattern: />/, pop_mode: true }); | |
const SPECIAL_CLOSE = createToken({ | |
name: "SPECIAL_CLOSE", | |
pattern: /\?>/, | |
pop_mode: true, | |
}); | |
const SLASH_CLOSE = createToken({ | |
name: "SLASH_CLOSE", | |
pattern: /\/>/, | |
pop_mode: true, | |
}); | |
const SLASH = createToken({ name: "SLASH", pattern: /\// }); | |
const STRING = createToken({ | |
name: "STRING", | |
pattern: /"[^<"]*"|'[^<']*'/, | |
}); | |
const EQUALS = createToken({ name: "EQUALS", pattern: /=/ }); | |
const Name = createToken({ name: "Name", pattern: makePattern`${f.Name}` }); | |
const S = createToken({ | |
name: "S", | |
pattern: /[ \t\r\n]/, | |
group: Lexer.SKIPPED, | |
}); | |
const xmlLexerDefinition = { | |
defaultMode: "OUTSIDE", | |
modes: { | |
OUTSIDE: [ | |
Comment, | |
CData, | |
DocType, | |
IgnoredDTD, | |
EntityRef, | |
CharRef, | |
SEA_WS, | |
XMLDeclOpen, | |
SLASH_OPEN, | |
PROCESSING_INSTRUCTION, | |
OPEN, | |
TEXT, | |
], | |
INSIDE: [ | |
// Tokens from `OUTSIDE` to improve error recovery behavior | |
Comment, | |
INVALID_SLASH_OPEN, | |
INVALID_OPEN_INSIDE, | |
// "Real" `INSIDE` tokens | |
CLOSE, | |
SPECIAL_CLOSE, | |
SLASH_CLOSE, | |
SLASH, | |
EQUALS, | |
STRING, | |
Name, | |
S, | |
], | |
}, | |
}; | |
const xmlLexer = new Lexer(xmlLexerDefinition, { | |
// Reducing the amount of position tracking can provide a small performance boost (<10%) | |
// Likely best to keep the full info for better error position reporting and | |
// to expose "fuller" ITokens from the Lexer. | |
positionTracking: "full", | |
ensureOptimizations: false, | |
// TODO: inspect definitions for XML line terminators | |
lineTerminatorCharacters: ["\n"], | |
lineTerminatorsPattern: /\n|\r\n/g, | |
}); | |
module.exports = { | |
xmlLexer, | |
tokensDictionary, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/parser.js": | |
/*!*******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/parser.js ***! | |
\*******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
const { CstParser, tokenMatcher } = __webpack_require__(/*! chevrotain */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/api.js"); | |
const { tokensDictionary: t } = __webpack_require__(/*! ./lexer */ "../fabric8-analytics-lsp-server/output/node_modules/@xml-tools/parser/lib/lexer.js"); | |
class Parser extends CstParser { | |
constructor() { | |
super(t, { | |
maxLookahead: 1, | |
recoveryEnabled: true, | |
nodeLocationTracking: "full", | |
}); | |
this.deletionRecoveryEnabled = true; | |
const $ = this; | |
$.RULE("document", () => { | |
$.OPTION(() => { | |
$.SUBRULE($.prolog); | |
}); | |
$.MANY(() => { | |
$.SUBRULE($.misc); | |
}); | |
$.OPTION2(() => { | |
$.SUBRULE($.docTypeDecl); | |
}); | |
$.MANY2(() => { | |
$.SUBRULE2($.misc); | |
}); | |
$.SUBRULE($.element); | |
$.MANY3(() => { | |
$.SUBRULE3($.misc); | |
}); | |
}); | |
$.RULE("prolog", () => { | |
$.CONSUME(t.XMLDeclOpen); | |
$.MANY(() => { | |
$.SUBRULE($.attribute); | |
}); | |
$.CONSUME(t.SPECIAL_CLOSE); | |
}); | |
// https://www.w3.org/TR/xml/#NT-doctypedecl | |
$.RULE("docTypeDecl", () => { | |
$.CONSUME(t.DocType); | |
$.CONSUME(t.Name); | |
$.OPTION(() => { | |
$.SUBRULE($.externalID); | |
}); | |
// The internal subSet part is intentionally not implemented because we do not at this | |
// time wish to implement a full DTD Parser as part of this project... | |
// https://www.w3.org/TR/xml/#NT-intSubset | |
$.CONSUME(t.CLOSE); | |
}); | |
$.RULE("externalID", () => { | |
// Using gates to assert the value of the "Name" Identifiers. | |
// We could use Categories to model un-reserved keywords, however I am not sure | |
// The added complexity is needed at this time... | |
$.OR([ | |
{ | |
GATE: () => $.LA(1).image === "SYSTEM", | |
ALT: () => { | |
$.CONSUME2(t.Name, { LABEL: "System" }); | |
$.CONSUME(t.STRING, { LABEL: "SystemLiteral" }); | |
}, | |
}, | |
{ | |
GATE: () => $.LA(1).image === "PUBLIC", | |
ALT: () => { | |
$.CONSUME3(t.Name, { LABEL: "Public" }); | |
$.CONSUME2(t.STRING, { LABEL: "PubIDLiteral" }); | |
$.CONSUME3(t.STRING, { LABEL: "SystemLiteral" }); | |
}, | |
}, | |
]); | |
}); | |
$.RULE("content", () => { | |
$.MANY(() => { | |
$.OR([ | |
{ ALT: () => $.SUBRULE($.element) }, | |
{ ALT: () => $.SUBRULE($.chardata) }, | |
{ ALT: () => $.SUBRULE($.reference) }, | |
{ ALT: () => $.CONSUME(t.CData) }, | |
{ ALT: () => $.CONSUME(t.PROCESSING_INSTRUCTION) }, | |
{ ALT: () => $.CONSUME(t.Comment) }, | |
]); | |
}); | |
}); | |
$.RULE("element", () => { | |
$.CONSUME(t.OPEN); | |
try { | |
this.deletionRecoveryEnabled = false; | |
// disabling single token deletion here | |
// because `< | |
// </note>` | |
// will be parsed as: `<note>` | |
// and the next element will be lost | |
$.CONSUME(t.Name); | |
} finally { | |
this.deletionRecoveryEnabled = true; | |
} | |
$.MANY(() => { | |
$.SUBRULE($.attribute); | |
}); | |
$.OR([ | |
{ | |
ALT: () => { | |
$.CONSUME(t.CLOSE, { LABEL: "START_CLOSE" }); | |
$.SUBRULE($.content); | |
$.CONSUME(t.SLASH_OPEN); | |
$.CONSUME2(t.Name, { LABEL: "END_NAME" }); | |
$.CONSUME2(t.CLOSE, { LABEL: "END" }); | |
}, | |
}, | |
{ | |
ALT: () => { | |
$.CONSUME(t.SLASH_CLOSE); | |
}, | |
}, | |
]); | |
}); | |
$.RULE("reference", () => { | |
$.OR([ | |
{ ALT: () => $.CONSUME(t.EntityRef) }, | |
{ ALT: () => $.CONSUME(t.CharRef) }, | |
]); | |
}); | |
$.RULE("attribute", () => { | |
$.CONSUME(t.Name); | |
try { | |
this.deletionRecoveryEnabled = false; | |
// disabling single token deletion here | |
// because `attrib1 attrib2="666` | |
// will be parsed as: `attrib1="666` | |
$.CONSUME(t.EQUALS); | |
// disabling single token deletion here | |
// to avoid new elementName being | |
$.CONSUME(t.STRING); | |
} finally { | |
this.deletionRecoveryEnabled = true; | |
} | |
}); | |
$.RULE("chardata", () => { | |
$.OR([ | |
{ ALT: () => $.CONSUME(t.TEXT) }, | |
{ ALT: () => $.CONSUME(t.SEA_WS) }, | |
]); | |
}); | |
$.RULE("misc", () => { | |
$.OR([ | |
{ ALT: () => $.CONSUME(t.Comment) }, | |
{ ALT: () => $.CONSUME(t.PROCESSING_INSTRUCTION) }, | |
{ ALT: () => $.CONSUME(t.SEA_WS) }, | |
]); | |
}); | |
this.performSelfAnalysis(); | |
} | |
canRecoverWithSingleTokenDeletion(expectedTokType) { | |
if (this.deletionRecoveryEnabled === false) { | |
return false; | |
} | |
return super.canRecoverWithSingleTokenDeletion(expectedTokType); | |
} | |
// TODO: provide this fix upstream to chevrotain | |
// https://github.com/SAP/chevrotain/issues/1055 | |
/* istanbul ignore next - should be tested as part of Chevrotain */ | |
findReSyncTokenType() { | |
var allPossibleReSyncTokTypes = this.flattenFollowSet(); | |
// this loop will always terminate as EOF is always in the follow stack and also always (virtually) in the input | |
let nextToken = this.LA(1); | |
let k = 2; | |
while (true) { | |
const foundMatch = allPossibleReSyncTokTypes.find((resyncTokType) => { | |
const canMatch = tokenMatcher(nextToken, resyncTokType); | |
return canMatch; | |
}); | |
if (foundMatch !== undefined) { | |
return foundMatch; | |
} | |
nextToken = this.LA(k); | |
k++; | |
} | |
} | |
} | |
// Re-use the same parser instance | |
const xmlParser = new Parser(); | |
module.exports = { | |
xmlParser, | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/asyncify.js": | |
/*!*****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/asyncify.js ***! | |
\*****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = asyncify; | |
var _isObject = __webpack_require__(/*! lodash/isObject */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isObject.js"); | |
var _isObject2 = _interopRequireDefault(_isObject); | |
var _initialParams = __webpack_require__(/*! ./internal/initialParams */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/initialParams.js"); | |
var _initialParams2 = _interopRequireDefault(_initialParams); | |
var _setImmediate = __webpack_require__(/*! ./internal/setImmediate */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/setImmediate.js"); | |
var _setImmediate2 = _interopRequireDefault(_setImmediate); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Take a sync function and make it async, passing its return value to a | |
* callback. This is useful for plugging sync functions into a waterfall, | |
* series, or other async functions. Any arguments passed to the generated | |
* function will be passed to the wrapped function (except for the final | |
* callback argument). Errors thrown will be passed to the callback. | |
* | |
* If the function passed to `asyncify` returns a Promise, that promises's | |
* resolved/rejected state will be used to call the callback, rather than simply | |
* the synchronous return value. | |
* | |
* This also means you can asyncify ES2017 `async` functions. | |
* | |
* @name asyncify | |
* @static | |
* @memberOf module:Utils | |
* @method | |
* @alias wrapSync | |
* @category Util | |
* @param {Function} func - The synchronous function, or Promise-returning | |
* function to convert to an {@link AsyncFunction}. | |
* @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be | |
* invoked with `(args..., callback)`. | |
* @example | |
* | |
* // passing a regular synchronous function | |
* async.waterfall([ | |
* async.apply(fs.readFile, filename, "utf8"), | |
* async.asyncify(JSON.parse), | |
* function (data, next) { | |
* // data is the result of parsing the text. | |
* // If there was a parsing error, it would have been caught. | |
* } | |
* ], callback); | |
* | |
* // passing a function returning a promise | |
* async.waterfall([ | |
* async.apply(fs.readFile, filename, "utf8"), | |
* async.asyncify(function (contents) { | |
* return db.model.create(contents); | |
* }), | |
* function (model, next) { | |
* // `model` is the instantiated model object. | |
* // If there was an error, this function would be skipped. | |
* } | |
* ], callback); | |
* | |
* // es2017 example, though `asyncify` is not needed if your JS environment | |
* // supports async functions out of the box | |
* var q = async.queue(async.asyncify(async function(file) { | |
* var intermediateStep = await processFile(file); | |
* return await somePromise(intermediateStep) | |
* })); | |
* | |
* q.push(files); | |
*/ | |
function asyncify(func) { | |
return (0, _initialParams2.default)(function (args, callback) { | |
var result; | |
try { | |
result = func.apply(this, args); | |
} catch (e) { | |
return callback(e); | |
} | |
// if result is Promise object | |
if ((0, _isObject2.default)(result) && typeof result.then === 'function') { | |
result.then(function (value) { | |
invokeCallback(callback, null, value); | |
}, function (err) { | |
invokeCallback(callback, err.message ? err : new Error(err)); | |
}); | |
} else { | |
callback(null, result); | |
} | |
}); | |
} | |
function invokeCallback(callback, error, value) { | |
try { | |
callback(error, value); | |
} catch (e) { | |
(0, _setImmediate2.default)(rethrow, e); | |
} | |
} | |
function rethrow(error) { | |
throw error; | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOf.js": | |
/*!***************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/eachOf.js ***! | |
\***************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = function (coll, iteratee, callback) { | |
var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; | |
eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); | |
}; | |
var _isArrayLike = __webpack_require__(/*! lodash/isArrayLike */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isArrayLike.js"); | |
var _isArrayLike2 = _interopRequireDefault(_isArrayLike); | |
var _breakLoop = __webpack_require__(/*! ./internal/breakLoop */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/breakLoop.js"); | |
var _breakLoop2 = _interopRequireDefault(_breakLoop); | |
var _eachOfLimit = __webpack_require__(/*! ./eachOfLimit */ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOfLimit.js"); | |
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); | |
var _doLimit = __webpack_require__(/*! ./internal/doLimit */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/doLimit.js"); | |
var _doLimit2 = _interopRequireDefault(_doLimit); | |
var _noop = __webpack_require__(/*! lodash/noop */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/noop.js"); | |
var _noop2 = _interopRequireDefault(_noop); | |
var _once = __webpack_require__(/*! ./internal/once */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/once.js"); | |
var _once2 = _interopRequireDefault(_once); | |
var _onlyOnce = __webpack_require__(/*! ./internal/onlyOnce */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/onlyOnce.js"); | |
var _onlyOnce2 = _interopRequireDefault(_onlyOnce); | |
var _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js"); | |
var _wrapAsync2 = _interopRequireDefault(_wrapAsync); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
// eachOf implementation optimized for array-likes | |
function eachOfArrayLike(coll, iteratee, callback) { | |
callback = (0, _once2.default)(callback || _noop2.default); | |
var index = 0, | |
completed = 0, | |
length = coll.length; | |
if (length === 0) { | |
callback(null); | |
} | |
function iteratorCallback(err, value) { | |
if (err) { | |
callback(err); | |
} else if (++completed === length || value === _breakLoop2.default) { | |
callback(null); | |
} | |
} | |
for (; index < length; index++) { | |
iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); | |
} | |
} | |
// a generic version of eachOf which can handle array, object, and iterator cases. | |
var eachOfGeneric = (0, _doLimit2.default)(_eachOfLimit2.default, Infinity); | |
/** | |
* Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument | |
* to the iteratee. | |
* | |
* @name eachOf | |
* @static | |
* @memberOf module:Collections | |
* @method | |
* @alias forEachOf | |
* @category Collection | |
* @see [async.each]{@link module:Collections.each} | |
* @param {Array|Iterable|Object} coll - A collection to iterate over. | |
* @param {AsyncFunction} iteratee - A function to apply to each | |
* item in `coll`. | |
* The `key` is the item's key, or index in the case of an array. | |
* Invoked with (item, key, callback). | |
* @param {Function} [callback] - A callback which is called when all | |
* `iteratee` functions have finished, or an error occurs. Invoked with (err). | |
* @example | |
* | |
* var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; | |
* var configs = {}; | |
* | |
* async.forEachOf(obj, function (value, key, callback) { | |
* fs.readFile(__dirname + value, "utf8", function (err, data) { | |
* if (err) return callback(err); | |
* try { | |
* configs[key] = JSON.parse(data); | |
* } catch (e) { | |
* return callback(e); | |
* } | |
* callback(); | |
* }); | |
* }, function (err) { | |
* if (err) console.error(err.message); | |
* // configs is now a map of JSON data | |
* doSomethingWith(configs); | |
* }); | |
*/ | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOfLimit.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/eachOfLimit.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = eachOfLimit; | |
var _eachOfLimit2 = __webpack_require__(/*! ./internal/eachOfLimit */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/eachOfLimit.js"); | |
var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); | |
var _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js"); | |
var _wrapAsync2 = _interopRequireDefault(_wrapAsync); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a | |
* time. | |
* | |
* @name eachOfLimit | |
* @static | |
* @memberOf module:Collections | |
* @method | |
* @see [async.eachOf]{@link module:Collections.eachOf} | |
* @alias forEachOfLimit | |
* @category Collection | |
* @param {Array|Iterable|Object} coll - A collection to iterate over. | |
* @param {number} limit - The maximum number of async operations at a time. | |
* @param {AsyncFunction} iteratee - An async function to apply to each | |
* item in `coll`. The `key` is the item's key, or index in the case of an | |
* array. | |
* Invoked with (item, key, callback). | |
* @param {Function} [callback] - A callback which is called when all | |
* `iteratee` functions have finished, or an error occurs. Invoked with (err). | |
*/ | |
function eachOfLimit(coll, limit, iteratee, callback) { | |
(0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOfSeries.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/eachOfSeries.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _eachOfLimit = __webpack_require__(/*! ./eachOfLimit */ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOfLimit.js"); | |
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); | |
var _doLimit = __webpack_require__(/*! ./internal/doLimit */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/doLimit.js"); | |
var _doLimit2 = _interopRequireDefault(_doLimit); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. | |
* | |
* @name eachOfSeries | |
* @static | |
* @memberOf module:Collections | |
* @method | |
* @see [async.eachOf]{@link module:Collections.eachOf} | |
* @alias forEachOfSeries | |
* @category Collection | |
* @param {Array|Iterable|Object} coll - A collection to iterate over. | |
* @param {AsyncFunction} iteratee - An async function to apply to each item in | |
* `coll`. | |
* Invoked with (item, key, callback). | |
* @param {Function} [callback] - A callback which is called when all `iteratee` | |
* functions have finished, or an error occurs. Invoked with (err). | |
*/ | |
exports.default = (0, _doLimit2.default)(_eachOfLimit2.default, 1); | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/forEach.js": | |
/*!****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/forEach.js ***! | |
\****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = eachLimit; | |
var _eachOf = __webpack_require__(/*! ./eachOf */ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOf.js"); | |
var _eachOf2 = _interopRequireDefault(_eachOf); | |
var _withoutIndex = __webpack_require__(/*! ./internal/withoutIndex */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/withoutIndex.js"); | |
var _withoutIndex2 = _interopRequireDefault(_withoutIndex); | |
var _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js"); | |
var _wrapAsync2 = _interopRequireDefault(_wrapAsync); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Applies the function `iteratee` to each item in `coll`, in parallel. | |
* The `iteratee` is called with an item from the list, and a callback for when | |
* it has finished. If the `iteratee` passes an error to its `callback`, the | |
* main `callback` (for the `each` function) is immediately called with the | |
* error. | |
* | |
* Note, that since this function applies `iteratee` to each item in parallel, | |
* there is no guarantee that the iteratee functions will complete in order. | |
* | |
* @name each | |
* @static | |
* @memberOf module:Collections | |
* @method | |
* @alias forEach | |
* @category Collection | |
* @param {Array|Iterable|Object} coll - A collection to iterate over. | |
* @param {AsyncFunction} iteratee - An async function to apply to | |
* each item in `coll`. Invoked with (item, callback). | |
* The array index is not passed to the iteratee. | |
* If you need the index, use `eachOf`. | |
* @param {Function} [callback] - A callback which is called when all | |
* `iteratee` functions have finished, or an error occurs. Invoked with (err). | |
* @example | |
* | |
* // assuming openFiles is an array of file names and saveFile is a function | |
* // to save the modified contents of that file: | |
* | |
* async.each(openFiles, saveFile, function(err){ | |
* // if any of the saves produced an error, err would equal that error | |
* }); | |
* | |
* // assuming openFiles is an array of file names | |
* async.each(openFiles, function(file, callback) { | |
* | |
* // Perform operation on file here. | |
* console.log('Processing file ' + file); | |
* | |
* if( file.length > 32 ) { | |
* console.log('This file name is too long'); | |
* callback('File name too long'); | |
* } else { | |
* // Do work to process file here | |
* console.log('File processed'); | |
* callback(); | |
* } | |
* }, function(err) { | |
* // if any of the file processing produced an error, err would equal that error | |
* if( err ) { | |
* // One of the iterations produced an error. | |
* // All processing will now stop. | |
* console.log('A file failed to process'); | |
* } else { | |
* console.log('All files have been processed successfully'); | |
* } | |
* }); | |
*/ | |
function eachLimit(coll, iteratee, callback) { | |
(0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/breakLoop.js": | |
/*!***************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/breakLoop.js ***! | |
\***************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
// A temporary value used to identify if the loop should be broken. | |
// See #1064, #1293 | |
exports.default = {}; | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/doLimit.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/doLimit.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = doLimit; | |
function doLimit(fn, limit) { | |
return function (iterable, iteratee, callback) { | |
return fn(iterable, limit, iteratee, callback); | |
}; | |
} | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/eachOfLimit.js": | |
/*!*****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/eachOfLimit.js ***! | |
\*****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = _eachOfLimit; | |
var _noop = __webpack_require__(/*! lodash/noop */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/noop.js"); | |
var _noop2 = _interopRequireDefault(_noop); | |
var _once = __webpack_require__(/*! ./once */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/once.js"); | |
var _once2 = _interopRequireDefault(_once); | |
var _iterator = __webpack_require__(/*! ./iterator */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/iterator.js"); | |
var _iterator2 = _interopRequireDefault(_iterator); | |
var _onlyOnce = __webpack_require__(/*! ./onlyOnce */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/onlyOnce.js"); | |
var _onlyOnce2 = _interopRequireDefault(_onlyOnce); | |
var _breakLoop = __webpack_require__(/*! ./breakLoop */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/breakLoop.js"); | |
var _breakLoop2 = _interopRequireDefault(_breakLoop); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _eachOfLimit(limit) { | |
return function (obj, iteratee, callback) { | |
callback = (0, _once2.default)(callback || _noop2.default); | |
if (limit <= 0 || !obj) { | |
return callback(null); | |
} | |
var nextElem = (0, _iterator2.default)(obj); | |
var done = false; | |
var running = 0; | |
var looping = false; | |
function iterateeCallback(err, value) { | |
running -= 1; | |
if (err) { | |
done = true; | |
callback(err); | |
} else if (value === _breakLoop2.default || done && running <= 0) { | |
done = true; | |
return callback(null); | |
} else if (!looping) { | |
replenish(); | |
} | |
} | |
function replenish() { | |
looping = true; | |
while (running < limit && !done) { | |
var elem = nextElem(); | |
if (elem === null) { | |
done = true; | |
if (running <= 0) { | |
callback(null); | |
} | |
return; | |
} | |
running += 1; | |
iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); | |
} | |
looping = false; | |
} | |
replenish(); | |
}; | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/getIterator.js": | |
/*!*****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/getIterator.js ***! | |
\*****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = function (coll) { | |
return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); | |
}; | |
var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/initialParams.js": | |
/*!*******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/initialParams.js ***! | |
\*******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = function (fn) { | |
return function () /*...args, callback*/{ | |
var args = (0, _slice2.default)(arguments); | |
var callback = args.pop(); | |
fn.call(this, args, callback); | |
}; | |
}; | |
var _slice = __webpack_require__(/*! ./slice */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/slice.js"); | |
var _slice2 = _interopRequireDefault(_slice); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/iterator.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/iterator.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = iterator; | |
var _isArrayLike = __webpack_require__(/*! lodash/isArrayLike */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isArrayLike.js"); | |
var _isArrayLike2 = _interopRequireDefault(_isArrayLike); | |
var _getIterator = __webpack_require__(/*! ./getIterator */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/getIterator.js"); | |
var _getIterator2 = _interopRequireDefault(_getIterator); | |
var _keys = __webpack_require__(/*! lodash/keys */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/keys.js"); | |
var _keys2 = _interopRequireDefault(_keys); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function createArrayIterator(coll) { | |
var i = -1; | |
var len = coll.length; | |
return function next() { | |
return ++i < len ? { value: coll[i], key: i } : null; | |
}; | |
} | |
function createES2015Iterator(iterator) { | |
var i = -1; | |
return function next() { | |
var item = iterator.next(); | |
if (item.done) return null; | |
i++; | |
return { value: item.value, key: i }; | |
}; | |
} | |
function createObjectIterator(obj) { | |
var okeys = (0, _keys2.default)(obj); | |
var i = -1; | |
var len = okeys.length; | |
return function next() { | |
var key = okeys[++i]; | |
return i < len ? { value: obj[key], key: key } : null; | |
}; | |
} | |
function iterator(coll) { | |
if ((0, _isArrayLike2.default)(coll)) { | |
return createArrayIterator(coll); | |
} | |
var iterator = (0, _getIterator2.default)(coll); | |
return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/once.js": | |
/*!**********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/once.js ***! | |
\**********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = once; | |
function once(fn) { | |
return function () { | |
if (fn === null) return; | |
var callFn = fn; | |
fn = null; | |
callFn.apply(this, arguments); | |
}; | |
} | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/onlyOnce.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/onlyOnce.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = onlyOnce; | |
function onlyOnce(fn) { | |
return function () { | |
if (fn === null) throw new Error("Callback was already called."); | |
var callFn = fn; | |
fn = null; | |
callFn.apply(this, arguments); | |
}; | |
} | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/parallel.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/parallel.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = _parallel; | |
var _noop = __webpack_require__(/*! lodash/noop */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/noop.js"); | |
var _noop2 = _interopRequireDefault(_noop); | |
var _isArrayLike = __webpack_require__(/*! lodash/isArrayLike */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isArrayLike.js"); | |
var _isArrayLike2 = _interopRequireDefault(_isArrayLike); | |
var _slice = __webpack_require__(/*! ./slice */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/slice.js"); | |
var _slice2 = _interopRequireDefault(_slice); | |
var _wrapAsync = __webpack_require__(/*! ./wrapAsync */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js"); | |
var _wrapAsync2 = _interopRequireDefault(_wrapAsync); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
function _parallel(eachfn, tasks, callback) { | |
callback = callback || _noop2.default; | |
var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; | |
eachfn(tasks, function (task, key, callback) { | |
(0, _wrapAsync2.default)(task)(function (err, result) { | |
if (arguments.length > 2) { | |
result = (0, _slice2.default)(arguments, 1); | |
} | |
results[key] = result; | |
callback(err); | |
}); | |
}, function (err) { | |
callback(err, results); | |
}); | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/setImmediate.js": | |
/*!******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/setImmediate.js ***! | |
\******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.hasNextTick = exports.hasSetImmediate = undefined; | |
exports.fallback = fallback; | |
exports.wrap = wrap; | |
var _slice = __webpack_require__(/*! ./slice */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/slice.js"); | |
var _slice2 = _interopRequireDefault(_slice); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; | |
var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; | |
function fallback(fn) { | |
setTimeout(fn, 0); | |
} | |
function wrap(defer) { | |
return function (fn /*, ...args*/) { | |
var args = (0, _slice2.default)(arguments, 1); | |
defer(function () { | |
fn.apply(null, args); | |
}); | |
}; | |
} | |
var _defer; | |
if (hasSetImmediate) { | |
_defer = setImmediate; | |
} else if (hasNextTick) { | |
_defer = process.nextTick; | |
} else { | |
_defer = fallback; | |
} | |
exports.default = wrap(_defer); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/slice.js": | |
/*!***********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/slice.js ***! | |
\***********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = slice; | |
function slice(arrayLike, start) { | |
start = start | 0; | |
var newLen = Math.max(arrayLike.length - start, 0); | |
var newArr = Array(newLen); | |
for (var idx = 0; idx < newLen; idx++) { | |
newArr[idx] = arrayLike[start + idx]; | |
} | |
return newArr; | |
} | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/withoutIndex.js": | |
/*!******************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/withoutIndex.js ***! | |
\******************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = _withoutIndex; | |
function _withoutIndex(iteratee) { | |
return function (value, index, callback) { | |
return iteratee(value, callback); | |
}; | |
} | |
module.exports = exports["default"]; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js": | |
/*!***************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/internal/wrapAsync.js ***! | |
\***************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.isAsync = undefined; | |
var _asyncify = __webpack_require__(/*! ../asyncify */ "../fabric8-analytics-lsp-server/output/node_modules/async/asyncify.js"); | |
var _asyncify2 = _interopRequireDefault(_asyncify); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var supportsSymbol = typeof Symbol === 'function'; | |
function isAsync(fn) { | |
return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; | |
} | |
function wrapAsync(asyncFn) { | |
return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; | |
} | |
exports.default = wrapAsync; | |
exports.isAsync = isAsync; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/async/series.js": | |
/*!***************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/async/series.js ***! | |
\***************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = series; | |
var _parallel = __webpack_require__(/*! ./internal/parallel */ "../fabric8-analytics-lsp-server/output/node_modules/async/internal/parallel.js"); | |
var _parallel2 = _interopRequireDefault(_parallel); | |
var _eachOfSeries = __webpack_require__(/*! ./eachOfSeries */ "../fabric8-analytics-lsp-server/output/node_modules/async/eachOfSeries.js"); | |
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
/** | |
* Run the functions in the `tasks` collection in series, each one running once | |
* the previous function has completed. If any functions in the series pass an | |
* error to its callback, no more functions are run, and `callback` is | |
* immediately called with the value of the error. Otherwise, `callback` | |
* receives an array of results when `tasks` have completed. | |
* | |
* It is also possible to use an object instead of an array. Each property will | |
* be run as a function, and the results will be passed to the final `callback` | |
* as an object instead of an array. This can be a more readable way of handling | |
* results from {@link async.series}. | |
* | |
* **Note** that while many implementations preserve the order of object | |
* properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) | |
* explicitly states that | |
* | |
* > The mechanics and order of enumerating the properties is not specified. | |
* | |
* So if you rely on the order in which your series of functions are executed, | |
* and want this to work on all platforms, consider using an array. | |
* | |
* @name series | |
* @static | |
* @memberOf module:ControlFlow | |
* @method | |
* @category Control Flow | |
* @param {Array|Iterable|Object} tasks - A collection containing | |
* [async functions]{@link AsyncFunction} to run in series. | |
* Each function can complete with any number of optional `result` values. | |
* @param {Function} [callback] - An optional callback to run once all the | |
* functions have completed. This function gets a results array (or object) | |
* containing all the result arguments passed to the `task` callbacks. Invoked | |
* with (err, result). | |
* @example | |
* async.series([ | |
* function(callback) { | |
* // do some stuff ... | |
* callback(null, 'one'); | |
* }, | |
* function(callback) { | |
* // do some more stuff ... | |
* callback(null, 'two'); | |
* } | |
* ], | |
* // optional callback | |
* function(err, results) { | |
* // results is now equal to ['one', 'two'] | |
* }); | |
* | |
* async.series({ | |
* one: function(callback) { | |
* setTimeout(function() { | |
* callback(null, 1); | |
* }, 200); | |
* }, | |
* two: function(callback){ | |
* setTimeout(function() { | |
* callback(null, 2); | |
* }, 100); | |
* } | |
* }, function(err, results) { | |
* // results is now equal to: {one: 1, two: 2} | |
* }); | |
*/ | |
function series(tasks, callback) { | |
(0, _parallel2.default)(_eachOfSeries2.default, tasks, callback); | |
} | |
module.exports = exports['default']; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/api.js": | |
/*!*****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/api.js ***! | |
\*****************************************************************************************/ | |
/*! exports provided: VERSION, CstParser, EmbeddedActionsParser, ParserDefinitionErrorType, EMPTY_ALT, Lexer, LexerDefinitionErrorType, createToken, createTokenInstance, EOF, tokenLabel, tokenMatcher, tokenName, defaultGrammarResolverErrorProvider, defaultGrammarValidatorErrorProvider, defaultParserErrorProvider, EarlyExitException, isRecognitionException, MismatchedTokenException, NotAllInputParsedException, NoViableAltException, defaultLexerErrorProvider, Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal, serializeGrammar, serializeProduction, GAstVisitor, assignOccurrenceIndices, resolveGrammar, validateGrammar, clearCache, createSyntaxDiagramsCode, generateParserFactory, generateParserModule, Parser */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearCache", function() { return clearCache; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; }); | |
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./version */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/version.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return _version__WEBPACK_IMPORTED_MODULE_0__["VERSION"]; }); | |
/* harmony import */ var _parse_parser_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse/parser/parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CstParser", function() { return _parse_parser_parser__WEBPACK_IMPORTED_MODULE_1__["CstParser"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmbeddedActionsParser", function() { return _parse_parser_parser__WEBPACK_IMPORTED_MODULE_1__["EmbeddedActionsParser"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ParserDefinitionErrorType", function() { return _parse_parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY_ALT", function() { return _parse_parser_parser__WEBPACK_IMPORTED_MODULE_1__["EMPTY_ALT"]; }); | |
/* harmony import */ var _scan_lexer_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scan/lexer_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Lexer", function() { return _scan_lexer_public__WEBPACK_IMPORTED_MODULE_2__["Lexer"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LexerDefinitionErrorType", function() { return _scan_lexer_public__WEBPACK_IMPORTED_MODULE_2__["LexerDefinitionErrorType"]; }); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createToken", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["createToken"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTokenInstance", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["createTokenInstance"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EOF", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["EOF"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tokenLabel", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["tokenLabel"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tokenMatcher", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["tokenMatcher"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tokenName", function() { return _scan_tokens_public__WEBPACK_IMPORTED_MODULE_3__["tokenName"]; }); | |
/* harmony import */ var _parse_errors_public__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./parse/errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultGrammarResolverErrorProvider", function() { return _parse_errors_public__WEBPACK_IMPORTED_MODULE_4__["defaultGrammarResolverErrorProvider"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultGrammarValidatorErrorProvider", function() { return _parse_errors_public__WEBPACK_IMPORTED_MODULE_4__["defaultGrammarValidatorErrorProvider"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultParserErrorProvider", function() { return _parse_errors_public__WEBPACK_IMPORTED_MODULE_4__["defaultParserErrorProvider"]; }); | |
/* harmony import */ var _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parse/exceptions_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EarlyExitException", function() { return _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__["EarlyExitException"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isRecognitionException", function() { return _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__["isRecognitionException"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MismatchedTokenException", function() { return _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__["MismatchedTokenException"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotAllInputParsedException", function() { return _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__["NotAllInputParsedException"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NoViableAltException", function() { return _parse_exceptions_public__WEBPACK_IMPORTED_MODULE_5__["NoViableAltException"]; }); | |
/* harmony import */ var _scan_lexer_errors_public__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scan/lexer_errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultLexerErrorProvider", function() { return _scan_lexer_errors_public__WEBPACK_IMPORTED_MODULE_6__["defaultLexerErrorProvider"]; }); | |
/* harmony import */ var _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./parse/grammar/gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Alternation", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Alternation"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Alternative", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Alternative"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NonTerminal", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["NonTerminal"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Option", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Option"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Repetition", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Repetition"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RepetitionMandatory", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["RepetitionMandatory"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RepetitionMandatoryWithSeparator", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["RepetitionMandatoryWithSeparator"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RepetitionWithSeparator", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["RepetitionWithSeparator"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Rule", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Rule"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Terminal", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["Terminal"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "serializeGrammar", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["serializeGrammar"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "serializeProduction", function() { return _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_7__["serializeProduction"]; }); | |
/* harmony import */ var _parse_grammar_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./parse/grammar/gast/gast_visitor_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GAstVisitor", function() { return _parse_grammar_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_8__["GAstVisitor"]; }); | |
/* harmony import */ var _parse_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./parse/grammar/gast/gast_resolver_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "assignOccurrenceIndices", function() { return _parse_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_9__["assignOccurrenceIndices"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "resolveGrammar", function() { return _parse_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_9__["resolveGrammar"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "validateGrammar", function() { return _parse_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_9__["validateGrammar"]; }); | |
/* harmony import */ var _diagrams_render_public__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/render_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/diagrams/render_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createSyntaxDiagramsCode", function() { return _diagrams_render_public__WEBPACK_IMPORTED_MODULE_10__["createSyntaxDiagramsCode"]; }); | |
/* harmony import */ var _generate_generate_public__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./generate/generate_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate_public.js"); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateParserFactory", function() { return _generate_generate_public__WEBPACK_IMPORTED_MODULE_11__["generateParserFactory"]; }); | |
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateParserModule", function() { return _generate_generate_public__WEBPACK_IMPORTED_MODULE_11__["generateParserModule"]; }); | |
// semantic version | |
// Tokens utilities | |
// Other Utilities | |
// grammar reflection API | |
// GAST Utilities | |
/* istanbul ignore next */ | |
function clearCache() { | |
console.warn("The clearCache function was 'soft' removed from the Chevrotain API." + | |
"\n\t It performs no action other than printing this message." + | |
"\n\t Please avoid using it as it will be completely removed in the future"); | |
} | |
var Parser = /** @class */ (function () { | |
function Parser() { | |
throw new Error("The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\t\n" + | |
"See: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_7-0-0"); | |
} | |
return Parser; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/diagrams/render_public.js": | |
/*!************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/diagrams/render_public.js ***! | |
\************************************************************************************************************/ | |
/*! exports provided: createSyntaxDiagramsCode */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSyntaxDiagramsCode", function() { return createSyntaxDiagramsCode; }); | |
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../version */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/version.js"); | |
function createSyntaxDiagramsCode(grammar, _a) { | |
var _b = _a === void 0 ? {} : _a, _c = _b.resourceBase, resourceBase = _c === void 0 ? "https://unpkg.com/chevrotain@" + _version__WEBPACK_IMPORTED_MODULE_0__["VERSION"] + "/diagrams/" : _c, _d = _b.css, css = _d === void 0 ? "https://unpkg.com/chevrotain@" + _version__WEBPACK_IMPORTED_MODULE_0__["VERSION"] + "/diagrams/diagrams.css" : _d; | |
var header = "\n<!-- This is a generated file -->\n<!DOCTYPE html>\n<meta charset=\"utf-8\">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n"; | |
var cssHtml = "\n<link rel='stylesheet' href='" + css + "'>\n"; | |
var scripts = "\n<script src='" + resourceBase + "vendor/railroad-diagrams.js'></script>\n<script src='" + resourceBase + "src/diagrams_builder.js'></script>\n<script src='" + resourceBase + "src/diagrams_behavior.js'></script>\n<script src='" + resourceBase + "src/main.js'></script>\n"; | |
var diagramsDiv = "\n<div id=\"diagrams\" align=\"center\"></div> \n"; | |
var serializedGrammar = "\n<script>\n window.serializedGrammar = " + JSON.stringify(grammar, null, " ") + ";\n</script>\n"; | |
var initLogic = "\n<script>\n var diagramsDiv = document.getElementById(\"diagrams\");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n</script>\n"; | |
return (header + cssHtml + scripts + diagramsDiv + serializedGrammar + initLogic); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate.js": | |
/*!*******************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate.js ***! | |
\*******************************************************************************************************/ | |
/*! exports provided: genUmdModule, genWrapperFunction, genClass, genAllRules, genRule, genTerminal, genNonTerminal, genAlternation, genSingleAlt */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genUmdModule", function() { return genUmdModule; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genWrapperFunction", function() { return genWrapperFunction; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genClass", function() { return genClass; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genAllRules", function() { return genAllRules; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genRule", function() { return genRule; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genTerminal", function() { return genTerminal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genNonTerminal", function() { return genNonTerminal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genAlternation", function() { return genAlternation; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genSingleAlt", function() { return genSingleAlt; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../parse/grammar/gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/** | |
* Missing features | |
* 1. Rule arguments | |
* 2. Gates | |
* 3. embedded actions | |
*/ | |
var NL = "\n"; | |
function genUmdModule(options) { | |
return "\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n" + genClass(options) + "\n \nreturn {\n " + options.name + ": " + options.name + " \n}\n}));\n"; | |
} | |
function genWrapperFunction(options) { | |
return " \n" + genClass(options) + "\nreturn new " + options.name + "(tokenVocabulary, config) \n"; | |
} | |
function genClass(options) { | |
// TODO: how to pass the token vocabulary? Constructor? other? | |
var result = "\nfunction " + options.name + "(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n " + genAllRules(options.rules) + "\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n" + options.name + ".prototype = Object.create(chevrotain.CstParser.prototype)\n" + options.name + ".prototype.constructor = " + options.name + " \n "; | |
return result; | |
} | |
function genAllRules(rules) { | |
var rulesText = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(rules, function (currRule) { | |
return genRule(currRule, 1); | |
}); | |
return rulesText.join("\n"); | |
} | |
function genRule(prod, n) { | |
var result = indent(n, "$.RULE(\"" + prod.name + "\", function() {") + NL; | |
result += genDefinition(prod.definition, n + 1); | |
result += indent(n + 1, "})") + NL; | |
return result; | |
} | |
function genTerminal(prod, n) { | |
var name = prod.terminalType.name; | |
// TODO: potential performance optimization, avoid tokenMap Dictionary access | |
return indent(n, "$.CONSUME" + prod.idx + "(this.tokensMap." + name + ")" + NL); | |
} | |
function genNonTerminal(prod, n) { | |
return indent(n, "$.SUBRULE" + prod.idx + "($." + prod.nonTerminalName + ")" + NL); | |
} | |
function genAlternation(prod, n) { | |
var result = indent(n, "$.OR" + prod.idx + "([") + NL; | |
var alts = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(prod.definition, function (altDef) { return genSingleAlt(altDef, n + 1); }); | |
result += alts.join("," + NL); | |
result += NL + indent(n, "])" + NL); | |
return result; | |
} | |
function genSingleAlt(prod, n) { | |
var result = indent(n, "{") + NL; | |
result += indent(n + 1, "ALT: function() {") + NL; | |
result += genDefinition(prod.definition, n + 1); | |
result += indent(n + 1, "}") + NL; | |
result += indent(n, "}"); | |
return result; | |
} | |
function genProd(prod, n) { | |
/* istanbul ignore else */ | |
if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]) { | |
return genNonTerminal(prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]) { | |
return genDSLRule("OPTION", prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatory"]) { | |
return genDSLRule("AT_LEAST_ONE", prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatoryWithSeparator"]) { | |
return genDSLRule("AT_LEAST_ONE_SEP", prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"]) { | |
return genDSLRule("MANY_SEP", prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"]) { | |
return genDSLRule("MANY", prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]) { | |
return genAlternation(prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]) { | |
return genTerminal(prod, n); | |
} | |
else if (prod instanceof _parse_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternative"]) { | |
return genDefinition(prod.definition, n); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function genDSLRule(dslName, prod, n) { | |
var result = indent(n, "$." + (dslName + prod.idx) + "("); | |
if (prod.separator) { | |
result += "{" + NL; | |
result += | |
indent(n + 1, "SEP: this.tokensMap." + prod.separator.name) + "," + NL; | |
result += "DEF: " + genDefFunction(prod.definition, n + 2) + NL; | |
result += indent(n, "}") + NL; | |
} | |
else { | |
result += genDefFunction(prod.definition, n + 1); | |
} | |
result += indent(n, ")") + NL; | |
return result; | |
} | |
function genDefFunction(definition, n) { | |
var def = "function() {" + NL; | |
def += genDefinition(definition, n); | |
def += indent(n, "}") + NL; | |
return def; | |
} | |
function genDefinition(def, n) { | |
var result = ""; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(def, function (prod) { | |
result += genProd(prod, n + 1); | |
}); | |
return result; | |
} | |
function indent(howMuch, text) { | |
var spaces = Array(howMuch * 4 + 1).join(" "); | |
return spaces + text; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate_public.js": | |
/*!**************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate_public.js ***! | |
\**************************************************************************************************************/ | |
/*! exports provided: generateParserFactory, generateParserModule */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateParserFactory", function() { return generateParserFactory; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateParserModule", function() { return generateParserModule; }); | |
/* harmony import */ var _generate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./generate */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/generate/generate.js"); | |
function generateParserFactory(options) { | |
var wrapperText = Object(_generate__WEBPACK_IMPORTED_MODULE_0__["genWrapperFunction"])({ | |
name: options.name, | |
rules: options.rules | |
}); | |
var constructorWrapper = new Function("tokenVocabulary", "config", "chevrotain", wrapperText); | |
return function (config) { | |
return constructorWrapper(options.tokenVocabulary, config, | |
// TODO: check how the require is transpiled/webpacked | |
__webpack_require__(/*! ../api */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/api.js")); | |
}; | |
} | |
function generateParserModule(options) { | |
return Object(_generate__WEBPACK_IMPORTED_MODULE_0__["genUmdModule"])({ name: options.name, rules: options.rules }); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js": | |
/*!**********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js ***! | |
\**********************************************************************************************************/ | |
/*! exports provided: classNameFromInstance, functionName, defineNameProp */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classNameFromInstance", function() { return classNameFromInstance; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "functionName", function() { return functionName; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineNameProp", function() { return defineNameProp; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
function classNameFromInstance(instance) { | |
return functionName(instance.constructor); | |
} | |
var FUNC_NAME_REGEXP = /^\s*function\s*(\S*)\s*\(/; | |
var NAME = "name"; | |
/* istanbul ignore next too many hacks for IE/old versions of node.js here*/ | |
function functionName(func) { | |
// Engines that support Function.prototype.name OR the nth (n>1) time after | |
// the name has been computed in the following else block. | |
var existingNameProp = func.name; | |
if (existingNameProp) { | |
return existingNameProp; | |
} | |
// hack for IE and engines that do not support Object.defineProperty on function.name (Node.js 0.10 && 0.12) | |
var computedName = func.toString().match(FUNC_NAME_REGEXP)[1]; | |
return computedName; | |
} | |
/** | |
* @returns {boolean} - has the property been successfully defined | |
*/ | |
function defineNameProp(obj, nameValue) { | |
var namePropDescriptor = Object.getOwnPropertyDescriptor(obj, NAME); | |
/* istanbul ignore else -> will only run in old versions of node.js */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(namePropDescriptor) || namePropDescriptor.configurable) { | |
Object.defineProperty(obj, NAME, { | |
enumerable: false, | |
configurable: true, | |
writable: false, | |
value: nameValue | |
}); | |
return true; | |
} | |
/* istanbul ignore next -> will only run in old versions of node.js */ | |
return false; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/constants.js": | |
/*!*****************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/constants.js ***! | |
\*****************************************************************************************************/ | |
/*! exports provided: IN */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IN", function() { return IN; }); | |
// TODO: can this be removed? where is it used? | |
var IN = "_~IN~_"; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst.js": | |
/*!***************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst.js ***! | |
\***************************************************************************************************/ | |
/*! exports provided: setNodeLocationOnlyOffset, setNodeLocationFull, addTerminalToCst, addNoneTerminalToCst */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeLocationOnlyOffset", function() { return setNodeLocationOnlyOffset; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setNodeLocationFull", function() { return setNodeLocationFull; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTerminalToCst", function() { return addTerminalToCst; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNoneTerminalToCst", function() { return addNoneTerminalToCst; }); | |
/** | |
* This nodeLocation tracking is not efficient and should only be used | |
* when error recovery is enabled or the Token Vector contains virtual Tokens | |
* (e.g, Python Indent/Outdent) | |
* As it executes the calculation for every single terminal/nonTerminal | |
* and does not rely on the fact the token vector is **sorted** | |
*/ | |
function setNodeLocationOnlyOffset(currNodeLocation, newLocationInfo) { | |
// First (valid) update for this cst node | |
if (isNaN(currNodeLocation.startOffset) === true) { | |
// assumption1: Token location information is either NaN or a valid number | |
// assumption2: Token location information is fully valid if it exist | |
// (both start/end offsets exist and are numbers). | |
currNodeLocation.startOffset = newLocationInfo.startOffset; | |
currNodeLocation.endOffset = newLocationInfo.endOffset; | |
} | |
// Once the startOffset has been updated with a valid number it should never receive | |
// any farther updates as the Token vector is sorted. | |
// We still have to check this this condition for every new possible location info | |
// because with error recovery enabled we may encounter invalid tokens (NaN location props) | |
else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) { | |
currNodeLocation.endOffset = newLocationInfo.endOffset; | |
} | |
} | |
/** | |
* This nodeLocation tracking is not efficient and should only be used | |
* when error recovery is enabled or the Token Vector contains virtual Tokens | |
* (e.g, Python Indent/Outdent) | |
* As it executes the calculation for every single terminal/nonTerminal | |
* and does not rely on the fact the token vector is **sorted** | |
*/ | |
function setNodeLocationFull(currNodeLocation, newLocationInfo) { | |
// First (valid) update for this cst node | |
if (isNaN(currNodeLocation.startOffset) === true) { | |
// assumption1: Token location information is either NaN or a valid number | |
// assumption2: Token location information is fully valid if it exist | |
// (all start/end props exist and are numbers). | |
currNodeLocation.startOffset = newLocationInfo.startOffset; | |
currNodeLocation.startColumn = newLocationInfo.startColumn; | |
currNodeLocation.startLine = newLocationInfo.startLine; | |
currNodeLocation.endOffset = newLocationInfo.endOffset; | |
currNodeLocation.endColumn = newLocationInfo.endColumn; | |
currNodeLocation.endLine = newLocationInfo.endLine; | |
} | |
// Once the start props has been updated with a valid number it should never receive | |
// any farther updates as the Token vector is sorted. | |
// We still have to check this this condition for every new possible location info | |
// because with error recovery enabled we may encounter invalid tokens (NaN location props) | |
else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) { | |
currNodeLocation.endOffset = newLocationInfo.endOffset; | |
currNodeLocation.endColumn = newLocationInfo.endColumn; | |
currNodeLocation.endLine = newLocationInfo.endLine; | |
} | |
} | |
function addTerminalToCst(node, token, tokenTypeName) { | |
if (node.children[tokenTypeName] === undefined) { | |
node.children[tokenTypeName] = [token]; | |
} | |
else { | |
node.children[tokenTypeName].push(token); | |
} | |
} | |
function addNoneTerminalToCst(node, ruleName, ruleResult) { | |
if (node.children[ruleName] === undefined) { | |
node.children[ruleName] = [ruleResult]; | |
} | |
else { | |
node.children[ruleName].push(ruleResult); | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js": | |
/*!***********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js ***! | |
\***********************************************************************************************************/ | |
/*! exports provided: defaultVisit, createBaseSemanticVisitorConstructor, createBaseVisitorConstructorWithDefaults, CstVisitorDefinitionError, validateVisitor, validateMissingCstMethods, validateRedundantMethods */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultVisit", function() { return defaultVisit; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBaseSemanticVisitorConstructor", function() { return createBaseSemanticVisitorConstructor; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBaseVisitorConstructorWithDefaults", function() { return createBaseVisitorConstructorWithDefaults; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CstVisitorDefinitionError", function() { return CstVisitorDefinitionError; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateVisitor", function() { return validateVisitor; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateMissingCstMethods", function() { return validateMissingCstMethods; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateRedundantMethods", function() { return validateRedundantMethods; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lang/lang_extensions */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js"); | |
/* harmony import */ var _grammar_checks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../grammar/checks */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js"); | |
function defaultVisit(ctx, param) { | |
var childrenNames = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["keys"])(ctx); | |
var childrenNamesLength = childrenNames.length; | |
for (var i = 0; i < childrenNamesLength; i++) { | |
var currChildName = childrenNames[i]; | |
var currChildArray = ctx[currChildName]; | |
var currChildArrayLength = currChildArray.length; | |
for (var j = 0; j < currChildArrayLength; j++) { | |
var currChild = currChildArray[j]; | |
// distinction between Tokens Children and CstNode children | |
if (currChild.tokenTypeIdx === undefined) { | |
this[currChild.name](currChild.children, param); | |
} | |
} | |
} | |
// defaultVisit does not support generic out param | |
return undefined; | |
} | |
function createBaseSemanticVisitorConstructor(grammarName, ruleNames) { | |
var derivedConstructor = function () { }; | |
// can be overwritten according to: | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/ | |
// name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname | |
Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__["defineNameProp"])(derivedConstructor, grammarName + "BaseSemantics"); | |
var semanticProto = { | |
visit: function (cstNode, param) { | |
// enables writing more concise visitor methods when CstNode has only a single child | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(cstNode)) { | |
// A CST Node's children dictionary can never have empty arrays as values | |
// If a key is defined there will be at least one element in the corresponding value array. | |
cstNode = cstNode[0]; | |
} | |
// enables passing optional CstNodes concisely. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(cstNode)) { | |
return undefined; | |
} | |
return this[cstNode.name](cstNode.children, param); | |
}, | |
validateVisitor: function () { | |
var semanticDefinitionErrors = validateVisitor(this, ruleNames); | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(semanticDefinitionErrors)) { | |
var errorMessages = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(semanticDefinitionErrors, function (currDefError) { return currDefError.msg; }); | |
throw Error("Errors Detected in CST Visitor <" + Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__["functionName"])(this.constructor) + ">:\n\t" + ("" + errorMessages.join("\n\n").replace(/\n/g, "\n\t"))); | |
} | |
} | |
}; | |
derivedConstructor.prototype = semanticProto; | |
derivedConstructor.prototype.constructor = derivedConstructor; | |
derivedConstructor._RULE_NAMES = ruleNames; | |
return derivedConstructor; | |
} | |
function createBaseVisitorConstructorWithDefaults(grammarName, ruleNames, baseConstructor) { | |
var derivedConstructor = function () { }; | |
// can be overwritten according to: | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/ | |
// name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname | |
Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__["defineNameProp"])(derivedConstructor, grammarName + "BaseSemanticsWithDefaults"); | |
var withDefaultsProto = Object.create(baseConstructor.prototype); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(ruleNames, function (ruleName) { | |
withDefaultsProto[ruleName] = defaultVisit; | |
}); | |
derivedConstructor.prototype = withDefaultsProto; | |
derivedConstructor.prototype.constructor = derivedConstructor; | |
return derivedConstructor; | |
} | |
var CstVisitorDefinitionError; | |
(function (CstVisitorDefinitionError) { | |
CstVisitorDefinitionError[CstVisitorDefinitionError["REDUNDANT_METHOD"] = 0] = "REDUNDANT_METHOD"; | |
CstVisitorDefinitionError[CstVisitorDefinitionError["MISSING_METHOD"] = 1] = "MISSING_METHOD"; | |
})(CstVisitorDefinitionError || (CstVisitorDefinitionError = {})); | |
function validateVisitor(visitorInstance, ruleNames) { | |
var missingErrors = validateMissingCstMethods(visitorInstance, ruleNames); | |
var redundantErrors = validateRedundantMethods(visitorInstance, ruleNames); | |
return missingErrors.concat(redundantErrors); | |
} | |
function validateMissingCstMethods(visitorInstance, ruleNames) { | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(ruleNames, function (currRuleName) { | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(visitorInstance[currRuleName])) { | |
return { | |
msg: "Missing visitor method: <" + currRuleName + "> on " + Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__["functionName"])(visitorInstance.constructor) + " CST Visitor.", | |
type: CstVisitorDefinitionError.MISSING_METHOD, | |
methodName: currRuleName | |
}; | |
} | |
}); | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["compact"])(errors); | |
} | |
var VALID_PROP_NAMES = ["constructor", "visit", "validateVisitor"]; | |
function validateRedundantMethods(visitorInstance, ruleNames) { | |
var errors = []; | |
for (var prop in visitorInstance) { | |
if (_grammar_checks__WEBPACK_IMPORTED_MODULE_2__["validTermsPattern"].test(prop) && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(visitorInstance[prop]) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(VALID_PROP_NAMES, prop) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(ruleNames, prop)) { | |
errors.push({ | |
msg: "Redundant visitor method: <" + prop + "> on " + Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_1__["functionName"])(visitorInstance.constructor) + " CST Visitor\n" + | |
"There is no Grammar Rule corresponding to this method's name.\n" + | |
("For utility methods on visitor classes use methods names that do not match /" + _grammar_checks__WEBPACK_IMPORTED_MODULE_2__["validTermsPattern"].source + "/."), | |
type: CstVisitorDefinitionError.REDUNDANT_METHOD, | |
methodName: prop | |
}); | |
} | |
} | |
return errors; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js": | |
/*!*********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js ***! | |
\*********************************************************************************************************/ | |
/*! exports provided: defaultParserErrorProvider, defaultGrammarResolverErrorProvider, defaultGrammarValidatorErrorProvider */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultParserErrorProvider", function() { return defaultParserErrorProvider; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultGrammarResolverErrorProvider", function() { return defaultGrammarResolverErrorProvider; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultGrammarValidatorErrorProvider", function() { return defaultGrammarValidatorErrorProvider; }); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./grammar/gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _grammar_gast_gast__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grammar/gast/gast */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js"); | |
var defaultParserErrorProvider = { | |
buildMismatchTokenMessage: function (_a) { | |
var expected = _a.expected, actual = _a.actual, previous = _a.previous, ruleName = _a.ruleName; | |
var hasLabel = Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["hasTokenLabel"])(expected); | |
var expectedMsg = hasLabel | |
? "--> " + Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["tokenLabel"])(expected) + " <--" | |
: "token of type --> " + expected.name + " <--"; | |
var msg = "Expecting " + expectedMsg + " but found --> '" + actual.image + "' <--"; | |
return msg; | |
}, | |
buildNotAllInputParsedMessage: function (_a) { | |
var firstRedundant = _a.firstRedundant, ruleName = _a.ruleName; | |
return "Redundant input, expecting EOF but found: " + firstRedundant.image; | |
}, | |
buildNoViableAltMessage: function (_a) { | |
var expectedPathsPerAlt = _a.expectedPathsPerAlt, actual = _a.actual, previous = _a.previous, customUserDescription = _a.customUserDescription, ruleName = _a.ruleName; | |
var errPrefix = "Expecting: "; | |
// TODO: issue: No Viable Alternative Error may have incomplete details. #502 | |
var actualText = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(actual).image; | |
var errSuffix = "\nbut found: '" + actualText + "'"; | |
if (customUserDescription) { | |
return errPrefix + customUserDescription + errSuffix; | |
} | |
else { | |
var allLookAheadPaths = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["reduce"])(expectedPathsPerAlt, function (result, currAltPaths) { return result.concat(currAltPaths); }, []); | |
var nextValidTokenSequences = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(allLookAheadPaths, function (currPath) { | |
return "[" + Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(currPath, function (currTokenType) { return Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["tokenLabel"])(currTokenType); }).join(", ") + "]"; | |
}); | |
var nextValidSequenceItems = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(nextValidTokenSequences, function (itemMsg, idx) { return " " + (idx + 1) + ". " + itemMsg; }); | |
var calculatedDescription = "one of these possible Token sequences:\n" + nextValidSequenceItems.join("\n"); | |
return errPrefix + calculatedDescription + errSuffix; | |
} | |
}, | |
buildEarlyExitMessage: function (_a) { | |
var expectedIterationPaths = _a.expectedIterationPaths, actual = _a.actual, customUserDescription = _a.customUserDescription, ruleName = _a.ruleName; | |
var errPrefix = "Expecting: "; | |
// TODO: issue: No Viable Alternative Error may have incomplete details. #502 | |
var actualText = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(actual).image; | |
var errSuffix = "\nbut found: '" + actualText + "'"; | |
if (customUserDescription) { | |
return errPrefix + customUserDescription + errSuffix; | |
} | |
else { | |
var nextValidTokenSequences = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(expectedIterationPaths, function (currPath) { | |
return "[" + Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(currPath, function (currTokenType) { return Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["tokenLabel"])(currTokenType); }).join(",") + "]"; | |
}); | |
var calculatedDescription = "expecting at least one iteration which starts with one of these possible Token sequences::\n " + | |
("<" + nextValidTokenSequences.join(" ,") + ">"); | |
return errPrefix + calculatedDescription + errSuffix; | |
} | |
} | |
}; | |
Object.freeze(defaultParserErrorProvider); | |
var defaultGrammarResolverErrorProvider = { | |
buildRuleNotFoundError: function (topLevelRule, undefinedRule) { | |
var msg = "Invalid grammar, reference to a rule which is not defined: ->" + | |
undefinedRule.nonTerminalName + | |
"<-\n" + | |
"inside top level rule: ->" + | |
topLevelRule.name + | |
"<-"; | |
return msg; | |
} | |
}; | |
var defaultGrammarValidatorErrorProvider = { | |
buildDuplicateFoundError: function (topLevelRule, duplicateProds) { | |
function getExtraProductionArgument(prod) { | |
if (prod instanceof _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_2__["Terminal"]) { | |
return prod.terminalType.name; | |
} | |
else if (prod instanceof _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_2__["NonTerminal"]) { | |
return prod.nonTerminalName; | |
} | |
else { | |
return ""; | |
} | |
} | |
var topLevelName = topLevelRule.name; | |
var duplicateProd = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(duplicateProds); | |
var index = duplicateProd.idx; | |
var dslName = Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_3__["getProductionDslName"])(duplicateProd); | |
var extraArgument = getExtraProductionArgument(duplicateProd); | |
var hasExplicitIndex = index > 0; | |
var msg = "->" + dslName + (hasExplicitIndex ? index : "") + "<- " + (extraArgument ? "with argument: ->" + extraArgument + "<-" : "") + "\n appears more than once (" + duplicateProds.length + " times) in the top level rule: ->" + topLevelName + "<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n "; | |
// white space trimming time! better to trim afterwards as it allows to use WELL formatted multi line template strings... | |
msg = msg.replace(/[ \t]+/g, " "); | |
msg = msg.replace(/\s\s+/g, "\n"); | |
return msg; | |
}, | |
buildNamespaceConflictError: function (rule) { | |
var errMsg = "Namespace conflict found in grammar.\n" + | |
("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <" + rule.name + ">.\n") + | |
"To resolve this make sure each Terminal and Non-Terminal names are unique\n" + | |
"This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\n" + | |
"and Non-Terminal names start with a lower case letter."; | |
return errMsg; | |
}, | |
buildAlternationPrefixAmbiguityError: function (options) { | |
var pathMsg = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(options.prefixPath, function (currTok) { | |
return Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["tokenLabel"])(currTok); | |
}).join(", "); | |
var occurrence = options.alternation.idx === 0 ? "" : options.alternation.idx; | |
var errMsg = "Ambiguous alternatives: <" + options.ambiguityIndices.join(" ,") + "> due to common lookahead prefix\n" + | |
("in <OR" + occurrence + "> inside <" + options.topLevelRule.name + "> Rule,\n") + | |
("<" + pathMsg + "> may appears as a prefix path in all these alternatives.\n") + | |
"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\n" + | |
"For Further details."; | |
return errMsg; | |
}, | |
buildAlternationAmbiguityError: function (options) { | |
var pathMsg = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(options.prefixPath, function (currtok) { | |
return Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["tokenLabel"])(currtok); | |
}).join(", "); | |
var occurrence = options.alternation.idx === 0 ? "" : options.alternation.idx; | |
var currMessage = "Ambiguous Alternatives Detected: <" + options.ambiguityIndices.join(" ,") + "> in <OR" + occurrence + ">" + | |
(" inside <" + options.topLevelRule.name + "> Rule,\n") + | |
("<" + pathMsg + "> may appears as a prefix path in all these alternatives.\n"); | |
currMessage = | |
currMessage + | |
"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n" + | |
"For Further details."; | |
return currMessage; | |
}, | |
buildEmptyRepetitionError: function (options) { | |
var dslName = Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_3__["getProductionDslName"])(options.repetition); | |
if (options.repetition.idx !== 0) { | |
dslName += options.repetition.idx; | |
} | |
var errMsg = "The repetition <" + dslName + "> within Rule <" + options.topLevelRule.name + "> can never consume any tokens.\n" + | |
"This could lead to an infinite loop."; | |
return errMsg; | |
}, | |
buildTokenNameError: function (options) { | |
var tokTypeName = options.tokenType.name; | |
var errMsg = "Invalid Grammar Token name: ->" + tokTypeName + "<- it must match the pattern: ->" + options.expectedPattern.toString() + "<-"; | |
return errMsg; | |
}, | |
buildEmptyAlternationError: function (options) { | |
var errMsg = "Ambiguous empty alternative: <" + (options.emptyChoiceIdx + 1) + ">" + | |
(" in <OR" + options.alternation.idx + "> inside <" + options.topLevelRule.name + "> Rule.\n") + | |
"Only the last alternative may be an empty alternative."; | |
return errMsg; | |
}, | |
buildTooManyAlternativesError: function (options) { | |
var errMsg = "An Alternation cannot have more than 256 alternatives:\n" + | |
("<OR" + options.alternation.idx + "> inside <" + options.topLevelRule.name + "> Rule.\n has " + (options.alternation.definition.length + 1) + " alternatives."); | |
return errMsg; | |
}, | |
buildLeftRecursionError: function (options) { | |
var ruleName = options.topLevelRule.name; | |
var pathNames = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"](options.leftRecursionPath, function (currRule) { return currRule.name; }); | |
var leftRecursivePath = ruleName + " --> " + pathNames | |
.concat([ruleName]) | |
.join(" --> "); | |
var errMsg = "Left Recursion found in grammar.\n" + | |
("rule: <" + ruleName + "> can be invoked from itself (directly or indirectly)\n") + | |
("without consuming any Tokens. The grammar path that causes this is: \n " + leftRecursivePath + "\n") + | |
" To fix this refactor your grammar to remove the left recursion.\n" + | |
"see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."; | |
return errMsg; | |
}, | |
buildInvalidRuleNameError: function (options) { | |
var ruleName = options.topLevelRule.name; | |
var expectedPatternString = options.expectedPattern.toString(); | |
var errMsg = "Invalid grammar rule name: ->" + ruleName + "<- it must match the pattern: ->" + expectedPatternString + "<-"; | |
return errMsg; | |
}, | |
buildDuplicateRuleNameError: function (options) { | |
var ruleName; | |
if (options.topLevelRule instanceof _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_2__["Rule"]) { | |
ruleName = options.topLevelRule.name; | |
} | |
else { | |
ruleName = options.topLevelRule; | |
} | |
var errMsg = "Duplicate definition, rule: ->" + ruleName + "<- is already defined in the grammar: ->" + options.grammarName + "<-"; | |
return errMsg; | |
} | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js": | |
/*!*************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js ***! | |
\*************************************************************************************************************/ | |
/*! exports provided: isRecognitionException, MismatchedTokenException, NoViableAltException, NotAllInputParsedException, EarlyExitException */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRecognitionException", function() { return isRecognitionException; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MismatchedTokenException", function() { return MismatchedTokenException; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoViableAltException", function() { return NoViableAltException; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotAllInputParsedException", function() { return NotAllInputParsedException; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EarlyExitException", function() { return EarlyExitException; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
var MISMATCHED_TOKEN_EXCEPTION = "MismatchedTokenException"; | |
var NO_VIABLE_ALT_EXCEPTION = "NoViableAltException"; | |
var EARLY_EXIT_EXCEPTION = "EarlyExitException"; | |
var NOT_ALL_INPUT_PARSED_EXCEPTION = "NotAllInputParsedException"; | |
var RECOGNITION_EXCEPTION_NAMES = [ | |
MISMATCHED_TOKEN_EXCEPTION, | |
NO_VIABLE_ALT_EXCEPTION, | |
EARLY_EXIT_EXCEPTION, | |
NOT_ALL_INPUT_PARSED_EXCEPTION | |
]; | |
Object.freeze(RECOGNITION_EXCEPTION_NAMES); | |
// hacks to bypass no support for custom Errors in javascript/typescript | |
function isRecognitionException(error) { | |
// can't do instanceof on hacked custom js exceptions | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(RECOGNITION_EXCEPTION_NAMES, error.name); | |
} | |
function MismatchedTokenException(message, token, previousToken) { | |
this.name = MISMATCHED_TOKEN_EXCEPTION; | |
this.message = message; | |
this.token = token; | |
this.previousToken = previousToken; | |
this.resyncedTokens = []; | |
} | |
// must use the "Error.prototype" instead of "new Error" | |
// because the stack trace points to where "new Error" was invoked" | |
MismatchedTokenException.prototype = Error.prototype; | |
function NoViableAltException(message, token, previousToken) { | |
this.name = NO_VIABLE_ALT_EXCEPTION; | |
this.message = message; | |
this.token = token; | |
this.previousToken = previousToken; | |
this.resyncedTokens = []; | |
} | |
NoViableAltException.prototype = Error.prototype; | |
function NotAllInputParsedException(message, token) { | |
this.name = NOT_ALL_INPUT_PARSED_EXCEPTION; | |
this.message = message; | |
this.token = token; | |
this.resyncedTokens = []; | |
} | |
NotAllInputParsedException.prototype = Error.prototype; | |
function EarlyExitException(message, token, previousToken) { | |
this.name = EARLY_EXIT_EXCEPTION; | |
this.message = message; | |
this.token = token; | |
this.previousToken = previousToken; | |
this.resyncedTokens = []; | |
} | |
EarlyExitException.prototype = Error.prototype; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js": | |
/*!**********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js ***! | |
\**********************************************************************************************************/ | |
/*! exports provided: validateGrammar, identifyProductionForDuplicates, OccurrenceValidationCollector, validTermsPattern, validateRuleName, validateTokenName, validateRuleDoesNotAlreadyExist, validateRuleIsOverridden, validateNoLeftRecursion, getFirstNoneTerminal, validateEmptyOrAlternative, validateAmbiguousAlternationAlternatives, RepetionCollector, validateTooManyAlts, validateSomeNonEmptyLookaheadPath, checkPrefixAlternativesAmbiguities */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateGrammar", function() { return validateGrammar; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identifyProductionForDuplicates", function() { return identifyProductionForDuplicates; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OccurrenceValidationCollector", function() { return OccurrenceValidationCollector; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validTermsPattern", function() { return validTermsPattern; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateRuleName", function() { return validateRuleName; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateTokenName", function() { return validateTokenName; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateRuleDoesNotAlreadyExist", function() { return validateRuleDoesNotAlreadyExist; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateRuleIsOverridden", function() { return validateRuleIsOverridden; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateNoLeftRecursion", function() { return validateNoLeftRecursion; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFirstNoneTerminal", function() { return getFirstNoneTerminal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateEmptyOrAlternative", function() { return validateEmptyOrAlternative; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateAmbiguousAlternationAlternatives", function() { return validateAmbiguousAlternationAlternatives; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RepetionCollector", function() { return RepetionCollector; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateTooManyAlts", function() { return validateTooManyAlts; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateSomeNonEmptyLookaheadPath", function() { return validateSomeNonEmptyLookaheadPath; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkPrefixAlternativesAmbiguities", function() { return checkPrefixAlternativesAmbiguities; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _parser_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../parser/parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _gast_gast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gast/gast */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js"); | |
/* harmony import */ var _lookahead__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lookahead */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js"); | |
/* harmony import */ var _interpreter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpreter */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./gast/gast_visitor_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
function validateGrammar(topLevels, globalMaxLookahead, tokenTypes, errMsgProvider, grammarName) { | |
var duplicateErrors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](topLevels, function (currTopLevel) { | |
return validateDuplicateProductions(currTopLevel, errMsgProvider); | |
}); | |
var leftRecursionErrors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](topLevels, function (currTopRule) { | |
return validateNoLeftRecursion(currTopRule, currTopRule, errMsgProvider); | |
}); | |
var emptyAltErrors = []; | |
var ambiguousAltsErrors = []; | |
var emptyRepetitionErrors = []; | |
// left recursion could cause infinite loops in the following validations. | |
// It is safest to first have the user fix the left recursion errors first and only then examine Further issues. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(leftRecursionErrors, _utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])) { | |
emptyAltErrors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topLevels, function (currTopRule) { | |
return validateEmptyOrAlternative(currTopRule, errMsgProvider); | |
}); | |
ambiguousAltsErrors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topLevels, function (currTopRule) { | |
return validateAmbiguousAlternationAlternatives(currTopRule, globalMaxLookahead, errMsgProvider); | |
}); | |
emptyRepetitionErrors = validateSomeNonEmptyLookaheadPath(topLevels, globalMaxLookahead, errMsgProvider); | |
} | |
var termsNamespaceConflictErrors = checkTerminalAndNoneTerminalsNameSpace(topLevels, tokenTypes, errMsgProvider); | |
var tokenNameErrors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](tokenTypes, function (currTokType) { | |
return validateTokenName(currTokType, errMsgProvider); | |
}); | |
var tooManyAltsErrors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topLevels, function (curRule) { | |
return validateTooManyAlts(curRule, errMsgProvider); | |
}); | |
var ruleNameErrors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topLevels, function (curRule) { | |
return validateRuleName(curRule, errMsgProvider); | |
}); | |
var duplicateRulesError = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topLevels, function (curRule) { | |
return validateRuleDoesNotAlreadyExist(curRule, topLevels, grammarName, errMsgProvider); | |
}); | |
return (_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"](duplicateErrors.concat(tokenNameErrors, emptyRepetitionErrors, leftRecursionErrors, emptyAltErrors, ambiguousAltsErrors, termsNamespaceConflictErrors, tooManyAltsErrors, ruleNameErrors, duplicateRulesError))); | |
} | |
function validateDuplicateProductions(topLevelRule, errMsgProvider) { | |
var collectorVisitor = new OccurrenceValidationCollector(); | |
topLevelRule.accept(collectorVisitor); | |
var allRuleProductions = collectorVisitor.allProductions; | |
var productionGroups = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["groupBy"](allRuleProductions, identifyProductionForDuplicates); | |
var duplicates = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"](productionGroups, function (currGroup) { | |
return currGroup.length > 1; | |
}); | |
var errors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"](duplicates), function (currDuplicates) { | |
var firstProd = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["first"](currDuplicates); | |
var msg = errMsgProvider.buildDuplicateFoundError(topLevelRule, currDuplicates); | |
var dslName = Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["getProductionDslName"])(firstProd); | |
var defError = { | |
message: msg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].DUPLICATE_PRODUCTIONS, | |
ruleName: topLevelRule.name, | |
dslName: dslName, | |
occurrence: firstProd.idx | |
}; | |
var param = getExtraProductionArgument(firstProd); | |
if (param) { | |
defError.parameter = param; | |
} | |
return defError; | |
}); | |
return errors; | |
} | |
function identifyProductionForDuplicates(prod) { | |
return Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["getProductionDslName"])(prod) + "_#_" + prod.idx + "_#_" + getExtraProductionArgument(prod); | |
} | |
function getExtraProductionArgument(prod) { | |
if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Terminal"]) { | |
return prod.terminalType.name; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["NonTerminal"]) { | |
return prod.nonTerminalName; | |
} | |
else { | |
return ""; | |
} | |
} | |
var OccurrenceValidationCollector = /** @class */ (function (_super) { | |
__extends(OccurrenceValidationCollector, _super); | |
function OccurrenceValidationCollector() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
_this.allProductions = []; | |
return _this; | |
} | |
OccurrenceValidationCollector.prototype.visitNonTerminal = function (subrule) { | |
this.allProductions.push(subrule); | |
}; | |
OccurrenceValidationCollector.prototype.visitOption = function (option) { | |
this.allProductions.push(option); | |
}; | |
OccurrenceValidationCollector.prototype.visitRepetitionWithSeparator = function (manySep) { | |
this.allProductions.push(manySep); | |
}; | |
OccurrenceValidationCollector.prototype.visitRepetitionMandatory = function (atLeastOne) { | |
this.allProductions.push(atLeastOne); | |
}; | |
OccurrenceValidationCollector.prototype.visitRepetitionMandatoryWithSeparator = function (atLeastOneSep) { | |
this.allProductions.push(atLeastOneSep); | |
}; | |
OccurrenceValidationCollector.prototype.visitRepetition = function (many) { | |
this.allProductions.push(many); | |
}; | |
OccurrenceValidationCollector.prototype.visitAlternation = function (or) { | |
this.allProductions.push(or); | |
}; | |
OccurrenceValidationCollector.prototype.visitTerminal = function (terminal) { | |
this.allProductions.push(terminal); | |
}; | |
return OccurrenceValidationCollector; | |
}(_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_6__["GAstVisitor"])); | |
var validTermsPattern = /^[a-zA-Z_]\w*$/; | |
// TODO: remove this limitation now that we use recorders | |
function validateRuleName(rule, errMsgProvider) { | |
var errors = []; | |
var ruleName = rule.name; | |
if (!ruleName.match(validTermsPattern)) { | |
errors.push({ | |
message: errMsgProvider.buildInvalidRuleNameError({ | |
topLevelRule: rule, | |
expectedPattern: validTermsPattern | |
}), | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].INVALID_RULE_NAME, | |
ruleName: ruleName | |
}); | |
} | |
return errors; | |
} | |
// TODO: remove this limitation now that we use recorders | |
function validateTokenName(tokenType, errMsgProvider) { | |
var errors = []; | |
var tokTypeName = tokenType.name; | |
if (!tokTypeName.match(validTermsPattern)) { | |
errors.push({ | |
message: errMsgProvider.buildTokenNameError({ | |
tokenType: tokenType, | |
expectedPattern: validTermsPattern | |
}), | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].INVALID_TOKEN_NAME | |
}); | |
} | |
return errors; | |
} | |
function validateRuleDoesNotAlreadyExist(rule, allRules, className, errMsgProvider) { | |
var errors = []; | |
var occurrences = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(allRules, function (result, curRule) { | |
if (curRule.name === rule.name) { | |
return result + 1; | |
} | |
return result; | |
}, 0); | |
if (occurrences > 1) { | |
var errMsg = errMsgProvider.buildDuplicateRuleNameError({ | |
topLevelRule: rule, | |
grammarName: className | |
}); | |
errors.push({ | |
message: errMsg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].DUPLICATE_RULE_NAME, | |
ruleName: rule.name | |
}); | |
} | |
return errors; | |
} | |
// TODO: is there anyway to get only the rule names of rules inherited from the super grammars? | |
// This is not part of the IGrammarErrorProvider because the validation cannot be performed on | |
// The grammar structure, only at runtime. | |
function validateRuleIsOverridden(ruleName, definedRulesNames, className) { | |
var errors = []; | |
var errMsg; | |
if (!_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"](definedRulesNames, ruleName)) { | |
errMsg = | |
"Invalid rule override, rule: ->" + ruleName + "<- cannot be overridden in the grammar: ->" + className + "<-" + | |
"as it is not defined in any of the super grammars "; | |
errors.push({ | |
message: errMsg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].INVALID_RULE_OVERRIDE, | |
ruleName: ruleName | |
}); | |
} | |
return errors; | |
} | |
function validateNoLeftRecursion(topRule, currRule, errMsgProvider, path) { | |
if (path === void 0) { path = []; } | |
var errors = []; | |
var nextNonTerminals = getFirstNoneTerminal(currRule.definition); | |
if (_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"](nextNonTerminals)) { | |
return []; | |
} | |
else { | |
var ruleName = topRule.name; | |
var foundLeftRecursion = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"](nextNonTerminals, topRule); | |
if (foundLeftRecursion) { | |
errors.push({ | |
message: errMsgProvider.buildLeftRecursionError({ | |
topLevelRule: topRule, | |
leftRecursionPath: path | |
}), | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].LEFT_RECURSION, | |
ruleName: ruleName | |
}); | |
} | |
// we are only looking for cyclic paths leading back to the specific topRule | |
// other cyclic paths are ignored, we still need this difference to avoid infinite loops... | |
var validNextSteps = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["difference"](nextNonTerminals, path.concat([topRule])); | |
var errorsFromNextSteps = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](validNextSteps, function (currRefRule) { | |
var newPath = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneArr"](path); | |
newPath.push(currRefRule); | |
return validateNoLeftRecursion(topRule, currRefRule, errMsgProvider, newPath); | |
}); | |
return errors.concat(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"](errorsFromNextSteps)); | |
} | |
} | |
function getFirstNoneTerminal(definition) { | |
var result = []; | |
if (_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"](definition)) { | |
return result; | |
} | |
var firstProd = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["first"](definition); | |
/* istanbul ignore else */ | |
if (firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["NonTerminal"]) { | |
result.push(firstProd.referencedRule); | |
} | |
else if (firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Alternative"] || | |
firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Option"] || | |
firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["RepetitionMandatory"] || | |
firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["RepetitionMandatoryWithSeparator"] || | |
firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["RepetitionWithSeparator"] || | |
firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Repetition"]) { | |
result = result.concat(getFirstNoneTerminal(firstProd.definition)); | |
} | |
else if (firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Alternation"]) { | |
// each sub definition in alternation is a FLAT | |
result = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"](_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](firstProd.definition, function (currSubDef) { | |
return getFirstNoneTerminal(currSubDef.definition); | |
})); | |
} | |
else if (firstProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["Terminal"]) { | |
// nothing to see, move along | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
var isFirstOptional = Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["isOptionalProd"])(firstProd); | |
var hasMore = definition.length > 1; | |
if (isFirstOptional && hasMore) { | |
var rest = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["drop"](definition); | |
return result.concat(getFirstNoneTerminal(rest)); | |
} | |
else { | |
return result; | |
} | |
} | |
var OrCollector = /** @class */ (function (_super) { | |
__extends(OrCollector, _super); | |
function OrCollector() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
_this.alternations = []; | |
return _this; | |
} | |
OrCollector.prototype.visitAlternation = function (node) { | |
this.alternations.push(node); | |
}; | |
return OrCollector; | |
}(_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_6__["GAstVisitor"])); | |
function validateEmptyOrAlternative(topLevelRule, errMsgProvider) { | |
var orCollector = new OrCollector(); | |
topLevelRule.accept(orCollector); | |
var ors = orCollector.alternations; | |
var errors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"](ors, function (errors, currOr) { | |
var exceptLast = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["dropRight"](currOr.definition); | |
var currErrors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](exceptLast, function (currAlternative, currAltIdx) { | |
var possibleFirstInAlt = Object(_interpreter__WEBPACK_IMPORTED_MODULE_4__["nextPossibleTokensAfter"])([currAlternative], [], null, 1); | |
if (_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"](possibleFirstInAlt)) { | |
return { | |
message: errMsgProvider.buildEmptyAlternationError({ | |
topLevelRule: topLevelRule, | |
alternation: currOr, | |
emptyChoiceIdx: currAltIdx | |
}), | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].NONE_LAST_EMPTY_ALT, | |
ruleName: topLevelRule.name, | |
occurrence: currOr.idx, | |
alternative: currAltIdx + 1 | |
}; | |
} | |
else { | |
return null; | |
} | |
}); | |
return errors.concat(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["compact"](currErrors)); | |
}, []); | |
return errors; | |
} | |
function validateAmbiguousAlternationAlternatives(topLevelRule, globalMaxLookahead, errMsgProvider) { | |
var orCollector = new OrCollector(); | |
topLevelRule.accept(orCollector); | |
var ors = orCollector.alternations; | |
// New Handling of ignoring ambiguities | |
// - https://github.com/SAP/chevrotain/issues/869 | |
ors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reject"])(ors, function (currOr) { return currOr.ignoreAmbiguities === true; }); | |
var errors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"](ors, function (result, currOr) { | |
var currOccurrence = currOr.idx; | |
var actualMaxLookahead = currOr.maxLookahead || globalMaxLookahead; | |
var alternatives = Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["getLookaheadPathsForOr"])(currOccurrence, topLevelRule, actualMaxLookahead, currOr); | |
var altsAmbiguityErrors = checkAlternativesAmbiguities(alternatives, currOr, topLevelRule, errMsgProvider); | |
var altsPrefixAmbiguityErrors = checkPrefixAlternativesAmbiguities(alternatives, currOr, topLevelRule, errMsgProvider); | |
return result.concat(altsAmbiguityErrors, altsPrefixAmbiguityErrors); | |
}, []); | |
return errors; | |
} | |
var RepetionCollector = /** @class */ (function (_super) { | |
__extends(RepetionCollector, _super); | |
function RepetionCollector() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
_this.allProductions = []; | |
return _this; | |
} | |
RepetionCollector.prototype.visitRepetitionWithSeparator = function (manySep) { | |
this.allProductions.push(manySep); | |
}; | |
RepetionCollector.prototype.visitRepetitionMandatory = function (atLeastOne) { | |
this.allProductions.push(atLeastOne); | |
}; | |
RepetionCollector.prototype.visitRepetitionMandatoryWithSeparator = function (atLeastOneSep) { | |
this.allProductions.push(atLeastOneSep); | |
}; | |
RepetionCollector.prototype.visitRepetition = function (many) { | |
this.allProductions.push(many); | |
}; | |
return RepetionCollector; | |
}(_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_6__["GAstVisitor"])); | |
function validateTooManyAlts(topLevelRule, errMsgProvider) { | |
var orCollector = new OrCollector(); | |
topLevelRule.accept(orCollector); | |
var ors = orCollector.alternations; | |
var errors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"](ors, function (errors, currOr) { | |
if (currOr.definition.length > 255) { | |
errors.push({ | |
message: errMsgProvider.buildTooManyAlternativesError({ | |
topLevelRule: topLevelRule, | |
alternation: currOr | |
}), | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].TOO_MANY_ALTS, | |
ruleName: topLevelRule.name, | |
occurrence: currOr.idx | |
}); | |
} | |
return errors; | |
}, []); | |
return errors; | |
} | |
function validateSomeNonEmptyLookaheadPath(topLevelRules, maxLookahead, errMsgProvider) { | |
var errors = []; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(topLevelRules, function (currTopRule) { | |
var collectorVisitor = new RepetionCollector(); | |
currTopRule.accept(collectorVisitor); | |
var allRuleProductions = collectorVisitor.allProductions; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(allRuleProductions, function (currProd) { | |
var prodType = Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["getProdType"])(currProd); | |
var actualMaxLookahead = currProd.maxLookahead || maxLookahead; | |
var currOccurrence = currProd.idx; | |
var paths = Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["getLookaheadPathsForOptionalProd"])(currOccurrence, currTopRule, prodType, actualMaxLookahead); | |
var pathsInsideProduction = paths[0]; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(pathsInsideProduction))) { | |
var errMsg = errMsgProvider.buildEmptyRepetitionError({ | |
topLevelRule: currTopRule, | |
repetition: currProd | |
}); | |
errors.push({ | |
message: errMsg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].NO_NON_EMPTY_LOOKAHEAD, | |
ruleName: currTopRule.name | |
}); | |
} | |
}); | |
}); | |
return errors; | |
} | |
function checkAlternativesAmbiguities(alternatives, alternation, rule, errMsgProvider) { | |
var foundAmbiguousPaths = []; | |
var identicalAmbiguities = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(alternatives, function (result, currAlt, currAltIdx) { | |
// ignore (skip) ambiguities with this alternative | |
if (alternation.definition[currAltIdx].ignoreAmbiguities === true) { | |
return result; | |
} | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currAlt, function (currPath) { | |
var altsCurrPathAppearsIn = [currAltIdx]; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(alternatives, function (currOtherAlt, currOtherAltIdx) { | |
if (currAltIdx !== currOtherAltIdx && | |
Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["containsPath"])(currOtherAlt, currPath) && | |
// ignore (skip) ambiguities with this "other" alternative | |
alternation.definition[currOtherAltIdx].ignoreAmbiguities !== true) { | |
altsCurrPathAppearsIn.push(currOtherAltIdx); | |
} | |
}); | |
if (altsCurrPathAppearsIn.length > 1 && | |
!Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["containsPath"])(foundAmbiguousPaths, currPath)) { | |
foundAmbiguousPaths.push(currPath); | |
result.push({ | |
alts: altsCurrPathAppearsIn, | |
path: currPath | |
}); | |
} | |
}); | |
return result; | |
}, []); | |
var currErrors = _utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"](identicalAmbiguities, function (currAmbDescriptor) { | |
var ambgIndices = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(currAmbDescriptor.alts, function (currAltIdx) { return currAltIdx + 1; }); | |
var currMessage = errMsgProvider.buildAlternationAmbiguityError({ | |
topLevelRule: rule, | |
alternation: alternation, | |
ambiguityIndices: ambgIndices, | |
prefixPath: currAmbDescriptor.path | |
}); | |
return { | |
message: currMessage, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].AMBIGUOUS_ALTS, | |
ruleName: rule.name, | |
occurrence: alternation.idx, | |
alternatives: [currAmbDescriptor.alts] | |
}; | |
}); | |
return currErrors; | |
} | |
function checkPrefixAlternativesAmbiguities(alternatives, alternation, rule, errMsgProvider) { | |
var errors = []; | |
// flatten | |
var pathsAndIndices = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(alternatives, function (result, currAlt, idx) { | |
var currPathsAndIdx = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(currAlt, function (currPath) { | |
return { idx: idx, path: currPath }; | |
}); | |
return result.concat(currPathsAndIdx); | |
}, []); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(pathsAndIndices, function (currPathAndIdx) { | |
var alternativeGast = alternation.definition[currPathAndIdx.idx]; | |
// ignore (skip) ambiguities with this alternative | |
if (alternativeGast.ignoreAmbiguities === true) { | |
return; | |
} | |
var targetIdx = currPathAndIdx.idx; | |
var targetPath = currPathAndIdx.path; | |
var prefixAmbiguitiesPathsAndIndices = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findAll"])(pathsAndIndices, function (searchPathAndIdx) { | |
// prefix ambiguity can only be created from lower idx (higher priority) path | |
return ( | |
// ignore (skip) ambiguities with this "other" alternative | |
alternation.definition[searchPathAndIdx.idx].ignoreAmbiguities !== | |
true && | |
searchPathAndIdx.idx < targetIdx && | |
// checking for strict prefix because identical lookaheads | |
// will be be detected using a different validation. | |
Object(_lookahead__WEBPACK_IMPORTED_MODULE_3__["isStrictPrefixOfPath"])(searchPathAndIdx.path, targetPath)); | |
}); | |
var currPathPrefixErrors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(prefixAmbiguitiesPathsAndIndices, function (currAmbPathAndIdx) { | |
var ambgIndices = [currAmbPathAndIdx.idx + 1, targetIdx + 1]; | |
var occurrence = alternation.idx === 0 ? "" : alternation.idx; | |
var message = errMsgProvider.buildAlternationPrefixAmbiguityError({ | |
topLevelRule: rule, | |
alternation: alternation, | |
ambiguityIndices: ambgIndices, | |
prefixPath: currAmbPathAndIdx.path | |
}); | |
return { | |
message: message, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].AMBIGUOUS_PREFIX_ALTS, | |
ruleName: rule.name, | |
occurrence: occurrence, | |
alternatives: ambgIndices | |
}; | |
}); | |
errors = errors.concat(currPathPrefixErrors); | |
}); | |
return errors; | |
} | |
function checkTerminalAndNoneTerminalsNameSpace(topLevels, tokenTypes, errMsgProvider) { | |
var errors = []; | |
var tokenNames = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(tokenTypes, function (currToken) { return currToken.name; }); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(topLevels, function (currRule) { | |
var currRuleName = currRule.name; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(tokenNames, currRuleName)) { | |
var errMsg = errMsgProvider.buildNamespaceConflictError(currRule); | |
errors.push({ | |
message: errMsg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_1__["ParserDefinitionErrorType"].CONFLICT_TOKENS_RULES_NAMESPACE, | |
ruleName: currRuleName | |
}); | |
} | |
}); | |
return errors; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js": | |
/*!*********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js ***! | |
\*********************************************************************************************************/ | |
/*! exports provided: first, firstForSequence, firstForBranching, firstForTerminal */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstForSequence", function() { return firstForSequence; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstForBranching", function() { return firstForBranching; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstForTerminal", function() { return firstForTerminal; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _gast_gast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gast/gast */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js"); | |
function first(prod) { | |
/* istanbul ignore else */ | |
if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]) { | |
// this could in theory cause infinite loops if | |
// (1) prod A refs prod B. | |
// (2) prod B refs prod A | |
// (3) AB can match the empty set | |
// in other words a cycle where everything is optional so the first will keep | |
// looking ahead for the next optional part and will never exit | |
// currently there is no safeguard for this unique edge case because | |
// (1) not sure a grammar in which this can happen is useful for anything (productive) | |
return first(prod.referencedRule); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]) { | |
return firstForTerminal(prod); | |
} | |
else if (Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["isSequenceProd"])(prod)) { | |
return firstForSequence(prod); | |
} | |
else if (Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["isBranchingProd"])(prod)) { | |
return firstForBranching(prod); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function firstForSequence(prod) { | |
var firstSet = []; | |
var seq = prod.definition; | |
var nextSubProdIdx = 0; | |
var hasInnerProdsRemaining = seq.length > nextSubProdIdx; | |
var currSubProd; | |
// so we enter the loop at least once (if the definition is not empty | |
var isLastInnerProdOptional = true; | |
// scan a sequence until it's end or until we have found a NONE optional production in it | |
while (hasInnerProdsRemaining && isLastInnerProdOptional) { | |
currSubProd = seq[nextSubProdIdx]; | |
isLastInnerProdOptional = Object(_gast_gast__WEBPACK_IMPORTED_MODULE_2__["isOptionalProd"])(currSubProd); | |
firstSet = firstSet.concat(first(currSubProd)); | |
nextSubProdIdx = nextSubProdIdx + 1; | |
hasInnerProdsRemaining = seq.length > nextSubProdIdx; | |
} | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["uniq"])(firstSet); | |
} | |
function firstForBranching(prod) { | |
var allAlternativesFirsts = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(prod.definition, function (innerProd) { | |
return first(innerProd); | |
}); | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["uniq"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(allAlternativesFirsts)); | |
} | |
function firstForTerminal(terminal) { | |
return [terminal.terminalType]; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js": | |
/*!**********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js ***! | |
\**********************************************************************************************************/ | |
/*! exports provided: ResyncFollowsWalker, computeAllProdsFollows, buildBetweenProdsFollowPrefix, buildInProdFollowPrefix */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResyncFollowsWalker", function() { return ResyncFollowsWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeAllProdsFollows", function() { return computeAllProdsFollows; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildBetweenProdsFollowPrefix", function() { return buildBetweenProdsFollowPrefix; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildInProdFollowPrefix", function() { return buildInProdFollowPrefix; }); | |
/* harmony import */ var _rest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rest */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js"); | |
/* harmony import */ var _first__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./first */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constants */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/constants.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
// This ResyncFollowsWalker computes all of the follows required for RESYNC | |
// (skipping reference production). | |
var ResyncFollowsWalker = /** @class */ (function (_super) { | |
__extends(ResyncFollowsWalker, _super); | |
function ResyncFollowsWalker(topProd) { | |
var _this = _super.call(this) || this; | |
_this.topProd = topProd; | |
_this.follows = {}; | |
return _this; | |
} | |
ResyncFollowsWalker.prototype.startWalking = function () { | |
this.walk(this.topProd); | |
return this.follows; | |
}; | |
ResyncFollowsWalker.prototype.walkTerminal = function (terminal, currRest, prevRest) { | |
// do nothing! just like in the public sector after 13:00 | |
}; | |
ResyncFollowsWalker.prototype.walkProdRef = function (refProd, currRest, prevRest) { | |
var followName = buildBetweenProdsFollowPrefix(refProd.referencedRule, refProd.idx) + | |
this.topProd.name; | |
var fullRest = currRest.concat(prevRest); | |
var restProd = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Alternative"]({ definition: fullRest }); | |
var t_in_topProd_follows = Object(_first__WEBPACK_IMPORTED_MODULE_1__["first"])(restProd); | |
this.follows[followName] = t_in_topProd_follows; | |
}; | |
return ResyncFollowsWalker; | |
}(_rest__WEBPACK_IMPORTED_MODULE_0__["RestWalker"])); | |
function computeAllProdsFollows(topProductions) { | |
var reSyncFollows = {}; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(topProductions, function (topProd) { | |
var currRefsFollow = new ResyncFollowsWalker(topProd).startWalking(); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["assign"])(reSyncFollows, currRefsFollow); | |
}); | |
return reSyncFollows; | |
} | |
function buildBetweenProdsFollowPrefix(inner, occurenceInParent) { | |
return inner.name + occurenceInParent + _constants__WEBPACK_IMPORTED_MODULE_3__["IN"]; | |
} | |
function buildInProdFollowPrefix(terminal) { | |
var terminalName = terminal.terminalType.name; | |
return terminalName + terminal.idx + _constants__WEBPACK_IMPORTED_MODULE_3__["IN"]; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js": | |
/*!*************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js ***! | |
\*************************************************************************************************************/ | |
/*! exports provided: isSequenceProd, isOptionalProd, isBranchingProd, getProductionDslName, DslMethodsCollectorVisitor, collectMethods */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSequenceProd", function() { return isSequenceProd; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isOptionalProd", function() { return isOptionalProd; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBranchingProd", function() { return isBranchingProd; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProductionDslName", function() { return getProductionDslName; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DslMethodsCollectorVisitor", function() { return DslMethodsCollectorVisitor; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "collectMethods", function() { return collectMethods; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _gast_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _gast_visitor_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gast_visitor_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
function isSequenceProd(prod) { | |
return (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternative"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatory"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatoryWithSeparator"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Rule"]); | |
} | |
function isOptionalProd(prod, alreadyVisited) { | |
if (alreadyVisited === void 0) { alreadyVisited = []; } | |
var isDirectlyOptional = prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"] || | |
prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"]; | |
if (isDirectlyOptional) { | |
return true; | |
} | |
// note that this can cause infinite loop if one optional empty TOP production has a cyclic dependency with another | |
// empty optional top rule | |
// may be indirectly optional ((A?B?C?) | (D?E?F?)) | |
if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]) { | |
// for OR its enough for just one of the alternatives to be optional | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["some"])(prod.definition, function (subProd) { | |
return isOptionalProd(subProd, alreadyVisited); | |
}); | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"] && Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(alreadyVisited, prod)) { | |
// avoiding stack overflow due to infinite recursion | |
return false; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["AbstractProduction"]) { | |
if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]) { | |
alreadyVisited.push(prod); | |
} | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(prod.definition, function (subProd) { | |
return isOptionalProd(subProd, alreadyVisited); | |
}); | |
} | |
else { | |
return false; | |
} | |
} | |
function isBranchingProd(prod) { | |
return prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]; | |
} | |
function getProductionDslName(prod) { | |
/* istanbul ignore else */ | |
if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]) { | |
return "SUBRULE"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]) { | |
return "OPTION"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]) { | |
return "OR"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatory"]) { | |
return "AT_LEAST_ONE"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatoryWithSeparator"]) { | |
return "AT_LEAST_ONE_SEP"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"]) { | |
return "MANY_SEP"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"]) { | |
return "MANY"; | |
} | |
else if (prod instanceof _gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]) { | |
return "CONSUME"; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
var DslMethodsCollectorVisitor = /** @class */ (function (_super) { | |
__extends(DslMethodsCollectorVisitor, _super); | |
function DslMethodsCollectorVisitor() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
// A minus is never valid in an identifier name | |
_this.separator = "-"; | |
_this.dslMethods = { | |
option: [], | |
alternation: [], | |
repetition: [], | |
repetitionWithSeparator: [], | |
repetitionMandatory: [], | |
repetitionMandatoryWithSeparator: [] | |
}; | |
return _this; | |
} | |
DslMethodsCollectorVisitor.prototype.reset = function () { | |
this.dslMethods = { | |
option: [], | |
alternation: [], | |
repetition: [], | |
repetitionWithSeparator: [], | |
repetitionMandatory: [], | |
repetitionMandatoryWithSeparator: [] | |
}; | |
}; | |
DslMethodsCollectorVisitor.prototype.visitTerminal = function (terminal) { | |
var key = terminal.terminalType.name + this.separator + "Terminal"; | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(this.dslMethods, key)) { | |
this.dslMethods[key] = []; | |
} | |
this.dslMethods[key].push(terminal); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitNonTerminal = function (subrule) { | |
var key = subrule.nonTerminalName + this.separator + "Terminal"; | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(this.dslMethods, key)) { | |
this.dslMethods[key] = []; | |
} | |
this.dslMethods[key].push(subrule); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitOption = function (option) { | |
this.dslMethods.option.push(option); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitRepetitionWithSeparator = function (manySep) { | |
this.dslMethods.repetitionWithSeparator.push(manySep); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitRepetitionMandatory = function (atLeastOne) { | |
this.dslMethods.repetitionMandatory.push(atLeastOne); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitRepetitionMandatoryWithSeparator = function (atLeastOneSep) { | |
this.dslMethods.repetitionMandatoryWithSeparator.push(atLeastOneSep); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitRepetition = function (many) { | |
this.dslMethods.repetition.push(many); | |
}; | |
DslMethodsCollectorVisitor.prototype.visitAlternation = function (or) { | |
this.dslMethods.alternation.push(or); | |
}; | |
return DslMethodsCollectorVisitor; | |
}(_gast_visitor_public__WEBPACK_IMPORTED_MODULE_2__["GAstVisitor"])); | |
var collectorVisitor = new DslMethodsCollectorVisitor(); | |
function collectMethods(rule) { | |
collectorVisitor.reset(); | |
rule.accept(collectorVisitor); | |
var dslMethods = collectorVisitor.dslMethods; | |
// avoid uncleaned references | |
collectorVisitor.reset(); | |
return dslMethods; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js": | |
/*!********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js ***! | |
\********************************************************************************************************************/ | |
/*! exports provided: AbstractProduction, NonTerminal, Rule, Alternative, Option, RepetitionMandatory, RepetitionMandatoryWithSeparator, Repetition, RepetitionWithSeparator, Alternation, Terminal, serializeGrammar, serializeProduction */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractProduction", function() { return AbstractProduction; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NonTerminal", function() { return NonTerminal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rule", function() { return Rule; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Alternative", function() { return Alternative; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Option", function() { return Option; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RepetitionMandatory", function() { return RepetitionMandatory; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RepetitionMandatoryWithSeparator", function() { return RepetitionMandatoryWithSeparator; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Repetition", function() { return Repetition; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RepetitionWithSeparator", function() { return RepetitionWithSeparator; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Alternation", function() { return Alternation; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Terminal", function() { return Terminal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeGrammar", function() { return serializeGrammar; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeProduction", function() { return serializeProduction; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var AbstractProduction = /** @class */ (function () { | |
function AbstractProduction(definition) { | |
this.definition = definition; | |
} | |
AbstractProduction.prototype.accept = function (visitor) { | |
visitor.visit(this); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(this.definition, function (prod) { | |
prod.accept(visitor); | |
}); | |
}; | |
return AbstractProduction; | |
}()); | |
var NonTerminal = /** @class */ (function (_super) { | |
__extends(NonTerminal, _super); | |
function NonTerminal(options) { | |
var _this = _super.call(this, []) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
Object.defineProperty(NonTerminal.prototype, "definition", { | |
get: function () { | |
if (this.referencedRule !== undefined) { | |
return this.referencedRule.definition; | |
} | |
return []; | |
}, | |
set: function (definition) { | |
// immutable | |
}, | |
enumerable: true, | |
configurable: true | |
}); | |
NonTerminal.prototype.accept = function (visitor) { | |
visitor.visit(this); | |
// don't visit children of a reference, we will get cyclic infinite loops if we do so | |
}; | |
return NonTerminal; | |
}(AbstractProduction)); | |
var Rule = /** @class */ (function (_super) { | |
__extends(Rule, _super); | |
function Rule(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.orgText = ""; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return Rule; | |
}(AbstractProduction)); | |
var Alternative = /** @class */ (function (_super) { | |
__extends(Alternative, _super); | |
function Alternative(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.ignoreAmbiguities = false; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return Alternative; | |
}(AbstractProduction)); | |
var Option = /** @class */ (function (_super) { | |
__extends(Option, _super); | |
function Option(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return Option; | |
}(AbstractProduction)); | |
var RepetitionMandatory = /** @class */ (function (_super) { | |
__extends(RepetitionMandatory, _super); | |
function RepetitionMandatory(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return RepetitionMandatory; | |
}(AbstractProduction)); | |
var RepetitionMandatoryWithSeparator = /** @class */ (function (_super) { | |
__extends(RepetitionMandatoryWithSeparator, _super); | |
function RepetitionMandatoryWithSeparator(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return RepetitionMandatoryWithSeparator; | |
}(AbstractProduction)); | |
var Repetition = /** @class */ (function (_super) { | |
__extends(Repetition, _super); | |
function Repetition(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return Repetition; | |
}(AbstractProduction)); | |
var RepetitionWithSeparator = /** @class */ (function (_super) { | |
__extends(RepetitionWithSeparator, _super); | |
function RepetitionWithSeparator(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return RepetitionWithSeparator; | |
}(AbstractProduction)); | |
var Alternation = /** @class */ (function (_super) { | |
__extends(Alternation, _super); | |
function Alternation(options) { | |
var _this = _super.call(this, options.definition) || this; | |
_this.idx = 1; | |
_this.ignoreAmbiguities = false; | |
_this.hasPredicates = false; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(_this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
return _this; | |
} | |
return Alternation; | |
}(AbstractProduction)); | |
var Terminal = /** @class */ (function () { | |
function Terminal(options) { | |
this.idx = 1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["assign"])(this, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["pick"])(options, function (v) { return v !== undefined; })); | |
} | |
Terminal.prototype.accept = function (visitor) { | |
visitor.visit(this); | |
}; | |
return Terminal; | |
}()); | |
function serializeGrammar(topRules) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(topRules, serializeProduction); | |
} | |
function serializeProduction(node) { | |
function convertDefinition(definition) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(definition, serializeProduction); | |
} | |
/* istanbul ignore else */ | |
if (node instanceof NonTerminal) { | |
return { | |
type: "NonTerminal", | |
name: node.nonTerminalName, | |
idx: node.idx | |
}; | |
} | |
else if (node instanceof Alternative) { | |
return { | |
type: "Alternative", | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof Option) { | |
return { | |
type: "Option", | |
idx: node.idx, | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof RepetitionMandatory) { | |
return { | |
type: "RepetitionMandatory", | |
idx: node.idx, | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof RepetitionMandatoryWithSeparator) { | |
return { | |
type: "RepetitionMandatoryWithSeparator", | |
idx: node.idx, | |
separator: (serializeProduction(new Terminal({ terminalType: node.separator }))), | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof RepetitionWithSeparator) { | |
return { | |
type: "RepetitionWithSeparator", | |
idx: node.idx, | |
separator: (serializeProduction(new Terminal({ terminalType: node.separator }))), | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof Repetition) { | |
return { | |
type: "Repetition", | |
idx: node.idx, | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof Alternation) { | |
return { | |
type: "Alternation", | |
idx: node.idx, | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else if (node instanceof Terminal) { | |
var serializedTerminal = { | |
type: "Terminal", | |
name: node.terminalType.name, | |
label: Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_1__["tokenLabel"])(node.terminalType), | |
idx: node.idx | |
}; | |
var pattern = node.terminalType.PATTERN; | |
if (node.terminalType.PATTERN) { | |
serializedTerminal.pattern = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isRegExp"])(pattern) | |
? pattern.source | |
: pattern; | |
} | |
return serializedTerminal; | |
} | |
else if (node instanceof Rule) { | |
return { | |
type: "Rule", | |
name: node.name, | |
orgText: node.orgText, | |
definition: convertDefinition(node.definition) | |
}; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js": | |
/*!*****************************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js ***! | |
\*****************************************************************************************************************************/ | |
/*! exports provided: resolveGrammar, validateGrammar, assignOccurrenceIndices */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveGrammar", function() { return resolveGrammar; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateGrammar", function() { return validateGrammar; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignOccurrenceIndices", function() { return assignOccurrenceIndices; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _resolver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../resolver */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js"); | |
/* harmony import */ var _checks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../checks */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js"); | |
/* harmony import */ var _errors_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js"); | |
/* harmony import */ var _gast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gast */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js"); | |
function resolveGrammar(options) { | |
options = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["defaults"])(options, { | |
errMsgProvider: _errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultGrammarResolverErrorProvider"] | |
}); | |
var topRulesTable = {}; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(options.rules, function (rule) { | |
topRulesTable[rule.name] = rule; | |
}); | |
return Object(_resolver__WEBPACK_IMPORTED_MODULE_1__["resolveGrammar"])(topRulesTable, options.errMsgProvider); | |
} | |
function validateGrammar(options) { | |
options = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["defaults"])(options, { | |
errMsgProvider: _errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultGrammarValidatorErrorProvider"] | |
}); | |
return Object(_checks__WEBPACK_IMPORTED_MODULE_2__["validateGrammar"])(options.rules, options.maxLookahead, options.tokenTypes, options.errMsgProvider, options.grammarName); | |
} | |
function assignOccurrenceIndices(options) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(options.rules, function (currRule) { | |
var methodsCollector = new _gast__WEBPACK_IMPORTED_MODULE_4__["DslMethodsCollectorVisitor"](); | |
currRule.accept(methodsCollector); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(methodsCollector.dslMethods, function (methods) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(methods, function (currMethod, arrIdx) { | |
currMethod.idx = arrIdx + 1; | |
}); | |
}); | |
}); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js": | |
/*!****************************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js ***! | |
\****************************************************************************************************************************/ | |
/*! exports provided: GAstVisitor */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GAstVisitor", function() { return GAstVisitor; }); | |
/* harmony import */ var _gast_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
var GAstVisitor = /** @class */ (function () { | |
function GAstVisitor() { | |
} | |
GAstVisitor.prototype.visit = function (node) { | |
var nodeAny = node; | |
switch (nodeAny.constructor) { | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["NonTerminal"]: | |
return this.visitNonTerminal(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Alternative"]: | |
return this.visitAlternative(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Option"]: | |
return this.visitOption(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["RepetitionMandatory"]: | |
return this.visitRepetitionMandatory(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["RepetitionMandatoryWithSeparator"]: | |
return this.visitRepetitionMandatoryWithSeparator(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["RepetitionWithSeparator"]: | |
return this.visitRepetitionWithSeparator(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Repetition"]: | |
return this.visitRepetition(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Alternation"]: | |
return this.visitAlternation(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Terminal"]: | |
return this.visitTerminal(nodeAny); | |
case _gast_public__WEBPACK_IMPORTED_MODULE_0__["Rule"]: | |
return this.visitRule(nodeAny); | |
/* istanbul ignore next */ | |
default: | |
throw Error("non exhaustive match"); | |
} | |
}; | |
GAstVisitor.prototype.visitNonTerminal = function (node) { }; | |
GAstVisitor.prototype.visitAlternative = function (node) { }; | |
GAstVisitor.prototype.visitOption = function (node) { }; | |
GAstVisitor.prototype.visitRepetition = function (node) { }; | |
GAstVisitor.prototype.visitRepetitionMandatory = function (node) { }; | |
GAstVisitor.prototype.visitRepetitionMandatoryWithSeparator = function (node) { }; | |
GAstVisitor.prototype.visitRepetitionWithSeparator = function (node) { }; | |
GAstVisitor.prototype.visitAlternation = function (node) { }; | |
GAstVisitor.prototype.visitTerminal = function (node) { }; | |
GAstVisitor.prototype.visitRule = function (node) { }; | |
return GAstVisitor; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js": | |
/*!***************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js ***! | |
\***************************************************************************************************************/ | |
/*! exports provided: AbstractNextPossibleTokensWalker, NextAfterTokenWalker, AbstractNextTerminalAfterProductionWalker, NextTerminalAfterManyWalker, NextTerminalAfterManySepWalker, NextTerminalAfterAtLeastOneWalker, NextTerminalAfterAtLeastOneSepWalker, possiblePathsFrom, nextPossibleTokensAfter */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractNextPossibleTokensWalker", function() { return AbstractNextPossibleTokensWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextAfterTokenWalker", function() { return NextAfterTokenWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbstractNextTerminalAfterProductionWalker", function() { return AbstractNextTerminalAfterProductionWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextTerminalAfterManyWalker", function() { return NextTerminalAfterManyWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextTerminalAfterManySepWalker", function() { return NextTerminalAfterManySepWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextTerminalAfterAtLeastOneWalker", function() { return NextTerminalAfterAtLeastOneWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NextTerminalAfterAtLeastOneSepWalker", function() { return NextTerminalAfterAtLeastOneSepWalker; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "possiblePathsFrom", function() { return possiblePathsFrom; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nextPossibleTokensAfter", function() { return nextPossibleTokensAfter; }); | |
/* harmony import */ var _rest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rest */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _first__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./first */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var AbstractNextPossibleTokensWalker = /** @class */ (function (_super) { | |
__extends(AbstractNextPossibleTokensWalker, _super); | |
function AbstractNextPossibleTokensWalker(topProd, path) { | |
var _this = _super.call(this) || this; | |
_this.topProd = topProd; | |
_this.path = path; | |
_this.possibleTokTypes = []; | |
_this.nextProductionName = ""; | |
_this.nextProductionOccurrence = 0; | |
_this.found = false; | |
_this.isAtEndOfPath = false; | |
return _this; | |
} | |
AbstractNextPossibleTokensWalker.prototype.startWalking = function () { | |
this.found = false; | |
if (this.path.ruleStack[0] !== this.topProd.name) { | |
throw Error("The path does not start with the walker's top Rule!"); | |
} | |
// immutable for the win | |
this.ruleStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(this.path.ruleStack).reverse(); // intelij bug requires assertion | |
this.occurrenceStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(this.path.occurrenceStack).reverse(); // intelij bug requires assertion | |
// already verified that the first production is valid, we now seek the 2nd production | |
this.ruleStack.pop(); | |
this.occurrenceStack.pop(); | |
this.updateExpectedNext(); | |
this.walk(this.topProd); | |
return this.possibleTokTypes; | |
}; | |
AbstractNextPossibleTokensWalker.prototype.walk = function (prod, prevRest) { | |
if (prevRest === void 0) { prevRest = []; } | |
// stop scanning once we found the path | |
if (!this.found) { | |
_super.prototype.walk.call(this, prod, prevRest); | |
} | |
}; | |
AbstractNextPossibleTokensWalker.prototype.walkProdRef = function (refProd, currRest, prevRest) { | |
// found the next production, need to keep walking in it | |
if (refProd.referencedRule.name === this.nextProductionName && | |
refProd.idx === this.nextProductionOccurrence) { | |
var fullRest = currRest.concat(prevRest); | |
this.updateExpectedNext(); | |
this.walk(refProd.referencedRule, fullRest); | |
} | |
}; | |
AbstractNextPossibleTokensWalker.prototype.updateExpectedNext = function () { | |
// need to consume the Terminal | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(this.ruleStack)) { | |
// must reset nextProductionXXX to avoid walking down another Top Level production while what we are | |
// really seeking is the last Terminal... | |
this.nextProductionName = ""; | |
this.nextProductionOccurrence = 0; | |
this.isAtEndOfPath = true; | |
} | |
else { | |
this.nextProductionName = this.ruleStack.pop(); | |
this.nextProductionOccurrence = this.occurrenceStack.pop(); | |
} | |
}; | |
return AbstractNextPossibleTokensWalker; | |
}(_rest__WEBPACK_IMPORTED_MODULE_0__["RestWalker"])); | |
var NextAfterTokenWalker = /** @class */ (function (_super) { | |
__extends(NextAfterTokenWalker, _super); | |
function NextAfterTokenWalker(topProd, path) { | |
var _this = _super.call(this, topProd, path) || this; | |
_this.path = path; | |
_this.nextTerminalName = ""; | |
_this.nextTerminalOccurrence = 0; | |
_this.nextTerminalName = _this.path.lastTok.name; | |
_this.nextTerminalOccurrence = _this.path.lastTokOccurrence; | |
return _this; | |
} | |
NextAfterTokenWalker.prototype.walkTerminal = function (terminal, currRest, prevRest) { | |
if (this.isAtEndOfPath && | |
terminal.terminalType.name === this.nextTerminalName && | |
terminal.idx === this.nextTerminalOccurrence && | |
!this.found) { | |
var fullRest = currRest.concat(prevRest); | |
var restProd = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternative"]({ definition: fullRest }); | |
this.possibleTokTypes = Object(_first__WEBPACK_IMPORTED_MODULE_2__["first"])(restProd); | |
this.found = true; | |
} | |
}; | |
return NextAfterTokenWalker; | |
}(AbstractNextPossibleTokensWalker)); | |
/** | |
* This walker only "walks" a single "TOP" level in the Grammar Ast, this means | |
* it never "follows" production refs | |
*/ | |
var AbstractNextTerminalAfterProductionWalker = /** @class */ (function (_super) { | |
__extends(AbstractNextTerminalAfterProductionWalker, _super); | |
function AbstractNextTerminalAfterProductionWalker(topRule, occurrence) { | |
var _this = _super.call(this) || this; | |
_this.topRule = topRule; | |
_this.occurrence = occurrence; | |
_this.result = { | |
token: undefined, | |
occurrence: undefined, | |
isEndOfRule: undefined | |
}; | |
return _this; | |
} | |
AbstractNextTerminalAfterProductionWalker.prototype.startWalking = function () { | |
this.walk(this.topRule); | |
return this.result; | |
}; | |
return AbstractNextTerminalAfterProductionWalker; | |
}(_rest__WEBPACK_IMPORTED_MODULE_0__["RestWalker"])); | |
var NextTerminalAfterManyWalker = /** @class */ (function (_super) { | |
__extends(NextTerminalAfterManyWalker, _super); | |
function NextTerminalAfterManyWalker() { | |
return _super !== null && _super.apply(this, arguments) || this; | |
} | |
NextTerminalAfterManyWalker.prototype.walkMany = function (manyProd, currRest, prevRest) { | |
if (manyProd.idx === this.occurrence) { | |
var firstAfterMany = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(currRest.concat(prevRest)); | |
this.result.isEndOfRule = firstAfterMany === undefined; | |
if (firstAfterMany instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
this.result.token = firstAfterMany.terminalType; | |
this.result.occurrence = firstAfterMany.idx; | |
} | |
} | |
else { | |
_super.prototype.walkMany.call(this, manyProd, currRest, prevRest); | |
} | |
}; | |
return NextTerminalAfterManyWalker; | |
}(AbstractNextTerminalAfterProductionWalker)); | |
var NextTerminalAfterManySepWalker = /** @class */ (function (_super) { | |
__extends(NextTerminalAfterManySepWalker, _super); | |
function NextTerminalAfterManySepWalker() { | |
return _super !== null && _super.apply(this, arguments) || this; | |
} | |
NextTerminalAfterManySepWalker.prototype.walkManySep = function (manySepProd, currRest, prevRest) { | |
if (manySepProd.idx === this.occurrence) { | |
var firstAfterManySep = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(currRest.concat(prevRest)); | |
this.result.isEndOfRule = firstAfterManySep === undefined; | |
if (firstAfterManySep instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
this.result.token = firstAfterManySep.terminalType; | |
this.result.occurrence = firstAfterManySep.idx; | |
} | |
} | |
else { | |
_super.prototype.walkManySep.call(this, manySepProd, currRest, prevRest); | |
} | |
}; | |
return NextTerminalAfterManySepWalker; | |
}(AbstractNextTerminalAfterProductionWalker)); | |
var NextTerminalAfterAtLeastOneWalker = /** @class */ (function (_super) { | |
__extends(NextTerminalAfterAtLeastOneWalker, _super); | |
function NextTerminalAfterAtLeastOneWalker() { | |
return _super !== null && _super.apply(this, arguments) || this; | |
} | |
NextTerminalAfterAtLeastOneWalker.prototype.walkAtLeastOne = function (atLeastOneProd, currRest, prevRest) { | |
if (atLeastOneProd.idx === this.occurrence) { | |
var firstAfterAtLeastOne = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(currRest.concat(prevRest)); | |
this.result.isEndOfRule = firstAfterAtLeastOne === undefined; | |
if (firstAfterAtLeastOne instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
this.result.token = firstAfterAtLeastOne.terminalType; | |
this.result.occurrence = firstAfterAtLeastOne.idx; | |
} | |
} | |
else { | |
_super.prototype.walkAtLeastOne.call(this, atLeastOneProd, currRest, prevRest); | |
} | |
}; | |
return NextTerminalAfterAtLeastOneWalker; | |
}(AbstractNextTerminalAfterProductionWalker)); | |
// TODO: reduce code duplication in the AfterWalkers | |
var NextTerminalAfterAtLeastOneSepWalker = /** @class */ (function (_super) { | |
__extends(NextTerminalAfterAtLeastOneSepWalker, _super); | |
function NextTerminalAfterAtLeastOneSepWalker() { | |
return _super !== null && _super.apply(this, arguments) || this; | |
} | |
NextTerminalAfterAtLeastOneSepWalker.prototype.walkAtLeastOneSep = function (atleastOneSepProd, currRest, prevRest) { | |
if (atleastOneSepProd.idx === this.occurrence) { | |
var firstAfterfirstAfterAtLeastOneSep = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(currRest.concat(prevRest)); | |
this.result.isEndOfRule = firstAfterfirstAfterAtLeastOneSep === undefined; | |
if (firstAfterfirstAfterAtLeastOneSep instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
this.result.token = firstAfterfirstAfterAtLeastOneSep.terminalType; | |
this.result.occurrence = firstAfterfirstAfterAtLeastOneSep.idx; | |
} | |
} | |
else { | |
_super.prototype.walkAtLeastOneSep.call(this, atleastOneSepProd, currRest, prevRest); | |
} | |
}; | |
return NextTerminalAfterAtLeastOneSepWalker; | |
}(AbstractNextTerminalAfterProductionWalker)); | |
function possiblePathsFrom(targetDef, maxLength, currPath) { | |
if (currPath === void 0) { currPath = []; } | |
// avoid side effects | |
currPath = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(currPath); | |
var result = []; | |
var i = 0; | |
// TODO: avoid inner funcs | |
function remainingPathWith(nextDef) { | |
return nextDef.concat(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(targetDef, i + 1)); | |
} | |
// TODO: avoid inner funcs | |
function getAlternativesForProd(definition) { | |
var alternatives = possiblePathsFrom(remainingPathWith(definition), maxLength, currPath); | |
return result.concat(alternatives); | |
} | |
/** | |
* Mandatory productions will halt the loop as the paths computed from their recursive calls will already contain the | |
* following (rest) of the targetDef. | |
* | |
* For optional productions (Option/Repetition/...) the loop will continue to represent the paths that do not include the | |
* the optional production. | |
*/ | |
while (currPath.length < maxLength && i < targetDef.length) { | |
var prod = targetDef[i]; | |
/* istanbul ignore else */ | |
if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternative"]) { | |
return getAlternativesForProd(prod.definition); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["NonTerminal"]) { | |
return getAlternativesForProd(prod.definition); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Option"]) { | |
result = getAlternativesForProd(prod.definition); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionMandatory"]) { | |
var newDef = prod.definition.concat([ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: prod.definition | |
}) | |
]); | |
return getAlternativesForProd(newDef); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionMandatoryWithSeparator"]) { | |
var newDef = [ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternative"]({ definition: prod.definition }), | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: [new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]({ terminalType: prod.separator })].concat(prod.definition) | |
}) | |
]; | |
return getAlternativesForProd(newDef); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionWithSeparator"]) { | |
var newDef = prod.definition.concat([ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: [new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]({ terminalType: prod.separator })].concat(prod.definition) | |
}) | |
]); | |
result = getAlternativesForProd(newDef); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]) { | |
var newDef = prod.definition.concat([ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: prod.definition | |
}) | |
]); | |
result = getAlternativesForProd(newDef); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternation"]) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(prod.definition, function (currAlt) { | |
result = getAlternativesForProd(currAlt.definition); | |
}); | |
return result; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
currPath.push(prod.terminalType); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
i++; | |
} | |
result.push({ | |
partialPath: currPath, | |
suffixDef: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(targetDef, i) | |
}); | |
return result; | |
} | |
function nextPossibleTokensAfter(initialDef, tokenVector, tokMatcher, maxLookAhead) { | |
var EXIT_NON_TERMINAL = "EXIT_NONE_TERMINAL"; | |
// to avoid creating a new Array each time. | |
var EXIT_NON_TERMINAL_ARR = [EXIT_NON_TERMINAL]; | |
var EXIT_ALTERNATIVE = "EXIT_ALTERNATIVE"; | |
var foundCompletePath = false; | |
var tokenVectorLength = tokenVector.length; | |
var minimalAlternativesIndex = tokenVectorLength - maxLookAhead - 1; | |
var result = []; | |
var possiblePaths = []; | |
possiblePaths.push({ | |
idx: -1, | |
def: initialDef, | |
ruleStack: [], | |
occurrenceStack: [] | |
}); | |
while (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(possiblePaths)) { | |
var currPath = possiblePaths.pop(); | |
// skip alternatives if no more results can be found (assuming deterministic grammar with fixed lookahead) | |
if (currPath === EXIT_ALTERNATIVE) { | |
if (foundCompletePath && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["last"])(possiblePaths).idx <= minimalAlternativesIndex) { | |
// remove irrelevant alternative | |
possiblePaths.pop(); | |
} | |
continue; | |
} | |
var currDef = currPath.def; | |
var currIdx = currPath.idx; | |
var currRuleStack = currPath.ruleStack; | |
var currOccurrenceStack = currPath.occurrenceStack; | |
// For Example: an empty path could exist in a valid grammar in the case of an EMPTY_ALT | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(currDef)) { | |
continue; | |
} | |
var prod = currDef[0]; | |
/* istanbul ignore else */ | |
if (prod === EXIT_NON_TERMINAL) { | |
var nextPath = { | |
idx: currIdx, | |
def: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef), | |
ruleStack: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["dropRight"])(currRuleStack), | |
occurrenceStack: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["dropRight"])(currOccurrenceStack) | |
}; | |
possiblePaths.push(nextPath); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]) { | |
/* istanbul ignore else */ | |
if (currIdx < tokenVectorLength - 1) { | |
var nextIdx = currIdx + 1; | |
var actualToken = tokenVector[nextIdx]; | |
if (tokMatcher(actualToken, prod.terminalType)) { | |
var nextPath = { | |
idx: nextIdx, | |
def: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPath); | |
} | |
// end of the line | |
} | |
else if (currIdx === tokenVectorLength - 1) { | |
// IGNORE ABOVE ELSE | |
result.push({ | |
nextTokenType: prod.terminalType, | |
nextTokenOccurrence: prod.idx, | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}); | |
foundCompletePath = true; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["NonTerminal"]) { | |
var newRuleStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(currRuleStack); | |
newRuleStack.push(prod.nonTerminalName); | |
var newOccurrenceStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(currOccurrenceStack); | |
newOccurrenceStack.push(prod.idx); | |
var nextPath = { | |
idx: currIdx, | |
def: prod.definition.concat(EXIT_NON_TERMINAL_ARR, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)), | |
ruleStack: newRuleStack, | |
occurrenceStack: newOccurrenceStack | |
}; | |
possiblePaths.push(nextPath); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Option"]) { | |
// the order of alternatives is meaningful, FILO (Last path will be traversed first). | |
var nextPathWithout = { | |
idx: currIdx, | |
def: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWithout); | |
// required marker to avoid backtracking paths whose higher priority alternatives already matched | |
possiblePaths.push(EXIT_ALTERNATIVE); | |
var nextPathWith = { | |
idx: currIdx, | |
def: prod.definition.concat(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWith); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionMandatory"]) { | |
// TODO:(THE NEW operators here take a while...) (convert once?) | |
var secondIteration = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: prod.definition, | |
idx: prod.idx | |
}); | |
var nextDef = prod.definition.concat([secondIteration], Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)); | |
var nextPath = { | |
idx: currIdx, | |
def: nextDef, | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPath); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionMandatoryWithSeparator"]) { | |
// TODO:(THE NEW operators here take a while...) (convert once?) | |
var separatorGast = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]({ | |
terminalType: prod.separator | |
}); | |
var secondIteration = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: [separatorGast].concat(prod.definition), | |
idx: prod.idx | |
}); | |
var nextDef = prod.definition.concat([secondIteration], Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)); | |
var nextPath = { | |
idx: currIdx, | |
def: nextDef, | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPath); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["RepetitionWithSeparator"]) { | |
// the order of alternatives is meaningful, FILO (Last path will be traversed first). | |
var nextPathWithout = { | |
idx: currIdx, | |
def: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWithout); | |
// required marker to avoid backtracking paths whose higher priority alternatives already matched | |
possiblePaths.push(EXIT_ALTERNATIVE); | |
var separatorGast = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Terminal"]({ | |
terminalType: prod.separator | |
}); | |
var nthRepetition = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: [separatorGast].concat(prod.definition), | |
idx: prod.idx | |
}); | |
var nextDef = prod.definition.concat([nthRepetition], Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)); | |
var nextPathWith = { | |
idx: currIdx, | |
def: nextDef, | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWith); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]) { | |
// the order of alternatives is meaningful, FILO (Last path will be traversed first). | |
var nextPathWithout = { | |
idx: currIdx, | |
def: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWithout); | |
// required marker to avoid backtracking paths whose higher priority alternatives already matched | |
possiblePaths.push(EXIT_ALTERNATIVE); | |
// TODO: an empty repetition will cause infinite loops here, will the parser detect this in selfAnalysis? | |
var nthRepetition = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Repetition"]({ | |
definition: prod.definition, | |
idx: prod.idx | |
}); | |
var nextDef = prod.definition.concat([nthRepetition], Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)); | |
var nextPathWith = { | |
idx: currIdx, | |
def: nextDef, | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(nextPathWith); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternation"]) { | |
// the order of alternatives is meaningful, FILO (Last path will be traversed first). | |
for (var i = prod.definition.length - 1; i >= 0; i--) { | |
var currAlt = prod.definition[i]; | |
var currAltPath = { | |
idx: currIdx, | |
def: currAlt.definition.concat(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}; | |
possiblePaths.push(currAltPath); | |
possiblePaths.push(EXIT_ALTERNATIVE); | |
} | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Alternative"]) { | |
possiblePaths.push({ | |
idx: currIdx, | |
def: prod.definition.concat(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["drop"])(currDef)), | |
ruleStack: currRuleStack, | |
occurrenceStack: currOccurrenceStack | |
}); | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_3__["Rule"]) { | |
// last because we should only encounter at most a single one of these per invocation. | |
possiblePaths.push(expandTopLevelRule(prod, currIdx, currRuleStack, currOccurrenceStack)); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
return result; | |
} | |
function expandTopLevelRule(topRule, currIdx, currRuleStack, currOccurrenceStack) { | |
var newRuleStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(currRuleStack); | |
newRuleStack.push(topRule.name); | |
var newCurrOccurrenceStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(currOccurrenceStack); | |
// top rule is always assumed to have been called with occurrence index 1 | |
newCurrOccurrenceStack.push(1); | |
return { | |
idx: currIdx, | |
def: topRule.definition, | |
ruleStack: newRuleStack, | |
occurrenceStack: newCurrOccurrenceStack | |
}; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js": | |
/*!********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js ***! | |
\********************************************************************************************************/ | |
/*! exports provided: BITS_FOR_METHOD_TYPE, BITS_FOR_OCCURRENCE_IDX, BITS_FOR_RULE_IDX, BITS_FOR_ALT_IDX, OR_IDX, OPTION_IDX, MANY_IDX, AT_LEAST_ONE_IDX, MANY_SEP_IDX, AT_LEAST_ONE_SEP_IDX, getKeyForAutomaticLookahead */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BITS_FOR_METHOD_TYPE", function() { return BITS_FOR_METHOD_TYPE; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BITS_FOR_OCCURRENCE_IDX", function() { return BITS_FOR_OCCURRENCE_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BITS_FOR_RULE_IDX", function() { return BITS_FOR_RULE_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BITS_FOR_ALT_IDX", function() { return BITS_FOR_ALT_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OR_IDX", function() { return OR_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OPTION_IDX", function() { return OPTION_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MANY_IDX", function() { return MANY_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AT_LEAST_ONE_IDX", function() { return AT_LEAST_ONE_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MANY_SEP_IDX", function() { return MANY_SEP_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AT_LEAST_ONE_SEP_IDX", function() { return AT_LEAST_ONE_SEP_IDX; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKeyForAutomaticLookahead", function() { return getKeyForAutomaticLookahead; }); | |
// Lookahead keys are 32Bit integers in the form | |
// TTTTTTTT-ZZZZZZZZZZZZ-YYYY-XXXXXXXX | |
// XXXX -> Occurrence Index bitmap. | |
// YYYY -> DSL Method Type bitmap. | |
// ZZZZZZZZZZZZZZZ -> Rule short Index bitmap. | |
// TTTTTTTTT -> alternation alternative index bitmap | |
var BITS_FOR_METHOD_TYPE = 4; | |
var BITS_FOR_OCCURRENCE_IDX = 8; | |
var BITS_FOR_RULE_IDX = 12; | |
// TODO: validation, this means that there may at most 2^8 --> 256 alternatives for an alternation. | |
var BITS_FOR_ALT_IDX = 8; | |
// short string used as part of mapping keys. | |
// being short improves the performance when composing KEYS for maps out of these | |
// The 5 - 8 bits (16 possible values, are reserved for the DSL method indices) | |
/* tslint:disable */ | |
var OR_IDX = 1 << BITS_FOR_OCCURRENCE_IDX; | |
var OPTION_IDX = 2 << BITS_FOR_OCCURRENCE_IDX; | |
var MANY_IDX = 3 << BITS_FOR_OCCURRENCE_IDX; | |
var AT_LEAST_ONE_IDX = 4 << BITS_FOR_OCCURRENCE_IDX; | |
var MANY_SEP_IDX = 5 << BITS_FOR_OCCURRENCE_IDX; | |
var AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX; | |
/* tslint:enable */ | |
// this actually returns a number, but it is always used as a string (object prop key) | |
function getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) { | |
/* tslint:disable */ | |
return occurrence | dslMethodIdx | ruleIdx; | |
/* tslint:enable */ | |
} | |
var BITS_START_FOR_ALT_IDX = 32 - BITS_FOR_ALT_IDX; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js": | |
/*!*************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js ***! | |
\*************************************************************************************************************/ | |
/*! exports provided: PROD_TYPE, getProdType, buildLookaheadFuncForOr, buildLookaheadFuncForOptionalProd, buildAlternativesLookAheadFunc, buildSingleAlternativeLookaheadFunction, lookAheadSequenceFromAlternatives, getLookaheadPathsForOr, getLookaheadPathsForOptionalProd, containsPath, isStrictPrefixOfPath, areTokenCategoriesNotUsed */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PROD_TYPE", function() { return PROD_TYPE; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProdType", function() { return getProdType; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildLookaheadFuncForOr", function() { return buildLookaheadFuncForOr; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildLookaheadFuncForOptionalProd", function() { return buildLookaheadFuncForOptionalProd; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildAlternativesLookAheadFunc", function() { return buildAlternativesLookAheadFunc; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildSingleAlternativeLookaheadFunction", function() { return buildSingleAlternativeLookaheadFunction; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lookAheadSequenceFromAlternatives", function() { return lookAheadSequenceFromAlternatives; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLookaheadPathsForOr", function() { return getLookaheadPathsForOr; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLookaheadPathsForOptionalProd", function() { return getLookaheadPathsForOptionalProd; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "containsPath", function() { return containsPath; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isStrictPrefixOfPath", function() { return isStrictPrefixOfPath; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areTokenCategoriesNotUsed", function() { return areTokenCategoriesNotUsed; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _interpreter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interpreter */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js"); | |
/* harmony import */ var _rest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rest */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js"); | |
/* harmony import */ var _scan_tokens__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../scan/tokens */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./gast/gast_visitor_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var PROD_TYPE; | |
(function (PROD_TYPE) { | |
PROD_TYPE[PROD_TYPE["OPTION"] = 0] = "OPTION"; | |
PROD_TYPE[PROD_TYPE["REPETITION"] = 1] = "REPETITION"; | |
PROD_TYPE[PROD_TYPE["REPETITION_MANDATORY"] = 2] = "REPETITION_MANDATORY"; | |
PROD_TYPE[PROD_TYPE["REPETITION_MANDATORY_WITH_SEPARATOR"] = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR"; | |
PROD_TYPE[PROD_TYPE["REPETITION_WITH_SEPARATOR"] = 4] = "REPETITION_WITH_SEPARATOR"; | |
PROD_TYPE[PROD_TYPE["ALTERNATION"] = 5] = "ALTERNATION"; | |
})(PROD_TYPE || (PROD_TYPE = {})); | |
function getProdType(prod) { | |
/* istanbul ignore else */ | |
if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Option"]) { | |
return PROD_TYPE.OPTION; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Repetition"]) { | |
return PROD_TYPE.REPETITION; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["RepetitionMandatory"]) { | |
return PROD_TYPE.REPETITION_MANDATORY; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["RepetitionMandatoryWithSeparator"]) { | |
return PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["RepetitionWithSeparator"]) { | |
return PROD_TYPE.REPETITION_WITH_SEPARATOR; | |
} | |
else if (prod instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Alternation"]) { | |
return PROD_TYPE.ALTERNATION; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function buildLookaheadFuncForOr(occurrence, ruleGrammar, maxLookahead, hasPredicates, dynamicTokensEnabled, laFuncBuilder) { | |
var lookAheadPaths = getLookaheadPathsForOr(occurrence, ruleGrammar, maxLookahead); | |
var tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths) | |
? _scan_tokens__WEBPACK_IMPORTED_MODULE_3__["tokenStructuredMatcherNoCategories"] | |
: _scan_tokens__WEBPACK_IMPORTED_MODULE_3__["tokenStructuredMatcher"]; | |
return laFuncBuilder(lookAheadPaths, hasPredicates, tokenMatcher, dynamicTokensEnabled); | |
} | |
/** | |
* When dealing with an Optional production (OPTION/MANY/2nd iteration of AT_LEAST_ONE/...) we need to compare | |
* the lookahead "inside" the production and the lookahead immediately "after" it in the same top level rule (context free). | |
* | |
* Example: given a production: | |
* ABC(DE)?DF | |
* | |
* The optional '(DE)?' should only be entered if we see 'DE'. a single Token 'D' is not sufficient to distinguish between the two | |
* alternatives. | |
* | |
* @returns A Lookahead function which will return true IFF the parser should parse the Optional production. | |
*/ | |
function buildLookaheadFuncForOptionalProd(occurrence, ruleGrammar, k, dynamicTokensEnabled, prodType, lookaheadBuilder) { | |
var lookAheadPaths = getLookaheadPathsForOptionalProd(occurrence, ruleGrammar, prodType, k); | |
var tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths) | |
? _scan_tokens__WEBPACK_IMPORTED_MODULE_3__["tokenStructuredMatcherNoCategories"] | |
: _scan_tokens__WEBPACK_IMPORTED_MODULE_3__["tokenStructuredMatcher"]; | |
return lookaheadBuilder(lookAheadPaths[0], tokenMatcher, dynamicTokensEnabled); | |
} | |
function buildAlternativesLookAheadFunc(alts, hasPredicates, tokenMatcher, dynamicTokensEnabled) { | |
var numOfAlts = alts.length; | |
var areAllOneTokenLookahead = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(alts, function (currAlt) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(currAlt, function (currPath) { | |
return currPath.length === 1; | |
}); | |
}); | |
// This version takes into account the predicates as well. | |
if (hasPredicates) { | |
/** | |
* @returns {number} - The chosen alternative index | |
*/ | |
return function (orAlts) { | |
// unfortunately the predicates must be extracted every single time | |
// as they cannot be cached due to references to parameters(vars) which are no longer valid. | |
// note that in the common case of no predicates, no cpu time will be wasted on this (see else block) | |
var predicates = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(orAlts, function (currAlt) { return currAlt.GATE; }); | |
for (var t = 0; t < numOfAlts; t++) { | |
var currAlt = alts[t]; | |
var currNumOfPaths = currAlt.length; | |
var currPredicate = predicates[t]; | |
if (currPredicate !== undefined && currPredicate.call(this) === false) { | |
// if the predicate does not match there is no point in checking the paths | |
continue; | |
} | |
nextPath: for (var j = 0; j < currNumOfPaths; j++) { | |
var currPath = currAlt[j]; | |
var currPathLength = currPath.length; | |
for (var i = 0; i < currPathLength; i++) { | |
var nextToken = this.LA(i + 1); | |
if (tokenMatcher(nextToken, currPath[i]) === false) { | |
// mismatch in current path | |
// try the next pth | |
continue nextPath; | |
} | |
} | |
// found a full path that matches. | |
// this will also work for an empty ALT as the loop will be skipped | |
return t; | |
} | |
// none of the paths for the current alternative matched | |
// try the next alternative | |
} | |
// none of the alternatives could be matched | |
return undefined; | |
}; | |
} | |
else if (areAllOneTokenLookahead && !dynamicTokensEnabled) { | |
// optimized (common) case of all the lookaheads paths requiring only | |
// a single token lookahead. These Optimizations cannot work if dynamically defined Tokens are used. | |
var singleTokenAlts = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(alts, function (currAlt) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(currAlt); | |
}); | |
var choiceToAlt_1 = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(singleTokenAlts, function (result, currAlt, idx) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currAlt, function (currTokType) { | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(result, currTokType.tokenTypeIdx)) { | |
result[currTokType.tokenTypeIdx] = idx; | |
} | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currTokType.categoryMatches, function (currExtendingType) { | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(result, currExtendingType)) { | |
result[currExtendingType] = idx; | |
} | |
}); | |
}); | |
return result; | |
}, []); | |
/** | |
* @returns {number} - The chosen alternative index | |
*/ | |
return function () { | |
var nextToken = this.LA(1); | |
return choiceToAlt_1[nextToken.tokenTypeIdx]; | |
}; | |
} | |
else { | |
// optimized lookahead without needing to check the predicates at all. | |
// this causes code duplication which is intentional to improve performance. | |
/** | |
* @returns {number} - The chosen alternative index | |
*/ | |
return function () { | |
for (var t = 0; t < numOfAlts; t++) { | |
var currAlt = alts[t]; | |
var currNumOfPaths = currAlt.length; | |
nextPath: for (var j = 0; j < currNumOfPaths; j++) { | |
var currPath = currAlt[j]; | |
var currPathLength = currPath.length; | |
for (var i = 0; i < currPathLength; i++) { | |
var nextToken = this.LA(i + 1); | |
if (tokenMatcher(nextToken, currPath[i]) === false) { | |
// mismatch in current path | |
// try the next pth | |
continue nextPath; | |
} | |
} | |
// found a full path that matches. | |
// this will also work for an empty ALT as the loop will be skipped | |
return t; | |
} | |
// none of the paths for the current alternative matched | |
// try the next alternative | |
} | |
// none of the alternatives could be matched | |
return undefined; | |
}; | |
} | |
} | |
function buildSingleAlternativeLookaheadFunction(alt, tokenMatcher, dynamicTokensEnabled) { | |
var areAllOneTokenLookahead = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(alt, function (currPath) { | |
return currPath.length === 1; | |
}); | |
var numOfPaths = alt.length; | |
// optimized (common) case of all the lookaheads paths requiring only | |
// a single token lookahead. | |
if (areAllOneTokenLookahead && !dynamicTokensEnabled) { | |
var singleTokensTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(alt); | |
if (singleTokensTypes.length === 1 && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(singleTokensTypes[0].categoryMatches)) { | |
var expectedTokenType = singleTokensTypes[0]; | |
var expectedTokenUniqueKey_1 = expectedTokenType.tokenTypeIdx; | |
return function () { | |
return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey_1; | |
}; | |
} | |
else { | |
var choiceToAlt_2 = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(singleTokensTypes, function (result, currTokType, idx) { | |
result[currTokType.tokenTypeIdx] = true; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currTokType.categoryMatches, function (currExtendingType) { | |
result[currExtendingType] = true; | |
}); | |
return result; | |
}, []); | |
return function () { | |
var nextToken = this.LA(1); | |
return choiceToAlt_2[nextToken.tokenTypeIdx] === true; | |
}; | |
} | |
} | |
else { | |
return function () { | |
nextPath: for (var j = 0; j < numOfPaths; j++) { | |
var currPath = alt[j]; | |
var currPathLength = currPath.length; | |
for (var i = 0; i < currPathLength; i++) { | |
var nextToken = this.LA(i + 1); | |
if (tokenMatcher(nextToken, currPath[i]) === false) { | |
// mismatch in current path | |
// try the next pth | |
continue nextPath; | |
} | |
} | |
// found a full path that matches. | |
return true; | |
} | |
// none of the paths matched | |
return false; | |
}; | |
} | |
} | |
var RestDefinitionFinderWalker = /** @class */ (function (_super) { | |
__extends(RestDefinitionFinderWalker, _super); | |
function RestDefinitionFinderWalker(topProd, targetOccurrence, targetProdType) { | |
var _this = _super.call(this) || this; | |
_this.topProd = topProd; | |
_this.targetOccurrence = targetOccurrence; | |
_this.targetProdType = targetProdType; | |
return _this; | |
} | |
RestDefinitionFinderWalker.prototype.startWalking = function () { | |
this.walk(this.topProd); | |
return this.restDef; | |
}; | |
RestDefinitionFinderWalker.prototype.checkIsTarget = function (node, expectedProdType, currRest, prevRest) { | |
if (node.idx === this.targetOccurrence && | |
this.targetProdType === expectedProdType) { | |
this.restDef = currRest.concat(prevRest); | |
return true; | |
} | |
// performance optimization, do not iterate over the entire Grammar ast after we have found the target | |
return false; | |
}; | |
RestDefinitionFinderWalker.prototype.walkOption = function (optionProd, currRest, prevRest) { | |
if (!this.checkIsTarget(optionProd, PROD_TYPE.OPTION, currRest, prevRest)) { | |
_super.prototype.walkOption.call(this, optionProd, currRest, prevRest); | |
} | |
}; | |
RestDefinitionFinderWalker.prototype.walkAtLeastOne = function (atLeastOneProd, currRest, prevRest) { | |
if (!this.checkIsTarget(atLeastOneProd, PROD_TYPE.REPETITION_MANDATORY, currRest, prevRest)) { | |
_super.prototype.walkOption.call(this, atLeastOneProd, currRest, prevRest); | |
} | |
}; | |
RestDefinitionFinderWalker.prototype.walkAtLeastOneSep = function (atLeastOneSepProd, currRest, prevRest) { | |
if (!this.checkIsTarget(atLeastOneSepProd, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, currRest, prevRest)) { | |
_super.prototype.walkOption.call(this, atLeastOneSepProd, currRest, prevRest); | |
} | |
}; | |
RestDefinitionFinderWalker.prototype.walkMany = function (manyProd, currRest, prevRest) { | |
if (!this.checkIsTarget(manyProd, PROD_TYPE.REPETITION, currRest, prevRest)) { | |
_super.prototype.walkOption.call(this, manyProd, currRest, prevRest); | |
} | |
}; | |
RestDefinitionFinderWalker.prototype.walkManySep = function (manySepProd, currRest, prevRest) { | |
if (!this.checkIsTarget(manySepProd, PROD_TYPE.REPETITION_WITH_SEPARATOR, currRest, prevRest)) { | |
_super.prototype.walkOption.call(this, manySepProd, currRest, prevRest); | |
} | |
}; | |
return RestDefinitionFinderWalker; | |
}(_rest__WEBPACK_IMPORTED_MODULE_2__["RestWalker"])); | |
/** | |
* Returns the definition of a target production in a top level level rule. | |
*/ | |
var InsideDefinitionFinderVisitor = /** @class */ (function (_super) { | |
__extends(InsideDefinitionFinderVisitor, _super); | |
function InsideDefinitionFinderVisitor(targetOccurrence, targetProdType, targetRef) { | |
var _this = _super.call(this) || this; | |
_this.targetOccurrence = targetOccurrence; | |
_this.targetProdType = targetProdType; | |
_this.targetRef = targetRef; | |
_this.result = []; | |
return _this; | |
} | |
InsideDefinitionFinderVisitor.prototype.checkIsTarget = function (node, expectedProdName) { | |
if (node.idx === this.targetOccurrence && | |
this.targetProdType === expectedProdName && | |
(this.targetRef === undefined || node === this.targetRef)) { | |
this.result = node.definition; | |
} | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitOption = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.OPTION); | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitRepetition = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.REPETITION); | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitRepetitionMandatory = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY); | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitRepetitionMandatoryWithSeparator = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR); | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitRepetitionWithSeparator = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.REPETITION_WITH_SEPARATOR); | |
}; | |
InsideDefinitionFinderVisitor.prototype.visitAlternation = function (node) { | |
this.checkIsTarget(node, PROD_TYPE.ALTERNATION); | |
}; | |
return InsideDefinitionFinderVisitor; | |
}(_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_5__["GAstVisitor"])); | |
function initializeArrayOfArrays(size) { | |
var result = new Array(size); | |
for (var i = 0; i < size; i++) { | |
result[i] = []; | |
} | |
return result; | |
} | |
/** | |
* A sort of hash function between a Path in the grammar and a string. | |
* Note that this returns multiple "hashes" to support the scenario of token categories. | |
* - A single path with categories may match multiple **actual** paths. | |
*/ | |
function pathToHashKeys(path) { | |
var keys = [""]; | |
for (var i = 0; i < path.length; i++) { | |
var tokType = path[i]; | |
var longerKeys = []; | |
for (var j = 0; j < keys.length; j++) { | |
var currShorterKey = keys[j]; | |
longerKeys.push(currShorterKey + "_" + tokType.tokenTypeIdx); | |
for (var t = 0; t < tokType.categoryMatches.length; t++) { | |
var categoriesKeySuffix = "_" + tokType.categoryMatches[t]; | |
longerKeys.push(currShorterKey + categoriesKeySuffix); | |
} | |
} | |
keys = longerKeys; | |
} | |
return keys; | |
} | |
/** | |
* Imperative style due to being called from a hot spot | |
*/ | |
function isUniquePrefixHash(altKnownPathsKeys, searchPathKeys, idx) { | |
for (var currAltIdx = 0; currAltIdx < altKnownPathsKeys.length; currAltIdx++) { | |
// We only want to test vs the other alternatives | |
if (currAltIdx === idx) { | |
continue; | |
} | |
var otherAltKnownPathsKeys = altKnownPathsKeys[currAltIdx]; | |
for (var searchIdx = 0; searchIdx < searchPathKeys.length; searchIdx++) { | |
var searchKey = searchPathKeys[searchIdx]; | |
if (otherAltKnownPathsKeys[searchKey] === true) { | |
return false; | |
} | |
} | |
} | |
// None of the SearchPathKeys were found in any of the other alternatives | |
return true; | |
} | |
function lookAheadSequenceFromAlternatives(altsDefs, k) { | |
var partialAlts = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(altsDefs, function (currAlt) { return Object(_interpreter__WEBPACK_IMPORTED_MODULE_1__["possiblePathsFrom"])([currAlt], 1); }); | |
var finalResult = initializeArrayOfArrays(partialAlts.length); | |
var altsHashes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(partialAlts, function (currAltPaths) { | |
var dict = {}; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currAltPaths, function (item) { | |
var keys = pathToHashKeys(item.partialPath); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(keys, function (currKey) { | |
dict[currKey] = true; | |
}); | |
}); | |
return dict; | |
}); | |
var newData = partialAlts; | |
// maxLookahead loop | |
for (var pathLength = 1; pathLength <= k; pathLength++) { | |
var currDataset = newData; | |
newData = initializeArrayOfArrays(currDataset.length); | |
var _loop_1 = function (altIdx) { | |
var currAltPathsAndSuffixes = currDataset[altIdx]; | |
// paths in current alternative loop | |
for (var currPathIdx = 0; currPathIdx < currAltPathsAndSuffixes.length; currPathIdx++) { | |
var currPathPrefix = currAltPathsAndSuffixes[currPathIdx].partialPath; | |
var suffixDef = currAltPathsAndSuffixes[currPathIdx].suffixDef; | |
var prefixKeys = pathToHashKeys(currPathPrefix); | |
var isUnique = isUniquePrefixHash(altsHashes, prefixKeys, altIdx); | |
// End of the line for this path. | |
if (isUnique || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(suffixDef) || currPathPrefix.length === k) { | |
var currAltResult = finalResult[altIdx]; | |
// TODO: Can we implement a containsPath using Maps/Dictionaries? | |
if (containsPath(currAltResult, currPathPrefix) === false) { | |
currAltResult.push(currPathPrefix); | |
// Update all new keys for the current path. | |
for (var j = 0; j < prefixKeys.length; j++) { | |
var currKey = prefixKeys[j]; | |
altsHashes[altIdx][currKey] = true; | |
} | |
} | |
} | |
// Expand longer paths | |
else { | |
var newPartialPathsAndSuffixes = Object(_interpreter__WEBPACK_IMPORTED_MODULE_1__["possiblePathsFrom"])(suffixDef, pathLength + 1, currPathPrefix); | |
newData[altIdx] = newData[altIdx].concat(newPartialPathsAndSuffixes); | |
// Update keys for new known paths | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(newPartialPathsAndSuffixes, function (item) { | |
var prefixKeys = pathToHashKeys(item.partialPath); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(prefixKeys, function (key) { | |
altsHashes[altIdx][key] = true; | |
}); | |
}); | |
} | |
} | |
}; | |
// alternatives loop | |
for (var altIdx = 0; altIdx < currDataset.length; altIdx++) { | |
_loop_1(altIdx); | |
} | |
} | |
return finalResult; | |
} | |
function getLookaheadPathsForOr(occurrence, ruleGrammar, k, orProd) { | |
var visitor = new InsideDefinitionFinderVisitor(occurrence, PROD_TYPE.ALTERNATION, orProd); | |
ruleGrammar.accept(visitor); | |
return lookAheadSequenceFromAlternatives(visitor.result, k); | |
} | |
function getLookaheadPathsForOptionalProd(occurrence, ruleGrammar, prodType, k) { | |
var insideDefVisitor = new InsideDefinitionFinderVisitor(occurrence, prodType); | |
ruleGrammar.accept(insideDefVisitor); | |
var insideDef = insideDefVisitor.result; | |
var afterDefWalker = new RestDefinitionFinderWalker(ruleGrammar, occurrence, prodType); | |
var afterDef = afterDefWalker.startWalking(); | |
var insideFlat = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Alternative"]({ definition: insideDef }); | |
var afterFlat = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_4__["Alternative"]({ definition: afterDef }); | |
return lookAheadSequenceFromAlternatives([insideFlat, afterFlat], k); | |
} | |
function containsPath(alternative, searchPath) { | |
compareOtherPath: for (var i = 0; i < alternative.length; i++) { | |
var otherPath = alternative[i]; | |
if (otherPath.length !== searchPath.length) { | |
continue; | |
} | |
for (var j = 0; j < otherPath.length; j++) { | |
var searchTok = searchPath[j]; | |
var otherTok = otherPath[j]; | |
var matchingTokens = searchTok === otherTok || | |
otherTok.categoryMatchesMap[searchTok.tokenTypeIdx] !== undefined; | |
if (matchingTokens === false) { | |
continue compareOtherPath; | |
} | |
} | |
return true; | |
} | |
return false; | |
} | |
function isStrictPrefixOfPath(prefix, other) { | |
return (prefix.length < other.length && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(prefix, function (tokType, idx) { | |
var otherTokType = other[idx]; | |
return (tokType === otherTokType || | |
otherTokType.categoryMatchesMap[tokType.tokenTypeIdx]); | |
})); | |
} | |
function areTokenCategoriesNotUsed(lookAheadPaths) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(lookAheadPaths, function (singleAltPaths) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(singleAltPaths, function (singlePath) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(singlePath, function (token) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(token.categoryMatches); }); | |
}); | |
}); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js": | |
/*!************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js ***! | |
\************************************************************************************************************/ | |
/*! exports provided: resolveGrammar, GastRefResolverVisitor */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveGrammar", function() { return resolveGrammar; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GastRefResolverVisitor", function() { return GastRefResolverVisitor; }); | |
/* harmony import */ var _parser_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../parser/parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gast/gast_visitor_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
function resolveGrammar(topLevels, errMsgProvider) { | |
var refResolver = new GastRefResolverVisitor(topLevels, errMsgProvider); | |
refResolver.resolveRefs(); | |
return refResolver.errors; | |
} | |
var GastRefResolverVisitor = /** @class */ (function (_super) { | |
__extends(GastRefResolverVisitor, _super); | |
function GastRefResolverVisitor(nameToTopRule, errMsgProvider) { | |
var _this = _super.call(this) || this; | |
_this.nameToTopRule = nameToTopRule; | |
_this.errMsgProvider = errMsgProvider; | |
_this.errors = []; | |
return _this; | |
} | |
GastRefResolverVisitor.prototype.resolveRefs = function () { | |
var _this = this; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["values"])(this.nameToTopRule), function (prod) { | |
_this.currTopLevel = prod; | |
prod.accept(_this); | |
}); | |
}; | |
GastRefResolverVisitor.prototype.visitNonTerminal = function (node) { | |
var ref = this.nameToTopRule[node.nonTerminalName]; | |
if (!ref) { | |
var msg = this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel, node); | |
this.errors.push({ | |
message: msg, | |
type: _parser_parser__WEBPACK_IMPORTED_MODULE_0__["ParserDefinitionErrorType"].UNRESOLVED_SUBRULE_REF, | |
ruleName: this.currTopLevel.name, | |
unresolvedRefName: node.nonTerminalName | |
}); | |
} | |
else { | |
node.referencedRule = ref; | |
} | |
}; | |
return GastRefResolverVisitor; | |
}(_gast_gast_visitor_public__WEBPACK_IMPORTED_MODULE_2__["GAstVisitor"])); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js": | |
/*!********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js ***! | |
\********************************************************************************************************/ | |
/*! exports provided: RestWalker */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RestWalker", function() { return RestWalker; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/** | |
* A Grammar Walker that computes the "remaining" grammar "after" a productions in the grammar. | |
*/ | |
var RestWalker = /** @class */ (function () { | |
function RestWalker() { | |
} | |
RestWalker.prototype.walk = function (prod, prevRest) { | |
var _this = this; | |
if (prevRest === void 0) { prevRest = []; } | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(prod.definition, function (subProd, index) { | |
var currRest = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["drop"])(prod.definition, index + 1); | |
/* istanbul ignore else */ | |
if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]) { | |
_this.walkProdRef(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]) { | |
_this.walkTerminal(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternative"]) { | |
_this.walkFlat(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]) { | |
_this.walkOption(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatory"]) { | |
_this.walkAtLeastOne(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatoryWithSeparator"]) { | |
_this.walkAtLeastOneSep(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"]) { | |
_this.walkManySep(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"]) { | |
_this.walkMany(subProd, currRest, prevRest); | |
} | |
else if (subProd instanceof _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]) { | |
_this.walkOr(subProd, currRest, prevRest); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
}); | |
}; | |
RestWalker.prototype.walkTerminal = function (terminal, currRest, prevRest) { }; | |
RestWalker.prototype.walkProdRef = function (refProd, currRest, prevRest) { }; | |
RestWalker.prototype.walkFlat = function (flatProd, currRest, prevRest) { | |
// ABCDEF => after the D the rest is EF | |
var fullOrRest = currRest.concat(prevRest); | |
this.walk(flatProd, fullOrRest); | |
}; | |
RestWalker.prototype.walkOption = function (optionProd, currRest, prevRest) { | |
// ABC(DE)?F => after the (DE)? the rest is F | |
var fullOrRest = currRest.concat(prevRest); | |
this.walk(optionProd, fullOrRest); | |
}; | |
RestWalker.prototype.walkAtLeastOne = function (atLeastOneProd, currRest, prevRest) { | |
// ABC(DE)+F => after the (DE)+ the rest is (DE)?F | |
var fullAtLeastOneRest = [ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]({ definition: atLeastOneProd.definition }) | |
].concat(currRest, prevRest); | |
this.walk(atLeastOneProd, fullAtLeastOneRest); | |
}; | |
RestWalker.prototype.walkAtLeastOneSep = function (atLeastOneSepProd, currRest, prevRest) { | |
// ABC DE(,DE)* F => after the (,DE)+ the rest is (,DE)?F | |
var fullAtLeastOneSepRest = restForRepetitionWithSeparator(atLeastOneSepProd, currRest, prevRest); | |
this.walk(atLeastOneSepProd, fullAtLeastOneSepRest); | |
}; | |
RestWalker.prototype.walkMany = function (manyProd, currRest, prevRest) { | |
// ABC(DE)*F => after the (DE)* the rest is (DE)?F | |
var fullManyRest = [ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]({ definition: manyProd.definition }) | |
].concat(currRest, prevRest); | |
this.walk(manyProd, fullManyRest); | |
}; | |
RestWalker.prototype.walkManySep = function (manySepProd, currRest, prevRest) { | |
// ABC (DE(,DE)*)? F => after the (,DE)* the rest is (,DE)?F | |
var fullManySepRest = restForRepetitionWithSeparator(manySepProd, currRest, prevRest); | |
this.walk(manySepProd, fullManySepRest); | |
}; | |
RestWalker.prototype.walkOr = function (orProd, currRest, prevRest) { | |
var _this = this; | |
// ABC(D|E|F)G => when finding the (D|E|F) the rest is G | |
var fullOrRest = currRest.concat(prevRest); | |
// walk all different alternatives | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(orProd.definition, function (alt) { | |
// wrapping each alternative in a single definition wrapper | |
// to avoid errors in computing the rest of that alternative in the invocation to computeInProdFollows | |
// (otherwise for OR([alt1,alt2]) alt2 will be considered in 'rest' of alt1 | |
var prodWrapper = new _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternative"]({ definition: [alt] }); | |
_this.walk(prodWrapper, fullOrRest); | |
}); | |
}; | |
return RestWalker; | |
}()); | |
function restForRepetitionWithSeparator(repSepProd, currRest, prevRest) { | |
var repSepRest = [ | |
new _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"]({ | |
definition: [new _gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]({ terminalType: repSepProd.separator })].concat(repSepProd.definition) | |
}) | |
]; | |
var fullRepSepRest = repSepRest.concat(currRest, prevRest); | |
return fullRepSepRest; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js": | |
/*!*********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js ***! | |
\*********************************************************************************************************/ | |
/*! exports provided: END_OF_FILE, DEFAULT_PARSER_CONFIG, DEFAULT_RULE_CONFIG, ParserDefinitionErrorType, EMPTY_ALT, Parser, CstParser, EmbeddedActionsParser */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "END_OF_FILE", function() { return END_OF_FILE; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_PARSER_CONFIG", function() { return DEFAULT_PARSER_CONFIG; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_RULE_CONFIG", function() { return DEFAULT_RULE_CONFIG; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParserDefinitionErrorType", function() { return ParserDefinitionErrorType; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY_ALT", function() { return EMPTY_ALT; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CstParser", function() { return CstParser; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedActionsParser", function() { return EmbeddedActionsParser; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _grammar_follow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../grammar/follow */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js"); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony import */ var _errors_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js"); | |
/* harmony import */ var _grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../grammar/gast/gast_resolver_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js"); | |
/* harmony import */ var _traits_recoverable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./traits/recoverable */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js"); | |
/* harmony import */ var _traits_looksahead__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./traits/looksahead */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js"); | |
/* harmony import */ var _traits_tree_builder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./traits/tree_builder */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js"); | |
/* harmony import */ var _traits_lexer_adapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./traits/lexer_adapter */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js"); | |
/* harmony import */ var _traits_recognizer_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./traits/recognizer_api */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js"); | |
/* harmony import */ var _traits_recognizer_engine__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./traits/recognizer_engine */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js"); | |
/* harmony import */ var _traits_error_handler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./traits/error_handler */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js"); | |
/* harmony import */ var _traits_context_assist__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./traits/context_assist */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js"); | |
/* harmony import */ var _traits_gast_recorder__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./traits/gast_recorder */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js"); | |
/* harmony import */ var _traits_perf_tracer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./traits/perf_tracer */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var END_OF_FILE = Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_2__["createTokenInstance"])(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_2__["EOF"], "", NaN, NaN, NaN, NaN, NaN, NaN); | |
Object.freeze(END_OF_FILE); | |
var DEFAULT_PARSER_CONFIG = Object.freeze({ | |
recoveryEnabled: false, | |
maxLookahead: 3, | |
dynamicTokensEnabled: false, | |
outputCst: true, | |
errorMessageProvider: _errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultParserErrorProvider"], | |
nodeLocationTracking: "none", | |
traceInitPerf: false, | |
skipValidations: false | |
}); | |
var DEFAULT_RULE_CONFIG = Object.freeze({ | |
recoveryValueFunc: function () { return undefined; }, | |
resyncEnabled: true | |
}); | |
var ParserDefinitionErrorType; | |
(function (ParserDefinitionErrorType) { | |
ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_RULE_NAME"] = 0] = "INVALID_RULE_NAME"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["DUPLICATE_RULE_NAME"] = 1] = "DUPLICATE_RULE_NAME"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_RULE_OVERRIDE"] = 2] = "INVALID_RULE_OVERRIDE"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["DUPLICATE_PRODUCTIONS"] = 3] = "DUPLICATE_PRODUCTIONS"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["UNRESOLVED_SUBRULE_REF"] = 4] = "UNRESOLVED_SUBRULE_REF"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["LEFT_RECURSION"] = 5] = "LEFT_RECURSION"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["NONE_LAST_EMPTY_ALT"] = 6] = "NONE_LAST_EMPTY_ALT"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["AMBIGUOUS_ALTS"] = 7] = "AMBIGUOUS_ALTS"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["CONFLICT_TOKENS_RULES_NAMESPACE"] = 8] = "CONFLICT_TOKENS_RULES_NAMESPACE"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["INVALID_TOKEN_NAME"] = 9] = "INVALID_TOKEN_NAME"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["NO_NON_EMPTY_LOOKAHEAD"] = 10] = "NO_NON_EMPTY_LOOKAHEAD"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["AMBIGUOUS_PREFIX_ALTS"] = 11] = "AMBIGUOUS_PREFIX_ALTS"; | |
ParserDefinitionErrorType[ParserDefinitionErrorType["TOO_MANY_ALTS"] = 12] = "TOO_MANY_ALTS"; | |
})(ParserDefinitionErrorType || (ParserDefinitionErrorType = {})); | |
function EMPTY_ALT(value) { | |
if (value === void 0) { value = undefined; } | |
return function () { | |
return value; | |
}; | |
} | |
var Parser = /** @class */ (function () { | |
function Parser(tokenVocabulary, config) { | |
this.definitionErrors = []; | |
this.selfAnalysisDone = false; | |
var that = this; | |
that.initErrorHandler(config); | |
that.initLexerAdapter(); | |
that.initLooksAhead(config); | |
that.initRecognizerEngine(tokenVocabulary, config); | |
that.initRecoverable(config); | |
that.initTreeBuilder(config); | |
that.initContentAssist(); | |
that.initGastRecorder(config); | |
that.initPerformanceTracer(config); | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "ignoredIssues")) { | |
throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\t" + | |
"Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\t" + | |
"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\t" + | |
"For further details."); | |
} | |
this.skipValidations = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "skipValidations") | |
? config.skipValidations | |
: DEFAULT_PARSER_CONFIG.skipValidations; | |
} | |
/** | |
* @deprecated use the **instance** method with the same name instead | |
*/ | |
Parser.performSelfAnalysis = function (parserInstance) { | |
throw Error("The **static** `performSelfAnalysis` method has been deprecated." + | |
"\t\nUse the **instance** method with the same name instead."); | |
}; | |
Parser.prototype.performSelfAnalysis = function () { | |
var _this = this; | |
this.TRACE_INIT("performSelfAnalysis", function () { | |
var defErrorsMsgs; | |
_this.selfAnalysisDone = true; | |
var className = _this.className; | |
_this.TRACE_INIT("toFastProps", function () { | |
// Without this voodoo magic the parser would be x3-x4 slower | |
// It seems it is better to invoke `toFastProperties` **before** | |
// Any manipulations of the `this` object done during the recording phase. | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["toFastProperties"])(_this); | |
}); | |
_this.TRACE_INIT("Grammar Recording", function () { | |
try { | |
_this.enableRecording(); | |
// Building the GAST | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(_this.definedRulesNames, function (currRuleName) { | |
var wrappedRule = _this[currRuleName]; | |
var originalGrammarAction = wrappedRule["originalGrammarAction"]; | |
var recordedRuleGast = undefined; | |
_this.TRACE_INIT(currRuleName + " Rule", function () { | |
recordedRuleGast = _this.topLevelRuleRecord(currRuleName, originalGrammarAction); | |
}); | |
_this.gastProductionsCache[currRuleName] = recordedRuleGast; | |
}); | |
} | |
finally { | |
_this.disableRecording(); | |
} | |
}); | |
var resolverErrors = []; | |
_this.TRACE_INIT("Grammar Resolving", function () { | |
resolverErrors = Object(_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_4__["resolveGrammar"])({ | |
rules: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(_this.gastProductionsCache) | |
}); | |
_this.definitionErrors.push.apply(_this.definitionErrors, resolverErrors); // mutability for the win? | |
}); | |
_this.TRACE_INIT("Grammar Validations", function () { | |
// only perform additional grammar validations IFF no resolving errors have occurred. | |
// as unresolved grammar may lead to unhandled runtime exceptions in the follow up validations. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(resolverErrors) && _this.skipValidations === false) { | |
var validationErrors = Object(_grammar_gast_gast_resolver_public__WEBPACK_IMPORTED_MODULE_4__["validateGrammar"])({ | |
rules: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(_this.gastProductionsCache), | |
maxLookahead: _this.maxLookahead, | |
tokenTypes: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(_this.tokensMap), | |
errMsgProvider: _errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultGrammarValidatorErrorProvider"], | |
grammarName: className | |
}); | |
_this.definitionErrors.push.apply(_this.definitionErrors, validationErrors); // mutability for the win? | |
} | |
}); | |
// this analysis may fail if the grammar is not perfectly valid | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(_this.definitionErrors)) { | |
// The results of these computations are not needed unless error recovery is enabled. | |
if (_this.recoveryEnabled) { | |
_this.TRACE_INIT("computeAllProdsFollows", function () { | |
var allFollows = Object(_grammar_follow__WEBPACK_IMPORTED_MODULE_1__["computeAllProdsFollows"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(_this.gastProductionsCache)); | |
_this.resyncFollows = allFollows; | |
}); | |
} | |
_this.TRACE_INIT("ComputeLookaheadFunctions", function () { | |
_this.preComputeLookaheadFunctions(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(_this.gastProductionsCache)); | |
}); | |
} | |
if (!Parser.DEFER_DEFINITION_ERRORS_HANDLING && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(_this.definitionErrors)) { | |
defErrorsMsgs = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(_this.definitionErrors, function (defError) { return defError.message; }); | |
throw new Error("Parser Definition Errors detected:\n " + defErrorsMsgs.join("\n-------------------------------\n")); | |
} | |
}); | |
}; | |
// Set this flag to true if you don't want the Parser to throw error when problems in it's definition are detected. | |
// (normally during the parser's constructor). | |
// This is a design time flag, it will not affect the runtime error handling of the parser, just design time errors, | |
// for example: duplicate rule names, referencing an unresolved subrule, ect... | |
// This flag should not be enabled during normal usage, it is used in special situations, for example when | |
// needing to display the parser definition errors in some GUI(online playground). | |
Parser.DEFER_DEFINITION_ERRORS_HANDLING = false; | |
return Parser; | |
}()); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["applyMixins"])(Parser, [ | |
_traits_recoverable__WEBPACK_IMPORTED_MODULE_5__["Recoverable"], | |
_traits_looksahead__WEBPACK_IMPORTED_MODULE_6__["LooksAhead"], | |
_traits_tree_builder__WEBPACK_IMPORTED_MODULE_7__["TreeBuilder"], | |
_traits_lexer_adapter__WEBPACK_IMPORTED_MODULE_8__["LexerAdapter"], | |
_traits_recognizer_engine__WEBPACK_IMPORTED_MODULE_10__["RecognizerEngine"], | |
_traits_recognizer_api__WEBPACK_IMPORTED_MODULE_9__["RecognizerApi"], | |
_traits_error_handler__WEBPACK_IMPORTED_MODULE_11__["ErrorHandler"], | |
_traits_context_assist__WEBPACK_IMPORTED_MODULE_12__["ContentAssist"], | |
_traits_gast_recorder__WEBPACK_IMPORTED_MODULE_13__["GastRecorder"], | |
_traits_perf_tracer__WEBPACK_IMPORTED_MODULE_14__["PerformanceTracer"] | |
]); | |
var CstParser = /** @class */ (function (_super) { | |
__extends(CstParser, _super); | |
function CstParser(tokenVocabulary, config) { | |
if (config === void 0) { config = DEFAULT_PARSER_CONFIG; } | |
var _this = this; | |
var configClone = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneObj"])(config); | |
configClone.outputCst = true; | |
_this = _super.call(this, tokenVocabulary, configClone) || this; | |
return _this; | |
} | |
return CstParser; | |
}(Parser)); | |
var EmbeddedActionsParser = /** @class */ (function (_super) { | |
__extends(EmbeddedActionsParser, _super); | |
function EmbeddedActionsParser(tokenVocabulary, config) { | |
if (config === void 0) { config = DEFAULT_PARSER_CONFIG; } | |
var _this = this; | |
var configClone = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneObj"])(config); | |
configClone.outputCst = false; | |
_this = _super.call(this, tokenVocabulary, configClone) || this; | |
return _this; | |
} | |
return EmbeddedActionsParser; | |
}(Parser)); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js": | |
/*!************************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js ***! | |
\************************************************************************************************************************/ | |
/*! exports provided: ContentAssist */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentAssist", function() { return ContentAssist; }); | |
/* harmony import */ var _grammar_interpreter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../grammar/interpreter */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
var ContentAssist = /** @class */ (function () { | |
function ContentAssist() { | |
} | |
ContentAssist.prototype.initContentAssist = function () { }; | |
ContentAssist.prototype.computeContentAssist = function (startRuleName, precedingInput) { | |
var startRuleGast = this.gastProductionsCache[startRuleName]; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(startRuleGast)) { | |
throw Error("Rule ->" + startRuleName + "<- does not exist in this grammar."); | |
} | |
return Object(_grammar_interpreter__WEBPACK_IMPORTED_MODULE_0__["nextPossibleTokensAfter"])([startRuleGast], precedingInput, this.tokenMatcher, this.maxLookahead); | |
}; | |
// TODO: should this be a member method or a utility? it does not have any state or usage of 'this'... | |
// TODO: should this be more explicitly part of the public API? | |
ContentAssist.prototype.getNextPossibleTokenTypes = function (grammarPath) { | |
var topRuleName = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["first"])(grammarPath.ruleStack); | |
var gastProductions = this.getGAstProductions(); | |
var topProduction = gastProductions[topRuleName]; | |
var nextPossibleTokenTypes = new _grammar_interpreter__WEBPACK_IMPORTED_MODULE_0__["NextAfterTokenWalker"](topProduction, grammarPath).startWalking(); | |
return nextPossibleTokenTypes; | |
}; | |
return ContentAssist; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js": | |
/*!***********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js ***! | |
\***********************************************************************************************************************/ | |
/*! exports provided: ErrorHandler */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; }); | |
/* harmony import */ var _exceptions_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../exceptions_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _grammar_lookahead__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../grammar/lookahead */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/** | |
* Trait responsible for runtime parsing errors. | |
*/ | |
var ErrorHandler = /** @class */ (function () { | |
function ErrorHandler() { | |
} | |
ErrorHandler.prototype.initErrorHandler = function (config) { | |
this._errors = []; | |
this.errorMessageProvider = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["has"])(config, "errorMessageProvider") | |
? config.errorMessageProvider | |
: _parser__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_PARSER_CONFIG"].errorMessageProvider; | |
}; | |
ErrorHandler.prototype.SAVE_ERROR = function (error) { | |
if (Object(_exceptions_public__WEBPACK_IMPORTED_MODULE_0__["isRecognitionException"])(error)) { | |
error.context = { | |
ruleStack: this.getHumanReadableRuleStack(), | |
ruleOccurrenceStack: Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(this.RULE_OCCURRENCE_STACK) | |
}; | |
this._errors.push(error); | |
return error; | |
} | |
else { | |
throw Error("Trying to save an Error which is not a RecognitionException"); | |
} | |
}; | |
Object.defineProperty(ErrorHandler.prototype, "errors", { | |
get: function () { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(this._errors); | |
}, | |
set: function (newErrors) { | |
this._errors = newErrors; | |
}, | |
enumerable: true, | |
configurable: true | |
}); | |
// TODO: consider caching the error message computed information | |
ErrorHandler.prototype.raiseEarlyExitException = function (occurrence, prodType, userDefinedErrMsg) { | |
var ruleName = this.getCurrRuleFullName(); | |
var ruleGrammar = this.getGAstProductions()[ruleName]; | |
var lookAheadPathsPerAlternative = Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_2__["getLookaheadPathsForOptionalProd"])(occurrence, ruleGrammar, prodType, this.maxLookahead); | |
var insideProdPaths = lookAheadPathsPerAlternative[0]; | |
var actualTokens = []; | |
for (var i = 1; i <= this.maxLookahead; i++) { | |
actualTokens.push(this.LA(i)); | |
} | |
var msg = this.errorMessageProvider.buildEarlyExitMessage({ | |
expectedIterationPaths: insideProdPaths, | |
actual: actualTokens, | |
previous: this.LA(0), | |
customUserDescription: userDefinedErrMsg, | |
ruleName: ruleName | |
}); | |
throw this.SAVE_ERROR(new _exceptions_public__WEBPACK_IMPORTED_MODULE_0__["EarlyExitException"](msg, this.LA(1), this.LA(0))); | |
}; | |
// TODO: consider caching the error message computed information | |
ErrorHandler.prototype.raiseNoAltException = function (occurrence, errMsgTypes) { | |
var ruleName = this.getCurrRuleFullName(); | |
var ruleGrammar = this.getGAstProductions()[ruleName]; | |
// TODO: getLookaheadPathsForOr can be slow for large enough maxLookahead and certain grammars, consider caching ? | |
var lookAheadPathsPerAlternative = Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_2__["getLookaheadPathsForOr"])(occurrence, ruleGrammar, this.maxLookahead); | |
var actualTokens = []; | |
for (var i = 1; i <= this.maxLookahead; i++) { | |
actualTokens.push(this.LA(i)); | |
} | |
var previousToken = this.LA(0); | |
var errMsg = this.errorMessageProvider.buildNoViableAltMessage({ | |
expectedPathsPerAlt: lookAheadPathsPerAlternative, | |
actual: actualTokens, | |
previous: previousToken, | |
customUserDescription: errMsgTypes, | |
ruleName: this.getCurrRuleFullName() | |
}); | |
throw this.SAVE_ERROR(new _exceptions_public__WEBPACK_IMPORTED_MODULE_0__["NoViableAltException"](errMsg, this.LA(1), previousToken)); | |
}; | |
return ErrorHandler; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js": | |
/*!***********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js ***! | |
\***********************************************************************************************************************/ | |
/*! exports provided: GastRecorder */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GastRecorder", function() { return GastRecorder; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grammar/gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/* harmony import */ var _scan_lexer_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../scan/lexer_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js"); | |
/* harmony import */ var _scan_tokens__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../scan/tokens */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js"); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _grammar_keys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../grammar/keys */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js"); | |
var RECORDING_NULL_OBJECT = { | |
description: "This Object indicates the Parser is during Recording Phase" | |
}; | |
Object.freeze(RECORDING_NULL_OBJECT); | |
var HANDLE_SEPARATOR = true; | |
var MAX_METHOD_IDX = Math.pow(2, _grammar_keys__WEBPACK_IMPORTED_MODULE_6__["BITS_FOR_OCCURRENCE_IDX"]) - 1; | |
var RFT = Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_4__["createToken"])({ name: "RECORDING_PHASE_TOKEN", pattern: _scan_lexer_public__WEBPACK_IMPORTED_MODULE_2__["Lexer"].NA }); | |
Object(_scan_tokens__WEBPACK_IMPORTED_MODULE_3__["augmentTokenTypes"])([RFT]); | |
var RECORDING_PHASE_TOKEN = Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_4__["createTokenInstance"])(RFT, "This IToken indicates the Parser is in Recording Phase\n\t" + | |
"" + | |
"See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details", | |
// Using "-1" instead of NaN (as in EOF) because an actual number is less likely to | |
// cause errors if the output of LA or CONSUME would be (incorrectly) used during the recording phase. | |
-1, -1, -1, -1, -1, -1); | |
Object.freeze(RECORDING_PHASE_TOKEN); | |
var RECORDING_PHASE_CSTNODE = { | |
name: "This CSTNode indicates the Parser is in Recording Phase\n\t" + | |
"See: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details", | |
children: {} | |
}; | |
/** | |
* This trait handles the creation of the GAST structure for Chevrotain Grammars | |
*/ | |
var GastRecorder = /** @class */ (function () { | |
function GastRecorder() { | |
} | |
GastRecorder.prototype.initGastRecorder = function (config) { | |
this.recordingProdStack = []; | |
this.RECORDING_PHASE = false; | |
}; | |
GastRecorder.prototype.enableRecording = function () { | |
var _this = this; | |
this.RECORDING_PHASE = true; | |
this.TRACE_INIT("Enable Recording", function () { | |
var _loop_1 = function (i) { | |
var idx = i > 0 ? i : ""; | |
_this["CONSUME" + idx] = function (arg1, arg2) { | |
return this.consumeInternalRecord(arg1, i, arg2); | |
}; | |
_this["SUBRULE" + idx] = function (arg1, arg2) { | |
return this.subruleInternalRecord(arg1, i, arg2); | |
}; | |
_this["OPTION" + idx] = function (arg1) { | |
return this.optionInternalRecord(arg1, i); | |
}; | |
_this["OR" + idx] = function (arg1) { | |
return this.orInternalRecord(arg1, i); | |
}; | |
_this["MANY" + idx] = function (arg1) { | |
this.manyInternalRecord(i, arg1); | |
}; | |
_this["MANY_SEP" + idx] = function (arg1) { | |
this.manySepFirstInternalRecord(i, arg1); | |
}; | |
_this["AT_LEAST_ONE" + idx] = function (arg1) { | |
this.atLeastOneInternalRecord(i, arg1); | |
}; | |
_this["AT_LEAST_ONE_SEP" + idx] = function (arg1) { | |
this.atLeastOneSepFirstInternalRecord(i, arg1); | |
}; | |
}; | |
/** | |
* Warning Dark Voodoo Magic upcoming! | |
* We are "replacing" the public parsing DSL methods API | |
* With **new** alternative implementations on the Parser **instance** | |
* | |
* So far this is the only way I've found to avoid performance regressions during parsing time. | |
* - Approx 30% performance regression was measured on Chrome 75 Canary when attempting to replace the "internal" | |
* implementations directly instead. | |
*/ | |
for (var i = 0; i < 10; i++) { | |
_loop_1(i); | |
} | |
// DSL methods with the idx(suffix) as an argument | |
_this["consume"] = function (idx, arg1, arg2) { | |
return this.consumeInternalRecord(arg1, idx, arg2); | |
}; | |
_this["subrule"] = function (idx, arg1, arg2) { | |
return this.subruleInternalRecord(arg1, idx, arg2); | |
}; | |
_this["option"] = function (idx, arg1) { | |
return this.optionInternalRecord(arg1, idx); | |
}; | |
_this["or"] = function (idx, arg1) { | |
return this.orInternalRecord(arg1, idx); | |
}; | |
_this["many"] = function (idx, arg1) { | |
this.manyInternalRecord(idx, arg1); | |
}; | |
_this["atLeastOne"] = function (idx, arg1) { | |
this.atLeastOneInternalRecord(idx, arg1); | |
}; | |
_this.ACTION = _this.ACTION_RECORD; | |
_this.BACKTRACK = _this.BACKTRACK_RECORD; | |
_this.LA = _this.LA_RECORD; | |
}); | |
}; | |
GastRecorder.prototype.disableRecording = function () { | |
var _this = this; | |
this.RECORDING_PHASE = false; | |
// By deleting these **instance** properties, any future invocation | |
// will be deferred to the original methods on the **prototype** object | |
// This seems to get rid of any incorrect optimizations that V8 may | |
// do during the recording phase. | |
this.TRACE_INIT("Deleting Recording methods", function () { | |
for (var i = 0; i < 10; i++) { | |
var idx = i > 0 ? i : ""; | |
delete _this["CONSUME" + idx]; | |
delete _this["SUBRULE" + idx]; | |
delete _this["OPTION" + idx]; | |
delete _this["OR" + idx]; | |
delete _this["MANY" + idx]; | |
delete _this["MANY_SEP" + idx]; | |
delete _this["AT_LEAST_ONE" + idx]; | |
delete _this["AT_LEAST_ONE_SEP" + idx]; | |
} | |
delete _this["consume"]; | |
delete _this["subrule"]; | |
delete _this["option"]; | |
delete _this["or"]; | |
delete _this["many"]; | |
delete _this["atLeastOne"]; | |
delete _this.ACTION; | |
delete _this.BACKTRACK; | |
delete _this.LA; | |
}); | |
}; | |
// TODO: is there any way to use this method to check no | |
// Parser methods are called inside an ACTION? | |
// Maybe try/catch/finally on ACTIONS while disabling the recorders state changes? | |
GastRecorder.prototype.ACTION_RECORD = function (impl) { | |
// NO-OP during recording | |
return; | |
}; | |
// Executing backtracking logic will break our recording logic assumptions | |
GastRecorder.prototype.BACKTRACK_RECORD = function (grammarRule, args) { | |
return function () { return true; }; | |
}; | |
// LA is part of the official API and may be used for custom lookahead logic | |
// by end users who may forget to wrap it in ACTION or inside a GATE | |
GastRecorder.prototype.LA_RECORD = function (howMuch) { | |
// We cannot use the RECORD_PHASE_TOKEN here because someone may depend | |
// On LA return EOF at the end of the input so an infinite loop may occur. | |
return _parser__WEBPACK_IMPORTED_MODULE_5__["END_OF_FILE"]; | |
}; | |
GastRecorder.prototype.topLevelRuleRecord = function (name, def) { | |
try { | |
var newTopLevelRule = new _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Rule"]({ definition: [], name: name }); | |
newTopLevelRule.name = name; | |
this.recordingProdStack.push(newTopLevelRule); | |
def.call(this); | |
this.recordingProdStack.pop(); | |
return newTopLevelRule; | |
} | |
catch (originalError) { | |
if (originalError.KNOWN_RECORDER_ERROR !== true) { | |
try { | |
originalError.message = | |
originalError.message + | |
'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\t' + | |
"https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording"; | |
} | |
catch (mutabilityError) { | |
// We may not be able to modify the original error object | |
throw originalError; | |
} | |
} | |
throw originalError; | |
} | |
}; | |
// Implementation of parsing DSL | |
GastRecorder.prototype.optionInternalRecord = function (actionORMethodDef, occurrence) { | |
return recordProd.call(this, _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Option"], actionORMethodDef, occurrence); | |
}; | |
GastRecorder.prototype.atLeastOneInternalRecord = function (occurrence, actionORMethodDef) { | |
recordProd.call(this, _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatory"], actionORMethodDef, occurrence); | |
}; | |
GastRecorder.prototype.atLeastOneSepFirstInternalRecord = function (occurrence, options) { | |
recordProd.call(this, _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionMandatoryWithSeparator"], options, occurrence, HANDLE_SEPARATOR); | |
}; | |
GastRecorder.prototype.manyInternalRecord = function (occurrence, actionORMethodDef) { | |
recordProd.call(this, _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Repetition"], actionORMethodDef, occurrence); | |
}; | |
GastRecorder.prototype.manySepFirstInternalRecord = function (occurrence, options) { | |
recordProd.call(this, _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["RepetitionWithSeparator"], options, occurrence, HANDLE_SEPARATOR); | |
}; | |
GastRecorder.prototype.orInternalRecord = function (altsOrOpts, occurrence) { | |
return recordOrProd.call(this, altsOrOpts, occurrence); | |
}; | |
GastRecorder.prototype.subruleInternalRecord = function (ruleToCall, occurrence, options) { | |
assertMethodIdxIsValid(occurrence); | |
if (!ruleToCall || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(ruleToCall, "ruleName") === false) { | |
var error = new Error("<SUBRULE" + getIdxSuffix(occurrence) + "> argument is invalid" + | |
(" expecting a Parser method reference but got: <" + JSON.stringify(ruleToCall) + ">") + | |
("\n inside top level rule: <" + this.recordingProdStack[0].name + ">")); | |
error.KNOWN_RECORDER_ERROR = true; | |
throw error; | |
} | |
var prevProd = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["peek"])(this.recordingProdStack); | |
var ruleName = ruleToCall["ruleName"]; | |
var newNoneTerminal = new _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["NonTerminal"]({ | |
idx: occurrence, | |
nonTerminalName: ruleName, | |
// The resolving of the `referencedRule` property will be done once all the Rule's GASTs have been created | |
referencedRule: undefined | |
}); | |
prevProd.definition.push(newNoneTerminal); | |
return this.outputCst ? RECORDING_PHASE_CSTNODE : RECORDING_NULL_OBJECT; | |
}; | |
GastRecorder.prototype.consumeInternalRecord = function (tokType, occurrence, options) { | |
assertMethodIdxIsValid(occurrence); | |
if (!Object(_scan_tokens__WEBPACK_IMPORTED_MODULE_3__["hasShortKeyProperty"])(tokType)) { | |
var error = new Error("<CONSUME" + getIdxSuffix(occurrence) + "> argument is invalid" + | |
(" expecting a TokenType reference but got: <" + JSON.stringify(tokType) + ">") + | |
("\n inside top level rule: <" + this.recordingProdStack[0].name + ">")); | |
error.KNOWN_RECORDER_ERROR = true; | |
throw error; | |
} | |
var prevProd = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["peek"])(this.recordingProdStack); | |
var newNoneTerminal = new _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Terminal"]({ | |
idx: occurrence, | |
terminalType: tokType | |
}); | |
prevProd.definition.push(newNoneTerminal); | |
return RECORDING_PHASE_TOKEN; | |
}; | |
return GastRecorder; | |
}()); | |
function recordProd(prodConstructor, mainProdArg, occurrence, handleSep) { | |
if (handleSep === void 0) { handleSep = false; } | |
assertMethodIdxIsValid(occurrence); | |
var prevProd = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["peek"])(this.recordingProdStack); | |
var grammarAction = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(mainProdArg) ? mainProdArg : mainProdArg.DEF; | |
var newProd = new prodConstructor({ definition: [], idx: occurrence }); | |
if (handleSep) { | |
newProd.separator = mainProdArg.SEP; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(mainProdArg, "MAX_LOOKAHEAD")) { | |
newProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD; | |
} | |
this.recordingProdStack.push(newProd); | |
grammarAction.call(this); | |
prevProd.definition.push(newProd); | |
this.recordingProdStack.pop(); | |
return RECORDING_NULL_OBJECT; | |
} | |
function recordOrProd(mainProdArg, occurrence) { | |
var _this = this; | |
assertMethodIdxIsValid(occurrence); | |
var prevProd = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["peek"])(this.recordingProdStack); | |
// Only an array of alternatives | |
var hasOptions = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(mainProdArg) === false; | |
var alts = hasOptions === false ? mainProdArg : mainProdArg.DEF; | |
var newOrProd = new _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternation"]({ | |
definition: [], | |
idx: occurrence, | |
ignoreAmbiguities: hasOptions && mainProdArg.IGNORE_AMBIGUITIES === true | |
}); | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(mainProdArg, "MAX_LOOKAHEAD")) { | |
newOrProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD; | |
} | |
var hasPredicates = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["some"])(alts, function (currAlt) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(currAlt.GATE); }); | |
newOrProd.hasPredicates = hasPredicates; | |
prevProd.definition.push(newOrProd); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(alts, function (currAlt) { | |
var currAltFlat = new _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_1__["Alternative"]({ definition: [] }); | |
newOrProd.definition.push(currAltFlat); | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(currAlt, "IGNORE_AMBIGUITIES")) { | |
currAltFlat.ignoreAmbiguities = currAlt.IGNORE_AMBIGUITIES; | |
} | |
// **implicit** ignoreAmbiguities due to usage of gate | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(currAlt, "GATE")) { | |
currAltFlat.ignoreAmbiguities = true; | |
} | |
_this.recordingProdStack.push(currAltFlat); | |
currAlt.ALT.call(_this); | |
_this.recordingProdStack.pop(); | |
}); | |
return RECORDING_NULL_OBJECT; | |
} | |
function getIdxSuffix(idx) { | |
return idx === 0 ? "" : "" + idx; | |
} | |
function assertMethodIdxIsValid(idx) { | |
if (idx < 0 || idx > MAX_METHOD_IDX) { | |
var error = new Error( | |
// The stack trace will contain all the needed details | |
"Invalid DSL Method idx value: <" + idx + ">\n\t" + | |
("Idx value must be a none negative value smaller than " + (MAX_METHOD_IDX + 1))); | |
error.KNOWN_RECORDER_ERROR = true; | |
throw error; | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js": | |
/*!***********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js ***! | |
\***********************************************************************************************************************/ | |
/*! exports provided: LexerAdapter */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LexerAdapter", function() { return LexerAdapter; }); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/** | |
* Trait responsible abstracting over the interaction with Lexer output (Token vector). | |
* | |
* This could be generalized to support other kinds of lexers, e.g. | |
* - Just in Time Lexing / Lexer-Less parsing. | |
* - Streaming Lexer. | |
*/ | |
var LexerAdapter = /** @class */ (function () { | |
function LexerAdapter() { | |
} | |
LexerAdapter.prototype.initLexerAdapter = function () { | |
this.tokVector = []; | |
this.tokVectorLength = 0; | |
this.currIdx = -1; | |
}; | |
Object.defineProperty(LexerAdapter.prototype, "input", { | |
get: function () { | |
return this.tokVector; | |
}, | |
set: function (newInput) { | |
if (this.selfAnalysisDone !== true) { | |
throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor."); | |
} | |
this.reset(); | |
this.tokVector = newInput; | |
this.tokVectorLength = newInput.length; | |
}, | |
enumerable: true, | |
configurable: true | |
}); | |
// skips a token and returns the next token | |
LexerAdapter.prototype.SKIP_TOKEN = function () { | |
if (this.currIdx <= this.tokVector.length - 2) { | |
this.consumeToken(); | |
return this.LA(1); | |
} | |
else { | |
return _parser__WEBPACK_IMPORTED_MODULE_0__["END_OF_FILE"]; | |
} | |
}; | |
// Lexer (accessing Token vector) related methods which can be overridden to implement lazy lexers | |
// or lexers dependent on parser context. | |
LexerAdapter.prototype.LA = function (howMuch) { | |
var soughtIdx = this.currIdx + howMuch; | |
if (soughtIdx < 0 || this.tokVectorLength <= soughtIdx) { | |
return _parser__WEBPACK_IMPORTED_MODULE_0__["END_OF_FILE"]; | |
} | |
else { | |
return this.tokVector[soughtIdx]; | |
} | |
}; | |
LexerAdapter.prototype.consumeToken = function () { | |
this.currIdx++; | |
}; | |
LexerAdapter.prototype.exportLexerState = function () { | |
return this.currIdx; | |
}; | |
LexerAdapter.prototype.importLexerState = function (newState) { | |
this.currIdx = newState; | |
}; | |
LexerAdapter.prototype.resetLexerState = function () { | |
this.currIdx = -1; | |
}; | |
LexerAdapter.prototype.moveToTerminatedState = function () { | |
this.currIdx = this.tokVector.length - 1; | |
}; | |
LexerAdapter.prototype.getLexerPosition = function () { | |
return this.exportLexerState(); | |
}; | |
return LexerAdapter; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js": | |
/*!********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js ***! | |
\********************************************************************************************************************/ | |
/*! exports provided: LooksAhead */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LooksAhead", function() { return LooksAhead; }); | |
/* harmony import */ var _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../grammar/lookahead */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _grammar_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../grammar/keys */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js"); | |
/* harmony import */ var _grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grammar/gast/gast */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js"); | |
/** | |
* Trait responsible for the lookahead related utilities and optimizations. | |
*/ | |
var LooksAhead = /** @class */ (function () { | |
function LooksAhead() { | |
} | |
LooksAhead.prototype.initLooksAhead = function (config) { | |
this.dynamicTokensEnabled = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["has"])(config, "dynamicTokensEnabled") | |
? config.dynamicTokensEnabled | |
: _parser__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_PARSER_CONFIG"].dynamicTokensEnabled; | |
this.maxLookahead = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["has"])(config, "maxLookahead") | |
? config.maxLookahead | |
: _parser__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_PARSER_CONFIG"].maxLookahead; | |
/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */ | |
this.lookAheadFuncsCache = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isES2015MapSupported"])() ? new Map() : []; | |
// Performance optimization on newer engines that support ES6 Map | |
// For larger Maps this is slightly faster than using a plain object (array in our case). | |
/* istanbul ignore else - The else branch will be tested on older node.js versions and IE11 */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isES2015MapSupported"])()) { | |
this.getLaFuncFromCache = this.getLaFuncFromMap; | |
this.setLaFuncCache = this.setLaFuncCacheUsingMap; | |
} | |
else { | |
this.getLaFuncFromCache = this.getLaFuncFromObj; | |
this.setLaFuncCache = this.setLaFuncUsingObj; | |
} | |
}; | |
LooksAhead.prototype.preComputeLookaheadFunctions = function (rules) { | |
var _this = this; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(rules, function (currRule) { | |
_this.TRACE_INIT(currRule.name + " Rule Lookahead", function () { | |
var _a = Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["collectMethods"])(currRule), alternation = _a.alternation, repetition = _a.repetition, option = _a.option, repetitionMandatory = _a.repetitionMandatory, repetitionMandatoryWithSeparator = _a.repetitionMandatoryWithSeparator, repetitionWithSeparator = _a.repetitionWithSeparator; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(alternation, function (currProd) { | |
var prodIdx = currProd.idx === 0 ? "" : currProd.idx; | |
_this.TRACE_INIT("" + Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd) + prodIdx, function () { | |
var laFunc = Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["buildLookaheadFuncForOr"])(currProd.idx, currRule, currProd.maxLookahead || _this.maxLookahead, currProd.hasPredicates, _this.dynamicTokensEnabled, _this.lookAheadBuilderForAlternatives); | |
var key = Object(_grammar_keys__WEBPACK_IMPORTED_MODULE_3__["getKeyForAutomaticLookahead"])(_this.fullRuleNameToShort[currRule.name], _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["OR_IDX"], currProd.idx); | |
_this.setLaFuncCache(key, laFunc); | |
}); | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(repetition, function (currProd) { | |
_this.computeLookaheadFunc(currRule, currProd.idx, _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["MANY_IDX"], _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["PROD_TYPE"].REPETITION, currProd.maxLookahead, Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd)); | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(option, function (currProd) { | |
_this.computeLookaheadFunc(currRule, currProd.idx, _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["OPTION_IDX"], _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["PROD_TYPE"].OPTION, currProd.maxLookahead, Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd)); | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(repetitionMandatory, function (currProd) { | |
_this.computeLookaheadFunc(currRule, currProd.idx, _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["AT_LEAST_ONE_IDX"], _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["PROD_TYPE"].REPETITION_MANDATORY, currProd.maxLookahead, Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd)); | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(repetitionMandatoryWithSeparator, function (currProd) { | |
_this.computeLookaheadFunc(currRule, currProd.idx, _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["AT_LEAST_ONE_SEP_IDX"], _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["PROD_TYPE"].REPETITION_MANDATORY_WITH_SEPARATOR, currProd.maxLookahead, Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd)); | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(repetitionWithSeparator, function (currProd) { | |
_this.computeLookaheadFunc(currRule, currProd.idx, _grammar_keys__WEBPACK_IMPORTED_MODULE_3__["MANY_SEP_IDX"], _grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["PROD_TYPE"].REPETITION_WITH_SEPARATOR, currProd.maxLookahead, Object(_grammar_gast_gast__WEBPACK_IMPORTED_MODULE_4__["getProductionDslName"])(currProd)); | |
}); | |
}); | |
}); | |
}; | |
LooksAhead.prototype.computeLookaheadFunc = function (rule, prodOccurrence, prodKey, prodType, prodMaxLookahead, dslMethodName) { | |
var _this = this; | |
this.TRACE_INIT("" + dslMethodName + (prodOccurrence === 0 ? "" : prodOccurrence), function () { | |
var laFunc = Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["buildLookaheadFuncForOptionalProd"])(prodOccurrence, rule, prodMaxLookahead || _this.maxLookahead, _this.dynamicTokensEnabled, prodType, _this.lookAheadBuilderForOptional); | |
var key = Object(_grammar_keys__WEBPACK_IMPORTED_MODULE_3__["getKeyForAutomaticLookahead"])(_this.fullRuleNameToShort[rule.name], prodKey, prodOccurrence); | |
_this.setLaFuncCache(key, laFunc); | |
}); | |
}; | |
LooksAhead.prototype.lookAheadBuilderForOptional = function (alt, tokenMatcher, dynamicTokensEnabled) { | |
return Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["buildSingleAlternativeLookaheadFunction"])(alt, tokenMatcher, dynamicTokensEnabled); | |
}; | |
LooksAhead.prototype.lookAheadBuilderForAlternatives = function (alts, hasPredicates, tokenMatcher, dynamicTokensEnabled) { | |
return Object(_grammar_lookahead__WEBPACK_IMPORTED_MODULE_0__["buildAlternativesLookAheadFunc"])(alts, hasPredicates, tokenMatcher, dynamicTokensEnabled); | |
}; | |
// this actually returns a number, but it is always used as a string (object prop key) | |
LooksAhead.prototype.getKeyForAutomaticLookahead = function (dslMethodIdx, occurrence) { | |
var currRuleShortName = this.getLastExplicitRuleShortName(); | |
return Object(_grammar_keys__WEBPACK_IMPORTED_MODULE_3__["getKeyForAutomaticLookahead"])(currRuleShortName, dslMethodIdx, occurrence); | |
}; | |
/* istanbul ignore next */ | |
LooksAhead.prototype.getLaFuncFromCache = function (key) { | |
return undefined; | |
}; | |
LooksAhead.prototype.getLaFuncFromMap = function (key) { | |
return this.lookAheadFuncsCache.get(key); | |
}; | |
/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */ | |
LooksAhead.prototype.getLaFuncFromObj = function (key) { | |
return this.lookAheadFuncsCache[key]; | |
}; | |
/* istanbul ignore next */ | |
LooksAhead.prototype.setLaFuncCache = function (key, value) { }; | |
LooksAhead.prototype.setLaFuncCacheUsingMap = function (key, value) { | |
this.lookAheadFuncsCache.set(key, value); | |
}; | |
/* istanbul ignore next - Using plain array as dictionary will be tested on older node.js versions and IE11 */ | |
LooksAhead.prototype.setLaFuncUsingObj = function (key, value) { | |
this.lookAheadFuncsCache[key] = value; | |
}; | |
return LooksAhead; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js": | |
/*!*********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js ***! | |
\*********************************************************************************************************************/ | |
/*! exports provided: PerformanceTracer */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PerformanceTracer", function() { return PerformanceTracer; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/** | |
* Trait responsible for runtime parsing errors. | |
*/ | |
var PerformanceTracer = /** @class */ (function () { | |
function PerformanceTracer() { | |
} | |
PerformanceTracer.prototype.initPerformanceTracer = function (config) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "traceInitPerf")) { | |
var userTraceInitPerf = config.traceInitPerf; | |
var traceIsNumber = typeof userTraceInitPerf === "number"; | |
this.traceInitMaxIdent = traceIsNumber | |
? userTraceInitPerf | |
: Infinity; | |
this.traceInitPerf = traceIsNumber | |
? userTraceInitPerf > 0 | |
: userTraceInitPerf; | |
} | |
else { | |
this.traceInitMaxIdent = 0; | |
this.traceInitPerf = _parser__WEBPACK_IMPORTED_MODULE_1__["DEFAULT_PARSER_CONFIG"].traceInitPerf; | |
} | |
this.traceInitIndent = -1; | |
}; | |
PerformanceTracer.prototype.TRACE_INIT = function (phaseDesc, phaseImpl) { | |
// No need to optimize this using NOOP pattern because | |
// It is not called in a hot spot... | |
if (this.traceInitPerf === true) { | |
this.traceInitIndent++; | |
var indent = new Array(this.traceInitIndent + 1).join("\t"); | |
if (this.traceInitIndent < this.traceInitMaxIdent) { | |
console.log(indent + "--> <" + phaseDesc + ">"); | |
} | |
var _a = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["timer"])(phaseImpl), time = _a.time, value = _a.value; | |
/* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */ | |
var traceMethod = time > 10 ? console.warn : console.log; | |
if (this.traceInitIndent < this.traceInitMaxIdent) { | |
traceMethod(indent + "<-- <" + phaseDesc + "> time: " + time + "ms"); | |
} | |
this.traceInitIndent--; | |
return value; | |
} | |
else { | |
return phaseImpl(); | |
} | |
}; | |
return PerformanceTracer; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js": | |
/*!************************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js ***! | |
\************************************************************************************************************************/ | |
/*! exports provided: RecognizerApi */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecognizerApi", function() { return RecognizerApi; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _exceptions_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../exceptions_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _errors_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/errors_public.js"); | |
/* harmony import */ var _grammar_checks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grammar/checks */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js"); | |
/* harmony import */ var _grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../grammar/gast/gast_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js"); | |
/** | |
* This trait is responsible for implementing the public API | |
* for defining Chevrotain parsers, i.e: | |
* - CONSUME | |
* - RULE | |
* - OPTION | |
* - ... | |
*/ | |
var RecognizerApi = /** @class */ (function () { | |
function RecognizerApi() { | |
} | |
RecognizerApi.prototype.ACTION = function (impl) { | |
return impl.call(this); | |
}; | |
RecognizerApi.prototype.consume = function (idx, tokType, options) { | |
return this.consumeInternal(tokType, idx, options); | |
}; | |
RecognizerApi.prototype.subrule = function (idx, ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, idx, options); | |
}; | |
RecognizerApi.prototype.option = function (idx, actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, idx); | |
}; | |
RecognizerApi.prototype.or = function (idx, altsOrOpts) { | |
return this.orInternal(altsOrOpts, idx); | |
}; | |
RecognizerApi.prototype.many = function (idx, actionORMethodDef) { | |
return this.manyInternal(idx, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.atLeastOne = function (idx, actionORMethodDef) { | |
return this.atLeastOneInternal(idx, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.CONSUME = function (tokType, options) { | |
return this.consumeInternal(tokType, 0, options); | |
}; | |
RecognizerApi.prototype.CONSUME1 = function (tokType, options) { | |
return this.consumeInternal(tokType, 1, options); | |
}; | |
RecognizerApi.prototype.CONSUME2 = function (tokType, options) { | |
return this.consumeInternal(tokType, 2, options); | |
}; | |
RecognizerApi.prototype.CONSUME3 = function (tokType, options) { | |
return this.consumeInternal(tokType, 3, options); | |
}; | |
RecognizerApi.prototype.CONSUME4 = function (tokType, options) { | |
return this.consumeInternal(tokType, 4, options); | |
}; | |
RecognizerApi.prototype.CONSUME5 = function (tokType, options) { | |
return this.consumeInternal(tokType, 5, options); | |
}; | |
RecognizerApi.prototype.CONSUME6 = function (tokType, options) { | |
return this.consumeInternal(tokType, 6, options); | |
}; | |
RecognizerApi.prototype.CONSUME7 = function (tokType, options) { | |
return this.consumeInternal(tokType, 7, options); | |
}; | |
RecognizerApi.prototype.CONSUME8 = function (tokType, options) { | |
return this.consumeInternal(tokType, 8, options); | |
}; | |
RecognizerApi.prototype.CONSUME9 = function (tokType, options) { | |
return this.consumeInternal(tokType, 9, options); | |
}; | |
RecognizerApi.prototype.SUBRULE = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 0, options); | |
}; | |
RecognizerApi.prototype.SUBRULE1 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 1, options); | |
}; | |
RecognizerApi.prototype.SUBRULE2 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 2, options); | |
}; | |
RecognizerApi.prototype.SUBRULE3 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 3, options); | |
}; | |
RecognizerApi.prototype.SUBRULE4 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 4, options); | |
}; | |
RecognizerApi.prototype.SUBRULE5 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 5, options); | |
}; | |
RecognizerApi.prototype.SUBRULE6 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 6, options); | |
}; | |
RecognizerApi.prototype.SUBRULE7 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 7, options); | |
}; | |
RecognizerApi.prototype.SUBRULE8 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 8, options); | |
}; | |
RecognizerApi.prototype.SUBRULE9 = function (ruleToCall, options) { | |
return this.subruleInternal(ruleToCall, 9, options); | |
}; | |
RecognizerApi.prototype.OPTION = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 0); | |
}; | |
RecognizerApi.prototype.OPTION1 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 1); | |
}; | |
RecognizerApi.prototype.OPTION2 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 2); | |
}; | |
RecognizerApi.prototype.OPTION3 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 3); | |
}; | |
RecognizerApi.prototype.OPTION4 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 4); | |
}; | |
RecognizerApi.prototype.OPTION5 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 5); | |
}; | |
RecognizerApi.prototype.OPTION6 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 6); | |
}; | |
RecognizerApi.prototype.OPTION7 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 7); | |
}; | |
RecognizerApi.prototype.OPTION8 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 8); | |
}; | |
RecognizerApi.prototype.OPTION9 = function (actionORMethodDef) { | |
return this.optionInternal(actionORMethodDef, 9); | |
}; | |
RecognizerApi.prototype.OR = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 0); | |
}; | |
RecognizerApi.prototype.OR1 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 1); | |
}; | |
RecognizerApi.prototype.OR2 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 2); | |
}; | |
RecognizerApi.prototype.OR3 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 3); | |
}; | |
RecognizerApi.prototype.OR4 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 4); | |
}; | |
RecognizerApi.prototype.OR5 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 5); | |
}; | |
RecognizerApi.prototype.OR6 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 6); | |
}; | |
RecognizerApi.prototype.OR7 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 7); | |
}; | |
RecognizerApi.prototype.OR8 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 8); | |
}; | |
RecognizerApi.prototype.OR9 = function (altsOrOpts) { | |
return this.orInternal(altsOrOpts, 9); | |
}; | |
RecognizerApi.prototype.MANY = function (actionORMethodDef) { | |
this.manyInternal(0, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY1 = function (actionORMethodDef) { | |
this.manyInternal(1, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY2 = function (actionORMethodDef) { | |
this.manyInternal(2, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY3 = function (actionORMethodDef) { | |
this.manyInternal(3, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY4 = function (actionORMethodDef) { | |
this.manyInternal(4, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY5 = function (actionORMethodDef) { | |
this.manyInternal(5, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY6 = function (actionORMethodDef) { | |
this.manyInternal(6, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY7 = function (actionORMethodDef) { | |
this.manyInternal(7, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY8 = function (actionORMethodDef) { | |
this.manyInternal(8, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY9 = function (actionORMethodDef) { | |
this.manyInternal(9, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.MANY_SEP = function (options) { | |
this.manySepFirstInternal(0, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP1 = function (options) { | |
this.manySepFirstInternal(1, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP2 = function (options) { | |
this.manySepFirstInternal(2, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP3 = function (options) { | |
this.manySepFirstInternal(3, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP4 = function (options) { | |
this.manySepFirstInternal(4, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP5 = function (options) { | |
this.manySepFirstInternal(5, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP6 = function (options) { | |
this.manySepFirstInternal(6, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP7 = function (options) { | |
this.manySepFirstInternal(7, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP8 = function (options) { | |
this.manySepFirstInternal(8, options); | |
}; | |
RecognizerApi.prototype.MANY_SEP9 = function (options) { | |
this.manySepFirstInternal(9, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE = function (actionORMethodDef) { | |
this.atLeastOneInternal(0, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE1 = function (actionORMethodDef) { | |
return this.atLeastOneInternal(1, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE2 = function (actionORMethodDef) { | |
this.atLeastOneInternal(2, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE3 = function (actionORMethodDef) { | |
this.atLeastOneInternal(3, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE4 = function (actionORMethodDef) { | |
this.atLeastOneInternal(4, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE5 = function (actionORMethodDef) { | |
this.atLeastOneInternal(5, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE6 = function (actionORMethodDef) { | |
this.atLeastOneInternal(6, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE7 = function (actionORMethodDef) { | |
this.atLeastOneInternal(7, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE8 = function (actionORMethodDef) { | |
this.atLeastOneInternal(8, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE9 = function (actionORMethodDef) { | |
this.atLeastOneInternal(9, actionORMethodDef); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP = function (options) { | |
this.atLeastOneSepFirstInternal(0, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP1 = function (options) { | |
this.atLeastOneSepFirstInternal(1, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP2 = function (options) { | |
this.atLeastOneSepFirstInternal(2, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP3 = function (options) { | |
this.atLeastOneSepFirstInternal(3, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP4 = function (options) { | |
this.atLeastOneSepFirstInternal(4, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP5 = function (options) { | |
this.atLeastOneSepFirstInternal(5, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP6 = function (options) { | |
this.atLeastOneSepFirstInternal(6, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP7 = function (options) { | |
this.atLeastOneSepFirstInternal(7, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP8 = function (options) { | |
this.atLeastOneSepFirstInternal(8, options); | |
}; | |
RecognizerApi.prototype.AT_LEAST_ONE_SEP9 = function (options) { | |
this.atLeastOneSepFirstInternal(9, options); | |
}; | |
RecognizerApi.prototype.RULE = function (name, implementation, config) { | |
if (config === void 0) { config = _parser__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_RULE_CONFIG"]; } | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(this.definedRulesNames, name)) { | |
var errMsg = _errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultGrammarValidatorErrorProvider"].buildDuplicateRuleNameError({ | |
topLevelRule: name, | |
grammarName: this.className | |
}); | |
var error = { | |
message: errMsg, | |
type: _parser__WEBPACK_IMPORTED_MODULE_2__["ParserDefinitionErrorType"].DUPLICATE_RULE_NAME, | |
ruleName: name | |
}; | |
this.definitionErrors.push(error); | |
} | |
this.definedRulesNames.push(name); | |
var ruleImplementation = this.defineRule(name, implementation, config); | |
this[name] = ruleImplementation; | |
return ruleImplementation; | |
}; | |
RecognizerApi.prototype.OVERRIDE_RULE = function (name, impl, config) { | |
if (config === void 0) { config = _parser__WEBPACK_IMPORTED_MODULE_2__["DEFAULT_RULE_CONFIG"]; } | |
var ruleErrors = []; | |
ruleErrors = ruleErrors.concat(Object(_grammar_checks__WEBPACK_IMPORTED_MODULE_4__["validateRuleIsOverridden"])(name, this.definedRulesNames, this.className)); | |
this.definitionErrors.push.apply(this.definitionErrors, ruleErrors); // mutability for the win | |
var ruleImplementation = this.defineRule(name, impl, config); | |
this[name] = ruleImplementation; | |
return ruleImplementation; | |
}; | |
RecognizerApi.prototype.BACKTRACK = function (grammarRule, args) { | |
return function () { | |
// save org state | |
this.isBackTrackingStack.push(1); | |
var orgState = this.saveRecogState(); | |
try { | |
grammarRule.apply(this, args); | |
// if no exception was thrown we have succeed parsing the rule. | |
return true; | |
} | |
catch (e) { | |
if (Object(_exceptions_public__WEBPACK_IMPORTED_MODULE_1__["isRecognitionException"])(e)) { | |
return false; | |
} | |
else { | |
throw e; | |
} | |
} | |
finally { | |
this.reloadRecogState(orgState); | |
this.isBackTrackingStack.pop(); | |
} | |
}; | |
}; | |
// GAST export APIs | |
RecognizerApi.prototype.getGAstProductions = function () { | |
return this.gastProductionsCache; | |
}; | |
RecognizerApi.prototype.getSerializedGastProductions = function () { | |
return Object(_grammar_gast_gast_public__WEBPACK_IMPORTED_MODULE_5__["serializeGrammar"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(this.gastProductionsCache)); | |
}; | |
return RecognizerApi; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js": | |
/*!***************************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js ***! | |
\***************************************************************************************************************************/ | |
/*! exports provided: RecognizerEngine */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RecognizerEngine", function() { return RecognizerEngine; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _grammar_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grammar/keys */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js"); | |
/* harmony import */ var _exceptions_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../exceptions_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js"); | |
/* harmony import */ var _grammar_lookahead__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../grammar/lookahead */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js"); | |
/* harmony import */ var _grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../grammar/interpreter */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/* harmony import */ var _recoverable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./recoverable */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js"); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony import */ var _scan_tokens__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../scan/tokens */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js"); | |
/* harmony import */ var _lang_lang_extensions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../lang/lang_extensions */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js"); | |
/** | |
* This trait is responsible for the runtime parsing engine | |
* Used by the official API (recognizer_api.ts) | |
*/ | |
var RecognizerEngine = /** @class */ (function () { | |
function RecognizerEngine() { | |
} | |
RecognizerEngine.prototype.initRecognizerEngine = function (tokenVocabulary, config) { | |
this.className = Object(_lang_lang_extensions__WEBPACK_IMPORTED_MODULE_9__["classNameFromInstance"])(this); | |
// TODO: would using an ES6 Map or plain object be faster (CST building scenario) | |
this.shortRuleNameToFull = {}; | |
this.fullRuleNameToShort = {}; | |
this.ruleShortNameIdx = 256; | |
this.tokenMatcher = _scan_tokens__WEBPACK_IMPORTED_MODULE_8__["tokenStructuredMatcherNoCategories"]; | |
this.definedRulesNames = []; | |
this.tokensMap = {}; | |
this.isBackTrackingStack = []; | |
this.RULE_STACK = []; | |
this.RULE_OCCURRENCE_STACK = []; | |
this.gastProductionsCache = {}; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "serializedGrammar")) { | |
throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n" + | |
"\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n" + | |
"\tFor Further details."); | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(tokenVocabulary)) { | |
// This only checks for Token vocabularies provided as arrays. | |
// That is good enough because the main objective is to detect users of pre-V4.0 APIs | |
// rather than all edge cases of empty Token vocabularies. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(tokenVocabulary)) { | |
throw Error("A Token Vocabulary cannot be empty.\n" + | |
"\tNote that the first argument for the parser constructor\n" + | |
"\tis no longer a Token vector (since v4.0)."); | |
} | |
if (typeof tokenVocabulary[0].startOffset === "number") { | |
throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n" + | |
"\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n" + | |
"\tFor Further details."); | |
} | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(tokenVocabulary)) { | |
this.tokensMap = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(tokenVocabulary, function (acc, tokType) { | |
acc[tokType.name] = tokType; | |
return acc; | |
}, {}); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokenVocabulary, "modes") && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(tokenVocabulary.modes)), _scan_tokens__WEBPACK_IMPORTED_MODULE_8__["isTokenType"])) { | |
var allTokenTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(tokenVocabulary.modes)); | |
var uniqueTokens = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["uniq"])(allTokenTypes); | |
this.tokensMap = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["reduce"])(uniqueTokens, function (acc, tokType) { | |
acc[tokType.name] = tokType; | |
return acc; | |
}, {}); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isObject"])(tokenVocabulary)) { | |
this.tokensMap = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneObj"])(tokenVocabulary); | |
} | |
else { | |
throw new Error("<tokensDictionary> argument must be An Array of Token constructors," + | |
" A dictionary of Token constructors or an IMultiModeLexerDefinition"); | |
} | |
// always add EOF to the tokenNames -> constructors map. it is useful to assure all the input has been | |
// parsed with a clear error message ("expecting EOF but found ...") | |
/* tslint:disable */ | |
this.tokensMap["EOF"] = _scan_tokens_public__WEBPACK_IMPORTED_MODULE_7__["EOF"]; | |
// TODO: This check may not be accurate for multi mode lexers | |
var noTokenCategoriesUsed = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["every"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(tokenVocabulary), function (tokenConstructor) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(tokenConstructor.categoryMatches); }); | |
this.tokenMatcher = noTokenCategoriesUsed | |
? _scan_tokens__WEBPACK_IMPORTED_MODULE_8__["tokenStructuredMatcherNoCategories"] | |
: _scan_tokens__WEBPACK_IMPORTED_MODULE_8__["tokenStructuredMatcher"]; | |
// Because ES2015+ syntax should be supported for creating Token classes | |
// We cannot assume that the Token classes were created using the "extendToken" utilities | |
// Therefore we must augment the Token classes both on Lexer initialization and on Parser initialization | |
Object(_scan_tokens__WEBPACK_IMPORTED_MODULE_8__["augmentTokenTypes"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["values"])(this.tokensMap)); | |
}; | |
RecognizerEngine.prototype.defineRule = function (ruleName, impl, config) { | |
if (this.selfAnalysisDone) { | |
throw Error("Grammar rule <" + ruleName + "> may not be defined after the 'performSelfAnalysis' method has been called'\n" + | |
"Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called."); | |
} | |
var resyncEnabled = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "resyncEnabled") | |
? config.resyncEnabled | |
: _parser__WEBPACK_IMPORTED_MODULE_5__["DEFAULT_RULE_CONFIG"].resyncEnabled; | |
var recoveryValueFunc = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, "recoveryValueFunc") | |
? config.recoveryValueFunc | |
: _parser__WEBPACK_IMPORTED_MODULE_5__["DEFAULT_RULE_CONFIG"].recoveryValueFunc; | |
// performance optimization: Use small integers as keys for the longer human readable "full" rule names. | |
// this greatly improves Map access time (as much as 8% for some performance benchmarks). | |
/* tslint:disable */ | |
var shortName = this.ruleShortNameIdx << (_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["BITS_FOR_METHOD_TYPE"] + _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["BITS_FOR_OCCURRENCE_IDX"]); | |
/* tslint:enable */ | |
this.ruleShortNameIdx++; | |
this.shortRuleNameToFull[shortName] = ruleName; | |
this.fullRuleNameToShort[ruleName] = shortName; | |
function invokeRuleWithTry(args) { | |
try { | |
if (this.outputCst === true) { | |
impl.apply(this, args); | |
var cst = this.CST_STACK[this.CST_STACK.length - 1]; | |
this.cstPostRule(cst); | |
return cst; | |
} | |
else { | |
return impl.apply(this, args); | |
} | |
} | |
catch (e) { | |
return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc); | |
} | |
finally { | |
this.ruleFinallyStateUpdate(); | |
} | |
} | |
var wrappedGrammarRule; | |
wrappedGrammarRule = function (idxInCallingRule, args) { | |
if (idxInCallingRule === void 0) { idxInCallingRule = 0; } | |
this.ruleInvocationStateUpdate(shortName, ruleName, idxInCallingRule); | |
return invokeRuleWithTry.call(this, args); | |
}; | |
var ruleNamePropName = "ruleName"; | |
wrappedGrammarRule[ruleNamePropName] = ruleName; | |
wrappedGrammarRule["originalGrammarAction"] = impl; | |
return wrappedGrammarRule; | |
}; | |
RecognizerEngine.prototype.invokeRuleCatch = function (e, resyncEnabledConfig, recoveryValueFunc) { | |
var isFirstInvokedRule = this.RULE_STACK.length === 1; | |
// note the reSync is always enabled for the first rule invocation, because we must always be able to | |
// reSync with EOF and just output some INVALID ParseTree | |
// during backtracking reSync recovery is disabled, otherwise we can't be certain the backtracking | |
// path is really the most valid one | |
var reSyncEnabled = resyncEnabledConfig && !this.isBackTracking() && this.recoveryEnabled; | |
if (Object(_exceptions_public__WEBPACK_IMPORTED_MODULE_2__["isRecognitionException"])(e)) { | |
var recogError = e; | |
if (reSyncEnabled) { | |
var reSyncTokType = this.findReSyncTokenType(); | |
if (this.isInCurrentRuleReSyncSet(reSyncTokType)) { | |
recogError.resyncedTokens = this.reSyncTo(reSyncTokType); | |
if (this.outputCst) { | |
var partialCstResult = this.CST_STACK[this.CST_STACK.length - 1]; | |
partialCstResult.recoveredNode = true; | |
return partialCstResult; | |
} | |
else { | |
return recoveryValueFunc(); | |
} | |
} | |
else { | |
if (this.outputCst) { | |
var partialCstResult = this.CST_STACK[this.CST_STACK.length - 1]; | |
partialCstResult.recoveredNode = true; | |
recogError.partialCstResult = partialCstResult; | |
} | |
// to be handled Further up the call stack | |
throw recogError; | |
} | |
} | |
else if (isFirstInvokedRule) { | |
// otherwise a Redundant input error will be created as well and we cannot guarantee that this is indeed the case | |
this.moveToTerminatedState(); | |
// the parser should never throw one of its own errors outside its flow. | |
// even if error recovery is disabled | |
return recoveryValueFunc(); | |
} | |
else { | |
// to be recovered Further up the call stack | |
throw recogError; | |
} | |
} | |
else { | |
// some other Error type which we don't know how to handle (for example a built in JavaScript Error) | |
throw e; | |
} | |
}; | |
// Implementation of parsing DSL | |
RecognizerEngine.prototype.optionInternal = function (actionORMethodDef, occurrence) { | |
var key = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["OPTION_IDX"], occurrence); | |
return this.optionInternalLogic(actionORMethodDef, occurrence, key); | |
}; | |
RecognizerEngine.prototype.optionInternalLogic = function (actionORMethodDef, occurrence, key) { | |
var _this = this; | |
var lookAheadFunc = this.getLaFuncFromCache(key); | |
var action; | |
var predicate; | |
if (actionORMethodDef.DEF !== undefined) { | |
action = actionORMethodDef.DEF; | |
predicate = actionORMethodDef.GATE; | |
// predicate present | |
if (predicate !== undefined) { | |
var orgLookaheadFunction_1 = lookAheadFunc; | |
lookAheadFunc = function () { | |
return predicate.call(_this) && orgLookaheadFunction_1.call(_this); | |
}; | |
} | |
} | |
else { | |
action = actionORMethodDef; | |
} | |
if (lookAheadFunc.call(this) === true) { | |
return action.call(this); | |
} | |
return undefined; | |
}; | |
RecognizerEngine.prototype.atLeastOneInternal = function (prodOccurrence, actionORMethodDef) { | |
var laKey = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["AT_LEAST_ONE_IDX"], prodOccurrence); | |
return this.atLeastOneInternalLogic(prodOccurrence, actionORMethodDef, laKey); | |
}; | |
RecognizerEngine.prototype.atLeastOneInternalLogic = function (prodOccurrence, actionORMethodDef, key) { | |
var _this = this; | |
var lookAheadFunc = this.getLaFuncFromCache(key); | |
var action; | |
var predicate; | |
if (actionORMethodDef.DEF !== undefined) { | |
action = actionORMethodDef.DEF; | |
predicate = actionORMethodDef.GATE; | |
// predicate present | |
if (predicate !== undefined) { | |
var orgLookaheadFunction_2 = lookAheadFunc; | |
lookAheadFunc = function () { | |
return predicate.call(_this) && orgLookaheadFunction_2.call(_this); | |
}; | |
} | |
} | |
else { | |
action = actionORMethodDef; | |
} | |
if (lookAheadFunc.call(this) === true) { | |
var notStuck = this.doSingleRepetition(action); | |
while (lookAheadFunc.call(this) === true && | |
notStuck === true) { | |
notStuck = this.doSingleRepetition(action); | |
} | |
} | |
else { | |
throw this.raiseEarlyExitException(prodOccurrence, _grammar_lookahead__WEBPACK_IMPORTED_MODULE_3__["PROD_TYPE"].REPETITION_MANDATORY, actionORMethodDef.ERR_MSG); | |
} | |
// note that while it may seem that this can cause an error because by using a recursive call to | |
// AT_LEAST_ONE we change the grammar to AT_LEAST_TWO, AT_LEAST_THREE ... , the possible recursive call | |
// from the tryInRepetitionRecovery(...) will only happen IFF there really are TWO/THREE/.... items. | |
// Performance optimization: "attemptInRepetitionRecovery" will be defined as NOOP unless recovery is enabled | |
this.attemptInRepetitionRecovery(this.atLeastOneInternal, [prodOccurrence, actionORMethodDef], lookAheadFunc, _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["AT_LEAST_ONE_IDX"], prodOccurrence, _grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterAtLeastOneWalker"]); | |
}; | |
RecognizerEngine.prototype.atLeastOneSepFirstInternal = function (prodOccurrence, options) { | |
var laKey = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["AT_LEAST_ONE_SEP_IDX"], prodOccurrence); | |
this.atLeastOneSepFirstInternalLogic(prodOccurrence, options, laKey); | |
}; | |
RecognizerEngine.prototype.atLeastOneSepFirstInternalLogic = function (prodOccurrence, options, key) { | |
var _this = this; | |
var action = options.DEF; | |
var separator = options.SEP; | |
var firstIterationLookaheadFunc = this.getLaFuncFromCache(key); | |
// 1st iteration | |
if (firstIterationLookaheadFunc.call(this) === true) { | |
; | |
action.call(this); | |
// TODO: Optimization can move this function construction into "attemptInRepetitionRecovery" | |
// because it is only needed in error recovery scenarios. | |
var separatorLookAheadFunc = function () { | |
return _this.tokenMatcher(_this.LA(1), separator); | |
}; | |
// 2nd..nth iterations | |
while (this.tokenMatcher(this.LA(1), separator) === true) { | |
// note that this CONSUME will never enter recovery because | |
// the separatorLookAheadFunc checks that the separator really does exist. | |
this.CONSUME(separator); | |
action.call(this); | |
} | |
// Performance optimization: "attemptInRepetitionRecovery" will be defined as NOOP unless recovery is enabled | |
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [ | |
prodOccurrence, | |
separator, | |
separatorLookAheadFunc, | |
action, | |
_grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterAtLeastOneSepWalker"] | |
], separatorLookAheadFunc, _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["AT_LEAST_ONE_SEP_IDX"], prodOccurrence, _grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterAtLeastOneSepWalker"]); | |
} | |
else { | |
throw this.raiseEarlyExitException(prodOccurrence, _grammar_lookahead__WEBPACK_IMPORTED_MODULE_3__["PROD_TYPE"].REPETITION_MANDATORY_WITH_SEPARATOR, options.ERR_MSG); | |
} | |
}; | |
RecognizerEngine.prototype.manyInternal = function (prodOccurrence, actionORMethodDef) { | |
var laKey = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["MANY_IDX"], prodOccurrence); | |
return this.manyInternalLogic(prodOccurrence, actionORMethodDef, laKey); | |
}; | |
RecognizerEngine.prototype.manyInternalLogic = function (prodOccurrence, actionORMethodDef, key) { | |
var _this = this; | |
var lookaheadFunction = this.getLaFuncFromCache(key); | |
var action; | |
var predicate; | |
if (actionORMethodDef.DEF !== undefined) { | |
action = actionORMethodDef.DEF; | |
predicate = actionORMethodDef.GATE; | |
// predicate present | |
if (predicate !== undefined) { | |
var orgLookaheadFunction_3 = lookaheadFunction; | |
lookaheadFunction = function () { | |
return predicate.call(_this) && orgLookaheadFunction_3.call(_this); | |
}; | |
} | |
} | |
else { | |
action = actionORMethodDef; | |
} | |
var notStuck = true; | |
while (lookaheadFunction.call(this) === true && notStuck === true) { | |
notStuck = this.doSingleRepetition(action); | |
} | |
// Performance optimization: "attemptInRepetitionRecovery" will be defined as NOOP unless recovery is enabled | |
this.attemptInRepetitionRecovery(this.manyInternal, [prodOccurrence, actionORMethodDef], lookaheadFunction, _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["MANY_IDX"], prodOccurrence, _grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterManyWalker"], | |
// The notStuck parameter is only relevant when "attemptInRepetitionRecovery" | |
// is invoked from manyInternal, in the MANY_SEP case and AT_LEAST_ONE[_SEP] | |
// An infinite loop cannot occur as: | |
// - Either the lookahead is guaranteed to consume something (Single Token Separator) | |
// - AT_LEAST_ONE by definition is guaranteed to consume something (or error out). | |
notStuck); | |
}; | |
RecognizerEngine.prototype.manySepFirstInternal = function (prodOccurrence, options) { | |
var laKey = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["MANY_SEP_IDX"], prodOccurrence); | |
this.manySepFirstInternalLogic(prodOccurrence, options, laKey); | |
}; | |
RecognizerEngine.prototype.manySepFirstInternalLogic = function (prodOccurrence, options, key) { | |
var _this = this; | |
var action = options.DEF; | |
var separator = options.SEP; | |
var firstIterationLaFunc = this.getLaFuncFromCache(key); | |
// 1st iteration | |
if (firstIterationLaFunc.call(this) === true) { | |
action.call(this); | |
var separatorLookAheadFunc = function () { | |
return _this.tokenMatcher(_this.LA(1), separator); | |
}; | |
// 2nd..nth iterations | |
while (this.tokenMatcher(this.LA(1), separator) === true) { | |
// note that this CONSUME will never enter recovery because | |
// the separatorLookAheadFunc checks that the separator really does exist. | |
this.CONSUME(separator); | |
// No need for checking infinite loop here due to consuming the separator. | |
action.call(this); | |
} | |
// Performance optimization: "attemptInRepetitionRecovery" will be defined as NOOP unless recovery is enabled | |
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [ | |
prodOccurrence, | |
separator, | |
separatorLookAheadFunc, | |
action, | |
_grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterManySepWalker"] | |
], separatorLookAheadFunc, _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["MANY_SEP_IDX"], prodOccurrence, _grammar_interpreter__WEBPACK_IMPORTED_MODULE_4__["NextTerminalAfterManySepWalker"]); | |
} | |
}; | |
RecognizerEngine.prototype.repetitionSepSecondInternal = function (prodOccurrence, separator, separatorLookAheadFunc, action, nextTerminalAfterWalker) { | |
while (separatorLookAheadFunc()) { | |
// note that this CONSUME will never enter recovery because | |
// the separatorLookAheadFunc checks that the separator really does exist. | |
this.CONSUME(separator); | |
action.call(this); | |
} | |
// we can only arrive to this function after an error | |
// has occurred (hence the name 'second') so the following | |
// IF will always be entered, its possible to remove it... | |
// however it is kept to avoid confusion and be consistent. | |
// Performance optimization: "attemptInRepetitionRecovery" will be defined as NOOP unless recovery is enabled | |
/* istanbul ignore else */ | |
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [ | |
prodOccurrence, | |
separator, | |
separatorLookAheadFunc, | |
action, | |
nextTerminalAfterWalker | |
], separatorLookAheadFunc, _grammar_keys__WEBPACK_IMPORTED_MODULE_1__["AT_LEAST_ONE_SEP_IDX"], prodOccurrence, nextTerminalAfterWalker); | |
}; | |
RecognizerEngine.prototype.doSingleRepetition = function (action) { | |
var beforeIteration = this.getLexerPosition(); | |
action.call(this); | |
var afterIteration = this.getLexerPosition(); | |
// This boolean will indicate if this repetition progressed | |
// or if we are "stuck" (potential infinite loop in the repetition). | |
return afterIteration > beforeIteration; | |
}; | |
RecognizerEngine.prototype.orInternal = function (altsOrOpts, occurrence) { | |
var laKey = this.getKeyForAutomaticLookahead(_grammar_keys__WEBPACK_IMPORTED_MODULE_1__["OR_IDX"], occurrence); | |
var alts = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(altsOrOpts) | |
? altsOrOpts | |
: altsOrOpts.DEF; | |
var laFunc = this.getLaFuncFromCache(laKey); | |
var altIdxToTake = laFunc.call(this, alts); | |
if (altIdxToTake !== undefined) { | |
var chosenAlternative = alts[altIdxToTake]; | |
return chosenAlternative.ALT.call(this); | |
} | |
this.raiseNoAltException(occurrence, altsOrOpts.ERR_MSG); | |
}; | |
RecognizerEngine.prototype.ruleFinallyStateUpdate = function () { | |
this.RULE_STACK.pop(); | |
this.RULE_OCCURRENCE_STACK.pop(); | |
// NOOP when cst is disabled | |
this.cstFinallyStateUpdate(); | |
if (this.RULE_STACK.length === 0 && this.isAtEndOfInput() === false) { | |
var firstRedundantTok = this.LA(1); | |
var errMsg = this.errorMessageProvider.buildNotAllInputParsedMessage({ | |
firstRedundant: firstRedundantTok, | |
ruleName: this.getCurrRuleFullName() | |
}); | |
this.SAVE_ERROR(new _exceptions_public__WEBPACK_IMPORTED_MODULE_2__["NotAllInputParsedException"](errMsg, firstRedundantTok)); | |
} | |
}; | |
RecognizerEngine.prototype.subruleInternal = function (ruleToCall, idx, options) { | |
var ruleResult; | |
try { | |
var args = options !== undefined ? options.ARGS : undefined; | |
ruleResult = ruleToCall.call(this, idx, args); | |
this.cstPostNonTerminal(ruleResult, options !== undefined && options.LABEL !== undefined | |
? options.LABEL | |
: ruleToCall.ruleName); | |
return ruleResult; | |
} | |
catch (e) { | |
this.subruleInternalError(e, options, ruleToCall.ruleName); | |
} | |
}; | |
RecognizerEngine.prototype.subruleInternalError = function (e, options, ruleName) { | |
if (Object(_exceptions_public__WEBPACK_IMPORTED_MODULE_2__["isRecognitionException"])(e) && e.partialCstResult !== undefined) { | |
this.cstPostNonTerminal(e.partialCstResult, options !== undefined && options.LABEL !== undefined | |
? options.LABEL | |
: ruleName); | |
delete e.partialCstResult; | |
} | |
throw e; | |
}; | |
RecognizerEngine.prototype.consumeInternal = function (tokType, idx, options) { | |
var consumedToken; | |
try { | |
var nextToken = this.LA(1); | |
if (this.tokenMatcher(nextToken, tokType) === true) { | |
this.consumeToken(); | |
consumedToken = nextToken; | |
} | |
else { | |
this.consumeInternalError(tokType, nextToken, options); | |
} | |
} | |
catch (eFromConsumption) { | |
consumedToken = this.consumeInternalRecovery(tokType, idx, eFromConsumption); | |
} | |
this.cstPostTerminal(options !== undefined && options.LABEL !== undefined | |
? options.LABEL | |
: tokType.name, consumedToken); | |
return consumedToken; | |
}; | |
RecognizerEngine.prototype.consumeInternalError = function (tokType, nextToken, options) { | |
var msg; | |
var previousToken = this.LA(0); | |
if (options !== undefined && options.ERR_MSG) { | |
msg = options.ERR_MSG; | |
} | |
else { | |
msg = this.errorMessageProvider.buildMismatchTokenMessage({ | |
expected: tokType, | |
actual: nextToken, | |
previous: previousToken, | |
ruleName: this.getCurrRuleFullName() | |
}); | |
} | |
throw this.SAVE_ERROR(new _exceptions_public__WEBPACK_IMPORTED_MODULE_2__["MismatchedTokenException"](msg, nextToken, previousToken)); | |
}; | |
RecognizerEngine.prototype.consumeInternalRecovery = function (tokType, idx, eFromConsumption) { | |
// no recovery allowed during backtracking, otherwise backtracking may recover invalid syntax and accept it | |
// but the original syntax could have been parsed successfully without any backtracking + recovery | |
if (this.recoveryEnabled && | |
// TODO: more robust checking of the exception type. Perhaps Typescript extending expressions? | |
eFromConsumption.name === "MismatchedTokenException" && | |
!this.isBackTracking()) { | |
var follows = this.getFollowsForInRuleRecovery(tokType, idx); | |
try { | |
return this.tryInRuleRecovery(tokType, follows); | |
} | |
catch (eFromInRuleRecovery) { | |
if (eFromInRuleRecovery.name === _recoverable__WEBPACK_IMPORTED_MODULE_6__["IN_RULE_RECOVERY_EXCEPTION"]) { | |
// failed in RuleRecovery. | |
// throw the original error in order to trigger reSync error recovery | |
throw eFromConsumption; | |
} | |
else { | |
throw eFromInRuleRecovery; | |
} | |
} | |
} | |
else { | |
throw eFromConsumption; | |
} | |
}; | |
RecognizerEngine.prototype.saveRecogState = function () { | |
// errors is a getter which will clone the errors array | |
var savedErrors = this.errors; | |
var savedRuleStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneArr"])(this.RULE_STACK); | |
return { | |
errors: savedErrors, | |
lexerState: this.exportLexerState(), | |
RULE_STACK: savedRuleStack, | |
CST_STACK: this.CST_STACK | |
}; | |
}; | |
RecognizerEngine.prototype.reloadRecogState = function (newState) { | |
this.errors = newState.errors; | |
this.importLexerState(newState.lexerState); | |
this.RULE_STACK = newState.RULE_STACK; | |
}; | |
RecognizerEngine.prototype.ruleInvocationStateUpdate = function (shortName, fullName, idxInCallingRule) { | |
this.RULE_OCCURRENCE_STACK.push(idxInCallingRule); | |
this.RULE_STACK.push(shortName); | |
// NOOP when cst is disabled | |
this.cstInvocationStateUpdate(fullName, shortName); | |
}; | |
RecognizerEngine.prototype.isBackTracking = function () { | |
return this.isBackTrackingStack.length !== 0; | |
}; | |
RecognizerEngine.prototype.getCurrRuleFullName = function () { | |
var shortName = this.getLastExplicitRuleShortName(); | |
return this.shortRuleNameToFull[shortName]; | |
}; | |
RecognizerEngine.prototype.shortRuleNameToFullName = function (shortName) { | |
return this.shortRuleNameToFull[shortName]; | |
}; | |
RecognizerEngine.prototype.isAtEndOfInput = function () { | |
return this.tokenMatcher(this.LA(1), _scan_tokens_public__WEBPACK_IMPORTED_MODULE_7__["EOF"]); | |
}; | |
RecognizerEngine.prototype.reset = function () { | |
this.resetLexerState(); | |
this.isBackTrackingStack = []; | |
this.errors = []; | |
this.RULE_STACK = []; | |
// TODO: extract a specific reset for TreeBuilder trait | |
this.CST_STACK = []; | |
this.RULE_OCCURRENCE_STACK = []; | |
}; | |
return RecognizerEngine; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js": | |
/*!*********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js ***! | |
\*********************************************************************************************************************/ | |
/*! exports provided: EOF_FOLLOW_KEY, IN_RULE_RECOVERY_EXCEPTION, InRuleRecoveryException, Recoverable, attemptInRepetitionRecovery */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOF_FOLLOW_KEY", function() { return EOF_FOLLOW_KEY; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IN_RULE_RECOVERY_EXCEPTION", function() { return IN_RULE_RECOVERY_EXCEPTION; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InRuleRecoveryException", function() { return InRuleRecoveryException; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Recoverable", function() { return Recoverable; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attemptInRepetitionRecovery", function() { return attemptInRepetitionRecovery; }); | |
/* harmony import */ var _scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../scan/tokens_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _exceptions_public__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../exceptions_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js"); | |
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/constants.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
var EOF_FOLLOW_KEY = {}; | |
var IN_RULE_RECOVERY_EXCEPTION = "InRuleRecoveryException"; | |
function InRuleRecoveryException(message) { | |
this.name = IN_RULE_RECOVERY_EXCEPTION; | |
this.message = message; | |
} | |
InRuleRecoveryException.prototype = Error.prototype; | |
/** | |
* This trait is responsible for the error recovery and fault tolerant logic | |
*/ | |
var Recoverable = /** @class */ (function () { | |
function Recoverable() { | |
} | |
Recoverable.prototype.initRecoverable = function (config) { | |
this.firstAfterRepMap = {}; | |
this.resyncFollows = {}; | |
this.recoveryEnabled = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["has"])(config, "recoveryEnabled") | |
? config.recoveryEnabled | |
: _parser__WEBPACK_IMPORTED_MODULE_4__["DEFAULT_PARSER_CONFIG"].recoveryEnabled; | |
// performance optimization, NOOP will be inlined which | |
// effectively means that this optional feature does not exist | |
// when not used. | |
if (this.recoveryEnabled) { | |
this.attemptInRepetitionRecovery = attemptInRepetitionRecovery; | |
} | |
}; | |
Recoverable.prototype.getTokenToInsert = function (tokType) { | |
var tokToInsert = Object(_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["createTokenInstance"])(tokType, "", NaN, NaN, NaN, NaN, NaN, NaN); | |
tokToInsert.isInsertedInRecovery = true; | |
return tokToInsert; | |
}; | |
Recoverable.prototype.canTokenTypeBeInsertedInRecovery = function (tokType) { | |
return true; | |
}; | |
Recoverable.prototype.tryInRepetitionRecovery = function (grammarRule, grammarRuleArgs, lookAheadFunc, expectedTokType) { | |
var _this = this; | |
// TODO: can the resyncTokenType be cached? | |
var reSyncTokType = this.findReSyncTokenType(); | |
var savedLexerState = this.exportLexerState(); | |
var resyncedTokens = []; | |
var passedResyncPoint = false; | |
var nextTokenWithoutResync = this.LA(1); | |
var currToken = this.LA(1); | |
var generateErrorMessage = function () { | |
var previousToken = _this.LA(0); | |
// we are preemptively re-syncing before an error has been detected, therefor we must reproduce | |
// the error that would have been thrown | |
var msg = _this.errorMessageProvider.buildMismatchTokenMessage({ | |
expected: expectedTokType, | |
actual: nextTokenWithoutResync, | |
previous: previousToken, | |
ruleName: _this.getCurrRuleFullName() | |
}); | |
var error = new _exceptions_public__WEBPACK_IMPORTED_MODULE_2__["MismatchedTokenException"](msg, nextTokenWithoutResync, _this.LA(0)); | |
// the first token here will be the original cause of the error, this is not part of the resyncedTokens property. | |
error.resyncedTokens = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["dropRight"])(resyncedTokens); | |
_this.SAVE_ERROR(error); | |
}; | |
while (!passedResyncPoint) { | |
// re-synced to a point where we can safely exit the repetition/ | |
if (this.tokenMatcher(currToken, expectedTokType)) { | |
generateErrorMessage(); | |
return; // must return here to avoid reverting the inputIdx | |
} | |
else if (lookAheadFunc.call(this)) { | |
// we skipped enough tokens so we can resync right back into another iteration of the repetition grammar rule | |
generateErrorMessage(); | |
// recursive invocation in other to support multiple re-syncs in the same top level repetition grammar rule | |
grammarRule.apply(this, grammarRuleArgs); | |
return; // must return here to avoid reverting the inputIdx | |
} | |
else if (this.tokenMatcher(currToken, reSyncTokType)) { | |
passedResyncPoint = true; | |
} | |
else { | |
currToken = this.SKIP_TOKEN(); | |
this.addToResyncTokens(currToken, resyncedTokens); | |
} | |
} | |
// we were unable to find a CLOSER point to resync inside the Repetition, reset the state. | |
// The parsing exception we were trying to prevent will happen in the NEXT parsing step. it may be handled by | |
// "between rules" resync recovery later in the flow. | |
this.importLexerState(savedLexerState); | |
}; | |
Recoverable.prototype.shouldInRepetitionRecoveryBeTried = function (expectTokAfterLastMatch, nextTokIdx, notStuck) { | |
// Edge case of arriving from a MANY repetition which is stuck | |
// Attempting recovery in this case could cause an infinite loop | |
if (notStuck === false) { | |
return false; | |
} | |
// arguments to try and perform resync into the next iteration of the many are missing | |
if (expectTokAfterLastMatch === undefined || nextTokIdx === undefined) { | |
return false; | |
} | |
// no need to recover, next token is what we expect... | |
if (this.tokenMatcher(this.LA(1), expectTokAfterLastMatch)) { | |
return false; | |
} | |
// error recovery is disabled during backtracking as it can make the parser ignore a valid grammar path | |
// and prefer some backtracking path that includes recovered errors. | |
if (this.isBackTracking()) { | |
return false; | |
} | |
// if we can perform inRule recovery (single token insertion or deletion) we always prefer that recovery algorithm | |
// because if it works, it makes the least amount of changes to the input stream (greedy algorithm) | |
//noinspection RedundantIfStatementJS | |
if (this.canPerformInRuleRecovery(expectTokAfterLastMatch, this.getFollowsForInRuleRecovery(expectTokAfterLastMatch, nextTokIdx))) { | |
return false; | |
} | |
return true; | |
}; | |
// Error Recovery functionality | |
Recoverable.prototype.getFollowsForInRuleRecovery = function (tokType, tokIdxInRule) { | |
var grammarPath = this.getCurrentGrammarPath(tokType, tokIdxInRule); | |
var follows = this.getNextPossibleTokenTypes(grammarPath); | |
return follows; | |
}; | |
Recoverable.prototype.tryInRuleRecovery = function (expectedTokType, follows) { | |
if (this.canRecoverWithSingleTokenInsertion(expectedTokType, follows)) { | |
var tokToInsert = this.getTokenToInsert(expectedTokType); | |
return tokToInsert; | |
} | |
if (this.canRecoverWithSingleTokenDeletion(expectedTokType)) { | |
var nextTok = this.SKIP_TOKEN(); | |
this.consumeToken(); | |
return nextTok; | |
} | |
throw new InRuleRecoveryException("sad sad panda"); | |
}; | |
Recoverable.prototype.canPerformInRuleRecovery = function (expectedToken, follows) { | |
return (this.canRecoverWithSingleTokenInsertion(expectedToken, follows) || | |
this.canRecoverWithSingleTokenDeletion(expectedToken)); | |
}; | |
Recoverable.prototype.canRecoverWithSingleTokenInsertion = function (expectedTokType, follows) { | |
var _this = this; | |
if (!this.canTokenTypeBeInsertedInRecovery(expectedTokType)) { | |
return false; | |
} | |
// must know the possible following tokens to perform single token insertion | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(follows)) { | |
return false; | |
} | |
var mismatchedTok = this.LA(1); | |
var isMisMatchedTokInFollows = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["find"])(follows, function (possibleFollowsTokType) { | |
return _this.tokenMatcher(mismatchedTok, possibleFollowsTokType); | |
}) !== undefined; | |
return isMisMatchedTokInFollows; | |
}; | |
Recoverable.prototype.canRecoverWithSingleTokenDeletion = function (expectedTokType) { | |
var isNextTokenWhatIsExpected = this.tokenMatcher(this.LA(2), expectedTokType); | |
return isNextTokenWhatIsExpected; | |
}; | |
Recoverable.prototype.isInCurrentRuleReSyncSet = function (tokenTypeIdx) { | |
var followKey = this.getCurrFollowKey(); | |
var currentRuleReSyncSet = this.getFollowSetFromFollowKey(followKey); | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["contains"])(currentRuleReSyncSet, tokenTypeIdx); | |
}; | |
Recoverable.prototype.findReSyncTokenType = function () { | |
var allPossibleReSyncTokTypes = this.flattenFollowSet(); | |
// this loop will always terminate as EOF is always in the follow stack and also always (virtually) in the input | |
var nextToken = this.LA(1); | |
var k = 2; | |
while (true) { | |
var nextTokenType = nextToken.tokenType; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["contains"])(allPossibleReSyncTokTypes, nextTokenType)) { | |
return nextTokenType; | |
} | |
nextToken = this.LA(k); | |
k++; | |
} | |
}; | |
Recoverable.prototype.getCurrFollowKey = function () { | |
// the length is at least one as we always add the ruleName to the stack before invoking the rule. | |
if (this.RULE_STACK.length === 1) { | |
return EOF_FOLLOW_KEY; | |
} | |
var currRuleShortName = this.getLastExplicitRuleShortName(); | |
var currRuleIdx = this.getLastExplicitRuleOccurrenceIndex(); | |
var prevRuleShortName = this.getPreviousExplicitRuleShortName(); | |
return { | |
ruleName: this.shortRuleNameToFullName(currRuleShortName), | |
idxInCallingRule: currRuleIdx, | |
inRule: this.shortRuleNameToFullName(prevRuleShortName) | |
}; | |
}; | |
Recoverable.prototype.buildFullFollowKeyStack = function () { | |
var _this = this; | |
var explicitRuleStack = this.RULE_STACK; | |
var explicitOccurrenceStack = this.RULE_OCCURRENCE_STACK; | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(explicitRuleStack, function (ruleName, idx) { | |
if (idx === 0) { | |
return EOF_FOLLOW_KEY; | |
} | |
return { | |
ruleName: _this.shortRuleNameToFullName(ruleName), | |
idxInCallingRule: explicitOccurrenceStack[idx], | |
inRule: _this.shortRuleNameToFullName(explicitRuleStack[idx - 1]) | |
}; | |
}); | |
}; | |
Recoverable.prototype.flattenFollowSet = function () { | |
var _this = this; | |
var followStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(this.buildFullFollowKeyStack(), function (currKey) { | |
return _this.getFollowSetFromFollowKey(currKey); | |
}); | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["flatten"])(followStack); | |
}; | |
Recoverable.prototype.getFollowSetFromFollowKey = function (followKey) { | |
if (followKey === EOF_FOLLOW_KEY) { | |
return [_scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["EOF"]]; | |
} | |
var followName = followKey.ruleName + followKey.idxInCallingRule + _constants__WEBPACK_IMPORTED_MODULE_3__["IN"] + followKey.inRule; | |
return this.resyncFollows[followName]; | |
}; | |
// It does not make any sense to include a virtual EOF token in the list of resynced tokens | |
// as EOF does not really exist and thus does not contain any useful information (line/column numbers) | |
Recoverable.prototype.addToResyncTokens = function (token, resyncTokens) { | |
if (!this.tokenMatcher(token, _scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["EOF"])) { | |
resyncTokens.push(token); | |
} | |
return resyncTokens; | |
}; | |
Recoverable.prototype.reSyncTo = function (tokType) { | |
var resyncedTokens = []; | |
var nextTok = this.LA(1); | |
while (this.tokenMatcher(nextTok, tokType) === false) { | |
nextTok = this.SKIP_TOKEN(); | |
this.addToResyncTokens(nextTok, resyncedTokens); | |
} | |
// the last token is not part of the error. | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["dropRight"])(resyncedTokens); | |
}; | |
Recoverable.prototype.attemptInRepetitionRecovery = function (prodFunc, args, lookaheadFunc, dslMethodIdx, prodOccurrence, nextToksWalker, notStuck) { | |
// by default this is a NO-OP | |
// The actual implementation is with the function(not method) below | |
}; | |
Recoverable.prototype.getCurrentGrammarPath = function (tokType, tokIdxInRule) { | |
var pathRuleStack = this.getHumanReadableRuleStack(); | |
var pathOccurrenceStack = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(this.RULE_OCCURRENCE_STACK); | |
var grammarPath = { | |
ruleStack: pathRuleStack, | |
occurrenceStack: pathOccurrenceStack, | |
lastTok: tokType, | |
lastTokOccurrence: tokIdxInRule | |
}; | |
return grammarPath; | |
}; | |
Recoverable.prototype.getHumanReadableRuleStack = function () { | |
var _this = this; | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(this.RULE_STACK, function (currShortName) { | |
return _this.shortRuleNameToFullName(currShortName); | |
}); | |
}; | |
return Recoverable; | |
}()); | |
function attemptInRepetitionRecovery(prodFunc, args, lookaheadFunc, dslMethodIdx, prodOccurrence, nextToksWalker, notStuck) { | |
var key = this.getKeyForAutomaticLookahead(dslMethodIdx, prodOccurrence); | |
var firstAfterRepInfo = this.firstAfterRepMap[key]; | |
if (firstAfterRepInfo === undefined) { | |
var currRuleName = this.getCurrRuleFullName(); | |
var ruleGrammar = this.getGAstProductions()[currRuleName]; | |
var walker = new nextToksWalker(ruleGrammar, prodOccurrence); | |
firstAfterRepInfo = walker.startWalking(); | |
this.firstAfterRepMap[key] = firstAfterRepInfo; | |
} | |
var expectTokAfterLastMatch = firstAfterRepInfo.token; | |
var nextTokIdx = firstAfterRepInfo.occurrence; | |
var isEndOfRule = firstAfterRepInfo.isEndOfRule; | |
// special edge case of a TOP most repetition after which the input should END. | |
// this will force an attempt for inRule recovery in that scenario. | |
if (this.RULE_STACK.length === 1 && | |
isEndOfRule && | |
expectTokAfterLastMatch === undefined) { | |
expectTokAfterLastMatch = _scan_tokens_public__WEBPACK_IMPORTED_MODULE_0__["EOF"]; | |
nextTokIdx = 1; | |
} | |
if (this.shouldInRepetitionRecoveryBeTried(expectTokAfterLastMatch, nextTokIdx, notStuck)) { | |
// TODO: performance optimization: instead of passing the original args here, we modify | |
// the args param (or create a new one) and make sure the lookahead func is explicitly provided | |
// to avoid searching the cache for it once more. | |
this.tryInRepetitionRecovery(prodFunc, args, lookaheadFunc, expectTokAfterLastMatch); | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js": | |
/*!**********************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js ***! | |
\**********************************************************************************************************************/ | |
/*! exports provided: TreeBuilder */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TreeBuilder", function() { return TreeBuilder; }); | |
/* harmony import */ var _cst_cst__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../cst/cst */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _cst_cst_visitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../cst/cst_visitor */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js"); | |
/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js"); | |
/** | |
* This trait is responsible for the CST building logic. | |
*/ | |
var TreeBuilder = /** @class */ (function () { | |
function TreeBuilder() { | |
} | |
TreeBuilder.prototype.initTreeBuilder = function (config) { | |
this.CST_STACK = []; | |
// outputCst is no longer exposed/defined in the pubic API | |
this.outputCst = config.outputCst; | |
this.nodeLocationTracking = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["has"])(config, "nodeLocationTracking") | |
? config.nodeLocationTracking | |
: _parser__WEBPACK_IMPORTED_MODULE_3__["DEFAULT_PARSER_CONFIG"].nodeLocationTracking; | |
if (!this.outputCst) { | |
this.cstInvocationStateUpdate = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstFinallyStateUpdate = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostTerminal = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostNonTerminal = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostRule = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
} | |
else { | |
if (/full/i.test(this.nodeLocationTracking)) { | |
if (this.recoveryEnabled) { | |
this.setNodeLocationFromToken = _cst_cst__WEBPACK_IMPORTED_MODULE_0__["setNodeLocationFull"]; | |
this.setNodeLocationFromNode = _cst_cst__WEBPACK_IMPORTED_MODULE_0__["setNodeLocationFull"]; | |
this.cstPostRule = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setInitialNodeLocation = this.setInitialNodeLocationFullRecovery; | |
} | |
else { | |
this.setNodeLocationFromToken = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setNodeLocationFromNode = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostRule = this.cstPostRuleFull; | |
this.setInitialNodeLocation = this.setInitialNodeLocationFullRegular; | |
} | |
} | |
else if (/onlyOffset/i.test(this.nodeLocationTracking)) { | |
if (this.recoveryEnabled) { | |
this.setNodeLocationFromToken = _cst_cst__WEBPACK_IMPORTED_MODULE_0__["setNodeLocationOnlyOffset"]; | |
this.setNodeLocationFromNode = _cst_cst__WEBPACK_IMPORTED_MODULE_0__["setNodeLocationOnlyOffset"]; | |
this.cstPostRule = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRecovery; | |
} | |
else { | |
this.setNodeLocationFromToken = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setNodeLocationFromNode = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostRule = this.cstPostRuleOnlyOffset; | |
this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRegular; | |
} | |
} | |
else if (/none/i.test(this.nodeLocationTracking)) { | |
this.setNodeLocationFromToken = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setNodeLocationFromNode = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.cstPostRule = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
this.setInitialNodeLocation = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
} | |
else { | |
throw Error("Invalid <nodeLocationTracking> config option: \"" + config.nodeLocationTracking + "\""); | |
} | |
} | |
}; | |
TreeBuilder.prototype.setInitialNodeLocationOnlyOffsetRecovery = function (cstNode) { | |
cstNode.location = { | |
startOffset: NaN, | |
endOffset: NaN | |
}; | |
}; | |
TreeBuilder.prototype.setInitialNodeLocationOnlyOffsetRegular = function (cstNode) { | |
cstNode.location = { | |
// without error recovery the starting Location of a new CstNode is guaranteed | |
// To be the next Token's startOffset (for valid inputs). | |
// For invalid inputs there won't be any CSTOutput so this potential | |
// inaccuracy does not matter | |
startOffset: this.LA(1).startOffset, | |
endOffset: NaN | |
}; | |
}; | |
TreeBuilder.prototype.setInitialNodeLocationFullRecovery = function (cstNode) { | |
cstNode.location = { | |
startOffset: NaN, | |
startLine: NaN, | |
startColumn: NaN, | |
endOffset: NaN, | |
endLine: NaN, | |
endColumn: NaN | |
}; | |
}; | |
/** | |
* @see setInitialNodeLocationOnlyOffsetRegular for explanation why this work | |
* @param cstNode | |
*/ | |
TreeBuilder.prototype.setInitialNodeLocationFullRegular = function (cstNode) { | |
var nextToken = this.LA(1); | |
cstNode.location = { | |
startOffset: nextToken.startOffset, | |
startLine: nextToken.startLine, | |
startColumn: nextToken.startColumn, | |
endOffset: NaN, | |
endLine: NaN, | |
endColumn: NaN | |
}; | |
}; | |
TreeBuilder.prototype.cstInvocationStateUpdate = function (fullRuleName, shortName) { | |
var cstNode = { | |
name: fullRuleName, | |
children: {} | |
}; | |
this.setInitialNodeLocation(cstNode); | |
this.CST_STACK.push(cstNode); | |
}; | |
TreeBuilder.prototype.cstFinallyStateUpdate = function () { | |
this.CST_STACK.pop(); | |
}; | |
TreeBuilder.prototype.cstPostRuleFull = function (ruleCstNode) { | |
var prevToken = this.LA(0); | |
var loc = ruleCstNode.location; | |
// If this condition is true it means we consumed at least one Token | |
// In this CstNode. | |
if (loc.startOffset <= prevToken.startOffset === true) { | |
loc.endOffset = prevToken.endOffset; | |
loc.endLine = prevToken.endLine; | |
loc.endColumn = prevToken.endColumn; | |
} | |
// "empty" CstNode edge case | |
else { | |
loc.startOffset = NaN; | |
loc.startLine = NaN; | |
loc.startColumn = NaN; | |
} | |
}; | |
TreeBuilder.prototype.cstPostRuleOnlyOffset = function (ruleCstNode) { | |
var prevToken = this.LA(0); | |
var loc = ruleCstNode.location; | |
// If this condition is true it means we consumed at least one Token | |
// In this CstNode. | |
if (loc.startOffset <= prevToken.startOffset === true) { | |
loc.endOffset = prevToken.endOffset; | |
} | |
// "empty" CstNode edge case | |
else { | |
loc.startOffset = NaN; | |
} | |
}; | |
TreeBuilder.prototype.cstPostTerminal = function (key, consumedToken) { | |
var rootCst = this.CST_STACK[this.CST_STACK.length - 1]; | |
Object(_cst_cst__WEBPACK_IMPORTED_MODULE_0__["addTerminalToCst"])(rootCst, consumedToken, key); | |
// This is only used when **both** error recovery and CST Output are enabled. | |
this.setNodeLocationFromToken(rootCst.location, consumedToken); | |
}; | |
TreeBuilder.prototype.cstPostNonTerminal = function (ruleCstResult, ruleName) { | |
var preCstNode = this.CST_STACK[this.CST_STACK.length - 1]; | |
Object(_cst_cst__WEBPACK_IMPORTED_MODULE_0__["addNoneTerminalToCst"])(preCstNode, ruleName, ruleCstResult); | |
// This is only used when **both** error recovery and CST Output are enabled. | |
this.setNodeLocationFromNode(preCstNode.location, ruleCstResult.location); | |
}; | |
TreeBuilder.prototype.getBaseCstVisitorConstructor = function () { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(this.baseCstVisitorConstructor)) { | |
var newBaseCstVisitorConstructor = Object(_cst_cst_visitor__WEBPACK_IMPORTED_MODULE_2__["createBaseSemanticVisitorConstructor"])(this.className, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["keys"])(this.gastProductionsCache)); | |
this.baseCstVisitorConstructor = newBaseCstVisitorConstructor; | |
return newBaseCstVisitorConstructor; | |
} | |
return this.baseCstVisitorConstructor; | |
}; | |
TreeBuilder.prototype.getBaseCstVisitorConstructorWithDefaults = function () { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(this.baseCstVisitorWithDefaultsConstructor)) { | |
var newConstructor = Object(_cst_cst_visitor__WEBPACK_IMPORTED_MODULE_2__["createBaseVisitorConstructorWithDefaults"])(this.className, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["keys"])(this.gastProductionsCache), this.getBaseCstVisitorConstructor()); | |
this.baseCstVisitorWithDefaultsConstructor = newConstructor; | |
return newConstructor; | |
} | |
return this.baseCstVisitorWithDefaultsConstructor; | |
}; | |
TreeBuilder.prototype.getLastExplicitRuleShortName = function () { | |
var ruleStack = this.RULE_STACK; | |
return ruleStack[ruleStack.length - 1]; | |
}; | |
TreeBuilder.prototype.getPreviousExplicitRuleShortName = function () { | |
var ruleStack = this.RULE_STACK; | |
return ruleStack[ruleStack.length - 2]; | |
}; | |
TreeBuilder.prototype.getLastExplicitRuleOccurrenceIndex = function () { | |
var occurrenceStack = this.RULE_OCCURRENCE_STACK; | |
return occurrenceStack[occurrenceStack.length - 1]; | |
}; | |
return TreeBuilder; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer.js": | |
/*!************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer.js ***! | |
\************************************************************************************************/ | |
/*! exports provided: DEFAULT_MODE, MODES, SUPPORT_STICKY, disableSticky, enableSticky, analyzeTokenTypes, validatePatterns, findMissingPatterns, findInvalidPatterns, findEndOfInputAnchor, findEmptyMatchRegExps, findStartOfInputAnchor, findUnsupportedFlags, findDuplicatePatterns, findInvalidGroupType, findModesThatDoNotExist, findUnreachablePatterns, addStartOfInput, addStickyFlag, performRuntimeChecks, performWarningRuntimeChecks, cloneEmptyGroups, isCustomPattern, isShortPattern, LineTerminatorOptimizedTester, buildLineBreakIssueMessage, minOptimizationVal, charCodeToOptimizedIndex */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_MODE", function() { return DEFAULT_MODE; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MODES", function() { return MODES; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SUPPORT_STICKY", function() { return SUPPORT_STICKY; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableSticky", function() { return disableSticky; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableSticky", function() { return enableSticky; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyzeTokenTypes", function() { return analyzeTokenTypes; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validatePatterns", function() { return validatePatterns; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findMissingPatterns", function() { return findMissingPatterns; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findInvalidPatterns", function() { return findInvalidPatterns; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findEndOfInputAnchor", function() { return findEndOfInputAnchor; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findEmptyMatchRegExps", function() { return findEmptyMatchRegExps; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findStartOfInputAnchor", function() { return findStartOfInputAnchor; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findUnsupportedFlags", function() { return findUnsupportedFlags; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDuplicatePatterns", function() { return findDuplicatePatterns; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findInvalidGroupType", function() { return findInvalidGroupType; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findModesThatDoNotExist", function() { return findModesThatDoNotExist; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findUnreachablePatterns", function() { return findUnreachablePatterns; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStartOfInput", function() { return addStartOfInput; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addStickyFlag", function() { return addStickyFlag; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "performRuntimeChecks", function() { return performRuntimeChecks; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "performWarningRuntimeChecks", function() { return performWarningRuntimeChecks; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneEmptyGroups", function() { return cloneEmptyGroups; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCustomPattern", function() { return isCustomPattern; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isShortPattern", function() { return isShortPattern; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LineTerminatorOptimizedTester", function() { return LineTerminatorOptimizedTester; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildLineBreakIssueMessage", function() { return buildLineBreakIssueMessage; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minOptimizationVal", function() { return minOptimizationVal; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "charCodeToOptimizedIndex", function() { return charCodeToOptimizedIndex; }); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regexp-to-ast */ "../fabric8-analytics-lsp-server/output/node_modules/regexp-to-ast/lib/regexp-to-ast.js"); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__); | |
/* harmony import */ var _lexer_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lexer_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _reg_exp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reg_exp */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp.js"); | |
/* harmony import */ var _reg_exp_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reg_exp_parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var PATTERN = "PATTERN"; | |
var DEFAULT_MODE = "defaultMode"; | |
var MODES = "modes"; | |
var SUPPORT_STICKY = typeof new RegExp("(?:)").sticky === "boolean"; | |
function disableSticky() { | |
SUPPORT_STICKY = false; | |
} | |
function enableSticky() { | |
SUPPORT_STICKY = true; | |
} | |
function analyzeTokenTypes(tokenTypes, options) { | |
options = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["defaults"])(options, { | |
useSticky: SUPPORT_STICKY, | |
debug: false, | |
safeMode: false, | |
positionTracking: "full", | |
lineTerminatorCharacters: ["\r", "\n"], | |
tracer: function (msg, action) { return action(); } | |
}); | |
var tracer = options.tracer; | |
tracer("initCharCodeToOptimizedIndexMap", function () { | |
initCharCodeToOptimizedIndexMap(); | |
}); | |
var onlyRelevantTypes; | |
tracer("Reject Lexer.NA", function () { | |
onlyRelevantTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reject"])(tokenTypes, function (currType) { | |
return currType[PATTERN] === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA; | |
}); | |
}); | |
var hasCustom = false; | |
var allTransformedPatterns; | |
tracer("Transform Patterns", function () { | |
hasCustom = false; | |
allTransformedPatterns = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (currType) { | |
var currPattern = currType[PATTERN]; | |
/* istanbul ignore else */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(currPattern)) { | |
var regExpSource = currPattern.source; | |
if (regExpSource.length === 1 && | |
// only these regExp meta characters which can appear in a length one regExp | |
regExpSource !== "^" && | |
regExpSource !== "$" && | |
regExpSource !== "." && | |
!currPattern.ignoreCase) { | |
return regExpSource; | |
} | |
else if (regExpSource.length === 2 && | |
regExpSource[0] === "\\" && | |
// not a meta character | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["contains"])([ | |
"d", | |
"D", | |
"s", | |
"S", | |
"t", | |
"r", | |
"n", | |
"t", | |
"0", | |
"c", | |
"b", | |
"B", | |
"f", | |
"v", | |
"w", | |
"W" | |
], regExpSource[1])) { | |
// escaped meta Characters: /\+/ /\[/ | |
// or redundant escaping: /\a/ | |
// without the escaping "\" | |
return regExpSource[1]; | |
} | |
else { | |
return options.useSticky | |
? addStickyFlag(currPattern) | |
: addStartOfInput(currPattern); | |
} | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(currPattern)) { | |
hasCustom = true; | |
// CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object | |
return { exec: currPattern }; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(currPattern, "exec")) { | |
hasCustom = true; | |
// ICustomPattern | |
return currPattern; | |
} | |
else if (typeof currPattern === "string") { | |
if (currPattern.length === 1) { | |
return currPattern; | |
} | |
else { | |
var escapedRegExpString = currPattern.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&"); | |
var wrappedRegExp = new RegExp(escapedRegExpString); | |
return options.useSticky | |
? addStickyFlag(wrappedRegExp) | |
: addStartOfInput(wrappedRegExp); | |
} | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
}); | |
}); | |
var patternIdxToType; | |
var patternIdxToGroup; | |
var patternIdxToLongerAltIdx; | |
var patternIdxToPushMode; | |
var patternIdxToPopMode; | |
tracer("misc mapping", function () { | |
patternIdxToType = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (currType) { return currType.tokenTypeIdx; }); | |
patternIdxToGroup = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (clazz) { | |
var groupName = clazz.GROUP; | |
/* istanbul ignore next */ | |
if (groupName === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].SKIPPED) { | |
return undefined; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(groupName)) { | |
return groupName; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(groupName)) { | |
return false; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
}); | |
patternIdxToLongerAltIdx = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (clazz) { | |
var longerAltType = clazz.LONGER_ALT; | |
if (longerAltType) { | |
var longerAltIdx = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["indexOf"])(onlyRelevantTypes, longerAltType); | |
return longerAltIdx; | |
} | |
}); | |
patternIdxToPushMode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (clazz) { return clazz.PUSH_MODE; }); | |
patternIdxToPopMode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (clazz) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(clazz, "POP_MODE"); | |
}); | |
}); | |
var patternIdxToCanLineTerminator; | |
tracer("Line Terminator Handling", function () { | |
var lineTerminatorCharCodes = getCharCodes(options.lineTerminatorCharacters); | |
patternIdxToCanLineTerminator = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (tokType) { return false; }); | |
if (options.positionTracking !== "onlyOffset") { | |
patternIdxToCanLineTerminator = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, function (tokType) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(tokType, "LINE_BREAKS")) { | |
return tokType.LINE_BREAKS; | |
} | |
else { | |
if (checkLineBreaksIssues(tokType, lineTerminatorCharCodes) === false) { | |
return Object(_reg_exp__WEBPACK_IMPORTED_MODULE_3__["canMatchCharCode"])(lineTerminatorCharCodes, tokType.PATTERN); | |
} | |
} | |
}); | |
} | |
}); | |
var patternIdxToIsCustom; | |
var patternIdxToShort; | |
var emptyGroups; | |
var patternIdxToConfig; | |
tracer("Misc Mapping #2", function () { | |
patternIdxToIsCustom = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(onlyRelevantTypes, isCustomPattern); | |
patternIdxToShort = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(allTransformedPatterns, isShortPattern); | |
emptyGroups = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reduce"])(onlyRelevantTypes, function (acc, clazz) { | |
var groupName = clazz.GROUP; | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(groupName) && !(groupName === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].SKIPPED)) { | |
acc[groupName] = []; | |
} | |
return acc; | |
}, {}); | |
patternIdxToConfig = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(allTransformedPatterns, function (x, idx) { | |
return { | |
pattern: allTransformedPatterns[idx], | |
longerAlt: patternIdxToLongerAltIdx[idx], | |
canLineTerminator: patternIdxToCanLineTerminator[idx], | |
isCustom: patternIdxToIsCustom[idx], | |
short: patternIdxToShort[idx], | |
group: patternIdxToGroup[idx], | |
push: patternIdxToPushMode[idx], | |
pop: patternIdxToPopMode[idx], | |
tokenTypeIdx: patternIdxToType[idx], | |
tokenType: onlyRelevantTypes[idx] | |
}; | |
}); | |
}); | |
var canBeOptimized = true; | |
var charCodeToPatternIdxToConfig = []; | |
if (!options.safeMode) { | |
tracer("First Char Optimization", function () { | |
charCodeToPatternIdxToConfig = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reduce"])(onlyRelevantTypes, function (result, currTokType, idx) { | |
if (typeof currTokType.PATTERN === "string") { | |
var charCode = currTokType.PATTERN.charCodeAt(0); | |
var optimizedIdx = charCodeToOptimizedIndex(charCode); | |
addToMapOfArrays(result, optimizedIdx, patternIdxToConfig[idx]); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isArray"])(currTokType.START_CHARS_HINT)) { | |
var lastOptimizedIdx_1; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(currTokType.START_CHARS_HINT, function (charOrInt) { | |
var charCode = typeof charOrInt === "string" | |
? charOrInt.charCodeAt(0) | |
: charOrInt; | |
var currOptimizedIdx = charCodeToOptimizedIndex(charCode); | |
// Avoid adding the config multiple times | |
/* istanbul ignore else */ | |
// - Difficult to check this scenario effects as it is only a performance | |
// optimization that does not change correctness | |
if (lastOptimizedIdx_1 !== currOptimizedIdx) { | |
lastOptimizedIdx_1 = currOptimizedIdx; | |
addToMapOfArrays(result, currOptimizedIdx, patternIdxToConfig[idx]); | |
} | |
}); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(currTokType.PATTERN)) { | |
if (currTokType.PATTERN.unicode) { | |
canBeOptimized = false; | |
if (options.ensureOptimizations) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["PRINT_ERROR"])("" + _reg_exp__WEBPACK_IMPORTED_MODULE_3__["failedOptimizationPrefixMsg"] + | |
("\tUnable to analyze < " + currTokType.PATTERN.toString() + " > pattern.\n") + | |
"\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n" + | |
"\tThis will disable the lexer's first char optimizations.\n" + | |
"\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE"); | |
} | |
} | |
else { | |
var optimizedCodes = Object(_reg_exp__WEBPACK_IMPORTED_MODULE_3__["getOptimizedStartCodesIndices"])(currTokType.PATTERN, options.ensureOptimizations); | |
/* istanbul ignore if */ | |
// start code will only be empty given an empty regExp or failure of regexp-to-ast library | |
// the first should be a different validation and the second cannot be tested. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isEmpty"])(optimizedCodes)) { | |
// we cannot understand what codes may start possible matches | |
// The optimization correctness requires knowing start codes for ALL patterns. | |
// Not actually sure this is an error, no debug message | |
canBeOptimized = false; | |
} | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(optimizedCodes, function (code) { | |
addToMapOfArrays(result, code, patternIdxToConfig[idx]); | |
}); | |
} | |
} | |
else { | |
if (options.ensureOptimizations) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["PRINT_ERROR"])("" + _reg_exp__WEBPACK_IMPORTED_MODULE_3__["failedOptimizationPrefixMsg"] + | |
("\tTokenType: <" + currTokType.name + "> is using a custom token pattern without providing <start_chars_hint> parameter.\n") + | |
"\tThis will disable the lexer's first char optimizations.\n" + | |
"\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"); | |
} | |
canBeOptimized = false; | |
} | |
return result; | |
}, []); | |
}); | |
} | |
tracer("ArrayPacking", function () { | |
charCodeToPatternIdxToConfig = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["packArray"])(charCodeToPatternIdxToConfig); | |
}); | |
return { | |
emptyGroups: emptyGroups, | |
patternIdxToConfig: patternIdxToConfig, | |
charCodeToPatternIdxToConfig: charCodeToPatternIdxToConfig, | |
hasCustom: hasCustom, | |
canBeOptimized: canBeOptimized | |
}; | |
} | |
function validatePatterns(tokenTypes, validModesNames) { | |
var errors = []; | |
var missingResult = findMissingPatterns(tokenTypes); | |
errors = errors.concat(missingResult.errors); | |
var invalidResult = findInvalidPatterns(missingResult.valid); | |
var validTokenTypes = invalidResult.valid; | |
errors = errors.concat(invalidResult.errors); | |
errors = errors.concat(validateRegExpPattern(validTokenTypes)); | |
errors = errors.concat(findInvalidGroupType(validTokenTypes)); | |
errors = errors.concat(findModesThatDoNotExist(validTokenTypes, validModesNames)); | |
errors = errors.concat(findUnreachablePatterns(validTokenTypes)); | |
return errors; | |
} | |
function validateRegExpPattern(tokenTypes) { | |
var errors = []; | |
var withRegExpPatterns = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currTokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(currTokType[PATTERN]); | |
}); | |
errors = errors.concat(findEndOfInputAnchor(withRegExpPatterns)); | |
errors = errors.concat(findStartOfInputAnchor(withRegExpPatterns)); | |
errors = errors.concat(findUnsupportedFlags(withRegExpPatterns)); | |
errors = errors.concat(findDuplicatePatterns(withRegExpPatterns)); | |
errors = errors.concat(findEmptyMatchRegExps(withRegExpPatterns)); | |
return errors; | |
} | |
function findMissingPatterns(tokenTypes) { | |
var tokenTypesWithMissingPattern = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
return !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(currType, PATTERN); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(tokenTypesWithMissingPattern, function (currType) { | |
return { | |
message: "Token Type: ->" + | |
currType.name + | |
"<- missing static 'PATTERN' property", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].MISSING_PATTERN, | |
tokenTypes: [currType] | |
}; | |
}); | |
var valid = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["difference"])(tokenTypes, tokenTypesWithMissingPattern); | |
return { errors: errors, valid: valid }; | |
} | |
function findInvalidPatterns(tokenTypes) { | |
var tokenTypesWithInvalidPattern = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
var pattern = currType[PATTERN]; | |
return (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(pattern) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(pattern) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(pattern, "exec") && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(pattern)); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(tokenTypesWithInvalidPattern, function (currType) { | |
return { | |
message: "Token Type: ->" + | |
currType.name + | |
"<- static 'PATTERN' can only be a RegExp, a" + | |
" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].INVALID_PATTERN, | |
tokenTypes: [currType] | |
}; | |
}); | |
var valid = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["difference"])(tokenTypes, tokenTypesWithInvalidPattern); | |
return { errors: errors, valid: valid }; | |
} | |
var end_of_input = /[^\\][\$]/; | |
function findEndOfInputAnchor(tokenTypes) { | |
var EndAnchorFinder = /** @class */ (function (_super) { | |
__extends(EndAnchorFinder, _super); | |
function EndAnchorFinder() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
_this.found = false; | |
return _this; | |
} | |
EndAnchorFinder.prototype.visitEndAnchor = function (node) { | |
this.found = true; | |
}; | |
return EndAnchorFinder; | |
}(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__["BaseRegExpVisitor"])); | |
var invalidRegex = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
var pattern = currType[PATTERN]; | |
try { | |
var regexpAst = Object(_reg_exp_parser__WEBPACK_IMPORTED_MODULE_4__["getRegExpAst"])(pattern); | |
var endAnchorVisitor = new EndAnchorFinder(); | |
endAnchorVisitor.visit(regexpAst); | |
return endAnchorVisitor.found; | |
} | |
catch (e) { | |
// old behavior in case of runtime exceptions with regexp-to-ast. | |
/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/ | |
return end_of_input.test(pattern.source); | |
} | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(invalidRegex, function (currType) { | |
return { | |
message: "Unexpected RegExp Anchor Error:\n" + | |
"\tToken Type: ->" + | |
currType.name + | |
"<- static 'PATTERN' cannot contain end of input anchor '$'\n" + | |
"\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS" + | |
"\tfor details.", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].EOI_ANCHOR_FOUND, | |
tokenTypes: [currType] | |
}; | |
}); | |
return errors; | |
} | |
function findEmptyMatchRegExps(tokenTypes) { | |
var matchesEmptyString = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
var pattern = currType[PATTERN]; | |
return pattern.test(""); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(matchesEmptyString, function (currType) { | |
return { | |
message: "Token Type: ->" + | |
currType.name + | |
"<- static 'PATTERN' must not match an empty string", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].EMPTY_MATCH_PATTERN, | |
tokenTypes: [currType] | |
}; | |
}); | |
return errors; | |
} | |
var start_of_input = /[^\\[][\^]|^\^/; | |
function findStartOfInputAnchor(tokenTypes) { | |
var StartAnchorFinder = /** @class */ (function (_super) { | |
__extends(StartAnchorFinder, _super); | |
function StartAnchorFinder() { | |
var _this = _super !== null && _super.apply(this, arguments) || this; | |
_this.found = false; | |
return _this; | |
} | |
StartAnchorFinder.prototype.visitStartAnchor = function (node) { | |
this.found = true; | |
}; | |
return StartAnchorFinder; | |
}(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__["BaseRegExpVisitor"])); | |
var invalidRegex = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
var pattern = currType[PATTERN]; | |
try { | |
var regexpAst = Object(_reg_exp_parser__WEBPACK_IMPORTED_MODULE_4__["getRegExpAst"])(pattern); | |
var startAnchorVisitor = new StartAnchorFinder(); | |
startAnchorVisitor.visit(regexpAst); | |
return startAnchorVisitor.found; | |
} | |
catch (e) { | |
// old behavior in case of runtime exceptions with regexp-to-ast. | |
/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/ | |
return start_of_input.test(pattern.source); | |
} | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(invalidRegex, function (currType) { | |
return { | |
message: "Unexpected RegExp Anchor Error:\n" + | |
"\tToken Type: ->" + | |
currType.name + | |
"<- static 'PATTERN' cannot contain start of input anchor '^'\n" + | |
"\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS" + | |
"\tfor details.", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].SOI_ANCHOR_FOUND, | |
tokenTypes: [currType] | |
}; | |
}); | |
return errors; | |
} | |
function findUnsupportedFlags(tokenTypes) { | |
var invalidFlags = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (currType) { | |
var pattern = currType[PATTERN]; | |
return pattern instanceof RegExp && (pattern.multiline || pattern.global); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(invalidFlags, function (currType) { | |
return { | |
message: "Token Type: ->" + | |
currType.name + | |
"<- static 'PATTERN' may NOT contain global('g') or multiline('m')", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].UNSUPPORTED_FLAGS_FOUND, | |
tokenTypes: [currType] | |
}; | |
}); | |
return errors; | |
} | |
// This can only test for identical duplicate RegExps, not semantically equivalent ones. | |
function findDuplicatePatterns(tokenTypes) { | |
var found = []; | |
var identicalPatterns = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(tokenTypes, function (outerType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reduce"])(tokenTypes, function (result, innerType) { | |
if (outerType.PATTERN.source === innerType.PATTERN.source && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["contains"])(found, innerType) && | |
innerType.PATTERN !== _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA) { | |
// this avoids duplicates in the result, each Token Type may only appear in one "set" | |
// in essence we are creating Equivalence classes on equality relation. | |
found.push(innerType); | |
result.push(innerType); | |
return result; | |
} | |
return result; | |
}, []); | |
}); | |
identicalPatterns = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["compact"])(identicalPatterns); | |
var duplicatePatterns = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(identicalPatterns, function (currIdenticalSet) { | |
return currIdenticalSet.length > 1; | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(duplicatePatterns, function (setOfIdentical) { | |
var tokenTypeNames = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(setOfIdentical, function (currType) { | |
return currType.name; | |
}); | |
var dupPatternSrc = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["first"])(setOfIdentical).PATTERN; | |
return { | |
message: "The same RegExp pattern ->" + dupPatternSrc + "<-" + | |
("has been used in all of the following Token Types: " + tokenTypeNames.join(", ") + " <-"), | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].DUPLICATE_PATTERNS_FOUND, | |
tokenTypes: setOfIdentical | |
}; | |
}); | |
return errors; | |
} | |
function findInvalidGroupType(tokenTypes) { | |
var invalidTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (clazz) { | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(clazz, "GROUP")) { | |
return false; | |
} | |
var group = clazz.GROUP; | |
return group !== _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].SKIPPED && group !== _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA && !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(group); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(invalidTypes, function (currType) { | |
return { | |
message: "Token Type: ->" + | |
currType.name + | |
"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].INVALID_GROUP_TYPE_FOUND, | |
tokenTypes: [currType] | |
}; | |
}); | |
return errors; | |
} | |
function findModesThatDoNotExist(tokenTypes, validModes) { | |
var invalidModes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["filter"])(tokenTypes, function (clazz) { | |
return (clazz.PUSH_MODE !== undefined && !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["contains"])(validModes, clazz.PUSH_MODE)); | |
}); | |
var errors = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(invalidModes, function (tokType) { | |
var msg = "Token Type: ->" + tokType.name + "<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->" + tokType.PUSH_MODE + "<-" + | |
"which does not exist"; | |
return { | |
message: msg, | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].PUSH_MODE_DOES_NOT_EXIST, | |
tokenTypes: [tokType] | |
}; | |
}); | |
return errors; | |
} | |
function findUnreachablePatterns(tokenTypes) { | |
var errors = []; | |
var canBeTested = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reduce"])(tokenTypes, function (result, tokType, idx) { | |
var pattern = tokType.PATTERN; | |
if (pattern === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA) { | |
return result; | |
} | |
// a more comprehensive validation for all forms of regExps would require | |
// deeper regExp analysis capabilities | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(pattern)) { | |
result.push({ str: pattern, idx: idx, tokenType: tokType }); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(pattern) && noMetaChar(pattern)) { | |
result.push({ str: pattern.source, idx: idx, tokenType: tokType }); | |
} | |
return result; | |
}, []); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(tokenTypes, function (tokType, testIdx) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(canBeTested, function (_a) { | |
var str = _a.str, idx = _a.idx, tokenType = _a.tokenType; | |
if (testIdx < idx && testTokenType(str, tokType.PATTERN)) { | |
var msg = "Token: ->" + tokenType.name + "<- can never be matched.\n" + | |
("Because it appears AFTER the Token Type ->" + tokType.name + "<-") + | |
"in the lexer's definition.\n" + | |
"See https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE"; | |
errors.push({ | |
message: msg, | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].UNREACHABLE_PATTERN, | |
tokenTypes: [tokType, tokenType] | |
}); | |
} | |
}); | |
}); | |
return errors; | |
} | |
function testTokenType(str, pattern) { | |
/* istanbul ignore else */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(pattern)) { | |
var regExpArray = pattern.exec(str); | |
return regExpArray !== null && regExpArray.index === 0; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(pattern)) { | |
// maintain the API of custom patterns | |
return pattern(str, 0, [], {}); | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(pattern, "exec")) { | |
// maintain the API of custom patterns | |
return pattern.exec(str, 0, [], {}); | |
} | |
else if (typeof pattern === "string") { | |
return pattern === str; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function noMetaChar(regExp) { | |
//https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp | |
var metaChars = [ | |
".", | |
"\\", | |
"[", | |
"]", | |
"|", | |
"^", | |
"$", | |
"(", | |
")", | |
"?", | |
"*", | |
"+", | |
"{" | |
]; | |
return (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["find"])(metaChars, function (char) { return regExp.source.indexOf(char) !== -1; }) === undefined); | |
} | |
function addStartOfInput(pattern) { | |
var flags = pattern.ignoreCase ? "i" : ""; | |
// always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input. | |
// duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/) | |
return new RegExp("^(?:" + pattern.source + ")", flags); | |
} | |
function addStickyFlag(pattern) { | |
var flags = pattern.ignoreCase ? "iy" : "y"; | |
// always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input. | |
// duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/) | |
return new RegExp("" + pattern.source, flags); | |
} | |
function performRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) { | |
var errors = []; | |
// some run time checks to help the end users. | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition, DEFAULT_MODE)) { | |
errors.push({ | |
message: "A MultiMode Lexer cannot be initialized without a <" + | |
DEFAULT_MODE + | |
"> property in its definition\n", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE | |
}); | |
} | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition, MODES)) { | |
errors.push({ | |
message: "A MultiMode Lexer cannot be initialized without a <" + | |
MODES + | |
"> property in its definition\n", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY | |
}); | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition, MODES) && | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition, DEFAULT_MODE) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition.modes, lexerDefinition.defaultMode)) { | |
errors.push({ | |
message: "A MultiMode Lexer cannot be initialized with a " + DEFAULT_MODE + ": <" + lexerDefinition.defaultMode + ">" + | |
"which does not exist\n", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST | |
}); | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(lexerDefinition, MODES)) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(lexerDefinition.modes, function (currModeValue, currModeName) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(currModeValue, function (currTokType, currIdx) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(currTokType)) { | |
errors.push({ | |
message: "A Lexer cannot be initialized using an undefined Token Type. Mode:" + | |
("<" + currModeName + "> at index: <" + currIdx + ">\n"), | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED | |
}); | |
} | |
}); | |
}); | |
} | |
return errors; | |
} | |
function performWarningRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) { | |
var warnings = []; | |
var hasAnyLineBreak = false; | |
var allTokenTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["compact"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["flatten"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["mapValues"])(lexerDefinition.modes, function (tokTypes) { return tokTypes; }))); | |
var concreteTokenTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["reject"])(allTokenTypes, function (currType) { return currType[PATTERN] === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA; }); | |
var terminatorCharCodes = getCharCodes(lineTerminatorCharacters); | |
if (trackLines) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(concreteTokenTypes, function (tokType) { | |
var currIssue = checkLineBreaksIssues(tokType, terminatorCharCodes); | |
if (currIssue !== false) { | |
var message = buildLineBreakIssueMessage(tokType, currIssue); | |
var warningDescriptor = { | |
message: message, | |
type: currIssue.issue, | |
tokenType: tokType | |
}; | |
warnings.push(warningDescriptor); | |
} | |
else { | |
// we don't want to attempt to scan if the user explicitly specified the line_breaks option. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(tokType, "LINE_BREAKS")) { | |
if (tokType.LINE_BREAKS === true) { | |
hasAnyLineBreak = true; | |
} | |
} | |
else { | |
if (Object(_reg_exp__WEBPACK_IMPORTED_MODULE_3__["canMatchCharCode"])(terminatorCharCodes, tokType.PATTERN)) { | |
hasAnyLineBreak = true; | |
} | |
} | |
} | |
}); | |
} | |
if (trackLines && !hasAnyLineBreak) { | |
warnings.push({ | |
message: "Warning: No LINE_BREAKS Found.\n" + | |
"\tThis Lexer has been defined to track line and column information,\n" + | |
"\tBut none of the Token Types can be identified as matching a line terminator.\n" + | |
"\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n" + | |
"\tfor details.", | |
type: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].NO_LINE_BREAKS_FLAGS | |
}); | |
} | |
return warnings; | |
} | |
function cloneEmptyGroups(emptyGroups) { | |
var clonedResult = {}; | |
var groupKeys = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["keys"])(emptyGroups); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["forEach"])(groupKeys, function (currKey) { | |
var currGroupValue = emptyGroups[currKey]; | |
/* istanbul ignore else */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isArray"])(currGroupValue)) { | |
clonedResult[currKey] = []; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
}); | |
return clonedResult; | |
} | |
// TODO: refactor to avoid duplication | |
function isCustomPattern(tokenType) { | |
var pattern = tokenType.PATTERN; | |
/* istanbul ignore else */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(pattern)) { | |
return false; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(pattern)) { | |
// CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object | |
return true; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(pattern, "exec")) { | |
// ICustomPattern | |
return true; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(pattern)) { | |
return false; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function isShortPattern(pattern) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(pattern) && pattern.length === 1) { | |
return pattern.charCodeAt(0); | |
} | |
else { | |
return false; | |
} | |
} | |
/** | |
* Faster than using a RegExp for default newline detection during lexing. | |
*/ | |
var LineTerminatorOptimizedTester = { | |
// implements /\n|\r\n?/g.test | |
test: function (text) { | |
var len = text.length; | |
for (var i = this.lastIndex; i < len; i++) { | |
var c = text.charCodeAt(i); | |
if (c === 10) { | |
this.lastIndex = i + 1; | |
return true; | |
} | |
else if (c === 13) { | |
if (text.charCodeAt(i + 1) === 10) { | |
this.lastIndex = i + 2; | |
} | |
else { | |
this.lastIndex = i + 1; | |
} | |
return true; | |
} | |
} | |
return false; | |
}, | |
lastIndex: 0 | |
}; | |
function checkLineBreaksIssues(tokType, lineTerminatorCharCodes) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["has"])(tokType, "LINE_BREAKS")) { | |
// if the user explicitly declared the line_breaks option we will respect their choice | |
// and assume it is correct. | |
return false; | |
} | |
else { | |
/* istanbul ignore else */ | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isRegExp"])(tokType.PATTERN)) { | |
try { | |
Object(_reg_exp__WEBPACK_IMPORTED_MODULE_3__["canMatchCharCode"])(lineTerminatorCharCodes, tokType.PATTERN); | |
} | |
catch (e) { | |
/* istanbul ignore next - to test this we would have to mock <canMatchCharCode> to throw an error */ | |
return { | |
issue: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].IDENTIFY_TERMINATOR, | |
errMsg: e.message | |
}; | |
} | |
return false; | |
} | |
else if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(tokType.PATTERN)) { | |
// string literal patterns can always be analyzed to detect line terminator usage | |
return false; | |
} | |
else if (isCustomPattern(tokType)) { | |
// custom token types | |
return { issue: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].CUSTOM_LINE_BREAK }; | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
} | |
function buildLineBreakIssueMessage(tokType, details) { | |
/* istanbul ignore else */ | |
if (details.issue === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].IDENTIFY_TERMINATOR) { | |
return ("Warning: unable to identify line terminator usage in pattern.\n" + | |
("\tThe problem is in the <" + tokType.name + "> Token Type\n") + | |
("\t Root cause: " + details.errMsg + ".\n") + | |
"\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR"); | |
} | |
else if (details.issue === _lexer_public__WEBPACK_IMPORTED_MODULE_1__["LexerDefinitionErrorType"].CUSTOM_LINE_BREAK) { | |
return ("Warning: A Custom Token Pattern should specify the <line_breaks> option.\n" + | |
("\tThe problem is in the <" + tokType.name + "> Token Type\n") + | |
"\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK"); | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function getCharCodes(charsOrCodes) { | |
var charCodes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["map"])(charsOrCodes, function (numOrString) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isString"])(numOrString) && numOrString.length > 0) { | |
return numOrString.charCodeAt(0); | |
} | |
else { | |
return numOrString; | |
} | |
}); | |
return charCodes; | |
} | |
function addToMapOfArrays(map, key, value) { | |
if (map[key] === undefined) { | |
map[key] = [value]; | |
} | |
else { | |
map[key].push(value); | |
} | |
} | |
var minOptimizationVal = 256; | |
/** | |
* We ae mapping charCode above ASCI (256) into buckets each in the size of 256. | |
* This is because ASCI are the most common start chars so each one of those will get its own | |
* possible token configs vector. | |
* | |
* Tokens starting with charCodes "above" ASCI are uncommon, so we can "afford" | |
* to place these into buckets of possible token configs, What we gain from | |
* this is avoiding the case of creating an optimization 'charCodeToPatternIdxToConfig' | |
* which would contain 10,000+ arrays of small size (e.g unicode Identifiers scenario). | |
* Our 'charCodeToPatternIdxToConfig' max size will now be: | |
* 256 + (2^16 / 2^8) - 1 === 511 | |
* | |
* note the hack for fast division integer part extraction | |
* See: https://stackoverflow.com/a/4228528 | |
*/ | |
function charCodeToOptimizedIndex(charCode) { | |
return charCode < minOptimizationVal | |
? charCode | |
: charCodeToOptimizedIdxMap[charCode]; | |
} | |
/** | |
* This is a compromise between cold start / hot running performance | |
* Creating this array takes ~3ms on a modern machine, | |
* But if we perform the computation at runtime as needed the CSS Lexer benchmark | |
* performance degrades by ~10% | |
* | |
* TODO: Perhaps it should be lazy initialized only if a charCode > 255 is used. | |
*/ | |
var charCodeToOptimizedIdxMap = []; | |
function initCharCodeToOptimizedIndexMap() { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isEmpty"])(charCodeToOptimizedIdxMap)) { | |
charCodeToOptimizedIdxMap = new Array(65536); | |
for (var i = 0; i < 65536; i++) { | |
/* tslint:disable */ | |
charCodeToOptimizedIdxMap[i] = i > 255 ? 255 + ~~(i / 255) : i; | |
/* tslint:enable */ | |
} | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js": | |
/*!**************************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js ***! | |
\**************************************************************************************************************/ | |
/*! exports provided: defaultLexerErrorProvider */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultLexerErrorProvider", function() { return defaultLexerErrorProvider; }); | |
var defaultLexerErrorProvider = { | |
buildUnableToPopLexerModeMessage: function (token) { | |
return "Unable to pop Lexer Mode after encountering Token ->" + token.image + "<- The Mode Stack is empty"; | |
}, | |
buildUnexpectedCharactersMessage: function (fullText, startOffset, length, line, column) { | |
return ("unexpected character: ->" + fullText.charAt(startOffset) + "<- at offset: " + startOffset + "," + (" skipped " + length + " characters.")); | |
} | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js": | |
/*!*******************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js ***! | |
\*******************************************************************************************************/ | |
/*! exports provided: LexerDefinitionErrorType, Lexer */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LexerDefinitionErrorType", function() { return LexerDefinitionErrorType; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lexer", function() { return Lexer; }); | |
/* harmony import */ var _lexer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lexer */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer.js"); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tokens */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js"); | |
/* harmony import */ var _scan_lexer_errors_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../scan/lexer_errors_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js"); | |
/* harmony import */ var _reg_exp_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reg_exp_parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js"); | |
var LexerDefinitionErrorType; | |
(function (LexerDefinitionErrorType) { | |
LexerDefinitionErrorType[LexerDefinitionErrorType["MISSING_PATTERN"] = 0] = "MISSING_PATTERN"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["INVALID_PATTERN"] = 1] = "INVALID_PATTERN"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["EOI_ANCHOR_FOUND"] = 2] = "EOI_ANCHOR_FOUND"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["UNSUPPORTED_FLAGS_FOUND"] = 3] = "UNSUPPORTED_FLAGS_FOUND"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["DUPLICATE_PATTERNS_FOUND"] = 4] = "DUPLICATE_PATTERNS_FOUND"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["INVALID_GROUP_TYPE_FOUND"] = 5] = "INVALID_GROUP_TYPE_FOUND"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["PUSH_MODE_DOES_NOT_EXIST"] = 6] = "PUSH_MODE_DOES_NOT_EXIST"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"] = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"] = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"] = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"] = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["SOI_ANCHOR_FOUND"] = 11] = "SOI_ANCHOR_FOUND"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["EMPTY_MATCH_PATTERN"] = 12] = "EMPTY_MATCH_PATTERN"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["NO_LINE_BREAKS_FLAGS"] = 13] = "NO_LINE_BREAKS_FLAGS"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["UNREACHABLE_PATTERN"] = 14] = "UNREACHABLE_PATTERN"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["IDENTIFY_TERMINATOR"] = 15] = "IDENTIFY_TERMINATOR"; | |
LexerDefinitionErrorType[LexerDefinitionErrorType["CUSTOM_LINE_BREAK"] = 16] = "CUSTOM_LINE_BREAK"; | |
})(LexerDefinitionErrorType || (LexerDefinitionErrorType = {})); | |
var DEFAULT_LEXER_CONFIG = { | |
deferDefinitionErrorsHandling: false, | |
positionTracking: "full", | |
lineTerminatorsPattern: /\n|\r\n?/g, | |
lineTerminatorCharacters: ["\n", "\r"], | |
ensureOptimizations: false, | |
safeMode: false, | |
errorMessageProvider: _scan_lexer_errors_public__WEBPACK_IMPORTED_MODULE_3__["defaultLexerErrorProvider"], | |
traceInitPerf: false, | |
skipValidations: false | |
}; | |
Object.freeze(DEFAULT_LEXER_CONFIG); | |
var Lexer = /** @class */ (function () { | |
function Lexer(lexerDefinition, config) { | |
var _this = this; | |
if (config === void 0) { config = DEFAULT_LEXER_CONFIG; } | |
this.lexerDefinition = lexerDefinition; | |
this.lexerDefinitionErrors = []; | |
this.lexerDefinitionWarning = []; | |
this.patternIdxToConfig = {}; | |
this.charCodeToPatternIdxToConfig = {}; | |
this.modes = []; | |
this.emptyGroups = {}; | |
this.config = undefined; | |
this.trackStartLines = true; | |
this.trackEndLines = true; | |
this.hasCustom = false; | |
this.canModeBeOptimized = {}; | |
if (typeof config === "boolean") { | |
throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\n" + | |
"a boolean 2nd argument is no longer supported"); | |
} | |
// todo: defaults func? | |
this.config = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["merge"])(DEFAULT_LEXER_CONFIG, config); | |
var traceInitVal = this.config.traceInitPerf; | |
if (traceInitVal === true) { | |
this.traceInitMaxIdent = Infinity; | |
this.traceInitPerf = true; | |
} | |
else if (typeof traceInitVal === "number") { | |
this.traceInitMaxIdent = traceInitVal; | |
this.traceInitPerf = true; | |
} | |
this.traceInitIndent = -1; | |
this.TRACE_INIT("Lexer Constructor", function () { | |
var actualDefinition; | |
var hasOnlySingleMode = true; | |
_this.TRACE_INIT("Lexer Config handling", function () { | |
if (_this.config.lineTerminatorsPattern === | |
DEFAULT_LEXER_CONFIG.lineTerminatorsPattern) { | |
// optimized built-in implementation for the defaults definition of lineTerminators | |
_this.config.lineTerminatorsPattern = _lexer__WEBPACK_IMPORTED_MODULE_0__["LineTerminatorOptimizedTester"]; | |
} | |
else { | |
if (_this.config.lineTerminatorCharacters === | |
DEFAULT_LEXER_CONFIG.lineTerminatorCharacters) { | |
throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n" + | |
"\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS"); | |
} | |
} | |
if (config.safeMode && config.ensureOptimizations) { | |
throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.'); | |
} | |
_this.trackStartLines = /full|onlyStart/i.test(_this.config.positionTracking); | |
_this.trackEndLines = /full/i.test(_this.config.positionTracking); | |
// Convert SingleModeLexerDefinition into a IMultiModeLexerDefinition. | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(lexerDefinition)) { | |
actualDefinition = { modes: {} }; | |
actualDefinition.modes[_lexer__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_MODE"]] = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneArr"])(lexerDefinition); | |
actualDefinition[_lexer__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_MODE"]] = _lexer__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_MODE"]; | |
} | |
else { | |
// no conversion needed, input should already be a IMultiModeLexerDefinition | |
hasOnlySingleMode = false; | |
actualDefinition = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["cloneObj"])(lexerDefinition); | |
} | |
}); | |
if (_this.config.skipValidations === false) { | |
_this.TRACE_INIT("performRuntimeChecks", function () { | |
_this.lexerDefinitionErrors = _this.lexerDefinitionErrors.concat(Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["performRuntimeChecks"])(actualDefinition, _this.trackStartLines, _this.config.lineTerminatorCharacters)); | |
}); | |
_this.TRACE_INIT("performWarningRuntimeChecks", function () { | |
_this.lexerDefinitionWarning = _this.lexerDefinitionWarning.concat(Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["performWarningRuntimeChecks"])(actualDefinition, _this.trackStartLines, _this.config.lineTerminatorCharacters)); | |
}); | |
} | |
// for extra robustness to avoid throwing an none informative error message | |
actualDefinition.modes = actualDefinition.modes | |
? actualDefinition.modes | |
: {}; | |
// an error of undefined TokenTypes will be detected in "performRuntimeChecks" above. | |
// this transformation is to increase robustness in the case of partially invalid lexer definition. | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(actualDefinition.modes, function (currModeValue, currModeName) { | |
actualDefinition.modes[currModeName] = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["reject"])(currModeValue, function (currTokType) { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(currTokType); }); | |
}); | |
var allModeNames = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["keys"])(actualDefinition.modes); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(actualDefinition.modes, function (currModDef, currModName) { | |
_this.TRACE_INIT("Mode: <" + currModName + "> processing", function () { | |
_this.modes.push(currModName); | |
if (_this.config.skipValidations === false) { | |
_this.TRACE_INIT("validatePatterns", function () { | |
_this.lexerDefinitionErrors = _this.lexerDefinitionErrors.concat(Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["validatePatterns"])(currModDef, allModeNames)); | |
}); | |
} | |
// If definition errors were encountered, the analysis phase may fail unexpectedly/ | |
// Considering a lexer with definition errors may never be used, there is no point | |
// to performing the analysis anyhow... | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(_this.lexerDefinitionErrors)) { | |
Object(_tokens__WEBPACK_IMPORTED_MODULE_2__["augmentTokenTypes"])(currModDef); | |
var currAnalyzeResult_1; | |
_this.TRACE_INIT("analyzeTokenTypes", function () { | |
currAnalyzeResult_1 = Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["analyzeTokenTypes"])(currModDef, { | |
lineTerminatorCharacters: _this.config | |
.lineTerminatorCharacters, | |
positionTracking: config.positionTracking, | |
ensureOptimizations: config.ensureOptimizations, | |
safeMode: config.safeMode, | |
tracer: _this.TRACE_INIT.bind(_this) | |
}); | |
}); | |
_this.patternIdxToConfig[currModName] = | |
currAnalyzeResult_1.patternIdxToConfig; | |
_this.charCodeToPatternIdxToConfig[currModName] = | |
currAnalyzeResult_1.charCodeToPatternIdxToConfig; | |
_this.emptyGroups = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["merge"])(_this.emptyGroups, currAnalyzeResult_1.emptyGroups); | |
_this.hasCustom = currAnalyzeResult_1.hasCustom || _this.hasCustom; | |
_this.canModeBeOptimized[currModName] = | |
currAnalyzeResult_1.canBeOptimized; | |
} | |
}); | |
}); | |
_this.defaultMode = actualDefinition.defaultMode; | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(_this.lexerDefinitionErrors) && | |
!_this.config.deferDefinitionErrorsHandling) { | |
var allErrMessages = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(_this.lexerDefinitionErrors, function (error) { | |
return error.message; | |
}); | |
var allErrMessagesString = allErrMessages.join("-----------------------\n"); | |
throw new Error("Errors detected in definition of Lexer:\n" + allErrMessagesString); | |
} | |
// Only print warning if there are no errors, This will avoid pl | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(_this.lexerDefinitionWarning, function (warningDescriptor) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["PRINT_WARNING"])(warningDescriptor.message); | |
}); | |
_this.TRACE_INIT("Choosing sub-methods implementations", function () { | |
// Choose the relevant internal implementations for this specific parser. | |
// These implementations should be in-lined by the JavaScript engine | |
// to provide optimal performance in each scenario. | |
if (_lexer__WEBPACK_IMPORTED_MODULE_0__["SUPPORT_STICKY"]) { | |
_this.chopInput = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["IDENTITY"]; | |
_this.match = _this.matchWithTest; | |
} | |
else { | |
_this.updateLastIndex = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
_this.match = _this.matchWithExec; | |
} | |
if (hasOnlySingleMode) { | |
_this.handleModes = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
} | |
if (_this.trackStartLines === false) { | |
_this.computeNewColumn = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["IDENTITY"]; | |
} | |
if (_this.trackEndLines === false) { | |
_this.updateTokenEndLineColumnLocation = _utils_utils__WEBPACK_IMPORTED_MODULE_1__["NOOP"]; | |
} | |
if (/full/i.test(_this.config.positionTracking)) { | |
_this.createTokenInstance = _this.createFullToken; | |
} | |
else if (/onlyStart/i.test(_this.config.positionTracking)) { | |
_this.createTokenInstance = _this.createStartOnlyToken; | |
} | |
else if (/onlyOffset/i.test(_this.config.positionTracking)) { | |
_this.createTokenInstance = _this.createOffsetOnlyToken; | |
} | |
else { | |
throw Error("Invalid <positionTracking> config option: \"" + _this.config.positionTracking + "\""); | |
} | |
if (_this.hasCustom) { | |
_this.addToken = _this.addTokenUsingPush; | |
_this.handlePayload = _this.handlePayloadWithCustom; | |
} | |
else { | |
_this.addToken = _this.addTokenUsingMemberAccess; | |
_this.handlePayload = _this.handlePayloadNoCustom; | |
} | |
}); | |
_this.TRACE_INIT("Failed Optimization Warnings", function () { | |
var unOptimizedModes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["reduce"])(_this.canModeBeOptimized, function (cannotBeOptimized, canBeOptimized, modeName) { | |
if (canBeOptimized === false) { | |
cannotBeOptimized.push(modeName); | |
} | |
return cannotBeOptimized; | |
}, []); | |
if (config.ensureOptimizations && !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(unOptimizedModes)) { | |
throw Error("Lexer Modes: < " + unOptimizedModes.join(", ") + " > cannot be optimized.\n" + | |
'\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n' + | |
"\t Or inspect the console log for details on how to resolve these issues."); | |
} | |
}); | |
_this.TRACE_INIT("clearRegExpParserCache", function () { | |
Object(_reg_exp_parser__WEBPACK_IMPORTED_MODULE_4__["clearRegExpParserCache"])(); | |
}); | |
_this.TRACE_INIT("toFastProperties", function () { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["toFastProperties"])(_this); | |
}); | |
}); | |
} | |
Lexer.prototype.tokenize = function (text, initialMode) { | |
if (initialMode === void 0) { initialMode = this.defaultMode; } | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(this.lexerDefinitionErrors)) { | |
var allErrMessages = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["map"])(this.lexerDefinitionErrors, function (error) { | |
return error.message; | |
}); | |
var allErrMessagesString = allErrMessages.join("-----------------------\n"); | |
throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n" + | |
allErrMessagesString); | |
} | |
var lexResult = this.tokenizeInternal(text, initialMode); | |
return lexResult; | |
}; | |
// There is quite a bit of duplication between this and "tokenizeInternalLazy" | |
// This is intentional due to performance considerations. | |
Lexer.prototype.tokenizeInternal = function (text, initialMode) { | |
var _this = this; | |
var i, j, matchAltImage, longerAltIdx, matchedImage, payload, altPayload, imageLength, group, tokType, newToken, errLength, droppedChar, msg, match; | |
var orgText = text; | |
var orgLength = orgText.length; | |
var offset = 0; | |
var matchedTokensIndex = 0; | |
// initializing the tokensArray to the "guessed" size. | |
// guessing too little will still reduce the number of array re-sizes on pushes. | |
// guessing too large (Tested by guessing x4 too large) may cost a bit more of memory | |
// but would still have a faster runtime by avoiding (All but one) array resizing. | |
var guessedNumberOfTokens = this.hasCustom | |
? 0 // will break custom token pattern APIs the matchedTokens array will contain undefined elements. | |
: Math.floor(text.length / 10); | |
var matchedTokens = new Array(guessedNumberOfTokens); | |
var errors = []; | |
var line = this.trackStartLines ? 1 : undefined; | |
var column = this.trackStartLines ? 1 : undefined; | |
var groups = Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["cloneEmptyGroups"])(this.emptyGroups); | |
var trackLines = this.trackStartLines; | |
var lineTerminatorPattern = this.config.lineTerminatorsPattern; | |
var currModePatternsLength = 0; | |
var patternIdxToConfig = []; | |
var currCharCodeToPatternIdxToConfig = []; | |
var modeStack = []; | |
var emptyArray = []; | |
Object.freeze(emptyArray); | |
var getPossiblePatterns = undefined; | |
function getPossiblePatternsSlow() { | |
return patternIdxToConfig; | |
} | |
function getPossiblePatternsOptimized(charCode) { | |
var optimizedCharIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_0__["charCodeToOptimizedIndex"])(charCode); | |
var possiblePatterns = currCharCodeToPatternIdxToConfig[optimizedCharIdx]; | |
if (possiblePatterns === undefined) { | |
return emptyArray; | |
} | |
else { | |
return possiblePatterns; | |
} | |
} | |
var pop_mode = function (popToken) { | |
// TODO: perhaps avoid this error in the edge case there is no more input? | |
if (modeStack.length === 1 && | |
// if we have both a POP_MODE and a PUSH_MODE this is in-fact a "transition" | |
// So no error should occur. | |
popToken.tokenType.PUSH_MODE === undefined) { | |
// if we try to pop the last mode there lexer will no longer have ANY mode. | |
// thus the pop is ignored, an error will be created and the lexer will continue parsing in the previous mode. | |
var msg_1 = _this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(popToken); | |
errors.push({ | |
offset: popToken.startOffset, | |
line: popToken.startLine !== undefined ? popToken.startLine : undefined, | |
column: popToken.startColumn !== undefined | |
? popToken.startColumn | |
: undefined, | |
length: popToken.image.length, | |
message: msg_1 | |
}); | |
} | |
else { | |
modeStack.pop(); | |
var newMode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["last"])(modeStack); | |
patternIdxToConfig = _this.patternIdxToConfig[newMode]; | |
currCharCodeToPatternIdxToConfig = _this.charCodeToPatternIdxToConfig[newMode]; | |
currModePatternsLength = patternIdxToConfig.length; | |
var modeCanBeOptimized = _this.canModeBeOptimized[newMode] && _this.config.safeMode === false; | |
if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) { | |
getPossiblePatterns = getPossiblePatternsOptimized; | |
} | |
else { | |
getPossiblePatterns = getPossiblePatternsSlow; | |
} | |
} | |
}; | |
function push_mode(newMode) { | |
modeStack.push(newMode); | |
currCharCodeToPatternIdxToConfig = this.charCodeToPatternIdxToConfig[newMode]; | |
patternIdxToConfig = this.patternIdxToConfig[newMode]; | |
currModePatternsLength = patternIdxToConfig.length; | |
currModePatternsLength = patternIdxToConfig.length; | |
var modeCanBeOptimized = this.canModeBeOptimized[newMode] && this.config.safeMode === false; | |
if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) { | |
getPossiblePatterns = getPossiblePatternsOptimized; | |
} | |
else { | |
getPossiblePatterns = getPossiblePatternsSlow; | |
} | |
} | |
// this pattern seems to avoid a V8 de-optimization, although that de-optimization does not | |
// seem to matter performance wise. | |
push_mode.call(this, initialMode); | |
var currConfig; | |
while (offset < orgLength) { | |
matchedImage = null; | |
var nextCharCode = orgText.charCodeAt(offset); | |
var chosenPatternIdxToConfig = getPossiblePatterns(nextCharCode); | |
var chosenPatternsLength = chosenPatternIdxToConfig.length; | |
for (i = 0; i < chosenPatternsLength; i++) { | |
currConfig = chosenPatternIdxToConfig[i]; | |
var currPattern = currConfig.pattern; | |
payload = null; | |
// manually in-lined because > 600 chars won't be in-lined in V8 | |
var singleCharCode = currConfig.short; | |
if (singleCharCode !== false) { | |
if (nextCharCode === singleCharCode) { | |
// single character string | |
matchedImage = currPattern; | |
} | |
} | |
else if (currConfig.isCustom === true) { | |
match = currPattern.exec(orgText, offset, matchedTokens, groups); | |
if (match !== null) { | |
matchedImage = match[0]; | |
if (match.payload !== undefined) { | |
payload = match.payload; | |
} | |
} | |
else { | |
matchedImage = null; | |
} | |
} | |
else { | |
this.updateLastIndex(currPattern, offset); | |
matchedImage = this.match(currPattern, text, offset); | |
} | |
if (matchedImage !== null) { | |
// even though this pattern matched we must try a another longer alternative. | |
// this can be used to prioritize keywords over identifiers | |
longerAltIdx = currConfig.longerAlt; | |
if (longerAltIdx !== undefined) { | |
// TODO: micro optimize, avoid extra prop access | |
// by saving/linking longerAlt on the original config? | |
var longerAltConfig = patternIdxToConfig[longerAltIdx]; | |
var longerAltPattern = longerAltConfig.pattern; | |
altPayload = null; | |
// single Char can never be a longer alt so no need to test it. | |
// manually in-lined because > 600 chars won't be in-lined in V8 | |
if (longerAltConfig.isCustom === true) { | |
match = longerAltPattern.exec(orgText, offset, matchedTokens, groups); | |
if (match !== null) { | |
matchAltImage = match[0]; | |
if (match.payload !== undefined) { | |
altPayload = match.payload; | |
} | |
} | |
else { | |
matchAltImage = null; | |
} | |
} | |
else { | |
this.updateLastIndex(longerAltPattern, offset); | |
matchAltImage = this.match(longerAltPattern, text, offset); | |
} | |
if (matchAltImage && matchAltImage.length > matchedImage.length) { | |
matchedImage = matchAltImage; | |
payload = altPayload; | |
currConfig = longerAltConfig; | |
} | |
} | |
break; | |
} | |
} | |
// successful match | |
if (matchedImage !== null) { | |
imageLength = matchedImage.length; | |
group = currConfig.group; | |
if (group !== undefined) { | |
tokType = currConfig.tokenTypeIdx; | |
// TODO: "offset + imageLength" and the new column may be computed twice in case of "full" location information inside | |
// createFullToken method | |
newToken = this.createTokenInstance(matchedImage, offset, tokType, currConfig.tokenType, line, column, imageLength); | |
this.handlePayload(newToken, payload); | |
// TODO: optimize NOOP in case there are no special groups? | |
if (group === false) { | |
matchedTokensIndex = this.addToken(matchedTokens, matchedTokensIndex, newToken); | |
} | |
else { | |
groups[group].push(newToken); | |
} | |
} | |
text = this.chopInput(text, imageLength); | |
offset = offset + imageLength; | |
// TODO: with newlines the column may be assigned twice | |
column = this.computeNewColumn(column, imageLength); | |
if (trackLines === true && currConfig.canLineTerminator === true) { | |
var numOfLTsInMatch = 0; | |
var foundTerminator = void 0; | |
var lastLTEndOffset = void 0; | |
lineTerminatorPattern.lastIndex = 0; | |
do { | |
foundTerminator = lineTerminatorPattern.test(matchedImage); | |
if (foundTerminator === true) { | |
lastLTEndOffset = lineTerminatorPattern.lastIndex - 1; | |
numOfLTsInMatch++; | |
} | |
} while (foundTerminator === true); | |
if (numOfLTsInMatch !== 0) { | |
line = line + numOfLTsInMatch; | |
column = imageLength - lastLTEndOffset; | |
this.updateTokenEndLineColumnLocation(newToken, group, lastLTEndOffset, numOfLTsInMatch, line, column, imageLength); | |
} | |
} | |
// will be NOOP if no modes present | |
this.handleModes(currConfig, pop_mode, push_mode, newToken); | |
} | |
else { | |
// error recovery, drop characters until we identify a valid token's start point | |
var errorStartOffset = offset; | |
var errorLine = line; | |
var errorColumn = column; | |
var foundResyncPoint = false; | |
while (!foundResyncPoint && offset < orgLength) { | |
// drop chars until we succeed in matching something | |
droppedChar = orgText.charCodeAt(offset); | |
// Identity Func (when sticky flag is enabled) | |
text = this.chopInput(text, 1); | |
offset++; | |
for (j = 0; j < currModePatternsLength; j++) { | |
var currConfig_1 = patternIdxToConfig[j]; | |
var currPattern = currConfig_1.pattern; | |
// manually in-lined because > 600 chars won't be in-lined in V8 | |
var singleCharCode = currConfig_1.short; | |
if (singleCharCode !== false) { | |
if (orgText.charCodeAt(offset) === singleCharCode) { | |
// single character string | |
foundResyncPoint = true; | |
} | |
} | |
else if (currConfig_1.isCustom === true) { | |
foundResyncPoint = | |
currPattern.exec(orgText, offset, matchedTokens, groups) !== | |
null; | |
} | |
else { | |
this.updateLastIndex(currPattern, offset); | |
foundResyncPoint = currPattern.exec(text) !== null; | |
} | |
if (foundResyncPoint === true) { | |
break; | |
} | |
} | |
} | |
errLength = offset - errorStartOffset; | |
// at this point we either re-synced or reached the end of the input text | |
msg = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(orgText, errorStartOffset, errLength, errorLine, errorColumn); | |
errors.push({ | |
offset: errorStartOffset, | |
line: errorLine, | |
column: errorColumn, | |
length: errLength, | |
message: msg | |
}); | |
} | |
} | |
// if we do have custom patterns which push directly into the | |
// TODO: custom tokens should not push directly?? | |
if (!this.hasCustom) { | |
// if we guessed a too large size for the tokens array this will shrink it to the right size. | |
matchedTokens.length = matchedTokensIndex; | |
} | |
return { | |
tokens: matchedTokens, | |
groups: groups, | |
errors: errors | |
}; | |
}; | |
Lexer.prototype.handleModes = function (config, pop_mode, push_mode, newToken) { | |
if (config.pop === true) { | |
// need to save the PUSH_MODE property as if the mode is popped | |
// patternIdxToPopMode is updated to reflect the new mode after popping the stack | |
var pushMode = config.push; | |
pop_mode(newToken); | |
if (pushMode !== undefined) { | |
push_mode.call(this, pushMode); | |
} | |
} | |
else if (config.push !== undefined) { | |
push_mode.call(this, config.push); | |
} | |
}; | |
Lexer.prototype.chopInput = function (text, length) { | |
return text.substring(length); | |
}; | |
Lexer.prototype.updateLastIndex = function (regExp, newLastIndex) { | |
regExp.lastIndex = newLastIndex; | |
}; | |
// TODO: decrease this under 600 characters? inspect stripping comments option in TSC compiler | |
Lexer.prototype.updateTokenEndLineColumnLocation = function (newToken, group, lastLTIdx, numOfLTsInMatch, line, column, imageLength) { | |
var lastCharIsLT, fixForEndingInLT; | |
if (group !== undefined) { | |
// a none skipped multi line Token, need to update endLine/endColumn | |
lastCharIsLT = lastLTIdx === imageLength - 1; | |
fixForEndingInLT = lastCharIsLT ? -1 : 0; | |
if (!(numOfLTsInMatch === 1 && lastCharIsLT === true)) { | |
// if a token ends in a LT that last LT only affects the line numbering of following Tokens | |
newToken.endLine = line + fixForEndingInLT; | |
// the last LT in a token does not affect the endColumn either as the [columnStart ... columnEnd) | |
// inclusive to exclusive range. | |
newToken.endColumn = column - 1 + -fixForEndingInLT; | |
} | |
// else single LT in the last character of a token, no need to modify the endLine/EndColumn | |
} | |
}; | |
Lexer.prototype.computeNewColumn = function (oldColumn, imageLength) { | |
return oldColumn + imageLength; | |
}; | |
// Place holder, will be replaced by the correct variant according to the locationTracking option at runtime. | |
/* istanbul ignore next - place holder */ | |
Lexer.prototype.createTokenInstance = function () { | |
var args = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
args[_i] = arguments[_i]; | |
} | |
return null; | |
}; | |
Lexer.prototype.createOffsetOnlyToken = function (image, startOffset, tokenTypeIdx, tokenType) { | |
return { | |
image: image, | |
startOffset: startOffset, | |
tokenTypeIdx: tokenTypeIdx, | |
tokenType: tokenType | |
}; | |
}; | |
Lexer.prototype.createStartOnlyToken = function (image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn) { | |
return { | |
image: image, | |
startOffset: startOffset, | |
startLine: startLine, | |
startColumn: startColumn, | |
tokenTypeIdx: tokenTypeIdx, | |
tokenType: tokenType | |
}; | |
}; | |
Lexer.prototype.createFullToken = function (image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn, imageLength) { | |
return { | |
image: image, | |
startOffset: startOffset, | |
endOffset: startOffset + imageLength - 1, | |
startLine: startLine, | |
endLine: startLine, | |
startColumn: startColumn, | |
endColumn: startColumn + imageLength - 1, | |
tokenTypeIdx: tokenTypeIdx, | |
tokenType: tokenType | |
}; | |
}; | |
// Place holder, will be replaced by the correct variant according to the locationTracking option at runtime. | |
/* istanbul ignore next - place holder */ | |
Lexer.prototype.addToken = function (tokenVector, index, tokenToAdd) { | |
return 666; | |
}; | |
Lexer.prototype.addTokenUsingPush = function (tokenVector, index, tokenToAdd) { | |
tokenVector.push(tokenToAdd); | |
return index; | |
}; | |
Lexer.prototype.addTokenUsingMemberAccess = function (tokenVector, index, tokenToAdd) { | |
tokenVector[index] = tokenToAdd; | |
index++; | |
return index; | |
}; | |
// Place holder, will be replaced by the correct variant according to the hasCustom flag option at runtime. | |
/* istanbul ignore next - place holder */ | |
Lexer.prototype.handlePayload = function (token, payload) { }; | |
Lexer.prototype.handlePayloadNoCustom = function (token, payload) { }; | |
Lexer.prototype.handlePayloadWithCustom = function (token, payload) { | |
if (payload !== null) { | |
token.payload = payload; | |
} | |
}; | |
/* istanbul ignore next - place holder to be replaced with chosen alternative at runtime */ | |
Lexer.prototype.match = function (pattern, text, offset) { | |
return null; | |
}; | |
Lexer.prototype.matchWithTest = function (pattern, text, offset) { | |
var found = pattern.test(text); | |
if (found === true) { | |
return text.substring(offset, pattern.lastIndex); | |
} | |
return null; | |
}; | |
Lexer.prototype.matchWithExec = function (pattern, text) { | |
var regExpArray = pattern.exec(text); | |
return regExpArray !== null ? regExpArray[0] : regExpArray; | |
}; | |
// Duplicated from the parser's perf trace trait to allow future extraction | |
// of the lexer to a separate package. | |
Lexer.prototype.TRACE_INIT = function (phaseDesc, phaseImpl) { | |
// No need to optimize this using NOOP pattern because | |
// It is not called in a hot spot... | |
if (this.traceInitPerf === true) { | |
this.traceInitIndent++; | |
var indent = new Array(this.traceInitIndent + 1).join("\t"); | |
if (this.traceInitIndent < this.traceInitMaxIdent) { | |
console.log(indent + "--> <" + phaseDesc + ">"); | |
} | |
var _a = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["timer"])(phaseImpl), time = _a.time, value = _a.value; | |
/* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */ | |
var traceMethod = time > 10 ? console.warn : console.log; | |
if (this.traceInitIndent < this.traceInitMaxIdent) { | |
traceMethod(indent + "<-- <" + phaseDesc + "> time: " + time + "ms"); | |
} | |
this.traceInitIndent--; | |
return value; | |
} | |
else { | |
return phaseImpl(); | |
} | |
}; | |
Lexer.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it will" + | |
"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace."; | |
Lexer.NA = /NOT_APPLICABLE/; | |
return Lexer; | |
}()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp.js": | |
/*!**************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp.js ***! | |
\**************************************************************************************************/ | |
/*! exports provided: failedOptimizationPrefixMsg, getOptimizedStartCodesIndices, firstCharOptimizedIndices, canMatchCharCode */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "failedOptimizationPrefixMsg", function() { return failedOptimizationPrefixMsg; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptimizedStartCodesIndices", function() { return getOptimizedStartCodesIndices; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstCharOptimizedIndices", function() { return firstCharOptimizedIndices; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canMatchCharCode", function() { return canMatchCharCode; }); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regexp-to-ast */ "../fabric8-analytics-lsp-server/output/node_modules/regexp-to-ast/lib/regexp-to-ast.js"); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _reg_exp_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reg_exp_parser */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js"); | |
/* harmony import */ var _lexer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lexer */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer.js"); | |
var __extends = (undefined && undefined.__extends) || (function () { | |
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 (b.hasOwnProperty(p)) d[p] = b[p]; }; | |
return extendStatics(d, b); | |
}; | |
return function (d, b) { | |
extendStatics(d, b); | |
function __() { this.constructor = d; } | |
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
}; | |
})(); | |
var complementErrorMessage = "Complement Sets are not supported for first char optimization"; | |
var failedOptimizationPrefixMsg = 'Unable to use "first char" lexer optimizations:\n'; | |
function getOptimizedStartCodesIndices(regExp, ensureOptimizations) { | |
if (ensureOptimizations === void 0) { ensureOptimizations = false; } | |
try { | |
var ast = Object(_reg_exp_parser__WEBPACK_IMPORTED_MODULE_2__["getRegExpAst"])(regExp); | |
var firstChars = firstCharOptimizedIndices(ast.value, {}, ast.flags.ignoreCase); | |
return firstChars; | |
} | |
catch (e) { | |
/* istanbul ignore next */ | |
// Testing this relies on the regexp-to-ast library having a bug... */ | |
// TODO: only the else branch needs to be ignored, try to fix with newer prettier / tsc | |
if (e.message === complementErrorMessage) { | |
if (ensureOptimizations) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["PRINT_WARNING"])("" + failedOptimizationPrefixMsg + | |
("\tUnable to optimize: < " + regExp.toString() + " >\n") + | |
"\tComplement Sets cannot be automatically optimized.\n" + | |
"\tThis will disable the lexer's first char optimizations.\n" + | |
"\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details."); | |
} | |
} | |
else { | |
var msgSuffix = ""; | |
if (ensureOptimizations) { | |
msgSuffix = | |
"\n\tThis will disable the lexer's first char optimizations.\n" + | |
"\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."; | |
} | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["PRINT_ERROR"])(failedOptimizationPrefixMsg + "\n" + | |
("\tFailed parsing: < " + regExp.toString() + " >\n") + | |
("\tUsing the regexp-to-ast library version: " + regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__["VERSION"] + "\n") + | |
"\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues" + | |
msgSuffix); | |
} | |
} | |
return []; | |
} | |
function firstCharOptimizedIndices(ast, result, ignoreCase) { | |
switch (ast.type) { | |
case "Disjunction": | |
for (var i = 0; i < ast.value.length; i++) { | |
firstCharOptimizedIndices(ast.value[i], result, ignoreCase); | |
} | |
break; | |
case "Alternative": | |
var terms = ast.value; | |
for (var i = 0; i < terms.length; i++) { | |
var term = terms[i]; | |
// skip terms that cannot effect the first char results | |
switch (term.type) { | |
case "EndAnchor": | |
// A group back reference cannot affect potential starting char. | |
// because if a back reference is the first production than automatically | |
// the group being referenced has had to come BEFORE so its codes have already been added | |
case "GroupBackReference": | |
// assertions do not affect potential starting codes | |
case "Lookahead": | |
case "NegativeLookahead": | |
case "StartAnchor": | |
case "WordBoundary": | |
case "NonWordBoundary": | |
continue; | |
} | |
var atom = term; | |
switch (atom.type) { | |
case "Character": | |
addOptimizedIdxToResult(atom.value, result, ignoreCase); | |
break; | |
case "Set": | |
if (atom.complement === true) { | |
throw Error(complementErrorMessage); | |
} | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["forEach"])(atom.value, function (code) { | |
if (typeof code === "number") { | |
addOptimizedIdxToResult(code, result, ignoreCase); | |
} | |
else { | |
// range | |
var range = code; | |
// cannot optimize when ignoreCase is | |
if (ignoreCase === true) { | |
for (var rangeCode = range.from; rangeCode <= range.to; rangeCode++) { | |
addOptimizedIdxToResult(rangeCode, result, ignoreCase); | |
} | |
} | |
// Optimization (2 orders of magnitude less work for very large ranges) | |
else { | |
// handle unoptimized values | |
for (var rangeCode = range.from; rangeCode <= range.to && rangeCode < _lexer__WEBPACK_IMPORTED_MODULE_3__["minOptimizationVal"]; rangeCode++) { | |
addOptimizedIdxToResult(rangeCode, result, ignoreCase); | |
} | |
// Less common charCode where we optimize for faster init time, by using larger "buckets" | |
if (range.to >= _lexer__WEBPACK_IMPORTED_MODULE_3__["minOptimizationVal"]) { | |
var minUnOptVal = range.from >= _lexer__WEBPACK_IMPORTED_MODULE_3__["minOptimizationVal"] | |
? range.from | |
: _lexer__WEBPACK_IMPORTED_MODULE_3__["minOptimizationVal"]; | |
var maxUnOptVal = range.to; | |
var minOptIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_3__["charCodeToOptimizedIndex"])(minUnOptVal); | |
var maxOptIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_3__["charCodeToOptimizedIndex"])(maxUnOptVal); | |
for (var currOptIdx = minOptIdx; currOptIdx <= maxOptIdx; currOptIdx++) { | |
result[currOptIdx] = currOptIdx; | |
} | |
} | |
} | |
} | |
}); | |
break; | |
case "Group": | |
firstCharOptimizedIndices(atom.value, result, ignoreCase); | |
break; | |
/* istanbul ignore next */ | |
default: | |
throw Error("Non Exhaustive Match"); | |
} | |
// reached a mandatory production, no more **start** codes can be found on this alternative | |
var isOptionalQuantifier = atom.quantifier !== undefined && atom.quantifier.atLeast === 0; | |
if ( | |
// A group may be optional due to empty contents /(?:)/ | |
// or if everything inside it is optional /((a)?)/ | |
(atom.type === "Group" && isWholeOptional(atom) === false) || | |
// If this term is not a group it may only be optional if it has an optional quantifier | |
(atom.type !== "Group" && isOptionalQuantifier === false)) { | |
break; | |
} | |
} | |
break; | |
/* istanbul ignore next */ | |
default: | |
throw Error("non exhaustive match!"); | |
} | |
// console.log(Object.keys(result).length) | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["values"])(result); | |
} | |
function addOptimizedIdxToResult(code, result, ignoreCase) { | |
var optimizedCharIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_3__["charCodeToOptimizedIndex"])(code); | |
result[optimizedCharIdx] = optimizedCharIdx; | |
if (ignoreCase === true) { | |
handleIgnoreCase(code, result); | |
} | |
} | |
function handleIgnoreCase(code, result) { | |
var char = String.fromCharCode(code); | |
var upperChar = char.toUpperCase(); | |
/* istanbul ignore else */ | |
if (upperChar !== char) { | |
var optimizedCharIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_3__["charCodeToOptimizedIndex"])(upperChar.charCodeAt(0)); | |
result[optimizedCharIdx] = optimizedCharIdx; | |
} | |
else { | |
var lowerChar = char.toLowerCase(); | |
if (lowerChar !== char) { | |
var optimizedCharIdx = Object(_lexer__WEBPACK_IMPORTED_MODULE_3__["charCodeToOptimizedIndex"])(lowerChar.charCodeAt(0)); | |
result[optimizedCharIdx] = optimizedCharIdx; | |
} | |
} | |
} | |
function findCode(setNode, targetCharCodes) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["find"])(setNode.value, function (codeOrRange) { | |
if (typeof codeOrRange === "number") { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["contains"])(targetCharCodes, codeOrRange); | |
} | |
else { | |
// range | |
var range_1 = codeOrRange; | |
return (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["find"])(targetCharCodes, function (targetCode) { return range_1.from <= targetCode && targetCode <= range_1.to; }) !== undefined); | |
} | |
}); | |
} | |
function isWholeOptional(ast) { | |
if (ast.quantifier && ast.quantifier.atLeast === 0) { | |
return true; | |
} | |
if (!ast.value) { | |
return false; | |
} | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["isArray"])(ast.value) | |
? Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["every"])(ast.value, isWholeOptional) | |
: isWholeOptional(ast.value); | |
} | |
var CharCodeFinder = /** @class */ (function (_super) { | |
__extends(CharCodeFinder, _super); | |
function CharCodeFinder(targetCharCodes) { | |
var _this = _super.call(this) || this; | |
_this.targetCharCodes = targetCharCodes; | |
_this.found = false; | |
return _this; | |
} | |
CharCodeFinder.prototype.visitChildren = function (node) { | |
// No need to keep looking... | |
if (this.found === true) { | |
return; | |
} | |
// switch lookaheads as they do not actually consume any characters thus | |
// finding a charCode at lookahead context does not mean that regexp can actually contain it in a match. | |
switch (node.type) { | |
case "Lookahead": | |
this.visitLookahead(node); | |
return; | |
case "NegativeLookahead": | |
this.visitNegativeLookahead(node); | |
return; | |
} | |
_super.prototype.visitChildren.call(this, node); | |
}; | |
CharCodeFinder.prototype.visitCharacter = function (node) { | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["contains"])(this.targetCharCodes, node.value)) { | |
this.found = true; | |
} | |
}; | |
CharCodeFinder.prototype.visitSet = function (node) { | |
if (node.complement) { | |
if (findCode(node, this.targetCharCodes) === undefined) { | |
this.found = true; | |
} | |
} | |
else { | |
if (findCode(node, this.targetCharCodes) !== undefined) { | |
this.found = true; | |
} | |
} | |
}; | |
return CharCodeFinder; | |
}(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__["BaseRegExpVisitor"])); | |
function canMatchCharCode(charCodes, pattern) { | |
if (pattern instanceof RegExp) { | |
var ast = Object(_reg_exp_parser__WEBPACK_IMPORTED_MODULE_2__["getRegExpAst"])(pattern); | |
var charCodeFinder = new CharCodeFinder(charCodes); | |
charCodeFinder.visit(ast); | |
return charCodeFinder.found; | |
} | |
else { | |
return (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["find"])(pattern, function (char) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["contains"])(charCodes, char.charCodeAt(0)); | |
}) !== undefined); | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js": | |
/*!*********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js ***! | |
\*********************************************************************************************************/ | |
/*! exports provided: getRegExpAst, clearRegExpParserCache */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRegExpAst", function() { return getRegExpAst; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearRegExpParserCache", function() { return clearRegExpParserCache; }); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! regexp-to-ast */ "../fabric8-analytics-lsp-server/output/node_modules/regexp-to-ast/lib/regexp-to-ast.js"); | |
/* harmony import */ var regexp_to_ast__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__); | |
var regExpAstCache = {}; | |
var regExpParser = new regexp_to_ast__WEBPACK_IMPORTED_MODULE_0__["RegExpParser"](); | |
function getRegExpAst(regExp) { | |
var regExpStr = regExp.toString(); | |
if (regExpAstCache.hasOwnProperty(regExpStr)) { | |
return regExpAstCache[regExpStr]; | |
} | |
else { | |
var regExpAst = regExpParser.pattern(regExpStr); | |
regExpAstCache[regExpStr] = regExpAst; | |
return regExpAst; | |
} | |
} | |
function clearRegExpParserCache() { | |
regExpAstCache = {}; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js": | |
/*!*************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js ***! | |
\*************************************************************************************************/ | |
/*! exports provided: tokenStructuredMatcher, tokenStructuredMatcherNoCategories, tokenShortNameIdx, tokenIdxToClass, augmentTokenTypes, expandCategories, assignTokenDefaultProps, assignCategoriesTokensProp, assignCategoriesMapProp, singleAssignCategoriesToksMap, hasShortKeyProperty, hasCategoriesProperty, hasExtendingTokensTypesProperty, hasExtendingTokensTypesMapProperty, isTokenType */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenStructuredMatcher", function() { return tokenStructuredMatcher; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenStructuredMatcherNoCategories", function() { return tokenStructuredMatcherNoCategories; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenShortNameIdx", function() { return tokenShortNameIdx; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenIdxToClass", function() { return tokenIdxToClass; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "augmentTokenTypes", function() { return augmentTokenTypes; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expandCategories", function() { return expandCategories; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignTokenDefaultProps", function() { return assignTokenDefaultProps; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignCategoriesTokensProp", function() { return assignCategoriesTokensProp; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignCategoriesMapProp", function() { return assignCategoriesMapProp; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "singleAssignCategoriesToksMap", function() { return singleAssignCategoriesToksMap; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasShortKeyProperty", function() { return hasShortKeyProperty; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasCategoriesProperty", function() { return hasCategoriesProperty; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasExtendingTokensTypesProperty", function() { return hasExtendingTokensTypesProperty; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasExtendingTokensTypesMapProperty", function() { return hasExtendingTokensTypesMapProperty; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTokenType", function() { return isTokenType; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
function tokenStructuredMatcher(tokInstance, tokConstructor) { | |
var instanceType = tokInstance.tokenTypeIdx; | |
if (instanceType === tokConstructor.tokenTypeIdx) { | |
return true; | |
} | |
else { | |
return (tokConstructor.isParent === true && | |
tokConstructor.categoryMatchesMap[instanceType] === true); | |
} | |
} | |
// Optimized tokenMatcher in case our grammar does not use token categories | |
// Being so tiny it is much more likely to be in-lined and this avoid the function call overhead | |
function tokenStructuredMatcherNoCategories(token, tokType) { | |
return token.tokenTypeIdx === tokType.tokenTypeIdx; | |
} | |
var tokenShortNameIdx = 1; | |
var tokenIdxToClass = {}; | |
function augmentTokenTypes(tokenTypes) { | |
// collect the parent Token Types as well. | |
var tokenTypesAndParents = expandCategories(tokenTypes); | |
// add required tokenType and categoryMatches properties | |
assignTokenDefaultProps(tokenTypesAndParents); | |
// fill up the categoryMatches | |
assignCategoriesMapProp(tokenTypesAndParents); | |
assignCategoriesTokensProp(tokenTypesAndParents); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(tokenTypesAndParents, function (tokType) { | |
tokType.isParent = tokType.categoryMatches.length > 0; | |
}); | |
} | |
function expandCategories(tokenTypes) { | |
var result = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["cloneArr"])(tokenTypes); | |
var categories = tokenTypes; | |
var searching = true; | |
while (searching) { | |
categories = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["compact"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["map"])(categories, function (currTokType) { return currTokType.CATEGORIES; }))); | |
var newCategories = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["difference"])(categories, result); | |
result = result.concat(newCategories); | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(newCategories)) { | |
searching = false; | |
} | |
else { | |
categories = newCategories; | |
} | |
} | |
return result; | |
} | |
function assignTokenDefaultProps(tokenTypes) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(tokenTypes, function (currTokType) { | |
if (!hasShortKeyProperty(currTokType)) { | |
tokenIdxToClass[tokenShortNameIdx] = currTokType; | |
currTokType.tokenTypeIdx = tokenShortNameIdx++; | |
} | |
// CATEGORIES? : TokenType | TokenType[] | |
if (hasCategoriesProperty(currTokType) && | |
!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isArray"])(currTokType.CATEGORIES) | |
// && | |
// !isUndefined(currTokType.CATEGORIES.PATTERN) | |
) { | |
currTokType.CATEGORIES = [currTokType.CATEGORIES]; | |
} | |
if (!hasCategoriesProperty(currTokType)) { | |
currTokType.CATEGORIES = []; | |
} | |
if (!hasExtendingTokensTypesProperty(currTokType)) { | |
currTokType.categoryMatches = []; | |
} | |
if (!hasExtendingTokensTypesMapProperty(currTokType)) { | |
currTokType.categoryMatchesMap = {}; | |
} | |
}); | |
} | |
function assignCategoriesTokensProp(tokenTypes) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(tokenTypes, function (currTokType) { | |
// avoid duplications | |
currTokType.categoryMatches = []; | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(currTokType.categoryMatchesMap, function (val, key) { | |
currTokType.categoryMatches.push(tokenIdxToClass[key].tokenTypeIdx); | |
}); | |
}); | |
} | |
function assignCategoriesMapProp(tokenTypes) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(tokenTypes, function (currTokType) { | |
singleAssignCategoriesToksMap([], currTokType); | |
}); | |
} | |
function singleAssignCategoriesToksMap(path, nextNode) { | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(path, function (pathNode) { | |
nextNode.categoryMatchesMap[pathNode.tokenTypeIdx] = true; | |
}); | |
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["forEach"])(nextNode.CATEGORIES, function (nextCategory) { | |
var newPath = path.concat(nextNode); | |
// avoids infinite loops due to cyclic categories. | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["contains"])(newPath, nextCategory)) { | |
singleAssignCategoriesToksMap(newPath, nextCategory); | |
} | |
}); | |
} | |
function hasShortKeyProperty(tokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokType, "tokenTypeIdx"); | |
} | |
function hasCategoriesProperty(tokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokType, "CATEGORIES"); | |
} | |
function hasExtendingTokensTypesProperty(tokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokType, "categoryMatches"); | |
} | |
function hasExtendingTokensTypesMapProperty(tokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokType, "categoryMatchesMap"); | |
} | |
function isTokenType(tokType) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(tokType, "tokenTypeIdx"); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js": | |
/*!********************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js ***! | |
\********************************************************************************************************/ | |
/*! exports provided: tokenLabel, tokenName, hasTokenLabel, createToken, EOF, createTokenInstance, tokenMatcher */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenLabel", function() { return tokenLabel; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenName", function() { return tokenName; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasTokenLabel", function() { return hasTokenLabel; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createToken", function() { return createToken; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOF", function() { return EOF; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTokenInstance", function() { return createTokenInstance; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tokenMatcher", function() { return tokenMatcher; }); | |
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js"); | |
/* harmony import */ var _lexer_public__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lexer_public */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js"); | |
/* harmony import */ var _tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tokens */ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/scan/tokens.js"); | |
function tokenLabel(tokType) { | |
if (hasTokenLabel(tokType)) { | |
return tokType.LABEL; | |
} | |
else { | |
return tokType.name; | |
} | |
} | |
function tokenName(tokType) { | |
return tokType.name; | |
} | |
function hasTokenLabel(obj) { | |
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isString"])(obj.LABEL) && obj.LABEL !== ""; | |
} | |
var PARENT = "parent"; | |
var CATEGORIES = "categories"; | |
var LABEL = "label"; | |
var GROUP = "group"; | |
var PUSH_MODE = "push_mode"; | |
var POP_MODE = "pop_mode"; | |
var LONGER_ALT = "longer_alt"; | |
var LINE_BREAKS = "line_breaks"; | |
var START_CHARS_HINT = "start_chars_hint"; | |
function createToken(config) { | |
return createTokenInternal(config); | |
} | |
function createTokenInternal(config) { | |
var pattern = config.pattern; | |
var tokenType = {}; | |
tokenType.name = config.name; | |
if (!Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isUndefined"])(pattern)) { | |
tokenType.PATTERN = pattern; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, PARENT)) { | |
throw ("The parent property is no longer supported.\n" + | |
"See: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details."); | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, CATEGORIES)) { | |
// casting to ANY as this will be fixed inside `augmentTokenTypes`` | |
tokenType.CATEGORIES = config[CATEGORIES]; | |
} | |
Object(_tokens__WEBPACK_IMPORTED_MODULE_2__["augmentTokenTypes"])([tokenType]); | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, LABEL)) { | |
tokenType.LABEL = config[LABEL]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, GROUP)) { | |
tokenType.GROUP = config[GROUP]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, POP_MODE)) { | |
tokenType.POP_MODE = config[POP_MODE]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, PUSH_MODE)) { | |
tokenType.PUSH_MODE = config[PUSH_MODE]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, LONGER_ALT)) { | |
tokenType.LONGER_ALT = config[LONGER_ALT]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, LINE_BREAKS)) { | |
tokenType.LINE_BREAKS = config[LINE_BREAKS]; | |
} | |
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["has"])(config, START_CHARS_HINT)) { | |
tokenType.START_CHARS_HINT = config[START_CHARS_HINT]; | |
} | |
return tokenType; | |
} | |
var EOF = createToken({ name: "EOF", pattern: _lexer_public__WEBPACK_IMPORTED_MODULE_1__["Lexer"].NA }); | |
Object(_tokens__WEBPACK_IMPORTED_MODULE_2__["augmentTokenTypes"])([EOF]); | |
function createTokenInstance(tokType, image, startOffset, endOffset, startLine, endLine, startColumn, endColumn) { | |
return { | |
image: image, | |
startOffset: startOffset, | |
endOffset: endOffset, | |
startLine: startLine, | |
endLine: endLine, | |
startColumn: startColumn, | |
endColumn: endColumn, | |
tokenTypeIdx: tokType.tokenTypeIdx, | |
tokenType: tokType | |
}; | |
} | |
function tokenMatcher(token, tokType) { | |
return Object(_tokens__WEBPACK_IMPORTED_MODULE_2__["tokenStructuredMatcher"])(token, tokType); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js": | |
/*!*************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/utils/utils.js ***! | |
\*************************************************************************************************/ | |
/*! exports provided: isEmpty, keys, values, mapValues, map, flatten, first, last, forEach, isString, isUndefined, isFunction, drop, dropRight, filter, reject, pick, has, contains, cloneArr, cloneObj, find, findAll, reduce, compact, uniq, partial, isArray, isRegExp, isObject, every, difference, some, indexOf, sortBy, zipObject, assign, assignNoOverwrite, defaults, groupBy, merge, NOOP, IDENTITY, packArray, PRINT_ERROR, PRINT_WARNING, isES2015MapSupported, applyMixins, toFastProperties, peek, timer */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapValues", function() { return mapValues; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return isString; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return isUndefined; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drop", function() { return drop; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dropRight", function() { return dropRight; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return reject; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pick", function() { return pick; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "has", function() { return has; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return contains; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneArr", function() { return cloneArr; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneObj", function() { return cloneObj; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findAll", function() { return findAll; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compact", function() { return compact; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return uniq; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return partial; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return isRegExp; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return difference; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "some", function() { return some; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return indexOf; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortBy", function() { return sortBy; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipObject", function() { return zipObject; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return assign; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assignNoOverwrite", function() { return assignNoOverwrite; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaults", function() { return defaults; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOOP", function() { return NOOP; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IDENTITY", function() { return IDENTITY; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packArray", function() { return packArray; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRINT_ERROR", function() { return PRINT_ERROR; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRINT_WARNING", function() { return PRINT_WARNING; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isES2015MapSupported", function() { return isES2015MapSupported; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMixins", function() { return applyMixins; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toFastProperties", function() { return toFastProperties; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "peek", function() { return peek; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); | |
/* | |
Utils using lodash style API. (not necessarily 100% compliant) for functional and other utils. | |
These utils should replace usage of lodash in the production code base. not because they are any better... | |
but for the purpose of being a dependency free library. | |
The hotspots in the code are already written in imperative style for performance reasons. | |
so writing several dozen utils which may be slower than the original lodash, does not matter as much | |
considering they will not be invoked in hotspots... | |
*/ | |
function isEmpty(arr) { | |
return arr && arr.length === 0; | |
} | |
function keys(obj) { | |
if (obj === undefined || obj === null) { | |
return []; | |
} | |
return Object.keys(obj); | |
} | |
function values(obj) { | |
var vals = []; | |
var keys = Object.keys(obj); | |
for (var i = 0; i < keys.length; i++) { | |
vals.push(obj[keys[i]]); | |
} | |
return vals; | |
} | |
function mapValues(obj, callback) { | |
var result = []; | |
var objKeys = keys(obj); | |
for (var idx = 0; idx < objKeys.length; idx++) { | |
var currKey = objKeys[idx]; | |
result.push(callback.call(null, obj[currKey], currKey)); | |
} | |
return result; | |
} | |
function map(arr, callback) { | |
var result = []; | |
for (var idx = 0; idx < arr.length; idx++) { | |
result.push(callback.call(null, arr[idx], idx)); | |
} | |
return result; | |
} | |
function flatten(arr) { | |
var result = []; | |
for (var idx = 0; idx < arr.length; idx++) { | |
var currItem = arr[idx]; | |
if (Array.isArray(currItem)) { | |
result = result.concat(flatten(currItem)); | |
} | |
else { | |
result.push(currItem); | |
} | |
} | |
return result; | |
} | |
function first(arr) { | |
return isEmpty(arr) ? undefined : arr[0]; | |
} | |
function last(arr) { | |
var len = arr && arr.length; | |
return len ? arr[len - 1] : undefined; | |
} | |
function forEach(collection, iteratorCallback) { | |
/* istanbul ignore else */ | |
if (Array.isArray(collection)) { | |
for (var i = 0; i < collection.length; i++) { | |
iteratorCallback.call(null, collection[i], i); | |
} | |
} | |
else if (isObject(collection)) { | |
var colKeys = keys(collection); | |
for (var i = 0; i < colKeys.length; i++) { | |
var key = colKeys[i]; | |
var value = collection[key]; | |
iteratorCallback.call(null, value, key); | |
} | |
} | |
else { | |
throw Error("non exhaustive match"); | |
} | |
} | |
function isString(item) { | |
return typeof item === "string"; | |
} | |
function isUndefined(item) { | |
return item === undefined; | |
} | |
function isFunction(item) { | |
return item instanceof Function; | |
} | |
function drop(arr, howMuch) { | |
if (howMuch === void 0) { howMuch = 1; } | |
return arr.slice(howMuch, arr.length); | |
} | |
function dropRight(arr, howMuch) { | |
if (howMuch === void 0) { howMuch = 1; } | |
return arr.slice(0, arr.length - howMuch); | |
} | |
function filter(arr, predicate) { | |
var result = []; | |
if (Array.isArray(arr)) { | |
for (var i = 0; i < arr.length; i++) { | |
var item = arr[i]; | |
if (predicate.call(null, item)) { | |
result.push(item); | |
} | |
} | |
} | |
return result; | |
} | |
function reject(arr, predicate) { | |
return filter(arr, function (item) { return !predicate(item); }); | |
} | |
function pick(obj, predicate) { | |
var keys = Object.keys(obj); | |
var result = {}; | |
for (var i = 0; i < keys.length; i++) { | |
var currKey = keys[i]; | |
var currItem = obj[currKey]; | |
if (predicate(currItem)) { | |
result[currKey] = currItem; | |
} | |
} | |
return result; | |
} | |
function has(obj, prop) { | |
if (isObject(obj)) { | |
return obj.hasOwnProperty(prop); | |
} | |
return false; | |
} | |
function contains(arr, item) { | |
return find(arr, function (currItem) { return currItem === item; }) !== undefined ? true : false; | |
} | |
/** | |
* shallow clone | |
*/ | |
function cloneArr(arr) { | |
var newArr = []; | |
for (var i = 0; i < arr.length; i++) { | |
newArr.push(arr[i]); | |
} | |
return newArr; | |
} | |
/** | |
* shallow clone | |
*/ | |
function cloneObj(obj) { | |
var clonedObj = {}; | |
for (var key in obj) { | |
/* istanbul ignore else */ | |
if (Object.prototype.hasOwnProperty.call(obj, key)) { | |
clonedObj[key] = obj[key]; | |
} | |
} | |
return clonedObj; | |
} | |
function find(arr, predicate) { | |
for (var i = 0; i < arr.length; i++) { | |
var item = arr[i]; | |
if (predicate.call(null, item)) { | |
return item; | |
} | |
} | |
return undefined; | |
} | |
function findAll(arr, predicate) { | |
var found = []; | |
for (var i = 0; i < arr.length; i++) { | |
var item = arr[i]; | |
if (predicate.call(null, item)) { | |
found.push(item); | |
} | |
} | |
return found; | |
} | |
function reduce(arrOrObj, iterator, initial) { | |
var isArr = Array.isArray(arrOrObj); | |
var vals = isArr ? arrOrObj : values(arrOrObj); | |
var objKeys = isArr ? [] : keys(arrOrObj); | |
var accumulator = initial; | |
for (var i = 0; i < vals.length; i++) { | |
accumulator = iterator.call(null, accumulator, vals[i], isArr ? i : objKeys[i]); | |
} | |
return accumulator; | |
} | |
function compact(arr) { | |
return reject(arr, function (item) { return item === null || item === undefined; }); | |
} | |
function uniq(arr, identity) { | |
if (identity === void 0) { identity = function (item) { return item; }; } | |
var identities = []; | |
return reduce(arr, function (result, currItem) { | |
var currIdentity = identity(currItem); | |
if (contains(identities, currIdentity)) { | |
return result; | |
} | |
else { | |
identities.push(currIdentity); | |
return result.concat(currItem); | |
} | |
}, []); | |
} | |
function partial(func) { | |
var restArgs = []; | |
for (var _i = 1; _i < arguments.length; _i++) { | |
restArgs[_i - 1] = arguments[_i]; | |
} | |
var firstArg = [null]; | |
var allArgs = firstArg.concat(restArgs); | |
return Function.bind.apply(func, allArgs); | |
} | |
function isArray(obj) { | |
return Array.isArray(obj); | |
} | |
function isRegExp(obj) { | |
return obj instanceof RegExp; | |
} | |
function isObject(obj) { | |
return obj instanceof Object; | |
} | |
function every(arr, predicate) { | |
for (var i = 0; i < arr.length; i++) { | |
if (!predicate(arr[i], i)) { | |
return false; | |
} | |
} | |
return true; | |
} | |
function difference(arr, values) { | |
return reject(arr, function (item) { return contains(values, item); }); | |
} | |
function some(arr, predicate) { | |
for (var i = 0; i < arr.length; i++) { | |
if (predicate(arr[i])) { | |
return true; | |
} | |
} | |
return false; | |
} | |
function indexOf(arr, value) { | |
for (var i = 0; i < arr.length; i++) { | |
if (arr[i] === value) { | |
return i; | |
} | |
} | |
return -1; | |
} | |
function sortBy(arr, orderFunc) { | |
var result = cloneArr(arr); | |
result.sort(function (a, b) { return orderFunc(a) - orderFunc(b); }); | |
return result; | |
} | |
function zipObject(keys, values) { | |
if (keys.length !== values.length) { | |
throw Error("can't zipObject with different number of keys and values!"); | |
} | |
var result = {}; | |
for (var i = 0; i < keys.length; i++) { | |
result[keys[i]] = values[i]; | |
} | |
return result; | |
} | |
/** | |
* mutates! (and returns) target | |
*/ | |
function assign(target) { | |
var sources = []; | |
for (var _i = 1; _i < arguments.length; _i++) { | |
sources[_i - 1] = arguments[_i]; | |
} | |
for (var i = 0; i < sources.length; i++) { | |
var curSource = sources[i]; | |
var currSourceKeys = keys(curSource); | |
for (var j = 0; j < currSourceKeys.length; j++) { | |
var currKey = currSourceKeys[j]; | |
target[currKey] = curSource[currKey]; | |
} | |
} | |
return target; | |
} | |
/** | |
* mutates! (and returns) target | |
*/ | |
function assignNoOverwrite(target) { | |
var sources = []; | |
for (var _i = 1; _i < arguments.length; _i++) { | |
sources[_i - 1] = arguments[_i]; | |
} | |
for (var i = 0; i < sources.length; i++) { | |
var curSource = sources[i]; | |
var currSourceKeys = keys(curSource); | |
for (var j = 0; j < currSourceKeys.length; j++) { | |
var currKey = currSourceKeys[j]; | |
if (!has(target, currKey)) { | |
target[currKey] = curSource[currKey]; | |
} | |
} | |
} | |
return target; | |
} | |
function defaults() { | |
var sources = []; | |
for (var _i = 0; _i < arguments.length; _i++) { | |
sources[_i] = arguments[_i]; | |
} | |
return assignNoOverwrite.apply(null, [{}].concat(sources)); | |
} | |
function groupBy(arr, groupKeyFunc) { | |
var result = {}; | |
forEach(arr, function (item) { | |
var currGroupKey = groupKeyFunc(item); | |
var currGroupArr = result[currGroupKey]; | |
if (currGroupArr) { | |
currGroupArr.push(item); | |
} | |
else { | |
result[currGroupKey] = [item]; | |
} | |
}); | |
return result; | |
} | |
/** | |
* Merge obj2 into obj1. | |
* Will overwrite existing properties with the same name | |
*/ | |
function merge(obj1, obj2) { | |
var result = cloneObj(obj1); | |
var keys2 = keys(obj2); | |
for (var i = 0; i < keys2.length; i++) { | |
var key = keys2[i]; | |
var value = obj2[key]; | |
result[key] = value; | |
} | |
return result; | |
} | |
function NOOP() { } | |
function IDENTITY(item) { | |
return item; | |
} | |
/** | |
* Will return a new packed array with same values. | |
*/ | |
function packArray(holeyArr) { | |
var result = []; | |
for (var i = 0; i < holeyArr.length; i++) { | |
var orgValue = holeyArr[i]; | |
result.push(orgValue !== undefined ? orgValue : undefined); | |
} | |
return result; | |
} | |
function PRINT_ERROR(msg) { | |
/* istanbul ignore else - can't override global.console in node.js */ | |
if (console && console.error) { | |
console.error("Error: " + msg); | |
} | |
} | |
function PRINT_WARNING(msg) { | |
/* istanbul ignore else - can't override global.console in node.js*/ | |
if (console && console.warn) { | |
// TODO: modify docs accordingly | |
console.warn("Warning: " + msg); | |
} | |
} | |
function isES2015MapSupported() { | |
return typeof Map === "function"; | |
} | |
function applyMixins(derivedCtor, baseCtors) { | |
baseCtors.forEach(function (baseCtor) { | |
var baseProto = baseCtor.prototype; | |
Object.getOwnPropertyNames(baseProto).forEach(function (propName) { | |
if (propName === "constructor") { | |
return; | |
} | |
var basePropDescriptor = Object.getOwnPropertyDescriptor(baseProto, propName); | |
// Handle Accessors | |
if (basePropDescriptor && | |
(basePropDescriptor.get || basePropDescriptor.set)) { | |
Object.defineProperty(derivedCtor.prototype, propName, basePropDescriptor); | |
} | |
else { | |
derivedCtor.prototype[propName] = baseCtor.prototype[propName]; | |
} | |
}); | |
}); | |
} | |
// base on: https://github.com/petkaantonov/bluebird/blob/b97c0d2d487e8c5076e8bd897e0dcd4622d31846/src/util.js#L201-L216 | |
function toFastProperties(toBecomeFast) { | |
function FakeConstructor() { } | |
// If our object is used as a constructor it would receive | |
FakeConstructor.prototype = toBecomeFast; | |
var fakeInstance = new FakeConstructor(); | |
function fakeAccess() { | |
return typeof fakeInstance.bar; | |
} | |
// help V8 understand this is a "real" prototype by actually using | |
// the fake instance. | |
fakeAccess(); | |
fakeAccess(); | |
return toBecomeFast; | |
// Eval prevents optimization of this method (even though this is dead code) | |
/* istanbul ignore next */ | |
// tslint:disable-next-line | |
eval(toBecomeFast); | |
} | |
function peek(arr) { | |
return arr[arr.length - 1]; | |
} | |
/* istanbul ignore next - for performance tracing*/ | |
function timer(func) { | |
var start = new Date().getTime(); | |
var val = func(); | |
var end = new Date().getTime(); | |
var total = end - start; | |
return { time: total, value: val }; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/version.js": | |
/*!*********************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/chevrotain/lib_esm/src/version.js ***! | |
\*********************************************************************************************/ | |
/*! exports provided: VERSION */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); | |
// needs a separate module as this is required inside chevrotain productive code | |
// and also in the entry point for webpack(api.ts). | |
// A separate file avoids cyclic dependencies and webpack errors. | |
var VERSION = "7.0.1"; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/conversions.js": | |
/*!****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color-convert/conversions.js ***! | |
\****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
/* MIT license */ | |
var cssKeywords = __webpack_require__(/*! color-name */ "../fabric8-analytics-lsp-server/output/node_modules/color-name/index.js"); | |
// NOTE: conversions should only return primitive values (i.e. arrays, or | |
// values that give correct `typeof` results). | |
// do not use box values types (i.e. Number(), String(), etc.) | |
var reverseKeywords = {}; | |
for (var key in cssKeywords) { | |
if (cssKeywords.hasOwnProperty(key)) { | |
reverseKeywords[cssKeywords[key]] = key; | |
} | |
} | |
var convert = module.exports = { | |
rgb: {channels: 3, labels: 'rgb'}, | |
hsl: {channels: 3, labels: 'hsl'}, | |
hsv: {channels: 3, labels: 'hsv'}, | |
hwb: {channels: 3, labels: 'hwb'}, | |
cmyk: {channels: 4, labels: 'cmyk'}, | |
xyz: {channels: 3, labels: 'xyz'}, | |
lab: {channels: 3, labels: 'lab'}, | |
lch: {channels: 3, labels: 'lch'}, | |
hex: {channels: 1, labels: ['hex']}, | |
keyword: {channels: 1, labels: ['keyword']}, | |
ansi16: {channels: 1, labels: ['ansi16']}, | |
ansi256: {channels: 1, labels: ['ansi256']}, | |
hcg: {channels: 3, labels: ['h', 'c', 'g']}, | |
apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, | |
gray: {channels: 1, labels: ['gray']} | |
}; | |
// hide .channels and .labels properties | |
for (var model in convert) { | |
if (convert.hasOwnProperty(model)) { | |
if (!('channels' in convert[model])) { | |
throw new Error('missing channels property: ' + model); | |
} | |
if (!('labels' in convert[model])) { | |
throw new Error('missing channel labels property: ' + model); | |
} | |
if (convert[model].labels.length !== convert[model].channels) { | |
throw new Error('channel and label counts mismatch: ' + model); | |
} | |
var channels = convert[model].channels; | |
var labels = convert[model].labels; | |
delete convert[model].channels; | |
delete convert[model].labels; | |
Object.defineProperty(convert[model], 'channels', {value: channels}); | |
Object.defineProperty(convert[model], 'labels', {value: labels}); | |
} | |
} | |
convert.rgb.hsl = function (rgb) { | |
var r = rgb[0] / 255; | |
var g = rgb[1] / 255; | |
var b = rgb[2] / 255; | |
var min = Math.min(r, g, b); | |
var max = Math.max(r, g, b); | |
var delta = max - min; | |
var h; | |
var s; | |
var l; | |
if (max === min) { | |
h = 0; | |
} else if (r === max) { | |
h = (g - b) / delta; | |
} else if (g === max) { | |
h = 2 + (b - r) / delta; | |
} else if (b === max) { | |
h = 4 + (r - g) / delta; | |
} | |
h = Math.min(h * 60, 360); | |
if (h < 0) { | |
h += 360; | |
} | |
l = (min + max) / 2; | |
if (max === min) { | |
s = 0; | |
} else if (l <= 0.5) { | |
s = delta / (max + min); | |
} else { | |
s = delta / (2 - max - min); | |
} | |
return [h, s * 100, l * 100]; | |
}; | |
convert.rgb.hsv = function (rgb) { | |
var rdif; | |
var gdif; | |
var bdif; | |
var h; | |
var s; | |
var r = rgb[0] / 255; | |
var g = rgb[1] / 255; | |
var b = rgb[2] / 255; | |
var v = Math.max(r, g, b); | |
var diff = v - Math.min(r, g, b); | |
var diffc = function (c) { | |
return (v - c) / 6 / diff + 1 / 2; | |
}; | |
if (diff === 0) { | |
h = s = 0; | |
} else { | |
s = diff / v; | |
rdif = diffc(r); | |
gdif = diffc(g); | |
bdif = diffc(b); | |
if (r === v) { | |
h = bdif - gdif; | |
} else if (g === v) { | |
h = (1 / 3) + rdif - bdif; | |
} else if (b === v) { | |
h = (2 / 3) + gdif - rdif; | |
} | |
if (h < 0) { | |
h += 1; | |
} else if (h > 1) { | |
h -= 1; | |
} | |
} | |
return [ | |
h * 360, | |
s * 100, | |
v * 100 | |
]; | |
}; | |
convert.rgb.hwb = function (rgb) { | |
var r = rgb[0]; | |
var g = rgb[1]; | |
var b = rgb[2]; | |
var h = convert.rgb.hsl(rgb)[0]; | |
var w = 1 / 255 * Math.min(r, Math.min(g, b)); | |
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); | |
return [h, w * 100, b * 100]; | |
}; | |
convert.rgb.cmyk = function (rgb) { | |
var r = rgb[0] / 255; | |
var g = rgb[1] / 255; | |
var b = rgb[2] / 255; | |
var c; | |
var m; | |
var y; | |
var k; | |
k = Math.min(1 - r, 1 - g, 1 - b); | |
c = (1 - r - k) / (1 - k) || 0; | |
m = (1 - g - k) / (1 - k) || 0; | |
y = (1 - b - k) / (1 - k) || 0; | |
return [c * 100, m * 100, y * 100, k * 100]; | |
}; | |
/** | |
* See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance | |
* */ | |
function comparativeDistance(x, y) { | |
return ( | |
Math.pow(x[0] - y[0], 2) + | |
Math.pow(x[1] - y[1], 2) + | |
Math.pow(x[2] - y[2], 2) | |
); | |
} | |
convert.rgb.keyword = function (rgb) { | |
var reversed = reverseKeywords[rgb]; | |
if (reversed) { | |
return reversed; | |
} | |
var currentClosestDistance = Infinity; | |
var currentClosestKeyword; | |
for (var keyword in cssKeywords) { | |
if (cssKeywords.hasOwnProperty(keyword)) { | |
var value = cssKeywords[keyword]; | |
// Compute comparative distance | |
var distance = comparativeDistance(rgb, value); | |
// Check if its less, if so set as closest | |
if (distance < currentClosestDistance) { | |
currentClosestDistance = distance; | |
currentClosestKeyword = keyword; | |
} | |
} | |
} | |
return currentClosestKeyword; | |
}; | |
convert.keyword.rgb = function (keyword) { | |
return cssKeywords[keyword]; | |
}; | |
convert.rgb.xyz = function (rgb) { | |
var r = rgb[0] / 255; | |
var g = rgb[1] / 255; | |
var b = rgb[2] / 255; | |
// assume sRGB | |
r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); | |
g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); | |
b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); | |
var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); | |
var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); | |
var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); | |
return [x * 100, y * 100, z * 100]; | |
}; | |
convert.rgb.lab = function (rgb) { | |
var xyz = convert.rgb.xyz(rgb); | |
var x = xyz[0]; | |
var y = xyz[1]; | |
var z = xyz[2]; | |
var l; | |
var a; | |
var b; | |
x /= 95.047; | |
y /= 100; | |
z /= 108.883; | |
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); | |
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); | |
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); | |
l = (116 * y) - 16; | |
a = 500 * (x - y); | |
b = 200 * (y - z); | |
return [l, a, b]; | |
}; | |
convert.hsl.rgb = function (hsl) { | |
var h = hsl[0] / 360; | |
var s = hsl[1] / 100; | |
var l = hsl[2] / 100; | |
var t1; | |
var t2; | |
var t3; | |
var rgb; | |
var val; | |
if (s === 0) { | |
val = l * 255; | |
return [val, val, val]; | |
} | |
if (l < 0.5) { | |
t2 = l * (1 + s); | |
} else { | |
t2 = l + s - l * s; | |
} | |
t1 = 2 * l - t2; | |
rgb = [0, 0, 0]; | |
for (var i = 0; i < 3; i++) { | |
t3 = h + 1 / 3 * -(i - 1); | |
if (t3 < 0) { | |
t3++; | |
} | |
if (t3 > 1) { | |
t3--; | |
} | |
if (6 * t3 < 1) { | |
val = t1 + (t2 - t1) * 6 * t3; | |
} else if (2 * t3 < 1) { | |
val = t2; | |
} else if (3 * t3 < 2) { | |
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; | |
} else { | |
val = t1; | |
} | |
rgb[i] = val * 255; | |
} | |
return rgb; | |
}; | |
convert.hsl.hsv = function (hsl) { | |
var h = hsl[0]; | |
var s = hsl[1] / 100; | |
var l = hsl[2] / 100; | |
var smin = s; | |
var lmin = Math.max(l, 0.01); | |
var sv; | |
var v; | |
l *= 2; | |
s *= (l <= 1) ? l : 2 - l; | |
smin *= lmin <= 1 ? lmin : 2 - lmin; | |
v = (l + s) / 2; | |
sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); | |
return [h, sv * 100, v * 100]; | |
}; | |
convert.hsv.rgb = function (hsv) { | |
var h = hsv[0] / 60; | |
var s = hsv[1] / 100; | |
var v = hsv[2] / 100; | |
var hi = Math.floor(h) % 6; | |
var f = h - Math.floor(h); | |
var p = 255 * v * (1 - s); | |
var q = 255 * v * (1 - (s * f)); | |
var t = 255 * v * (1 - (s * (1 - f))); | |
v *= 255; | |
switch (hi) { | |
case 0: | |
return [v, t, p]; | |
case 1: | |
return [q, v, p]; | |
case 2: | |
return [p, v, t]; | |
case 3: | |
return [p, q, v]; | |
case 4: | |
return [t, p, v]; | |
case 5: | |
return [v, p, q]; | |
} | |
}; | |
convert.hsv.hsl = function (hsv) { | |
var h = hsv[0]; | |
var s = hsv[1] / 100; | |
var v = hsv[2] / 100; | |
var vmin = Math.max(v, 0.01); | |
var lmin; | |
var sl; | |
var l; | |
l = (2 - s) * v; | |
lmin = (2 - s) * vmin; | |
sl = s * vmin; | |
sl /= (lmin <= 1) ? lmin : 2 - lmin; | |
sl = sl || 0; | |
l /= 2; | |
return [h, sl * 100, l * 100]; | |
}; | |
// http://dev.w3.org/csswg/css-color/#hwb-to-rgb | |
convert.hwb.rgb = function (hwb) { | |
var h = hwb[0] / 360; | |
var wh = hwb[1] / 100; | |
var bl = hwb[2] / 100; | |
var ratio = wh + bl; | |
var i; | |
var v; | |
var f; | |
var n; | |
// wh + bl cant be > 1 | |
if (ratio > 1) { | |
wh /= ratio; | |
bl /= ratio; | |
} | |
i = Math.floor(6 * h); | |
v = 1 - bl; | |
f = 6 * h - i; | |
if ((i & 0x01) !== 0) { | |
f = 1 - f; | |
} | |
n = wh + f * (v - wh); // linear interpolation | |
var r; | |
var g; | |
var b; | |
switch (i) { | |
default: | |
case 6: | |
case 0: r = v; g = n; b = wh; break; | |
case 1: r = n; g = v; b = wh; break; | |
case 2: r = wh; g = v; b = n; break; | |
case 3: r = wh; g = n; b = v; break; | |
case 4: r = n; g = wh; b = v; break; | |
case 5: r = v; g = wh; b = n; break; | |
} | |
return [r * 255, g * 255, b * 255]; | |
}; | |
convert.cmyk.rgb = function (cmyk) { | |
var c = cmyk[0] / 100; | |
var m = cmyk[1] / 100; | |
var y = cmyk[2] / 100; | |
var k = cmyk[3] / 100; | |
var r; | |
var g; | |
var b; | |
r = 1 - Math.min(1, c * (1 - k) + k); | |
g = 1 - Math.min(1, m * (1 - k) + k); | |
b = 1 - Math.min(1, y * (1 - k) + k); | |
return [r * 255, g * 255, b * 255]; | |
}; | |
convert.xyz.rgb = function (xyz) { | |
var x = xyz[0] / 100; | |
var y = xyz[1] / 100; | |
var z = xyz[2] / 100; | |
var r; | |
var g; | |
var b; | |
r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); | |
g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); | |
b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); | |
// assume sRGB | |
r = r > 0.0031308 | |
? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) | |
: r * 12.92; | |
g = g > 0.0031308 | |
? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) | |
: g * 12.92; | |
b = b > 0.0031308 | |
? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) | |
: b * 12.92; | |
r = Math.min(Math.max(0, r), 1); | |
g = Math.min(Math.max(0, g), 1); | |
b = Math.min(Math.max(0, b), 1); | |
return [r * 255, g * 255, b * 255]; | |
}; | |
convert.xyz.lab = function (xyz) { | |
var x = xyz[0]; | |
var y = xyz[1]; | |
var z = xyz[2]; | |
var l; | |
var a; | |
var b; | |
x /= 95.047; | |
y /= 100; | |
z /= 108.883; | |
x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); | |
y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); | |
z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); | |
l = (116 * y) - 16; | |
a = 500 * (x - y); | |
b = 200 * (y - z); | |
return [l, a, b]; | |
}; | |
convert.lab.xyz = function (lab) { | |
var l = lab[0]; | |
var a = lab[1]; | |
var b = lab[2]; | |
var x; | |
var y; | |
var z; | |
y = (l + 16) / 116; | |
x = a / 500 + y; | |
z = y - b / 200; | |
var y2 = Math.pow(y, 3); | |
var x2 = Math.pow(x, 3); | |
var z2 = Math.pow(z, 3); | |
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; | |
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; | |
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; | |
x *= 95.047; | |
y *= 100; | |
z *= 108.883; | |
return [x, y, z]; | |
}; | |
convert.lab.lch = function (lab) { | |
var l = lab[0]; | |
var a = lab[1]; | |
var b = lab[2]; | |
var hr; | |
var h; | |
var c; | |
hr = Math.atan2(b, a); | |
h = hr * 360 / 2 / Math.PI; | |
if (h < 0) { | |
h += 360; | |
} | |
c = Math.sqrt(a * a + b * b); | |
return [l, c, h]; | |
}; | |
convert.lch.lab = function (lch) { | |
var l = lch[0]; | |
var c = lch[1]; | |
var h = lch[2]; | |
var a; | |
var b; | |
var hr; | |
hr = h / 360 * 2 * Math.PI; | |
a = c * Math.cos(hr); | |
b = c * Math.sin(hr); | |
return [l, a, b]; | |
}; | |
convert.rgb.ansi16 = function (args) { | |
var r = args[0]; | |
var g = args[1]; | |
var b = args[2]; | |
var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization | |
value = Math.round(value / 50); | |
if (value === 0) { | |
return 30; | |
} | |
var ansi = 30 | |
+ ((Math.round(b / 255) << 2) | |
| (Math.round(g / 255) << 1) | |
| Math.round(r / 255)); | |
if (value === 2) { | |
ansi += 60; | |
} | |
return ansi; | |
}; | |
convert.hsv.ansi16 = function (args) { | |
// optimization here; we already know the value and don't need to get | |
// it converted for us. | |
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); | |
}; | |
convert.rgb.ansi256 = function (args) { | |
var r = args[0]; | |
var g = args[1]; | |
var b = args[2]; | |
// we use the extended greyscale palette here, with the exception of | |
// black and white. normal palette only has 4 greyscale shades. | |
if (r === g && g === b) { | |
if (r < 8) { | |
return 16; | |
} | |
if (r > 248) { | |
return 231; | |
} | |
return Math.round(((r - 8) / 247) * 24) + 232; | |
} | |
var ansi = 16 | |
+ (36 * Math.round(r / 255 * 5)) | |
+ (6 * Math.round(g / 255 * 5)) | |
+ Math.round(b / 255 * 5); | |
return ansi; | |
}; | |
convert.ansi16.rgb = function (args) { | |
var color = args % 10; | |
// handle greyscale | |
if (color === 0 || color === 7) { | |
if (args > 50) { | |
color += 3.5; | |
} | |
color = color / 10.5 * 255; | |
return [color, color, color]; | |
} | |
var mult = (~~(args > 50) + 1) * 0.5; | |
var r = ((color & 1) * mult) * 255; | |
var g = (((color >> 1) & 1) * mult) * 255; | |
var b = (((color >> 2) & 1) * mult) * 255; | |
return [r, g, b]; | |
}; | |
convert.ansi256.rgb = function (args) { | |
// handle greyscale | |
if (args >= 232) { | |
var c = (args - 232) * 10 + 8; | |
return [c, c, c]; | |
} | |
args -= 16; | |
var rem; | |
var r = Math.floor(args / 36) / 5 * 255; | |
var g = Math.floor((rem = args % 36) / 6) / 5 * 255; | |
var b = (rem % 6) / 5 * 255; | |
return [r, g, b]; | |
}; | |
convert.rgb.hex = function (args) { | |
var integer = ((Math.round(args[0]) & 0xFF) << 16) | |
+ ((Math.round(args[1]) & 0xFF) << 8) | |
+ (Math.round(args[2]) & 0xFF); | |
var string = integer.toString(16).toUpperCase(); | |
return '000000'.substring(string.length) + string; | |
}; | |
convert.hex.rgb = function (args) { | |
var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); | |
if (!match) { | |
return [0, 0, 0]; | |
} | |
var colorString = match[0]; | |
if (match[0].length === 3) { | |
colorString = colorString.split('').map(function (char) { | |
return char + char; | |
}).join(''); | |
} | |
var integer = parseInt(colorString, 16); | |
var r = (integer >> 16) & 0xFF; | |
var g = (integer >> 8) & 0xFF; | |
var b = integer & 0xFF; | |
return [r, g, b]; | |
}; | |
convert.rgb.hcg = function (rgb) { | |
var r = rgb[0] / 255; | |
var g = rgb[1] / 255; | |
var b = rgb[2] / 255; | |
var max = Math.max(Math.max(r, g), b); | |
var min = Math.min(Math.min(r, g), b); | |
var chroma = (max - min); | |
var grayscale; | |
var hue; | |
if (chroma < 1) { | |
grayscale = min / (1 - chroma); | |
} else { | |
grayscale = 0; | |
} | |
if (chroma <= 0) { | |
hue = 0; | |
} else | |
if (max === r) { | |
hue = ((g - b) / chroma) % 6; | |
} else | |
if (max === g) { | |
hue = 2 + (b - r) / chroma; | |
} else { | |
hue = 4 + (r - g) / chroma + 4; | |
} | |
hue /= 6; | |
hue %= 1; | |
return [hue * 360, chroma * 100, grayscale * 100]; | |
}; | |
convert.hsl.hcg = function (hsl) { | |
var s = hsl[1] / 100; | |
var l = hsl[2] / 100; | |
var c = 1; | |
var f = 0; | |
if (l < 0.5) { | |
c = 2.0 * s * l; | |
} else { | |
c = 2.0 * s * (1.0 - l); | |
} | |
if (c < 1.0) { | |
f = (l - 0.5 * c) / (1.0 - c); | |
} | |
return [hsl[0], c * 100, f * 100]; | |
}; | |
convert.hsv.hcg = function (hsv) { | |
var s = hsv[1] / 100; | |
var v = hsv[2] / 100; | |
var c = s * v; | |
var f = 0; | |
if (c < 1.0) { | |
f = (v - c) / (1 - c); | |
} | |
return [hsv[0], c * 100, f * 100]; | |
}; | |
convert.hcg.rgb = function (hcg) { | |
var h = hcg[0] / 360; | |
var c = hcg[1] / 100; | |
var g = hcg[2] / 100; | |
if (c === 0.0) { | |
return [g * 255, g * 255, g * 255]; | |
} | |
var pure = [0, 0, 0]; | |
var hi = (h % 1) * 6; | |
var v = hi % 1; | |
var w = 1 - v; | |
var mg = 0; | |
switch (Math.floor(hi)) { | |
case 0: | |
pure[0] = 1; pure[1] = v; pure[2] = 0; break; | |
case 1: | |
pure[0] = w; pure[1] = 1; pure[2] = 0; break; | |
case 2: | |
pure[0] = 0; pure[1] = 1; pure[2] = v; break; | |
case 3: | |
pure[0] = 0; pure[1] = w; pure[2] = 1; break; | |
case 4: | |
pure[0] = v; pure[1] = 0; pure[2] = 1; break; | |
default: | |
pure[0] = 1; pure[1] = 0; pure[2] = w; | |
} | |
mg = (1.0 - c) * g; | |
return [ | |
(c * pure[0] + mg) * 255, | |
(c * pure[1] + mg) * 255, | |
(c * pure[2] + mg) * 255 | |
]; | |
}; | |
convert.hcg.hsv = function (hcg) { | |
var c = hcg[1] / 100; | |
var g = hcg[2] / 100; | |
var v = c + g * (1.0 - c); | |
var f = 0; | |
if (v > 0.0) { | |
f = c / v; | |
} | |
return [hcg[0], f * 100, v * 100]; | |
}; | |
convert.hcg.hsl = function (hcg) { | |
var c = hcg[1] / 100; | |
var g = hcg[2] / 100; | |
var l = g * (1.0 - c) + 0.5 * c; | |
var s = 0; | |
if (l > 0.0 && l < 0.5) { | |
s = c / (2 * l); | |
} else | |
if (l >= 0.5 && l < 1.0) { | |
s = c / (2 * (1 - l)); | |
} | |
return [hcg[0], s * 100, l * 100]; | |
}; | |
convert.hcg.hwb = function (hcg) { | |
var c = hcg[1] / 100; | |
var g = hcg[2] / 100; | |
var v = c + g * (1.0 - c); | |
return [hcg[0], (v - c) * 100, (1 - v) * 100]; | |
}; | |
convert.hwb.hcg = function (hwb) { | |
var w = hwb[1] / 100; | |
var b = hwb[2] / 100; | |
var v = 1 - b; | |
var c = v - w; | |
var g = 0; | |
if (c < 1) { | |
g = (v - c) / (1 - c); | |
} | |
return [hwb[0], c * 100, g * 100]; | |
}; | |
convert.apple.rgb = function (apple) { | |
return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; | |
}; | |
convert.rgb.apple = function (rgb) { | |
return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; | |
}; | |
convert.gray.rgb = function (args) { | |
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; | |
}; | |
convert.gray.hsl = convert.gray.hsv = function (args) { | |
return [0, 0, args[0]]; | |
}; | |
convert.gray.hwb = function (gray) { | |
return [0, 100, gray[0]]; | |
}; | |
convert.gray.cmyk = function (gray) { | |
return [0, 0, 0, gray[0]]; | |
}; | |
convert.gray.lab = function (gray) { | |
return [gray[0], 0, 0]; | |
}; | |
convert.gray.hex = function (gray) { | |
var val = Math.round(gray[0] / 100 * 255) & 0xFF; | |
var integer = (val << 16) + (val << 8) + val; | |
var string = integer.toString(16).toUpperCase(); | |
return '000000'.substring(string.length) + string; | |
}; | |
convert.rgb.gray = function (rgb) { | |
var val = (rgb[0] + rgb[1] + rgb[2]) / 3; | |
return [val / 255 * 100]; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/index.js": | |
/*!**********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color-convert/index.js ***! | |
\**********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var conversions = __webpack_require__(/*! ./conversions */ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/conversions.js"); | |
var route = __webpack_require__(/*! ./route */ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/route.js"); | |
var convert = {}; | |
var models = Object.keys(conversions); | |
function wrapRaw(fn) { | |
var wrappedFn = function (args) { | |
if (args === undefined || args === null) { | |
return args; | |
} | |
if (arguments.length > 1) { | |
args = Array.prototype.slice.call(arguments); | |
} | |
return fn(args); | |
}; | |
// preserve .conversion property if there is one | |
if ('conversion' in fn) { | |
wrappedFn.conversion = fn.conversion; | |
} | |
return wrappedFn; | |
} | |
function wrapRounded(fn) { | |
var wrappedFn = function (args) { | |
if (args === undefined || args === null) { | |
return args; | |
} | |
if (arguments.length > 1) { | |
args = Array.prototype.slice.call(arguments); | |
} | |
var result = fn(args); | |
// we're assuming the result is an array here. | |
// see notice in conversions.js; don't use box types | |
// in conversion functions. | |
if (typeof result === 'object') { | |
for (var len = result.length, i = 0; i < len; i++) { | |
result[i] = Math.round(result[i]); | |
} | |
} | |
return result; | |
}; | |
// preserve .conversion property if there is one | |
if ('conversion' in fn) { | |
wrappedFn.conversion = fn.conversion; | |
} | |
return wrappedFn; | |
} | |
models.forEach(function (fromModel) { | |
convert[fromModel] = {}; | |
Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); | |
Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); | |
var routes = route(fromModel); | |
var routeModels = Object.keys(routes); | |
routeModels.forEach(function (toModel) { | |
var fn = routes[toModel]; | |
convert[fromModel][toModel] = wrapRounded(fn); | |
convert[fromModel][toModel].raw = wrapRaw(fn); | |
}); | |
}); | |
module.exports = convert; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/route.js": | |
/*!**********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color-convert/route.js ***! | |
\**********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var conversions = __webpack_require__(/*! ./conversions */ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/conversions.js"); | |
/* | |
this function routes a model to all other models. | |
all functions that are routed have a property `.conversion` attached | |
to the returned synthetic function. This property is an array | |
of strings, each with the steps in between the 'from' and 'to' | |
color models (inclusive). | |
conversions that are not possible simply are not included. | |
*/ | |
function buildGraph() { | |
var graph = {}; | |
// https://jsperf.com/object-keys-vs-for-in-with-closure/3 | |
var models = Object.keys(conversions); | |
for (var len = models.length, i = 0; i < len; i++) { | |
graph[models[i]] = { | |
// http://jsperf.com/1-vs-infinity | |
// micro-opt, but this is simple. | |
distance: -1, | |
parent: null | |
}; | |
} | |
return graph; | |
} | |
// https://en.wikipedia.org/wiki/Breadth-first_search | |
function deriveBFS(fromModel) { | |
var graph = buildGraph(); | |
var queue = [fromModel]; // unshift -> queue -> pop | |
graph[fromModel].distance = 0; | |
while (queue.length) { | |
var current = queue.pop(); | |
var adjacents = Object.keys(conversions[current]); | |
for (var len = adjacents.length, i = 0; i < len; i++) { | |
var adjacent = adjacents[i]; | |
var node = graph[adjacent]; | |
if (node.distance === -1) { | |
node.distance = graph[current].distance + 1; | |
node.parent = current; | |
queue.unshift(adjacent); | |
} | |
} | |
} | |
return graph; | |
} | |
function link(from, to) { | |
return function (args) { | |
return to(from(args)); | |
}; | |
} | |
function wrapConversion(toModel, graph) { | |
var path = [graph[toModel].parent, toModel]; | |
var fn = conversions[graph[toModel].parent][toModel]; | |
var cur = graph[toModel].parent; | |
while (graph[cur].parent) { | |
path.unshift(graph[cur].parent); | |
fn = link(conversions[graph[cur].parent][cur], fn); | |
cur = graph[cur].parent; | |
} | |
fn.conversion = path; | |
return fn; | |
} | |
module.exports = function (fromModel) { | |
var graph = deriveBFS(fromModel); | |
var conversion = {}; | |
var models = Object.keys(graph); | |
for (var len = models.length, i = 0; i < len; i++) { | |
var toModel = models[i]; | |
var node = graph[toModel]; | |
if (node.parent === null) { | |
// no possible conversion, or this node is the source model. | |
continue; | |
} | |
conversion[toModel] = wrapConversion(toModel, graph); | |
} | |
return conversion; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color-name/index.js": | |
/*!*******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color-name/index.js ***! | |
\*******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
module.exports = { | |
"aliceblue": [240, 248, 255], | |
"antiquewhite": [250, 235, 215], | |
"aqua": [0, 255, 255], | |
"aquamarine": [127, 255, 212], | |
"azure": [240, 255, 255], | |
"beige": [245, 245, 220], | |
"bisque": [255, 228, 196], | |
"black": [0, 0, 0], | |
"blanchedalmond": [255, 235, 205], | |
"blue": [0, 0, 255], | |
"blueviolet": [138, 43, 226], | |
"brown": [165, 42, 42], | |
"burlywood": [222, 184, 135], | |
"cadetblue": [95, 158, 160], | |
"chartreuse": [127, 255, 0], | |
"chocolate": [210, 105, 30], | |
"coral": [255, 127, 80], | |
"cornflowerblue": [100, 149, 237], | |
"cornsilk": [255, 248, 220], | |
"crimson": [220, 20, 60], | |
"cyan": [0, 255, 255], | |
"darkblue": [0, 0, 139], | |
"darkcyan": [0, 139, 139], | |
"darkgoldenrod": [184, 134, 11], | |
"darkgray": [169, 169, 169], | |
"darkgreen": [0, 100, 0], | |
"darkgrey": [169, 169, 169], | |
"darkkhaki": [189, 183, 107], | |
"darkmagenta": [139, 0, 139], | |
"darkolivegreen": [85, 107, 47], | |
"darkorange": [255, 140, 0], | |
"darkorchid": [153, 50, 204], | |
"darkred": [139, 0, 0], | |
"darksalmon": [233, 150, 122], | |
"darkseagreen": [143, 188, 143], | |
"darkslateblue": [72, 61, 139], | |
"darkslategray": [47, 79, 79], | |
"darkslategrey": [47, 79, 79], | |
"darkturquoise": [0, 206, 209], | |
"darkviolet": [148, 0, 211], | |
"deeppink": [255, 20, 147], | |
"deepskyblue": [0, 191, 255], | |
"dimgray": [105, 105, 105], | |
"dimgrey": [105, 105, 105], | |
"dodgerblue": [30, 144, 255], | |
"firebrick": [178, 34, 34], | |
"floralwhite": [255, 250, 240], | |
"forestgreen": [34, 139, 34], | |
"fuchsia": [255, 0, 255], | |
"gainsboro": [220, 220, 220], | |
"ghostwhite": [248, 248, 255], | |
"gold": [255, 215, 0], | |
"goldenrod": [218, 165, 32], | |
"gray": [128, 128, 128], | |
"green": [0, 128, 0], | |
"greenyellow": [173, 255, 47], | |
"grey": [128, 128, 128], | |
"honeydew": [240, 255, 240], | |
"hotpink": [255, 105, 180], | |
"indianred": [205, 92, 92], | |
"indigo": [75, 0, 130], | |
"ivory": [255, 255, 240], | |
"khaki": [240, 230, 140], | |
"lavender": [230, 230, 250], | |
"lavenderblush": [255, 240, 245], | |
"lawngreen": [124, 252, 0], | |
"lemonchiffon": [255, 250, 205], | |
"lightblue": [173, 216, 230], | |
"lightcoral": [240, 128, 128], | |
"lightcyan": [224, 255, 255], | |
"lightgoldenrodyellow": [250, 250, 210], | |
"lightgray": [211, 211, 211], | |
"lightgreen": [144, 238, 144], | |
"lightgrey": [211, 211, 211], | |
"lightpink": [255, 182, 193], | |
"lightsalmon": [255, 160, 122], | |
"lightseagreen": [32, 178, 170], | |
"lightskyblue": [135, 206, 250], | |
"lightslategray": [119, 136, 153], | |
"lightslategrey": [119, 136, 153], | |
"lightsteelblue": [176, 196, 222], | |
"lightyellow": [255, 255, 224], | |
"lime": [0, 255, 0], | |
"limegreen": [50, 205, 50], | |
"linen": [250, 240, 230], | |
"magenta": [255, 0, 255], | |
"maroon": [128, 0, 0], | |
"mediumaquamarine": [102, 205, 170], | |
"mediumblue": [0, 0, 205], | |
"mediumorchid": [186, 85, 211], | |
"mediumpurple": [147, 112, 219], | |
"mediumseagreen": [60, 179, 113], | |
"mediumslateblue": [123, 104, 238], | |
"mediumspringgreen": [0, 250, 154], | |
"mediumturquoise": [72, 209, 204], | |
"mediumvioletred": [199, 21, 133], | |
"midnightblue": [25, 25, 112], | |
"mintcream": [245, 255, 250], | |
"mistyrose": [255, 228, 225], | |
"moccasin": [255, 228, 181], | |
"navajowhite": [255, 222, 173], | |
"navy": [0, 0, 128], | |
"oldlace": [253, 245, 230], | |
"olive": [128, 128, 0], | |
"olivedrab": [107, 142, 35], | |
"orange": [255, 165, 0], | |
"orangered": [255, 69, 0], | |
"orchid": [218, 112, 214], | |
"palegoldenrod": [238, 232, 170], | |
"palegreen": [152, 251, 152], | |
"paleturquoise": [175, 238, 238], | |
"palevioletred": [219, 112, 147], | |
"papayawhip": [255, 239, 213], | |
"peachpuff": [255, 218, 185], | |
"peru": [205, 133, 63], | |
"pink": [255, 192, 203], | |
"plum": [221, 160, 221], | |
"powderblue": [176, 224, 230], | |
"purple": [128, 0, 128], | |
"rebeccapurple": [102, 51, 153], | |
"red": [255, 0, 0], | |
"rosybrown": [188, 143, 143], | |
"royalblue": [65, 105, 225], | |
"saddlebrown": [139, 69, 19], | |
"salmon": [250, 128, 114], | |
"sandybrown": [244, 164, 96], | |
"seagreen": [46, 139, 87], | |
"seashell": [255, 245, 238], | |
"sienna": [160, 82, 45], | |
"silver": [192, 192, 192], | |
"skyblue": [135, 206, 235], | |
"slateblue": [106, 90, 205], | |
"slategray": [112, 128, 144], | |
"slategrey": [112, 128, 144], | |
"snow": [255, 250, 250], | |
"springgreen": [0, 255, 127], | |
"steelblue": [70, 130, 180], | |
"tan": [210, 180, 140], | |
"teal": [0, 128, 128], | |
"thistle": [216, 191, 216], | |
"tomato": [255, 99, 71], | |
"turquoise": [64, 224, 208], | |
"violet": [238, 130, 238], | |
"wheat": [245, 222, 179], | |
"white": [255, 255, 255], | |
"whitesmoke": [245, 245, 245], | |
"yellow": [255, 255, 0], | |
"yellowgreen": [154, 205, 50] | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color-string/index.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color-string/index.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
/* MIT license */ | |
var colorNames = __webpack_require__(/*! color-name */ "../fabric8-analytics-lsp-server/output/node_modules/color-name/index.js"); | |
var swizzle = __webpack_require__(/*! simple-swizzle */ "../fabric8-analytics-lsp-server/output/node_modules/simple-swizzle/index.js"); | |
var reverseNames = {}; | |
// create a list of reverse color names | |
for (var name in colorNames) { | |
if (colorNames.hasOwnProperty(name)) { | |
reverseNames[colorNames[name]] = name; | |
} | |
} | |
var cs = module.exports = { | |
to: {}, | |
get: {} | |
}; | |
cs.get = function (string) { | |
var prefix = string.substring(0, 3).toLowerCase(); | |
var val; | |
var model; | |
switch (prefix) { | |
case 'hsl': | |
val = cs.get.hsl(string); | |
model = 'hsl'; | |
break; | |
case 'hwb': | |
val = cs.get.hwb(string); | |
model = 'hwb'; | |
break; | |
default: | |
val = cs.get.rgb(string); | |
model = 'rgb'; | |
break; | |
} | |
if (!val) { | |
return null; | |
} | |
return {model: model, value: val}; | |
}; | |
cs.get.rgb = function (string) { | |
if (!string) { | |
return null; | |
} | |
var abbr = /^#([a-f0-9]{3,4})$/i; | |
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; | |
var rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | |
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | |
var keyword = /(\D+)/; | |
var rgb = [0, 0, 0, 1]; | |
var match; | |
var i; | |
var hexAlpha; | |
if (match = string.match(hex)) { | |
hexAlpha = match[2]; | |
match = match[1]; | |
for (i = 0; i < 3; i++) { | |
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 | |
var i2 = i * 2; | |
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); | |
} | |
if (hexAlpha) { | |
rgb[3] = parseInt(hexAlpha, 16) / 255; | |
} | |
} else if (match = string.match(abbr)) { | |
match = match[1]; | |
hexAlpha = match[3]; | |
for (i = 0; i < 3; i++) { | |
rgb[i] = parseInt(match[i] + match[i], 16); | |
} | |
if (hexAlpha) { | |
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; | |
} | |
} else if (match = string.match(rgba)) { | |
for (i = 0; i < 3; i++) { | |
rgb[i] = parseInt(match[i + 1], 0); | |
} | |
if (match[4]) { | |
rgb[3] = parseFloat(match[4]); | |
} | |
} else if (match = string.match(per)) { | |
for (i = 0; i < 3; i++) { | |
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); | |
} | |
if (match[4]) { | |
rgb[3] = parseFloat(match[4]); | |
} | |
} else if (match = string.match(keyword)) { | |
if (match[1] === 'transparent') { | |
return [0, 0, 0, 0]; | |
} | |
rgb = colorNames[match[1]]; | |
if (!rgb) { | |
return null; | |
} | |
rgb[3] = 1; | |
return rgb; | |
} else { | |
return null; | |
} | |
for (i = 0; i < 3; i++) { | |
rgb[i] = clamp(rgb[i], 0, 255); | |
} | |
rgb[3] = clamp(rgb[3], 0, 1); | |
return rgb; | |
}; | |
cs.get.hsl = function (string) { | |
if (!string) { | |
return null; | |
} | |
var hsl = /^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | |
var match = string.match(hsl); | |
if (match) { | |
var alpha = parseFloat(match[4]); | |
var h = (parseFloat(match[1]) + 360) % 360; | |
var s = clamp(parseFloat(match[2]), 0, 100); | |
var l = clamp(parseFloat(match[3]), 0, 100); | |
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); | |
return [h, s, l, a]; | |
} | |
return null; | |
}; | |
cs.get.hwb = function (string) { | |
if (!string) { | |
return null; | |
} | |
var hwb = /^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/; | |
var match = string.match(hwb); | |
if (match) { | |
var alpha = parseFloat(match[4]); | |
var h = ((parseFloat(match[1]) % 360) + 360) % 360; | |
var w = clamp(parseFloat(match[2]), 0, 100); | |
var b = clamp(parseFloat(match[3]), 0, 100); | |
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); | |
return [h, w, b, a]; | |
} | |
return null; | |
}; | |
cs.to.hex = function () { | |
var rgba = swizzle(arguments); | |
return ( | |
'#' + | |
hexDouble(rgba[0]) + | |
hexDouble(rgba[1]) + | |
hexDouble(rgba[2]) + | |
(rgba[3] < 1 | |
? (hexDouble(Math.round(rgba[3] * 255))) | |
: '') | |
); | |
}; | |
cs.to.rgb = function () { | |
var rgba = swizzle(arguments); | |
return rgba.length < 4 || rgba[3] === 1 | |
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' | |
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; | |
}; | |
cs.to.rgb.percent = function () { | |
var rgba = swizzle(arguments); | |
var r = Math.round(rgba[0] / 255 * 100); | |
var g = Math.round(rgba[1] / 255 * 100); | |
var b = Math.round(rgba[2] / 255 * 100); | |
return rgba.length < 4 || rgba[3] === 1 | |
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' | |
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; | |
}; | |
cs.to.hsl = function () { | |
var hsla = swizzle(arguments); | |
return hsla.length < 4 || hsla[3] === 1 | |
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' | |
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; | |
}; | |
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax | |
// (hwb have alpha optional & 1 is default value) | |
cs.to.hwb = function () { | |
var hwba = swizzle(arguments); | |
var a = ''; | |
if (hwba.length >= 4 && hwba[3] !== 1) { | |
a = ', ' + hwba[3]; | |
} | |
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; | |
}; | |
cs.to.keyword = function (rgb) { | |
return reverseNames[rgb.slice(0, 3)]; | |
}; | |
// helpers | |
function clamp(num, min, max) { | |
return Math.min(Math.max(min, num), max); | |
} | |
function hexDouble(num) { | |
var str = num.toString(16).toUpperCase(); | |
return (str.length < 2) ? '0' + str : str; | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/color/index.js": | |
/*!**************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/color/index.js ***! | |
\**************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var colorString = __webpack_require__(/*! color-string */ "../fabric8-analytics-lsp-server/output/node_modules/color-string/index.js"); | |
var convert = __webpack_require__(/*! color-convert */ "../fabric8-analytics-lsp-server/output/node_modules/color-convert/index.js"); | |
var _slice = [].slice; | |
var skippedModels = [ | |
// to be honest, I don't really feel like keyword belongs in color convert, but eh. | |
'keyword', | |
// gray conflicts with some method names, and has its own method defined. | |
'gray', | |
// shouldn't really be in color-convert either... | |
'hex' | |
]; | |
var hashedModelKeys = {}; | |
Object.keys(convert).forEach(function (model) { | |
hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; | |
}); | |
var limiters = {}; | |
function Color(obj, model) { | |
if (!(this instanceof Color)) { | |
return new Color(obj, model); | |
} | |
if (model && model in skippedModels) { | |
model = null; | |
} | |
if (model && !(model in convert)) { | |
throw new Error('Unknown model: ' + model); | |
} | |
var i; | |
var channels; | |
if (!obj) { | |
this.model = 'rgb'; | |
this.color = [0, 0, 0]; | |
this.valpha = 1; | |
} else if (obj instanceof Color) { | |
this.model = obj.model; | |
this.color = obj.color.slice(); | |
this.valpha = obj.valpha; | |
} else if (typeof obj === 'string') { | |
var result = colorString.get(obj); | |
if (result === null) { | |
throw new Error('Unable to parse color from string: ' + obj); | |
} | |
this.model = result.model; | |
channels = convert[this.model].channels; | |
this.color = result.value.slice(0, channels); | |
this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; | |
} else if (obj.length) { | |
this.model = model || 'rgb'; | |
channels = convert[this.model].channels; | |
var newArr = _slice.call(obj, 0, channels); | |
this.color = zeroArray(newArr, channels); | |
this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; | |
} else if (typeof obj === 'number') { | |
// this is always RGB - can be converted later on. | |
obj &= 0xFFFFFF; | |
this.model = 'rgb'; | |
this.color = [ | |
(obj >> 16) & 0xFF, | |
(obj >> 8) & 0xFF, | |
obj & 0xFF | |
]; | |
this.valpha = 1; | |
} else { | |
this.valpha = 1; | |
var keys = Object.keys(obj); | |
if ('alpha' in obj) { | |
keys.splice(keys.indexOf('alpha'), 1); | |
this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; | |
} | |
var hashedKeys = keys.sort().join(''); | |
if (!(hashedKeys in hashedModelKeys)) { | |
throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); | |
} | |
this.model = hashedModelKeys[hashedKeys]; | |
var labels = convert[this.model].labels; | |
var color = []; | |
for (i = 0; i < labels.length; i++) { | |
color.push(obj[labels[i]]); | |
} | |
this.color = zeroArray(color); | |
} | |
// perform limitations (clamping, etc.) | |
if (limiters[this.model]) { | |
channels = convert[this.model].channels; | |
for (i = 0; i < channels; i++) { | |
var limit = limiters[this.model][i]; | |
if (limit) { | |
this.color[i] = limit(this.color[i]); | |
} | |
} | |
} | |
this.valpha = Math.max(0, Math.min(1, this.valpha)); | |
if (Object.freeze) { | |
Object.freeze(this); | |
} | |
} | |
Color.prototype = { | |
toString: function () { | |
return this.string(); | |
}, | |
toJSON: function () { | |
return this[this.model](); | |
}, | |
string: function (places) { | |
var self = this.model in colorString.to ? this : this.rgb(); | |
self = self.round(typeof places === 'number' ? places : 1); | |
var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); | |
return colorString.to[self.model](args); | |
}, | |
percentString: function (places) { | |
var self = this.rgb().round(typeof places === 'number' ? places : 1); | |
var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); | |
return colorString.to.rgb.percent(args); | |
}, | |
array: function () { | |
return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); | |
}, | |
object: function () { | |
var result = {}; | |
var channels = convert[this.model].channels; | |
var labels = convert[this.model].labels; | |
for (var i = 0; i < channels; i++) { | |
result[labels[i]] = this.color[i]; | |
} | |
if (this.valpha !== 1) { | |
result.alpha = this.valpha; | |
} | |
return result; | |
}, | |
unitArray: function () { | |
var rgb = this.rgb().color; | |
rgb[0] /= 255; | |
rgb[1] /= 255; | |
rgb[2] /= 255; | |
if (this.valpha !== 1) { | |
rgb.push(this.valpha); | |
} | |
return rgb; | |
}, | |
unitObject: function () { | |
var rgb = this.rgb().object(); | |
rgb.r /= 255; | |
rgb.g /= 255; | |
rgb.b /= 255; | |
if (this.valpha !== 1) { | |
rgb.alpha = this.valpha; | |
} | |
return rgb; | |
}, | |
round: function (places) { | |
places = Math.max(places || 0, 0); | |
return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); | |
}, | |
alpha: function (val) { | |
if (arguments.length) { | |
return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); | |
} | |
return this.valpha; | |
}, | |
// rgb | |
red: getset('rgb', 0, maxfn(255)), | |
green: getset('rgb', 1, maxfn(255)), | |
blue: getset('rgb', 2, maxfn(255)), | |
hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style | |
saturationl: getset('hsl', 1, maxfn(100)), | |
lightness: getset('hsl', 2, maxfn(100)), | |
saturationv: getset('hsv', 1, maxfn(100)), | |
value: getset('hsv', 2, maxfn(100)), | |
chroma: getset('hcg', 1, maxfn(100)), | |
gray: getset('hcg', 2, maxfn(100)), | |
white: getset('hwb', 1, maxfn(100)), | |
wblack: getset('hwb', 2, maxfn(100)), | |
cyan: getset('cmyk', 0, maxfn(100)), | |
magenta: getset('cmyk', 1, maxfn(100)), | |
yellow: getset('cmyk', 2, maxfn(100)), | |
black: getset('cmyk', 3, maxfn(100)), | |
x: getset('xyz', 0, maxfn(100)), | |
y: getset('xyz', 1, maxfn(100)), | |
z: getset('xyz', 2, maxfn(100)), | |
l: getset('lab', 0, maxfn(100)), | |
a: getset('lab', 1), | |
b: getset('lab', 2), | |
keyword: function (val) { | |
if (arguments.length) { | |
return new Color(val); | |
} | |
return convert[this.model].keyword(this.color); | |
}, | |
hex: function (val) { | |
if (arguments.length) { | |
return new Color(val); | |
} | |
return colorString.to.hex(this.rgb().round().color); | |
}, | |
rgbNumber: function () { | |
var rgb = this.rgb().color; | |
return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); | |
}, | |
luminosity: function () { | |
// http://www.w3.org/TR/WCAG20/#relativeluminancedef | |
var rgb = this.rgb().color; | |
var lum = []; | |
for (var i = 0; i < rgb.length; i++) { | |
var chan = rgb[i] / 255; | |
lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); | |
} | |
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; | |
}, | |
contrast: function (color2) { | |
// http://www.w3.org/TR/WCAG20/#contrast-ratiodef | |
var lum1 = this.luminosity(); | |
var lum2 = color2.luminosity(); | |
if (lum1 > lum2) { | |
return (lum1 + 0.05) / (lum2 + 0.05); | |
} | |
return (lum2 + 0.05) / (lum1 + 0.05); | |
}, | |
level: function (color2) { | |
var contrastRatio = this.contrast(color2); | |
if (contrastRatio >= 7.1) { | |
return 'AAA'; | |
} | |
return (contrastRatio >= 4.5) ? 'AA' : ''; | |
}, | |
isDark: function () { | |
// YIQ equation from http://24ways.org/2010/calculating-color-contrast | |
var rgb = this.rgb().color; | |
var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; | |
return yiq < 128; | |
}, | |
isLight: function () { | |
return !this.isDark(); | |
}, | |
negate: function () { | |
var rgb = this.rgb(); | |
for (var i = 0; i < 3; i++) { | |
rgb.color[i] = 255 - rgb.color[i]; | |
} | |
return rgb; | |
}, | |
lighten: function (ratio) { | |
var hsl = this.hsl(); | |
hsl.color[2] += hsl.color[2] * ratio; | |
return hsl; | |
}, | |
darken: function (ratio) { | |
var hsl = this.hsl(); | |
hsl.color[2] -= hsl.color[2] * ratio; | |
return hsl; | |
}, | |
saturate: function (ratio) { | |
var hsl = this.hsl(); | |
hsl.color[1] += hsl.color[1] * ratio; | |
return hsl; | |
}, | |
desaturate: function (ratio) { | |
var hsl = this.hsl(); | |
hsl.color[1] -= hsl.color[1] * ratio; | |
return hsl; | |
}, | |
whiten: function (ratio) { | |
var hwb = this.hwb(); | |
hwb.color[1] += hwb.color[1] * ratio; | |
return hwb; | |
}, | |
blacken: function (ratio) { | |
var hwb = this.hwb(); | |
hwb.color[2] += hwb.color[2] * ratio; | |
return hwb; | |
}, | |
grayscale: function () { | |
// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale | |
var rgb = this.rgb().color; | |
var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; | |
return Color.rgb(val, val, val); | |
}, | |
fade: function (ratio) { | |
return this.alpha(this.valpha - (this.valpha * ratio)); | |
}, | |
opaquer: function (ratio) { | |
return this.alpha(this.valpha + (this.valpha * ratio)); | |
}, | |
rotate: function (degrees) { | |
var hsl = this.hsl(); | |
var hue = hsl.color[0]; | |
hue = (hue + degrees) % 360; | |
hue = hue < 0 ? 360 + hue : hue; | |
hsl.color[0] = hue; | |
return hsl; | |
}, | |
mix: function (mixinColor, weight) { | |
// ported from sass implementation in C | |
// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 | |
var color1 = mixinColor.rgb(); | |
var color2 = this.rgb(); | |
var p = weight === undefined ? 0.5 : weight; | |
var w = 2 * p - 1; | |
var a = color1.alpha() - color2.alpha(); | |
var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; | |
var w2 = 1 - w1; | |
return Color.rgb( | |
w1 * color1.red() + w2 * color2.red(), | |
w1 * color1.green() + w2 * color2.green(), | |
w1 * color1.blue() + w2 * color2.blue(), | |
color1.alpha() * p + color2.alpha() * (1 - p)); | |
} | |
}; | |
// model conversion methods and static constructors | |
Object.keys(convert).forEach(function (model) { | |
if (skippedModels.indexOf(model) !== -1) { | |
return; | |
} | |
var channels = convert[model].channels; | |
// conversion methods | |
Color.prototype[model] = function () { | |
if (this.model === model) { | |
return new Color(this); | |
} | |
if (arguments.length) { | |
return new Color(arguments, model); | |
} | |
var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; | |
return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); | |
}; | |
// 'static' construction methods | |
Color[model] = function (color) { | |
if (typeof color === 'number') { | |
color = zeroArray(_slice.call(arguments), channels); | |
} | |
return new Color(color, model); | |
}; | |
}); | |
function roundTo(num, places) { | |
return Number(num.toFixed(places)); | |
} | |
function roundToPlace(places) { | |
return function (num) { | |
return roundTo(num, places); | |
}; | |
} | |
function getset(model, channel, modifier) { | |
model = Array.isArray(model) ? model : [model]; | |
model.forEach(function (m) { | |
(limiters[m] || (limiters[m] = []))[channel] = modifier; | |
}); | |
model = model[0]; | |
return function (val) { | |
var result; | |
if (arguments.length) { | |
if (modifier) { | |
val = modifier(val); | |
} | |
result = this[model](); | |
result.color[channel] = val; | |
return result; | |
} | |
result = this[model]().color[channel]; | |
if (modifier) { | |
result = modifier(result); | |
} | |
return result; | |
}; | |
} | |
function maxfn(max) { | |
return function (v) { | |
return Math.max(0, Math.min(max, v)); | |
}; | |
} | |
function assertArray(val) { | |
return Array.isArray(val) ? val : [val]; | |
} | |
function zeroArray(arr, length) { | |
for (var i = 0; i < length; i++) { | |
if (typeof arr[i] !== 'number') { | |
arr[i] = 0; | |
} | |
} | |
return arr; | |
} | |
module.exports = Color; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colornames/colors.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colornames/colors.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module.exports = [ | |
{ | |
"value":"#B0171F", | |
"name":"indian red" | |
}, | |
{ | |
"value":"#DC143C", | |
"css":true, | |
"name":"crimson" | |
}, | |
{ | |
"value":"#FFB6C1", | |
"css":true, | |
"name":"lightpink" | |
}, | |
{ | |
"value":"#FFAEB9", | |
"name":"lightpink 1" | |
}, | |
{ | |
"value":"#EEA2AD", | |
"name":"lightpink 2" | |
}, | |
{ | |
"value":"#CD8C95", | |
"name":"lightpink 3" | |
}, | |
{ | |
"value":"#8B5F65", | |
"name":"lightpink 4" | |
}, | |
{ | |
"value":"#FFC0CB", | |
"css":true, | |
"name":"pink" | |
}, | |
{ | |
"value":"#FFB5C5", | |
"name":"pink 1" | |
}, | |
{ | |
"value":"#EEA9B8", | |
"name":"pink 2" | |
}, | |
{ | |
"value":"#CD919E", | |
"name":"pink 3" | |
}, | |
{ | |
"value":"#8B636C", | |
"name":"pink 4" | |
}, | |
{ | |
"value":"#DB7093", | |
"css":true, | |
"name":"palevioletred" | |
}, | |
{ | |
"value":"#FF82AB", | |
"name":"palevioletred 1" | |
}, | |
{ | |
"value":"#EE799F", | |
"name":"palevioletred 2" | |
}, | |
{ | |
"value":"#CD6889", | |
"name":"palevioletred 3" | |
}, | |
{ | |
"value":"#8B475D", | |
"name":"palevioletred 4" | |
}, | |
{ | |
"value":"#FFF0F5", | |
"name":"lavenderblush 1" | |
}, | |
{ | |
"value":"#FFF0F5", | |
"css":true, | |
"name":"lavenderblush" | |
}, | |
{ | |
"value":"#EEE0E5", | |
"name":"lavenderblush 2" | |
}, | |
{ | |
"value":"#CDC1C5", | |
"name":"lavenderblush 3" | |
}, | |
{ | |
"value":"#8B8386", | |
"name":"lavenderblush 4" | |
}, | |
{ | |
"value":"#FF3E96", | |
"name":"violetred 1" | |
}, | |
{ | |
"value":"#EE3A8C", | |
"name":"violetred 2" | |
}, | |
{ | |
"value":"#CD3278", | |
"name":"violetred 3" | |
}, | |
{ | |
"value":"#8B2252", | |
"name":"violetred 4" | |
}, | |
{ | |
"value":"#FF69B4", | |
"css":true, | |
"name":"hotpink" | |
}, | |
{ | |
"value":"#FF6EB4", | |
"name":"hotpink 1" | |
}, | |
{ | |
"value":"#EE6AA7", | |
"name":"hotpink 2" | |
}, | |
{ | |
"value":"#CD6090", | |
"name":"hotpink 3" | |
}, | |
{ | |
"value":"#8B3A62", | |
"name":"hotpink 4" | |
}, | |
{ | |
"value":"#872657", | |
"name":"raspberry" | |
}, | |
{ | |
"value":"#FF1493", | |
"name":"deeppink 1" | |
}, | |
{ | |
"value":"#FF1493", | |
"css":true, | |
"name":"deeppink" | |
}, | |
{ | |
"value":"#EE1289", | |
"name":"deeppink 2" | |
}, | |
{ | |
"value":"#CD1076", | |
"name":"deeppink 3" | |
}, | |
{ | |
"value":"#8B0A50", | |
"name":"deeppink 4" | |
}, | |
{ | |
"value":"#FF34B3", | |
"name":"maroon 1" | |
}, | |
{ | |
"value":"#EE30A7", | |
"name":"maroon 2" | |
}, | |
{ | |
"value":"#CD2990", | |
"name":"maroon 3" | |
}, | |
{ | |
"value":"#8B1C62", | |
"name":"maroon 4" | |
}, | |
{ | |
"value":"#C71585", | |
"css":true, | |
"name":"mediumvioletred" | |
}, | |
{ | |
"value":"#D02090", | |
"name":"violetred" | |
}, | |
{ | |
"value":"#DA70D6", | |
"css":true, | |
"name":"orchid" | |
}, | |
{ | |
"value":"#FF83FA", | |
"name":"orchid 1" | |
}, | |
{ | |
"value":"#EE7AE9", | |
"name":"orchid 2" | |
}, | |
{ | |
"value":"#CD69C9", | |
"name":"orchid 3" | |
}, | |
{ | |
"value":"#8B4789", | |
"name":"orchid 4" | |
}, | |
{ | |
"value":"#D8BFD8", | |
"css":true, | |
"name":"thistle" | |
}, | |
{ | |
"value":"#FFE1FF", | |
"name":"thistle 1" | |
}, | |
{ | |
"value":"#EED2EE", | |
"name":"thistle 2" | |
}, | |
{ | |
"value":"#CDB5CD", | |
"name":"thistle 3" | |
}, | |
{ | |
"value":"#8B7B8B", | |
"name":"thistle 4" | |
}, | |
{ | |
"value":"#FFBBFF", | |
"name":"plum 1" | |
}, | |
{ | |
"value":"#EEAEEE", | |
"name":"plum 2" | |
}, | |
{ | |
"value":"#CD96CD", | |
"name":"plum 3" | |
}, | |
{ | |
"value":"#8B668B", | |
"name":"plum 4" | |
}, | |
{ | |
"value":"#DDA0DD", | |
"css":true, | |
"name":"plum" | |
}, | |
{ | |
"value":"#EE82EE", | |
"css":true, | |
"name":"violet" | |
}, | |
{ | |
"value":"#FF00FF", | |
"vga":true, | |
"name":"magenta" | |
}, | |
{ | |
"value":"#FF00FF", | |
"vga":true, | |
"css":true, | |
"name":"fuchsia" | |
}, | |
{ | |
"value":"#EE00EE", | |
"name":"magenta 2" | |
}, | |
{ | |
"value":"#CD00CD", | |
"name":"magenta 3" | |
}, | |
{ | |
"value":"#8B008B", | |
"name":"magenta 4" | |
}, | |
{ | |
"value":"#8B008B", | |
"css":true, | |
"name":"darkmagenta" | |
}, | |
{ | |
"value":"#800080", | |
"vga":true, | |
"css":true, | |
"name":"purple" | |
}, | |
{ | |
"value":"#BA55D3", | |
"css":true, | |
"name":"mediumorchid" | |
}, | |
{ | |
"value":"#E066FF", | |
"name":"mediumorchid 1" | |
}, | |
{ | |
"value":"#D15FEE", | |
"name":"mediumorchid 2" | |
}, | |
{ | |
"value":"#B452CD", | |
"name":"mediumorchid 3" | |
}, | |
{ | |
"value":"#7A378B", | |
"name":"mediumorchid 4" | |
}, | |
{ | |
"value":"#9400D3", | |
"css":true, | |
"name":"darkviolet" | |
}, | |
{ | |
"value":"#9932CC", | |
"css":true, | |
"name":"darkorchid" | |
}, | |
{ | |
"value":"#BF3EFF", | |
"name":"darkorchid 1" | |
}, | |
{ | |
"value":"#B23AEE", | |
"name":"darkorchid 2" | |
}, | |
{ | |
"value":"#9A32CD", | |
"name":"darkorchid 3" | |
}, | |
{ | |
"value":"#68228B", | |
"name":"darkorchid 4" | |
}, | |
{ | |
"value":"#4B0082", | |
"css":true, | |
"name":"indigo" | |
}, | |
{ | |
"value":"#8A2BE2", | |
"css":true, | |
"name":"blueviolet" | |
}, | |
{ | |
"value":"#9B30FF", | |
"name":"purple 1" | |
}, | |
{ | |
"value":"#912CEE", | |
"name":"purple 2" | |
}, | |
{ | |
"value":"#7D26CD", | |
"name":"purple 3" | |
}, | |
{ | |
"value":"#551A8B", | |
"name":"purple 4" | |
}, | |
{ | |
"value":"#9370DB", | |
"css":true, | |
"name":"mediumpurple" | |
}, | |
{ | |
"value":"#AB82FF", | |
"name":"mediumpurple 1" | |
}, | |
{ | |
"value":"#9F79EE", | |
"name":"mediumpurple 2" | |
}, | |
{ | |
"value":"#8968CD", | |
"name":"mediumpurple 3" | |
}, | |
{ | |
"value":"#5D478B", | |
"name":"mediumpurple 4" | |
}, | |
{ | |
"value":"#483D8B", | |
"css":true, | |
"name":"darkslateblue" | |
}, | |
{ | |
"value":"#8470FF", | |
"name":"lightslateblue" | |
}, | |
{ | |
"value":"#7B68EE", | |
"css":true, | |
"name":"mediumslateblue" | |
}, | |
{ | |
"value":"#6A5ACD", | |
"css":true, | |
"name":"slateblue" | |
}, | |
{ | |
"value":"#836FFF", | |
"name":"slateblue 1" | |
}, | |
{ | |
"value":"#7A67EE", | |
"name":"slateblue 2" | |
}, | |
{ | |
"value":"#6959CD", | |
"name":"slateblue 3" | |
}, | |
{ | |
"value":"#473C8B", | |
"name":"slateblue 4" | |
}, | |
{ | |
"value":"#F8F8FF", | |
"css":true, | |
"name":"ghostwhite" | |
}, | |
{ | |
"value":"#E6E6FA", | |
"css":true, | |
"name":"lavender" | |
}, | |
{ | |
"value":"#0000FF", | |
"vga":true, | |
"css":true, | |
"name":"blue" | |
}, | |
{ | |
"value":"#0000EE", | |
"name":"blue 2" | |
}, | |
{ | |
"value":"#0000CD", | |
"name":"blue 3" | |
}, | |
{ | |
"value":"#0000CD", | |
"css":true, | |
"name":"mediumblue" | |
}, | |
{ | |
"value":"#00008B", | |
"name":"blue 4" | |
}, | |
{ | |
"value":"#00008B", | |
"css":true, | |
"name":"darkblue" | |
}, | |
{ | |
"value":"#000080", | |
"vga":true, | |
"css":true, | |
"name":"navy" | |
}, | |
{ | |
"value":"#191970", | |
"css":true, | |
"name":"midnightblue" | |
}, | |
{ | |
"value":"#3D59AB", | |
"name":"cobalt" | |
}, | |
{ | |
"value":"#4169E1", | |
"css":true, | |
"name":"royalblue" | |
}, | |
{ | |
"value":"#4876FF", | |
"name":"royalblue 1" | |
}, | |
{ | |
"value":"#436EEE", | |
"name":"royalblue 2" | |
}, | |
{ | |
"value":"#3A5FCD", | |
"name":"royalblue 3" | |
}, | |
{ | |
"value":"#27408B", | |
"name":"royalblue 4" | |
}, | |
{ | |
"value":"#6495ED", | |
"css":true, | |
"name":"cornflowerblue" | |
}, | |
{ | |
"value":"#B0C4DE", | |
"css":true, | |
"name":"lightsteelblue" | |
}, | |
{ | |
"value":"#CAE1FF", | |
"name":"lightsteelblue 1" | |
}, | |
{ | |
"value":"#BCD2EE", | |
"name":"lightsteelblue 2" | |
}, | |
{ | |
"value":"#A2B5CD", | |
"name":"lightsteelblue 3" | |
}, | |
{ | |
"value":"#6E7B8B", | |
"name":"lightsteelblue 4" | |
}, | |
{ | |
"value":"#778899", | |
"css":true, | |
"name":"lightslategray" | |
}, | |
{ | |
"value":"#708090", | |
"css":true, | |
"name":"slategray" | |
}, | |
{ | |
"value":"#C6E2FF", | |
"name":"slategray 1" | |
}, | |
{ | |
"value":"#B9D3EE", | |
"name":"slategray 2" | |
}, | |
{ | |
"value":"#9FB6CD", | |
"name":"slategray 3" | |
}, | |
{ | |
"value":"#6C7B8B", | |
"name":"slategray 4" | |
}, | |
{ | |
"value":"#1E90FF", | |
"name":"dodgerblue 1" | |
}, | |
{ | |
"value":"#1E90FF", | |
"css":true, | |
"name":"dodgerblue" | |
}, | |
{ | |
"value":"#1C86EE", | |
"name":"dodgerblue 2" | |
}, | |
{ | |
"value":"#1874CD", | |
"name":"dodgerblue 3" | |
}, | |
{ | |
"value":"#104E8B", | |
"name":"dodgerblue 4" | |
}, | |
{ | |
"value":"#F0F8FF", | |
"css":true, | |
"name":"aliceblue" | |
}, | |
{ | |
"value":"#4682B4", | |
"css":true, | |
"name":"steelblue" | |
}, | |
{ | |
"value":"#63B8FF", | |
"name":"steelblue 1" | |
}, | |
{ | |
"value":"#5CACEE", | |
"name":"steelblue 2" | |
}, | |
{ | |
"value":"#4F94CD", | |
"name":"steelblue 3" | |
}, | |
{ | |
"value":"#36648B", | |
"name":"steelblue 4" | |
}, | |
{ | |
"value":"#87CEFA", | |
"css":true, | |
"name":"lightskyblue" | |
}, | |
{ | |
"value":"#B0E2FF", | |
"name":"lightskyblue 1" | |
}, | |
{ | |
"value":"#A4D3EE", | |
"name":"lightskyblue 2" | |
}, | |
{ | |
"value":"#8DB6CD", | |
"name":"lightskyblue 3" | |
}, | |
{ | |
"value":"#607B8B", | |
"name":"lightskyblue 4" | |
}, | |
{ | |
"value":"#87CEFF", | |
"name":"skyblue 1" | |
}, | |
{ | |
"value":"#7EC0EE", | |
"name":"skyblue 2" | |
}, | |
{ | |
"value":"#6CA6CD", | |
"name":"skyblue 3" | |
}, | |
{ | |
"value":"#4A708B", | |
"name":"skyblue 4" | |
}, | |
{ | |
"value":"#87CEEB", | |
"css":true, | |
"name":"skyblue" | |
}, | |
{ | |
"value":"#00BFFF", | |
"name":"deepskyblue 1" | |
}, | |
{ | |
"value":"#00BFFF", | |
"css":true, | |
"name":"deepskyblue" | |
}, | |
{ | |
"value":"#00B2EE", | |
"name":"deepskyblue 2" | |
}, | |
{ | |
"value":"#009ACD", | |
"name":"deepskyblue 3" | |
}, | |
{ | |
"value":"#00688B", | |
"name":"deepskyblue 4" | |
}, | |
{ | |
"value":"#33A1C9", | |
"name":"peacock" | |
}, | |
{ | |
"value":"#ADD8E6", | |
"css":true, | |
"name":"lightblue" | |
}, | |
{ | |
"value":"#BFEFFF", | |
"name":"lightblue 1" | |
}, | |
{ | |
"value":"#B2DFEE", | |
"name":"lightblue 2" | |
}, | |
{ | |
"value":"#9AC0CD", | |
"name":"lightblue 3" | |
}, | |
{ | |
"value":"#68838B", | |
"name":"lightblue 4" | |
}, | |
{ | |
"value":"#B0E0E6", | |
"css":true, | |
"name":"powderblue" | |
}, | |
{ | |
"value":"#98F5FF", | |
"name":"cadetblue 1" | |
}, | |
{ | |
"value":"#8EE5EE", | |
"name":"cadetblue 2" | |
}, | |
{ | |
"value":"#7AC5CD", | |
"name":"cadetblue 3" | |
}, | |
{ | |
"value":"#53868B", | |
"name":"cadetblue 4" | |
}, | |
{ | |
"value":"#00F5FF", | |
"name":"turquoise 1" | |
}, | |
{ | |
"value":"#00E5EE", | |
"name":"turquoise 2" | |
}, | |
{ | |
"value":"#00C5CD", | |
"name":"turquoise 3" | |
}, | |
{ | |
"value":"#00868B", | |
"name":"turquoise 4" | |
}, | |
{ | |
"value":"#5F9EA0", | |
"css":true, | |
"name":"cadetblue" | |
}, | |
{ | |
"value":"#00CED1", | |
"css":true, | |
"name":"darkturquoise" | |
}, | |
{ | |
"value":"#F0FFFF", | |
"name":"azure 1" | |
}, | |
{ | |
"value":"#F0FFFF", | |
"css":true, | |
"name":"azure" | |
}, | |
{ | |
"value":"#E0EEEE", | |
"name":"azure 2" | |
}, | |
{ | |
"value":"#C1CDCD", | |
"name":"azure 3" | |
}, | |
{ | |
"value":"#838B8B", | |
"name":"azure 4" | |
}, | |
{ | |
"value":"#E0FFFF", | |
"name":"lightcyan 1" | |
}, | |
{ | |
"value":"#E0FFFF", | |
"css":true, | |
"name":"lightcyan" | |
}, | |
{ | |
"value":"#D1EEEE", | |
"name":"lightcyan 2" | |
}, | |
{ | |
"value":"#B4CDCD", | |
"name":"lightcyan 3" | |
}, | |
{ | |
"value":"#7A8B8B", | |
"name":"lightcyan 4" | |
}, | |
{ | |
"value":"#BBFFFF", | |
"name":"paleturquoise 1" | |
}, | |
{ | |
"value":"#AEEEEE", | |
"name":"paleturquoise 2" | |
}, | |
{ | |
"value":"#AEEEEE", | |
"css":true, | |
"name":"paleturquoise" | |
}, | |
{ | |
"value":"#96CDCD", | |
"name":"paleturquoise 3" | |
}, | |
{ | |
"value":"#668B8B", | |
"name":"paleturquoise 4" | |
}, | |
{ | |
"value":"#2F4F4F", | |
"css":true, | |
"name":"darkslategray" | |
}, | |
{ | |
"value":"#97FFFF", | |
"name":"darkslategray 1" | |
}, | |
{ | |
"value":"#8DEEEE", | |
"name":"darkslategray 2" | |
}, | |
{ | |
"value":"#79CDCD", | |
"name":"darkslategray 3" | |
}, | |
{ | |
"value":"#528B8B", | |
"name":"darkslategray 4" | |
}, | |
{ | |
"value":"#00FFFF", | |
"name":"cyan" | |
}, | |
{ | |
"value":"#00FFFF", | |
"css":true, | |
"name":"aqua" | |
}, | |
{ | |
"value":"#00EEEE", | |
"name":"cyan 2" | |
}, | |
{ | |
"value":"#00CDCD", | |
"name":"cyan 3" | |
}, | |
{ | |
"value":"#008B8B", | |
"name":"cyan 4" | |
}, | |
{ | |
"value":"#008B8B", | |
"css":true, | |
"name":"darkcyan" | |
}, | |
{ | |
"value":"#008080", | |
"vga":true, | |
"css":true, | |
"name":"teal" | |
}, | |
{ | |
"value":"#48D1CC", | |
"css":true, | |
"name":"mediumturquoise" | |
}, | |
{ | |
"value":"#20B2AA", | |
"css":true, | |
"name":"lightseagreen" | |
}, | |
{ | |
"value":"#03A89E", | |
"name":"manganeseblue" | |
}, | |
{ | |
"value":"#40E0D0", | |
"css":true, | |
"name":"turquoise" | |
}, | |
{ | |
"value":"#808A87", | |
"name":"coldgrey" | |
}, | |
{ | |
"value":"#00C78C", | |
"name":"turquoiseblue" | |
}, | |
{ | |
"value":"#7FFFD4", | |
"name":"aquamarine 1" | |
}, | |
{ | |
"value":"#7FFFD4", | |
"css":true, | |
"name":"aquamarine" | |
}, | |
{ | |
"value":"#76EEC6", | |
"name":"aquamarine 2" | |
}, | |
{ | |
"value":"#66CDAA", | |
"name":"aquamarine 3" | |
}, | |
{ | |
"value":"#66CDAA", | |
"css":true, | |
"name":"mediumaquamarine" | |
}, | |
{ | |
"value":"#458B74", | |
"name":"aquamarine 4" | |
}, | |
{ | |
"value":"#00FA9A", | |
"css":true, | |
"name":"mediumspringgreen" | |
}, | |
{ | |
"value":"#F5FFFA", | |
"css":true, | |
"name":"mintcream" | |
}, | |
{ | |
"value":"#00FF7F", | |
"css":true, | |
"name":"springgreen" | |
}, | |
{ | |
"value":"#00EE76", | |
"name":"springgreen 1" | |
}, | |
{ | |
"value":"#00CD66", | |
"name":"springgreen 2" | |
}, | |
{ | |
"value":"#008B45", | |
"name":"springgreen 3" | |
}, | |
{ | |
"value":"#3CB371", | |
"css":true, | |
"name":"mediumseagreen" | |
}, | |
{ | |
"value":"#54FF9F", | |
"name":"seagreen 1" | |
}, | |
{ | |
"value":"#4EEE94", | |
"name":"seagreen 2" | |
}, | |
{ | |
"value":"#43CD80", | |
"name":"seagreen 3" | |
}, | |
{ | |
"value":"#2E8B57", | |
"name":"seagreen 4" | |
}, | |
{ | |
"value":"#2E8B57", | |
"css":true, | |
"name":"seagreen" | |
}, | |
{ | |
"value":"#00C957", | |
"name":"emeraldgreen" | |
}, | |
{ | |
"value":"#BDFCC9", | |
"name":"mint" | |
}, | |
{ | |
"value":"#3D9140", | |
"name":"cobaltgreen" | |
}, | |
{ | |
"value":"#F0FFF0", | |
"name":"honeydew 1" | |
}, | |
{ | |
"value":"#F0FFF0", | |
"css":true, | |
"name":"honeydew" | |
}, | |
{ | |
"value":"#E0EEE0", | |
"name":"honeydew 2" | |
}, | |
{ | |
"value":"#C1CDC1", | |
"name":"honeydew 3" | |
}, | |
{ | |
"value":"#838B83", | |
"name":"honeydew 4" | |
}, | |
{ | |
"value":"#8FBC8F", | |
"css":true, | |
"name":"darkseagreen" | |
}, | |
{ | |
"value":"#C1FFC1", | |
"name":"darkseagreen 1" | |
}, | |
{ | |
"value":"#B4EEB4", | |
"name":"darkseagreen 2" | |
}, | |
{ | |
"value":"#9BCD9B", | |
"name":"darkseagreen 3" | |
}, | |
{ | |
"value":"#698B69", | |
"name":"darkseagreen 4" | |
}, | |
{ | |
"value":"#98FB98", | |
"css":true, | |
"name":"palegreen" | |
}, | |
{ | |
"value":"#9AFF9A", | |
"name":"palegreen 1" | |
}, | |
{ | |
"value":"#90EE90", | |
"name":"palegreen 2" | |
}, | |
{ | |
"value":"#90EE90", | |
"css":true, | |
"name":"lightgreen" | |
}, | |
{ | |
"value":"#7CCD7C", | |
"name":"palegreen 3" | |
}, | |
{ | |
"value":"#548B54", | |
"name":"palegreen 4" | |
}, | |
{ | |
"value":"#32CD32", | |
"css":true, | |
"name":"limegreen" | |
}, | |
{ | |
"value":"#228B22", | |
"css":true, | |
"name":"forestgreen" | |
}, | |
{ | |
"value":"#00FF00", | |
"vga":true, | |
"name":"green 1" | |
}, | |
{ | |
"value":"#00FF00", | |
"vga":true, | |
"css":true, | |
"name":"lime" | |
}, | |
{ | |
"value":"#00EE00", | |
"name":"green 2" | |
}, | |
{ | |
"value":"#00CD00", | |
"name":"green 3" | |
}, | |
{ | |
"value":"#008B00", | |
"name":"green 4" | |
}, | |
{ | |
"value":"#008000", | |
"vga":true, | |
"css":true, | |
"name":"green" | |
}, | |
{ | |
"value":"#006400", | |
"css":true, | |
"name":"darkgreen" | |
}, | |
{ | |
"value":"#308014", | |
"name":"sapgreen" | |
}, | |
{ | |
"value":"#7CFC00", | |
"css":true, | |
"name":"lawngreen" | |
}, | |
{ | |
"value":"#7FFF00", | |
"name":"chartreuse 1" | |
}, | |
{ | |
"value":"#7FFF00", | |
"css":true, | |
"name":"chartreuse" | |
}, | |
{ | |
"value":"#76EE00", | |
"name":"chartreuse 2" | |
}, | |
{ | |
"value":"#66CD00", | |
"name":"chartreuse 3" | |
}, | |
{ | |
"value":"#458B00", | |
"name":"chartreuse 4" | |
}, | |
{ | |
"value":"#ADFF2F", | |
"css":true, | |
"name":"greenyellow" | |
}, | |
{ | |
"value":"#CAFF70", | |
"name":"darkolivegreen 1" | |
}, | |
{ | |
"value":"#BCEE68", | |
"name":"darkolivegreen 2" | |
}, | |
{ | |
"value":"#A2CD5A", | |
"name":"darkolivegreen 3" | |
}, | |
{ | |
"value":"#6E8B3D", | |
"name":"darkolivegreen 4" | |
}, | |
{ | |
"value":"#556B2F", | |
"css":true, | |
"name":"darkolivegreen" | |
}, | |
{ | |
"value":"#6B8E23", | |
"css":true, | |
"name":"olivedrab" | |
}, | |
{ | |
"value":"#C0FF3E", | |
"name":"olivedrab 1" | |
}, | |
{ | |
"value":"#B3EE3A", | |
"name":"olivedrab 2" | |
}, | |
{ | |
"value":"#9ACD32", | |
"name":"olivedrab 3" | |
}, | |
{ | |
"value":"#9ACD32", | |
"css":true, | |
"name":"yellowgreen" | |
}, | |
{ | |
"value":"#698B22", | |
"name":"olivedrab 4" | |
}, | |
{ | |
"value":"#FFFFF0", | |
"name":"ivory 1" | |
}, | |
{ | |
"value":"#FFFFF0", | |
"css":true, | |
"name":"ivory" | |
}, | |
{ | |
"value":"#EEEEE0", | |
"name":"ivory 2" | |
}, | |
{ | |
"value":"#CDCDC1", | |
"name":"ivory 3" | |
}, | |
{ | |
"value":"#8B8B83", | |
"name":"ivory 4" | |
}, | |
{ | |
"value":"#F5F5DC", | |
"css":true, | |
"name":"beige" | |
}, | |
{ | |
"value":"#FFFFE0", | |
"name":"lightyellow 1" | |
}, | |
{ | |
"value":"#FFFFE0", | |
"css":true, | |
"name":"lightyellow" | |
}, | |
{ | |
"value":"#EEEED1", | |
"name":"lightyellow 2" | |
}, | |
{ | |
"value":"#CDCDB4", | |
"name":"lightyellow 3" | |
}, | |
{ | |
"value":"#8B8B7A", | |
"name":"lightyellow 4" | |
}, | |
{ | |
"value":"#FAFAD2", | |
"css":true, | |
"name":"lightgoldenrodyellow" | |
}, | |
{ | |
"value":"#FFFF00", | |
"vga":true, | |
"name":"yellow 1" | |
}, | |
{ | |
"value":"#FFFF00", | |
"vga":true, | |
"css":true, | |
"name":"yellow" | |
}, | |
{ | |
"value":"#EEEE00", | |
"name":"yellow 2" | |
}, | |
{ | |
"value":"#CDCD00", | |
"name":"yellow 3" | |
}, | |
{ | |
"value":"#8B8B00", | |
"name":"yellow 4" | |
}, | |
{ | |
"value":"#808069", | |
"name":"warmgrey" | |
}, | |
{ | |
"value":"#808000", | |
"vga":true, | |
"css":true, | |
"name":"olive" | |
}, | |
{ | |
"value":"#BDB76B", | |
"css":true, | |
"name":"darkkhaki" | |
}, | |
{ | |
"value":"#FFF68F", | |
"name":"khaki 1" | |
}, | |
{ | |
"value":"#EEE685", | |
"name":"khaki 2" | |
}, | |
{ | |
"value":"#CDC673", | |
"name":"khaki 3" | |
}, | |
{ | |
"value":"#8B864E", | |
"name":"khaki 4" | |
}, | |
{ | |
"value":"#F0E68C", | |
"css":true, | |
"name":"khaki" | |
}, | |
{ | |
"value":"#EEE8AA", | |
"css":true, | |
"name":"palegoldenrod" | |
}, | |
{ | |
"value":"#FFFACD", | |
"name":"lemonchiffon 1" | |
}, | |
{ | |
"value":"#FFFACD", | |
"css":true, | |
"name":"lemonchiffon" | |
}, | |
{ | |
"value":"#EEE9BF", | |
"name":"lemonchiffon 2" | |
}, | |
{ | |
"value":"#CDC9A5", | |
"name":"lemonchiffon 3" | |
}, | |
{ | |
"value":"#8B8970", | |
"name":"lemonchiffon 4" | |
}, | |
{ | |
"value":"#FFEC8B", | |
"name":"lightgoldenrod 1" | |
}, | |
{ | |
"value":"#EEDC82", | |
"name":"lightgoldenrod 2" | |
}, | |
{ | |
"value":"#CDBE70", | |
"name":"lightgoldenrod 3" | |
}, | |
{ | |
"value":"#8B814C", | |
"name":"lightgoldenrod 4" | |
}, | |
{ | |
"value":"#E3CF57", | |
"name":"banana" | |
}, | |
{ | |
"value":"#FFD700", | |
"name":"gold 1" | |
}, | |
{ | |
"value":"#FFD700", | |
"css":true, | |
"name":"gold" | |
}, | |
{ | |
"value":"#EEC900", | |
"name":"gold 2" | |
}, | |
{ | |
"value":"#CDAD00", | |
"name":"gold 3" | |
}, | |
{ | |
"value":"#8B7500", | |
"name":"gold 4" | |
}, | |
{ | |
"value":"#FFF8DC", | |
"name":"cornsilk 1" | |
}, | |
{ | |
"value":"#FFF8DC", | |
"css":true, | |
"name":"cornsilk" | |
}, | |
{ | |
"value":"#EEE8CD", | |
"name":"cornsilk 2" | |
}, | |
{ | |
"value":"#CDC8B1", | |
"name":"cornsilk 3" | |
}, | |
{ | |
"value":"#8B8878", | |
"name":"cornsilk 4" | |
}, | |
{ | |
"value":"#DAA520", | |
"css":true, | |
"name":"goldenrod" | |
}, | |
{ | |
"value":"#FFC125", | |
"name":"goldenrod 1" | |
}, | |
{ | |
"value":"#EEB422", | |
"name":"goldenrod 2" | |
}, | |
{ | |
"value":"#CD9B1D", | |
"name":"goldenrod 3" | |
}, | |
{ | |
"value":"#8B6914", | |
"name":"goldenrod 4" | |
}, | |
{ | |
"value":"#B8860B", | |
"css":true, | |
"name":"darkgoldenrod" | |
}, | |
{ | |
"value":"#FFB90F", | |
"name":"darkgoldenrod 1" | |
}, | |
{ | |
"value":"#EEAD0E", | |
"name":"darkgoldenrod 2" | |
}, | |
{ | |
"value":"#CD950C", | |
"name":"darkgoldenrod 3" | |
}, | |
{ | |
"value":"#8B6508", | |
"name":"darkgoldenrod 4" | |
}, | |
{ | |
"value":"#FFA500", | |
"name":"orange 1" | |
}, | |
{ | |
"value":"#FF8000", | |
"css":true, | |
"name":"orange" | |
}, | |
{ | |
"value":"#EE9A00", | |
"name":"orange 2" | |
}, | |
{ | |
"value":"#CD8500", | |
"name":"orange 3" | |
}, | |
{ | |
"value":"#8B5A00", | |
"name":"orange 4" | |
}, | |
{ | |
"value":"#FFFAF0", | |
"css":true, | |
"name":"floralwhite" | |
}, | |
{ | |
"value":"#FDF5E6", | |
"css":true, | |
"name":"oldlace" | |
}, | |
{ | |
"value":"#F5DEB3", | |
"css":true, | |
"name":"wheat" | |
}, | |
{ | |
"value":"#FFE7BA", | |
"name":"wheat 1" | |
}, | |
{ | |
"value":"#EED8AE", | |
"name":"wheat 2" | |
}, | |
{ | |
"value":"#CDBA96", | |
"name":"wheat 3" | |
}, | |
{ | |
"value":"#8B7E66", | |
"name":"wheat 4" | |
}, | |
{ | |
"value":"#FFE4B5", | |
"css":true, | |
"name":"moccasin" | |
}, | |
{ | |
"value":"#FFEFD5", | |
"css":true, | |
"name":"papayawhip" | |
}, | |
{ | |
"value":"#FFEBCD", | |
"css":true, | |
"name":"blanchedalmond" | |
}, | |
{ | |
"value":"#FFDEAD", | |
"name":"navajowhite 1" | |
}, | |
{ | |
"value":"#FFDEAD", | |
"css":true, | |
"name":"navajowhite" | |
}, | |
{ | |
"value":"#EECFA1", | |
"name":"navajowhite 2" | |
}, | |
{ | |
"value":"#CDB38B", | |
"name":"navajowhite 3" | |
}, | |
{ | |
"value":"#8B795E", | |
"name":"navajowhite 4" | |
}, | |
{ | |
"value":"#FCE6C9", | |
"name":"eggshell" | |
}, | |
{ | |
"value":"#D2B48C", | |
"css":true, | |
"name":"tan" | |
}, | |
{ | |
"value":"#9C661F", | |
"name":"brick" | |
}, | |
{ | |
"value":"#FF9912", | |
"name":"cadmiumyellow" | |
}, | |
{ | |
"value":"#FAEBD7", | |
"css":true, | |
"name":"antiquewhite" | |
}, | |
{ | |
"value":"#FFEFDB", | |
"name":"antiquewhite 1" | |
}, | |
{ | |
"value":"#EEDFCC", | |
"name":"antiquewhite 2" | |
}, | |
{ | |
"value":"#CDC0B0", | |
"name":"antiquewhite 3" | |
}, | |
{ | |
"value":"#8B8378", | |
"name":"antiquewhite 4" | |
}, | |
{ | |
"value":"#DEB887", | |
"css":true, | |
"name":"burlywood" | |
}, | |
{ | |
"value":"#FFD39B", | |
"name":"burlywood 1" | |
}, | |
{ | |
"value":"#EEC591", | |
"name":"burlywood 2" | |
}, | |
{ | |
"value":"#CDAA7D", | |
"name":"burlywood 3" | |
}, | |
{ | |
"value":"#8B7355", | |
"name":"burlywood 4" | |
}, | |
{ | |
"value":"#FFE4C4", | |
"name":"bisque 1" | |
}, | |
{ | |
"value":"#FFE4C4", | |
"css":true, | |
"name":"bisque" | |
}, | |
{ | |
"value":"#EED5B7", | |
"name":"bisque 2" | |
}, | |
{ | |
"value":"#CDB79E", | |
"name":"bisque 3" | |
}, | |
{ | |
"value":"#8B7D6B", | |
"name":"bisque 4" | |
}, | |
{ | |
"value":"#E3A869", | |
"name":"melon" | |
}, | |
{ | |
"value":"#ED9121", | |
"name":"carrot" | |
}, | |
{ | |
"value":"#FF8C00", | |
"css":true, | |
"name":"darkorange" | |
}, | |
{ | |
"value":"#FF7F00", | |
"name":"darkorange 1" | |
}, | |
{ | |
"value":"#EE7600", | |
"name":"darkorange 2" | |
}, | |
{ | |
"value":"#CD6600", | |
"name":"darkorange 3" | |
}, | |
{ | |
"value":"#8B4500", | |
"name":"darkorange 4" | |
}, | |
{ | |
"value":"#FFA54F", | |
"name":"tan 1" | |
}, | |
{ | |
"value":"#EE9A49", | |
"name":"tan 2" | |
}, | |
{ | |
"value":"#CD853F", | |
"name":"tan 3" | |
}, | |
{ | |
"value":"#CD853F", | |
"css":true, | |
"name":"peru" | |
}, | |
{ | |
"value":"#8B5A2B", | |
"name":"tan 4" | |
}, | |
{ | |
"value":"#FAF0E6", | |
"css":true, | |
"name":"linen" | |
}, | |
{ | |
"value":"#FFDAB9", | |
"name":"peachpuff 1" | |
}, | |
{ | |
"value":"#FFDAB9", | |
"css":true, | |
"name":"peachpuff" | |
}, | |
{ | |
"value":"#EECBAD", | |
"name":"peachpuff 2" | |
}, | |
{ | |
"value":"#CDAF95", | |
"name":"peachpuff 3" | |
}, | |
{ | |
"value":"#8B7765", | |
"name":"peachpuff 4" | |
}, | |
{ | |
"value":"#FFF5EE", | |
"name":"seashell 1" | |
}, | |
{ | |
"value":"#FFF5EE", | |
"css":true, | |
"name":"seashell" | |
}, | |
{ | |
"value":"#EEE5DE", | |
"name":"seashell 2" | |
}, | |
{ | |
"value":"#CDC5BF", | |
"name":"seashell 3" | |
}, | |
{ | |
"value":"#8B8682", | |
"name":"seashell 4" | |
}, | |
{ | |
"value":"#F4A460", | |
"css":true, | |
"name":"sandybrown" | |
}, | |
{ | |
"value":"#C76114", | |
"name":"rawsienna" | |
}, | |
{ | |
"value":"#D2691E", | |
"css":true, | |
"name":"chocolate" | |
}, | |
{ | |
"value":"#FF7F24", | |
"name":"chocolate 1" | |
}, | |
{ | |
"value":"#EE7621", | |
"name":"chocolate 2" | |
}, | |
{ | |
"value":"#CD661D", | |
"name":"chocolate 3" | |
}, | |
{ | |
"value":"#8B4513", | |
"name":"chocolate 4" | |
}, | |
{ | |
"value":"#8B4513", | |
"css":true, | |
"name":"saddlebrown" | |
}, | |
{ | |
"value":"#292421", | |
"name":"ivoryblack" | |
}, | |
{ | |
"value":"#FF7D40", | |
"name":"flesh" | |
}, | |
{ | |
"value":"#FF6103", | |
"name":"cadmiumorange" | |
}, | |
{ | |
"value":"#8A360F", | |
"name":"burntsienna" | |
}, | |
{ | |
"value":"#A0522D", | |
"css":true, | |
"name":"sienna" | |
}, | |
{ | |
"value":"#FF8247", | |
"name":"sienna 1" | |
}, | |
{ | |
"value":"#EE7942", | |
"name":"sienna 2" | |
}, | |
{ | |
"value":"#CD6839", | |
"name":"sienna 3" | |
}, | |
{ | |
"value":"#8B4726", | |
"name":"sienna 4" | |
}, | |
{ | |
"value":"#FFA07A", | |
"name":"lightsalmon 1" | |
}, | |
{ | |
"value":"#FFA07A", | |
"css":true, | |
"name":"lightsalmon" | |
}, | |
{ | |
"value":"#EE9572", | |
"name":"lightsalmon 2" | |
}, | |
{ | |
"value":"#CD8162", | |
"name":"lightsalmon 3" | |
}, | |
{ | |
"value":"#8B5742", | |
"name":"lightsalmon 4" | |
}, | |
{ | |
"value":"#FF7F50", | |
"css":true, | |
"name":"coral" | |
}, | |
{ | |
"value":"#FF4500", | |
"name":"orangered 1" | |
}, | |
{ | |
"value":"#FF4500", | |
"css":true, | |
"name":"orangered" | |
}, | |
{ | |
"value":"#EE4000", | |
"name":"orangered 2" | |
}, | |
{ | |
"value":"#CD3700", | |
"name":"orangered 3" | |
}, | |
{ | |
"value":"#8B2500", | |
"name":"orangered 4" | |
}, | |
{ | |
"value":"#5E2612", | |
"name":"sepia" | |
}, | |
{ | |
"value":"#E9967A", | |
"css":true, | |
"name":"darksalmon" | |
}, | |
{ | |
"value":"#FF8C69", | |
"name":"salmon 1" | |
}, | |
{ | |
"value":"#EE8262", | |
"name":"salmon 2" | |
}, | |
{ | |
"value":"#CD7054", | |
"name":"salmon 3" | |
}, | |
{ | |
"value":"#8B4C39", | |
"name":"salmon 4" | |
}, | |
{ | |
"value":"#FF7256", | |
"name":"coral 1" | |
}, | |
{ | |
"value":"#EE6A50", | |
"name":"coral 2" | |
}, | |
{ | |
"value":"#CD5B45", | |
"name":"coral 3" | |
}, | |
{ | |
"value":"#8B3E2F", | |
"name":"coral 4" | |
}, | |
{ | |
"value":"#8A3324", | |
"name":"burntumber" | |
}, | |
{ | |
"value":"#FF6347", | |
"name":"tomato 1" | |
}, | |
{ | |
"value":"#FF6347", | |
"css":true, | |
"name":"tomato" | |
}, | |
{ | |
"value":"#EE5C42", | |
"name":"tomato 2" | |
}, | |
{ | |
"value":"#CD4F39", | |
"name":"tomato 3" | |
}, | |
{ | |
"value":"#8B3626", | |
"name":"tomato 4" | |
}, | |
{ | |
"value":"#FA8072", | |
"css":true, | |
"name":"salmon" | |
}, | |
{ | |
"value":"#FFE4E1", | |
"name":"mistyrose 1" | |
}, | |
{ | |
"value":"#FFE4E1", | |
"css":true, | |
"name":"mistyrose" | |
}, | |
{ | |
"value":"#EED5D2", | |
"name":"mistyrose 2" | |
}, | |
{ | |
"value":"#CDB7B5", | |
"name":"mistyrose 3" | |
}, | |
{ | |
"value":"#8B7D7B", | |
"name":"mistyrose 4" | |
}, | |
{ | |
"value":"#FFFAFA", | |
"name":"snow 1" | |
}, | |
{ | |
"value":"#FFFAFA", | |
"css":true, | |
"name":"snow" | |
}, | |
{ | |
"value":"#EEE9E9", | |
"name":"snow 2" | |
}, | |
{ | |
"value":"#CDC9C9", | |
"name":"snow 3" | |
}, | |
{ | |
"value":"#8B8989", | |
"name":"snow 4" | |
}, | |
{ | |
"value":"#BC8F8F", | |
"css":true, | |
"name":"rosybrown" | |
}, | |
{ | |
"value":"#FFC1C1", | |
"name":"rosybrown 1" | |
}, | |
{ | |
"value":"#EEB4B4", | |
"name":"rosybrown 2" | |
}, | |
{ | |
"value":"#CD9B9B", | |
"name":"rosybrown 3" | |
}, | |
{ | |
"value":"#8B6969", | |
"name":"rosybrown 4" | |
}, | |
{ | |
"value":"#F08080", | |
"css":true, | |
"name":"lightcoral" | |
}, | |
{ | |
"value":"#CD5C5C", | |
"css":true, | |
"name":"indianred" | |
}, | |
{ | |
"value":"#FF6A6A", | |
"name":"indianred 1" | |
}, | |
{ | |
"value":"#EE6363", | |
"name":"indianred 2" | |
}, | |
{ | |
"value":"#8B3A3A", | |
"name":"indianred 4" | |
}, | |
{ | |
"value":"#CD5555", | |
"name":"indianred 3" | |
}, | |
{ | |
"value":"#A52A2A", | |
"css":true, | |
"name":"brown" | |
}, | |
{ | |
"value":"#FF4040", | |
"name":"brown 1" | |
}, | |
{ | |
"value":"#EE3B3B", | |
"name":"brown 2" | |
}, | |
{ | |
"value":"#CD3333", | |
"name":"brown 3" | |
}, | |
{ | |
"value":"#8B2323", | |
"name":"brown 4" | |
}, | |
{ | |
"value":"#B22222", | |
"css":true, | |
"name":"firebrick" | |
}, | |
{ | |
"value":"#FF3030", | |
"name":"firebrick 1" | |
}, | |
{ | |
"value":"#EE2C2C", | |
"name":"firebrick 2" | |
}, | |
{ | |
"value":"#CD2626", | |
"name":"firebrick 3" | |
}, | |
{ | |
"value":"#8B1A1A", | |
"name":"firebrick 4" | |
}, | |
{ | |
"value":"#FF0000", | |
"vga":true, | |
"name":"red 1" | |
}, | |
{ | |
"value":"#FF0000", | |
"vga":true, | |
"css":true, | |
"name":"red" | |
}, | |
{ | |
"value":"#EE0000", | |
"name":"red 2" | |
}, | |
{ | |
"value":"#CD0000", | |
"name":"red 3" | |
}, | |
{ | |
"value":"#8B0000", | |
"name":"red 4" | |
}, | |
{ | |
"value":"#8B0000", | |
"css":true, | |
"name":"darkred" | |
}, | |
{ | |
"value":"#800000", | |
"vga":true, | |
"css":true, | |
"name":"maroon" | |
}, | |
{ | |
"value":"#8E388E", | |
"name":"sgi beet" | |
}, | |
{ | |
"value":"#7171C6", | |
"name":"sgi slateblue" | |
}, | |
{ | |
"value":"#7D9EC0", | |
"name":"sgi lightblue" | |
}, | |
{ | |
"value":"#388E8E", | |
"name":"sgi teal" | |
}, | |
{ | |
"value":"#71C671", | |
"name":"sgi chartreuse" | |
}, | |
{ | |
"value":"#8E8E38", | |
"name":"sgi olivedrab" | |
}, | |
{ | |
"value":"#C5C1AA", | |
"name":"sgi brightgray" | |
}, | |
{ | |
"value":"#C67171", | |
"name":"sgi salmon" | |
}, | |
{ | |
"value":"#555555", | |
"name":"sgi darkgray" | |
}, | |
{ | |
"value":"#1E1E1E", | |
"name":"sgi gray 12" | |
}, | |
{ | |
"value":"#282828", | |
"name":"sgi gray 16" | |
}, | |
{ | |
"value":"#515151", | |
"name":"sgi gray 32" | |
}, | |
{ | |
"value":"#5B5B5B", | |
"name":"sgi gray 36" | |
}, | |
{ | |
"value":"#848484", | |
"name":"sgi gray 52" | |
}, | |
{ | |
"value":"#8E8E8E", | |
"name":"sgi gray 56" | |
}, | |
{ | |
"value":"#AAAAAA", | |
"name":"sgi lightgray" | |
}, | |
{ | |
"value":"#B7B7B7", | |
"name":"sgi gray 72" | |
}, | |
{ | |
"value":"#C1C1C1", | |
"name":"sgi gray 76" | |
}, | |
{ | |
"value":"#EAEAEA", | |
"name":"sgi gray 92" | |
}, | |
{ | |
"value":"#F4F4F4", | |
"name":"sgi gray 96" | |
}, | |
{ | |
"value":"#FFFFFF", | |
"vga":true, | |
"css":true, | |
"name":"white" | |
}, | |
{ | |
"value":"#F5F5F5", | |
"name":"white smoke" | |
}, | |
{ | |
"value":"#F5F5F5", | |
"name":"gray 96" | |
}, | |
{ | |
"value":"#DCDCDC", | |
"css":true, | |
"name":"gainsboro" | |
}, | |
{ | |
"value":"#D3D3D3", | |
"css":true, | |
"name":"lightgrey" | |
}, | |
{ | |
"value":"#C0C0C0", | |
"vga":true, | |
"css":true, | |
"name":"silver" | |
}, | |
{ | |
"value":"#A9A9A9", | |
"css":true, | |
"name":"darkgray" | |
}, | |
{ | |
"value":"#808080", | |
"vga":true, | |
"css":true, | |
"name":"gray" | |
}, | |
{ | |
"value":"#696969", | |
"css":true, | |
"name":"dimgray" | |
}, | |
{ | |
"value":"#696969", | |
"name":"gray 42" | |
}, | |
{ | |
"value":"#000000", | |
"vga":true, | |
"css":true, | |
"name":"black" | |
}, | |
{ | |
"value":"#FCFCFC", | |
"name":"gray 99" | |
}, | |
{ | |
"value":"#FAFAFA", | |
"name":"gray 98" | |
}, | |
{ | |
"value":"#F7F7F7", | |
"name":"gray 97" | |
}, | |
{ | |
"value":"#F2F2F2", | |
"name":"gray 95" | |
}, | |
{ | |
"value":"#F0F0F0", | |
"name":"gray 94" | |
}, | |
{ | |
"value":"#EDEDED", | |
"name":"gray 93" | |
}, | |
{ | |
"value":"#EBEBEB", | |
"name":"gray 92" | |
}, | |
{ | |
"value":"#E8E8E8", | |
"name":"gray 91" | |
}, | |
{ | |
"value":"#E5E5E5", | |
"name":"gray 90" | |
}, | |
{ | |
"value":"#E3E3E3", | |
"name":"gray 89" | |
}, | |
{ | |
"value":"#E0E0E0", | |
"name":"gray 88" | |
}, | |
{ | |
"value":"#DEDEDE", | |
"name":"gray 87" | |
}, | |
{ | |
"value":"#DBDBDB", | |
"name":"gray 86" | |
}, | |
{ | |
"value":"#D9D9D9", | |
"name":"gray 85" | |
}, | |
{ | |
"value":"#D6D6D6", | |
"name":"gray 84" | |
}, | |
{ | |
"value":"#D4D4D4", | |
"name":"gray 83" | |
}, | |
{ | |
"value":"#D1D1D1", | |
"name":"gray 82" | |
}, | |
{ | |
"value":"#CFCFCF", | |
"name":"gray 81" | |
}, | |
{ | |
"value":"#CCCCCC", | |
"name":"gray 80" | |
}, | |
{ | |
"value":"#C9C9C9", | |
"name":"gray 79" | |
}, | |
{ | |
"value":"#C7C7C7", | |
"name":"gray 78" | |
}, | |
{ | |
"value":"#C4C4C4", | |
"name":"gray 77" | |
}, | |
{ | |
"value":"#C2C2C2", | |
"name":"gray 76" | |
}, | |
{ | |
"value":"#BFBFBF", | |
"name":"gray 75" | |
}, | |
{ | |
"value":"#BDBDBD", | |
"name":"gray 74" | |
}, | |
{ | |
"value":"#BABABA", | |
"name":"gray 73" | |
}, | |
{ | |
"value":"#B8B8B8", | |
"name":"gray 72" | |
}, | |
{ | |
"value":"#B5B5B5", | |
"name":"gray 71" | |
}, | |
{ | |
"value":"#B3B3B3", | |
"name":"gray 70" | |
}, | |
{ | |
"value":"#B0B0B0", | |
"name":"gray 69" | |
}, | |
{ | |
"value":"#ADADAD", | |
"name":"gray 68" | |
}, | |
{ | |
"value":"#ABABAB", | |
"name":"gray 67" | |
}, | |
{ | |
"value":"#A8A8A8", | |
"name":"gray 66" | |
}, | |
{ | |
"value":"#A6A6A6", | |
"name":"gray 65" | |
}, | |
{ | |
"value":"#A3A3A3", | |
"name":"gray 64" | |
}, | |
{ | |
"value":"#A1A1A1", | |
"name":"gray 63" | |
}, | |
{ | |
"value":"#9E9E9E", | |
"name":"gray 62" | |
}, | |
{ | |
"value":"#9C9C9C", | |
"name":"gray 61" | |
}, | |
{ | |
"value":"#999999", | |
"name":"gray 60" | |
}, | |
{ | |
"value":"#969696", | |
"name":"gray 59" | |
}, | |
{ | |
"value":"#949494", | |
"name":"gray 58" | |
}, | |
{ | |
"value":"#919191", | |
"name":"gray 57" | |
}, | |
{ | |
"value":"#8F8F8F", | |
"name":"gray 56" | |
}, | |
{ | |
"value":"#8C8C8C", | |
"name":"gray 55" | |
}, | |
{ | |
"value":"#8A8A8A", | |
"name":"gray 54" | |
}, | |
{ | |
"value":"#878787", | |
"name":"gray 53" | |
}, | |
{ | |
"value":"#858585", | |
"name":"gray 52" | |
}, | |
{ | |
"value":"#828282", | |
"name":"gray 51" | |
}, | |
{ | |
"value":"#7F7F7F", | |
"name":"gray 50" | |
}, | |
{ | |
"value":"#7D7D7D", | |
"name":"gray 49" | |
}, | |
{ | |
"value":"#7A7A7A", | |
"name":"gray 48" | |
}, | |
{ | |
"value":"#787878", | |
"name":"gray 47" | |
}, | |
{ | |
"value":"#757575", | |
"name":"gray 46" | |
}, | |
{ | |
"value":"#737373", | |
"name":"gray 45" | |
}, | |
{ | |
"value":"#707070", | |
"name":"gray 44" | |
}, | |
{ | |
"value":"#6E6E6E", | |
"name":"gray 43" | |
}, | |
{ | |
"value":"#666666", | |
"name":"gray 40" | |
}, | |
{ | |
"value":"#636363", | |
"name":"gray 39" | |
}, | |
{ | |
"value":"#616161", | |
"name":"gray 38" | |
}, | |
{ | |
"value":"#5E5E5E", | |
"name":"gray 37" | |
}, | |
{ | |
"value":"#5C5C5C", | |
"name":"gray 36" | |
}, | |
{ | |
"value":"#595959", | |
"name":"gray 35" | |
}, | |
{ | |
"value":"#575757", | |
"name":"gray 34" | |
}, | |
{ | |
"value":"#545454", | |
"name":"gray 33" | |
}, | |
{ | |
"value":"#525252", | |
"name":"gray 32" | |
}, | |
{ | |
"value":"#4F4F4F", | |
"name":"gray 31" | |
}, | |
{ | |
"value":"#4D4D4D", | |
"name":"gray 30" | |
}, | |
{ | |
"value":"#4A4A4A", | |
"name":"gray 29" | |
}, | |
{ | |
"value":"#474747", | |
"name":"gray 28" | |
}, | |
{ | |
"value":"#454545", | |
"name":"gray 27" | |
}, | |
{ | |
"value":"#424242", | |
"name":"gray 26" | |
}, | |
{ | |
"value":"#404040", | |
"name":"gray 25" | |
}, | |
{ | |
"value":"#3D3D3D", | |
"name":"gray 24" | |
}, | |
{ | |
"value":"#3B3B3B", | |
"name":"gray 23" | |
}, | |
{ | |
"value":"#383838", | |
"name":"gray 22" | |
}, | |
{ | |
"value":"#363636", | |
"name":"gray 21" | |
}, | |
{ | |
"value":"#333333", | |
"name":"gray 20" | |
}, | |
{ | |
"value":"#303030", | |
"name":"gray 19" | |
}, | |
{ | |
"value":"#2E2E2E", | |
"name":"gray 18" | |
}, | |
{ | |
"value":"#2B2B2B", | |
"name":"gray 17" | |
}, | |
{ | |
"value":"#292929", | |
"name":"gray 16" | |
}, | |
{ | |
"value":"#262626", | |
"name":"gray 15" | |
}, | |
{ | |
"value":"#242424", | |
"name":"gray 14" | |
}, | |
{ | |
"value":"#212121", | |
"name":"gray 13" | |
}, | |
{ | |
"value":"#1F1F1F", | |
"name":"gray 12" | |
}, | |
{ | |
"value":"#1C1C1C", | |
"name":"gray 11" | |
}, | |
{ | |
"value":"#1A1A1A", | |
"name":"gray 10" | |
}, | |
{ | |
"value":"#171717", | |
"name":"gray 9" | |
}, | |
{ | |
"value":"#141414", | |
"name":"gray 8" | |
}, | |
{ | |
"value":"#121212", | |
"name":"gray 7" | |
}, | |
{ | |
"value":"#0F0F0F", | |
"name":"gray 6" | |
}, | |
{ | |
"value":"#0D0D0D", | |
"name":"gray 5" | |
}, | |
{ | |
"value":"#0A0A0A", | |
"name":"gray 4" | |
}, | |
{ | |
"value":"#080808", | |
"name":"gray 3" | |
}, | |
{ | |
"value":"#050505", | |
"name":"gray 2" | |
}, | |
{ | |
"value":"#030303", | |
"name":"gray 1" | |
}, | |
{ | |
"value":"#F5F5F5", | |
"css":true, | |
"name":"whitesmoke" | |
} | |
] | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colornames/index.js": | |
/*!*******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colornames/index.js ***! | |
\*******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
/** | |
* Module dependencies | |
*/ | |
var colors = __webpack_require__(/*! ./colors */ "../fabric8-analytics-lsp-server/output/node_modules/colornames/colors.js") | |
var cssColors = colors.filter(function(color){ | |
return !! color.css | |
}) | |
var vgaColors = colors.filter(function(color){ | |
return !! color.vga | |
}) | |
/** | |
* Get color value for a certain name. | |
* @param name {String} | |
* @return {String} Hex color value | |
* @api public | |
*/ | |
module.exports = function(name) { | |
var color = module.exports.get(name) | |
return color && color.value | |
} | |
/** | |
* Get color object. | |
* | |
* @param name {String} | |
* @return {Object} Color object | |
* @api public | |
*/ | |
module.exports.get = function(name) { | |
name = name || '' | |
name = name.trim().toLowerCase() | |
return colors.filter(function(color){ | |
return color.name.toLowerCase() === name | |
}).pop() | |
} | |
/** | |
* Get all color object. | |
* | |
* @return {Array} | |
* @api public | |
*/ | |
module.exports.all = module.exports.get.all = function() { | |
return colors | |
} | |
/** | |
* Get color object compatible with CSS. | |
* | |
* @return {Array} | |
* @api public | |
*/ | |
module.exports.get.css = function(name) { | |
if (!name) return cssColors | |
name = name || '' | |
name = name.trim().toLowerCase() | |
return cssColors.filter(function(color){ | |
return color.name.toLowerCase() === name | |
}).pop() | |
} | |
module.exports.get.vga = function(name) { | |
if (!name) return vgaColors | |
name = name || '' | |
name = name.trim().toLowerCase() | |
return vgaColors.filter(function(color){ | |
return color.name.toLowerCase() === name | |
}).pop() | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/colors.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/colors.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
/* | |
The MIT License (MIT) | |
Original Library | |
- Copyright (c) Marak Squires | |
Additional functionality | |
- Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
THE SOFTWARE. | |
*/ | |
var colors = {}; | |
module['exports'] = colors; | |
colors.themes = {}; | |
var util = __webpack_require__(/*! util */ "util"); | |
var ansiStyles = colors.styles = __webpack_require__(/*! ./styles */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/styles.js"); | |
var defineProps = Object.defineProperties; | |
var newLineRegex = new RegExp(/[\r\n]+/g); | |
colors.supportsColor = __webpack_require__(/*! ./system/supports-colors */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/supports-colors.js").supportsColor; | |
if (typeof colors.enabled === 'undefined') { | |
colors.enabled = colors.supportsColor() !== false; | |
} | |
colors.enable = function() { | |
colors.enabled = true; | |
}; | |
colors.disable = function() { | |
colors.enabled = false; | |
}; | |
colors.stripColors = colors.strip = function(str) { | |
return ('' + str).replace(/\x1B\[\d+m/g, ''); | |
}; | |
// eslint-disable-next-line no-unused-vars | |
var stylize = colors.stylize = function stylize(str, style) { | |
if (!colors.enabled) { | |
return str+''; | |
} | |
var styleMap = ansiStyles[style]; | |
// Stylize should work for non-ANSI styles, too | |
if(!styleMap && style in colors){ | |
// Style maps like trap operate as functions on strings; | |
// they don't have properties like open or close. | |
return colors[style](str); | |
} | |
return styleMap.open + str + styleMap.close; | |
}; | |
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; | |
var escapeStringRegexp = function(str) { | |
if (typeof str !== 'string') { | |
throw new TypeError('Expected a string'); | |
} | |
return str.replace(matchOperatorsRe, '\\$&'); | |
}; | |
function build(_styles) { | |
var builder = function builder() { | |
return applyStyle.apply(builder, arguments); | |
}; | |
builder._styles = _styles; | |
// __proto__ is used because we must return a function, but there is | |
// no way to create a function with a different prototype. | |
builder.__proto__ = proto; | |
return builder; | |
} | |
var styles = (function() { | |
var ret = {}; | |
ansiStyles.grey = ansiStyles.gray; | |
Object.keys(ansiStyles).forEach(function(key) { | |
ansiStyles[key].closeRe = | |
new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); | |
ret[key] = { | |
get: function() { | |
return build(this._styles.concat(key)); | |
}, | |
}; | |
}); | |
return ret; | |
})(); | |
var proto = defineProps(function colors() {}, styles); | |
function applyStyle() { | |
var args = Array.prototype.slice.call(arguments); | |
var str = args.map(function(arg) { | |
// Use weak equality check so we can colorize null/undefined in safe mode | |
if (arg != null && arg.constructor === String) { | |
return arg; | |
} else { | |
return util.inspect(arg); | |
} | |
}).join(' '); | |
if (!colors.enabled || !str) { | |
return str; | |
} | |
var newLinesPresent = str.indexOf('\n') != -1; | |
var nestedStyles = this._styles; | |
var i = nestedStyles.length; | |
while (i--) { | |
var code = ansiStyles[nestedStyles[i]]; | |
str = code.open + str.replace(code.closeRe, code.open) + code.close; | |
if (newLinesPresent) { | |
str = str.replace(newLineRegex, function(match) { | |
return code.close + match + code.open; | |
}); | |
} | |
} | |
return str; | |
} | |
colors.setTheme = function(theme) { | |
if (typeof theme === 'string') { | |
console.log('colors.setTheme now only accepts an object, not a string. ' + | |
'If you are trying to set a theme from a file, it is now your (the ' + | |
'caller\'s) responsibility to require the file. The old syntax ' + | |
'looked like colors.setTheme(__dirname + ' + | |
'\'/../themes/generic-logging.js\'); The new syntax looks like '+ | |
'colors.setTheme(require(__dirname + ' + | |
'\'/../themes/generic-logging.js\'));'); | |
return; | |
} | |
for (var style in theme) { | |
(function(style) { | |
colors[style] = function(str) { | |
if (typeof theme[style] === 'object') { | |
var out = str; | |
for (var i in theme[style]) { | |
out = colors[theme[style][i]](out); | |
} | |
return out; | |
} | |
return colors[theme[style]](str); | |
}; | |
})(style); | |
} | |
}; | |
function init() { | |
var ret = {}; | |
Object.keys(styles).forEach(function(name) { | |
ret[name] = { | |
get: function() { | |
return build([name]); | |
}, | |
}; | |
}); | |
return ret; | |
} | |
var sequencer = function sequencer(map, str) { | |
var exploded = str.split(''); | |
exploded = exploded.map(map); | |
return exploded.join(''); | |
}; | |
// custom formatter methods | |
colors.trap = __webpack_require__(/*! ./custom/trap */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/trap.js"); | |
colors.zalgo = __webpack_require__(/*! ./custom/zalgo */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/zalgo.js"); | |
// maps | |
colors.maps = {}; | |
colors.maps.america = __webpack_require__(/*! ./maps/america */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/america.js")(colors); | |
colors.maps.zebra = __webpack_require__(/*! ./maps/zebra */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/zebra.js")(colors); | |
colors.maps.rainbow = __webpack_require__(/*! ./maps/rainbow */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/rainbow.js")(colors); | |
colors.maps.random = __webpack_require__(/*! ./maps/random */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/random.js")(colors); | |
for (var map in colors.maps) { | |
(function(map) { | |
colors[map] = function(str) { | |
return sequencer(colors.maps[map], str); | |
}; | |
})(map); | |
} | |
defineProps(colors, init()); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/trap.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/trap.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module['exports'] = function runTheTrap(text, options) { | |
var result = ''; | |
text = text || 'Run the trap, drop the bass'; | |
text = text.split(''); | |
var trap = { | |
a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'], | |
b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'], | |
c: ['\u00a9', '\u023b', '\u03fe'], | |
d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'], | |
e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc', | |
'\u0a6c'], | |
f: ['\u04fa'], | |
g: ['\u0262'], | |
h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'], | |
i: ['\u0f0f'], | |
j: ['\u0134'], | |
k: ['\u0138', '\u04a0', '\u04c3', '\u051e'], | |
l: ['\u0139'], | |
m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'], | |
n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'], | |
o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd', | |
'\u06dd', '\u0e4f'], | |
p: ['\u01f7', '\u048e'], | |
q: ['\u09cd'], | |
r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'], | |
s: ['\u00a7', '\u03de', '\u03df', '\u03e8'], | |
t: ['\u0141', '\u0166', '\u0373'], | |
u: ['\u01b1', '\u054d'], | |
v: ['\u05d8'], | |
w: ['\u0428', '\u0460', '\u047c', '\u0d70'], | |
x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'], | |
y: ['\u00a5', '\u04b0', '\u04cb'], | |
z: ['\u01b5', '\u0240'], | |
}; | |
text.forEach(function(c) { | |
c = c.toLowerCase(); | |
var chars = trap[c] || [' ']; | |
var rand = Math.floor(Math.random() * chars.length); | |
if (typeof trap[c] !== 'undefined') { | |
result += trap[c][rand]; | |
} else { | |
result += c; | |
} | |
}); | |
return result; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/zalgo.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/custom/zalgo.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
// please no | |
module['exports'] = function zalgo(text, options) { | |
text = text || ' he is here '; | |
var soul = { | |
'up': [ | |
'̍', '̎', '̄', '̅', | |
'̿', '̑', '̆', '̐', | |
'͒', '͗', '͑', '̇', | |
'̈', '̊', '͂', '̓', | |
'̈', '͊', '͋', '͌', | |
'̃', '̂', '̌', '͐', | |
'̀', '́', '̋', '̏', | |
'̒', '̓', '̔', '̽', | |
'̉', 'ͣ', 'ͤ', 'ͥ', | |
'ͦ', 'ͧ', 'ͨ', 'ͩ', | |
'ͪ', 'ͫ', 'ͬ', 'ͭ', | |
'ͮ', 'ͯ', '̾', '͛', | |
'͆', '̚', | |
], | |
'down': [ | |
'̖', '̗', '̘', '̙', | |
'̜', '̝', '̞', '̟', | |
'̠', '̤', '̥', '̦', | |
'̩', '̪', '̫', '̬', | |
'̭', '̮', '̯', '̰', | |
'̱', '̲', '̳', '̹', | |
'̺', '̻', '̼', 'ͅ', | |
'͇', '͈', '͉', '͍', | |
'͎', '͓', '͔', '͕', | |
'͖', '͙', '͚', '̣', | |
], | |
'mid': [ | |
'̕', '̛', '̀', '́', | |
'͘', '̡', '̢', '̧', | |
'̨', '̴', '̵', '̶', | |
'͜', '͝', '͞', | |
'͟', '͠', '͢', '̸', | |
'̷', '͡', ' ҉', | |
], | |
}; | |
var all = [].concat(soul.up, soul.down, soul.mid); | |
function randomNumber(range) { | |
var r = Math.floor(Math.random() * range); | |
return r; | |
} | |
function isChar(character) { | |
var bool = false; | |
all.filter(function(i) { | |
bool = (i === character); | |
}); | |
return bool; | |
} | |
function heComes(text, options) { | |
var result = ''; | |
var counts; | |
var l; | |
options = options || {}; | |
options['up'] = | |
typeof options['up'] !== 'undefined' ? options['up'] : true; | |
options['mid'] = | |
typeof options['mid'] !== 'undefined' ? options['mid'] : true; | |
options['down'] = | |
typeof options['down'] !== 'undefined' ? options['down'] : true; | |
options['size'] = | |
typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; | |
text = text.split(''); | |
for (l in text) { | |
if (isChar(l)) { | |
continue; | |
} | |
result = result + text[l]; | |
counts = {'up': 0, 'down': 0, 'mid': 0}; | |
switch (options.size) { | |
case 'mini': | |
counts.up = randomNumber(8); | |
counts.mid = randomNumber(2); | |
counts.down = randomNumber(8); | |
break; | |
case 'maxi': | |
counts.up = randomNumber(16) + 3; | |
counts.mid = randomNumber(4) + 1; | |
counts.down = randomNumber(64) + 3; | |
break; | |
default: | |
counts.up = randomNumber(8) + 1; | |
counts.mid = randomNumber(6) / 2; | |
counts.down = randomNumber(8) + 1; | |
break; | |
} | |
var arr = ['up', 'mid', 'down']; | |
for (var d in arr) { | |
var index = arr[d]; | |
for (var i = 0; i <= counts[index]; i++) { | |
if (options[index]) { | |
result = result + soul[index][randomNumber(soul[index].length)]; | |
} | |
} | |
} | |
} | |
return result; | |
} | |
// don't summon him | |
return heComes(text, options); | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/america.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/america.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module['exports'] = function(colors) { | |
return function(letter, i, exploded) { | |
if (letter === ' ') return letter; | |
switch (i%3) { | |
case 0: return colors.red(letter); | |
case 1: return colors.white(letter); | |
case 2: return colors.blue(letter); | |
} | |
}; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/rainbow.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/rainbow.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module['exports'] = function(colors) { | |
// RoY G BiV | |
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; | |
return function(letter, i, exploded) { | |
if (letter === ' ') { | |
return letter; | |
} else { | |
return colors[rainbowColors[i++ % rainbowColors.length]](letter); | |
} | |
}; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/random.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/random.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module['exports'] = function(colors) { | |
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', | |
'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', | |
'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; | |
return function(letter, i, exploded) { | |
return letter === ' ' ? letter : | |
colors[ | |
available[Math.round(Math.random() * (available.length - 2))] | |
](letter); | |
}; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/zebra.js": | |
/*!************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/maps/zebra.js ***! | |
\************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module['exports'] = function(colors) { | |
return function(letter, i, exploded) { | |
return i % 2 === 0 ? letter : colors.inverse(letter); | |
}; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/styles.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/styles.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/* | |
The MIT License (MIT) | |
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
THE SOFTWARE. | |
*/ | |
var styles = {}; | |
module['exports'] = styles; | |
var codes = { | |
reset: [0, 0], | |
bold: [1, 22], | |
dim: [2, 22], | |
italic: [3, 23], | |
underline: [4, 24], | |
inverse: [7, 27], | |
hidden: [8, 28], | |
strikethrough: [9, 29], | |
black: [30, 39], | |
red: [31, 39], | |
green: [32, 39], | |
yellow: [33, 39], | |
blue: [34, 39], | |
magenta: [35, 39], | |
cyan: [36, 39], | |
white: [37, 39], | |
gray: [90, 39], | |
grey: [90, 39], | |
brightRed: [91, 39], | |
brightGreen: [92, 39], | |
brightYellow: [93, 39], | |
brightBlue: [94, 39], | |
brightMagenta: [95, 39], | |
brightCyan: [96, 39], | |
brightWhite: [97, 39], | |
bgBlack: [40, 49], | |
bgRed: [41, 49], | |
bgGreen: [42, 49], | |
bgYellow: [43, 49], | |
bgBlue: [44, 49], | |
bgMagenta: [45, 49], | |
bgCyan: [46, 49], | |
bgWhite: [47, 49], | |
bgGray: [100, 49], | |
bgGrey: [100, 49], | |
bgBrightRed: [101, 49], | |
bgBrightGreen: [102, 49], | |
bgBrightYellow: [103, 49], | |
bgBrightBlue: [104, 49], | |
bgBrightMagenta: [105, 49], | |
bgBrightCyan: [106, 49], | |
bgBrightWhite: [107, 49], | |
// legacy styles for colors pre v1.0.0 | |
blackBG: [40, 49], | |
redBG: [41, 49], | |
greenBG: [42, 49], | |
yellowBG: [43, 49], | |
blueBG: [44, 49], | |
magentaBG: [45, 49], | |
cyanBG: [46, 49], | |
whiteBG: [47, 49], | |
}; | |
Object.keys(codes).forEach(function(key) { | |
var val = codes[key]; | |
var style = styles[key] = []; | |
style.open = '\u001b[' + val[0] + 'm'; | |
style.close = '\u001b[' + val[1] + 'm'; | |
}); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/has-flag.js": | |
/*!*****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/has-flag.js ***! | |
\*****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* | |
MIT License | |
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
SOFTWARE. | |
*/ | |
module.exports = function(flag, argv) { | |
argv = argv || process.argv; | |
var terminatorPos = argv.indexOf('--'); | |
var prefix = /^-{1,2}/.test(flag) ? '' : '--'; | |
var pos = argv.indexOf(prefix + flag); | |
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/supports-colors.js": | |
/*!************************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/supports-colors.js ***! | |
\************************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
/* | |
The MIT License (MIT) | |
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in | |
all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
THE SOFTWARE. | |
*/ | |
var os = __webpack_require__(/*! os */ "os"); | |
var hasFlag = __webpack_require__(/*! ./has-flag.js */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/system/has-flag.js"); | |
var env = process.env; | |
var forceColor = void 0; | |
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { | |
forceColor = false; | |
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') | |
|| hasFlag('color=always')) { | |
forceColor = true; | |
} | |
if ('FORCE_COLOR' in env) { | |
forceColor = env.FORCE_COLOR.length === 0 | |
|| parseInt(env.FORCE_COLOR, 10) !== 0; | |
} | |
function translateLevel(level) { | |
if (level === 0) { | |
return false; | |
} | |
return { | |
level: level, | |
hasBasic: true, | |
has256: level >= 2, | |
has16m: level >= 3, | |
}; | |
} | |
function supportsColor(stream) { | |
if (forceColor === false) { | |
return 0; | |
} | |
if (hasFlag('color=16m') || hasFlag('color=full') | |
|| hasFlag('color=truecolor')) { | |
return 3; | |
} | |
if (hasFlag('color=256')) { | |
return 2; | |
} | |
if (stream && !stream.isTTY && forceColor !== true) { | |
return 0; | |
} | |
var min = forceColor ? 1 : 0; | |
if (process.platform === 'win32') { | |
// Node.js 7.5.0 is the first version of Node.js to include a patch to | |
// libuv that enables 256 color output on Windows. Anything earlier and it | |
// won't work. However, here we target Node.js 8 at minimum as it is an LTS | |
// release, and Node.js 7 is not. Windows 10 build 10586 is the first | |
// Windows release that supports 256 colors. Windows 10 build 14931 is the | |
// first release that supports 16m/TrueColor. | |
var osRelease = os.release().split('.'); | |
if (Number(process.versions.node.split('.')[0]) >= 8 | |
&& Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { | |
return Number(osRelease[2]) >= 14931 ? 3 : 2; | |
} | |
return 1; | |
} | |
if ('CI' in env) { | |
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) { | |
return sign in env; | |
}) || env.CI_NAME === 'codeship') { | |
return 1; | |
} | |
return min; | |
} | |
if ('TEAMCITY_VERSION' in env) { | |
return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0 | |
); | |
} | |
if ('TERM_PROGRAM' in env) { | |
var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); | |
switch (env.TERM_PROGRAM) { | |
case 'iTerm.app': | |
return version >= 3 ? 3 : 2; | |
case 'Hyper': | |
return 3; | |
case 'Apple_Terminal': | |
return 2; | |
// No default | |
} | |
} | |
if (/-256(color)?$/i.test(env.TERM)) { | |
return 2; | |
} | |
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { | |
return 1; | |
} | |
if ('COLORTERM' in env) { | |
return 1; | |
} | |
if (env.TERM === 'dumb') { | |
return min; | |
} | |
return min; | |
} | |
function getSupportLevel(stream) { | |
var level = supportsColor(stream); | |
return translateLevel(level); | |
} | |
module.exports = { | |
supportsColor: getSupportLevel, | |
stdout: getSupportLevel(process.stdout), | |
stderr: getSupportLevel(process.stderr), | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colors/safe.js": | |
/*!**************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colors/safe.js ***! | |
\**************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
// | |
// Remark: Requiring this file will use the "safe" colors API, | |
// which will not touch String.prototype. | |
// | |
// var colors = require('colors/safe'); | |
// colors.red("foo") | |
// | |
// | |
var colors = __webpack_require__(/*! ./lib/colors */ "../fabric8-analytics-lsp-server/output/node_modules/colors/lib/colors.js"); | |
module['exports'] = colors; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/colorspace/index.js": | |
/*!*******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/colorspace/index.js ***! | |
\*******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var color = __webpack_require__(/*! color */ "../fabric8-analytics-lsp-server/output/node_modules/color/index.js") | |
, hex = __webpack_require__(/*! text-hex */ "../fabric8-analytics-lsp-server/output/node_modules/text-hex/index.js"); | |
/** | |
* Generate a color for a given name. But be reasonably smart about it by | |
* understanding name spaces and coloring each namespace a bit lighter so they | |
* still have the same base color as the root. | |
* | |
* @param {string} namespace The namespace | |
* @param {string} [delimiter] The delimiter | |
* @returns {string} color | |
*/ | |
module.exports = function colorspace(namespace, delimiter) { | |
var split = namespace.split(delimiter || ':'); | |
var base = hex(split[0]); | |
if (!split.length) return base; | |
for (var i = 0, l = split.length - 1; i < l; i++) { | |
base = color(base) | |
.mix(color(hex(split[i + 1]))) | |
.saturate(1) | |
.hex(); | |
} | |
return base; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/compare-versions/index.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/compare-versions/index.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* global define */ | |
(function (root, factory) { | |
/* istanbul ignore next */ | |
if (true) { | |
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), | |
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? | |
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), | |
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); | |
} else {} | |
}(this, function () { | |
var semver = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i; | |
function indexOrEnd(str, q) { | |
return str.indexOf(q) === -1 ? str.length : str.indexOf(q); | |
} | |
function split(v) { | |
var c = v.replace(/^v/, '').replace(/\+.*$/, ''); | |
var patchIndex = indexOrEnd(c, '-'); | |
var arr = c.substring(0, patchIndex).split('.'); | |
arr.push(c.substring(patchIndex + 1)); | |
return arr; | |
} | |
function tryParse(v) { | |
return isNaN(Number(v)) ? v : Number(v); | |
} | |
function validate(version) { | |
if (typeof version !== 'string') { | |
throw new TypeError('Invalid argument expected string'); | |
} | |
if (!semver.test(version)) { | |
throw new Error('Invalid argument not valid semver (\''+version+'\' received)'); | |
} | |
} | |
function compareVersions(v1, v2) { | |
[v1, v2].forEach(validate); | |
var s1 = split(v1); | |
var s2 = split(v2); | |
for (var i = 0; i < Math.max(s1.length - 1, s2.length - 1); i++) { | |
var n1 = parseInt(s1[i] || 0, 10); | |
var n2 = parseInt(s2[i] || 0, 10); | |
if (n1 > n2) return 1; | |
if (n2 > n1) return -1; | |
} | |
var sp1 = s1[s1.length - 1]; | |
var sp2 = s2[s2.length - 1]; | |
if (sp1 && sp2) { | |
var p1 = sp1.split('.').map(tryParse); | |
var p2 = sp2.split('.').map(tryParse); | |
for (i = 0; i < Math.max(p1.length, p2.length); i++) { | |
if (p1[i] === undefined || typeof p2[i] === 'string' && typeof p1[i] === 'number') return -1; | |
if (p2[i] === undefined || typeof p1[i] === 'string' && typeof p2[i] === 'number') return 1; | |
if (p1[i] > p2[i]) return 1; | |
if (p2[i] > p1[i]) return -1; | |
} | |
} else if (sp1 || sp2) { | |
return sp1 ? -1 : 1; | |
} | |
return 0; | |
}; | |
var allowedOperators = [ | |
'>', | |
'>=', | |
'=', | |
'<', | |
'<=' | |
]; | |
var operatorResMap = { | |
'>': [1], | |
'>=': [0, 1], | |
'=': [0], | |
'<=': [-1, 0], | |
'<': [-1] | |
}; | |
function validateOperator(op) { | |
if (typeof op !== 'string') { | |
throw new TypeError('Invalid operator type, expected string but got ' + typeof op); | |
} | |
if (allowedOperators.indexOf(op) === -1) { | |
throw new TypeError('Invalid operator, expected one of ' + allowedOperators.join('|')); | |
} | |
} | |
compareVersions.validate = function(version) { | |
return typeof version === 'string' && semver.test(version); | |
} | |
compareVersions.compare = function (v1, v2, operator) { | |
// Validate operator | |
validateOperator(operator); | |
// since result of compareVersions can only be -1 or 0 or 1 | |
// a simple map can be used to replace switch | |
var res = compareVersions(v1, v2); | |
return operatorResMap[operator].indexOf(res) > -1; | |
} | |
return compareVersions; | |
})); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/core-util-is/lib/util.js": | |
/*!************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/core-util-is/lib/util.js ***! | |
\************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
// Copyright Joyent, Inc. and other Node contributors. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a | |
// copy of this software and associated documentation files (the | |
// "Software"), to deal in the Software without restriction, including | |
// without limitation the rights to use, copy, modify, merge, publish, | |
// distribute, sublicense, and/or sell copies of the Software, and to permit | |
// persons to whom the Software is furnished to do so, subject to the | |
// following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included | |
// in all copies or substantial portions of the Software. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | |
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | |
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | |
// USE OR OTHER DEALINGS IN THE SOFTWARE. | |
// NOTE: These type checking functions intentionally don't use `instanceof` | |
// because it is fragile and can be easily faked with `Object.create()`. | |
function isArray(arg) { | |
if (Array.isArray) { | |
return Array.isArray(arg); | |
} | |
return objectToString(arg) === '[object Array]'; | |
} | |
exports.isArray = isArray; | |
function isBoolean(arg) { | |
return typeof arg === 'boolean'; | |
} | |
exports.isBoolean = isBoolean; | |
function isNull(arg) { | |
return arg === null; | |
} | |
exports.isNull = isNull; | |
function isNullOrUndefined(arg) { | |
return arg == null; | |
} | |
exports.isNullOrUndefined = isNullOrUndefined; | |
function isNumber(arg) { | |
return typeof arg === 'number'; | |
} | |
exports.isNumber = isNumber; | |
function isString(arg) { | |
return typeof arg === 'string'; | |
} | |
exports.isString = isString; | |
function isSymbol(arg) { | |
return typeof arg === 'symbol'; | |
} | |
exports.isSymbol = isSymbol; | |
function isUndefined(arg) { | |
return arg === void 0; | |
} | |
exports.isUndefined = isUndefined; | |
function isRegExp(re) { | |
return objectToString(re) === '[object RegExp]'; | |
} | |
exports.isRegExp = isRegExp; | |
function isObject(arg) { | |
return typeof arg === 'object' && arg !== null; | |
} | |
exports.isObject = isObject; | |
function isDate(d) { | |
return objectToString(d) === '[object Date]'; | |
} | |
exports.isDate = isDate; | |
function isError(e) { | |
return (objectToString(e) === '[object Error]' || e instanceof Error); | |
} | |
exports.isError = isError; | |
function isFunction(arg) { | |
return typeof arg === 'function'; | |
} | |
exports.isFunction = isFunction; | |
function isPrimitive(arg) { | |
return arg === null || | |
typeof arg === 'boolean' || | |
typeof arg === 'number' || | |
typeof arg === 'string' || | |
typeof arg === 'symbol' || // ES6 symbol | |
typeof arg === 'undefined'; | |
} | |
exports.isPrimitive = isPrimitive; | |
exports.isBuffer = Buffer.isBuffer; | |
function objectToString(o) { | |
return Object.prototype.toString.call(o); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/diagnostics/index.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/diagnostics/index.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var colorspace = __webpack_require__(/*! colorspace */ "../fabric8-analytics-lsp-server/output/node_modules/colorspace/index.js") | |
, enabled = __webpack_require__(/*! enabled */ "../fabric8-analytics-lsp-server/output/node_modules/enabled/index.js") | |
, kuler = __webpack_require__(/*! kuler */ "../fabric8-analytics-lsp-server/output/node_modules/kuler/index.js") | |
, util = __webpack_require__(/*! util */ "util"); | |
/** | |
* Check if the terminal we're using allows the use of colors. | |
* | |
* @type {Boolean} | |
* @private | |
*/ | |
var tty = __webpack_require__(/*! tty */ "tty").isatty(1); | |
/** | |
* The default stream instance we should be writing against. | |
* | |
* @type {Stream} | |
* @public | |
*/ | |
var stream = process.stdout; | |
/** | |
* A simple environment based logger. | |
* | |
* Options: | |
* | |
* - colors: Force the use of colors or forcefully disable them. If this option | |
* is not supplied the colors will be based on your terminal. | |
* - stream: The Stream instance we should write our logs to, defaults to | |
* process.stdout but can be anything you like. | |
* | |
* @param {String} name The namespace of your log function. | |
* @param {Object} options Logger configuration. | |
* @returns {Function} Configured logging method. | |
* @api public | |
*/ | |
function factory(name, options) { | |
if (!enabled(name)) return function diagnopes() {}; | |
options = options || {}; | |
options.colors = 'colors' in options ? options.colors : tty; | |
options.ansi = options.colors ? kuler(name, colorspace(name)) : name; | |
options.stream = options.stream || stream; | |
// | |
// Allow multiple streams, so make sure it's an array which makes iteration | |
// easier. | |
// | |
if (!Array.isArray(options.stream)) { | |
options.stream = [options.stream]; | |
} | |
// | |
// The actual debug function which does the logging magic. | |
// | |
return function debug(line) { | |
// | |
// Better formatting for error instances. | |
// | |
if (line instanceof Error) line = line.stack || line.message || line; | |
line = [ | |
// | |
// Add the colorized namespace. | |
// | |
options.ansi, | |
// | |
// The total time we took to execute the next debug statement. | |
// | |
' ', | |
line | |
].join(''); | |
// | |
// Use util.format so we can follow the same API as console.log. | |
// | |
line = util.format.apply(this, [line].concat( | |
Array.prototype.slice.call(arguments, 1) | |
)) + '\n'; | |
options.stream.forEach(function each(stream) { | |
stream.write(line); | |
}); | |
}; | |
} | |
/** | |
* Override the "default" stream that we write to. This allows you to globally | |
* configure the steams. | |
* | |
* @param {Stream} output | |
* @returns {function} Factory | |
* @api private | |
*/ | |
factory.to = function to(output) { | |
stream = output; | |
return factory; | |
}; | |
// | |
// Expose the module. | |
// | |
module.exports = factory; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/enabled/index.js": | |
/*!****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/enabled/index.js ***! | |
\****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var env = __webpack_require__(/*! env-variable */ "../fabric8-analytics-lsp-server/output/node_modules/env-variable/index.js"); | |
/** | |
* Checks if a given namespace is allowed by the environment variables. | |
* | |
* @param {String} name namespace that should be included. | |
* @param {Array} variables | |
* @returns {Boolean} | |
* @api public | |
*/ | |
module.exports = function enabled(name, variables) { | |
var envy = env() | |
, variable | |
, i = 0; | |
variables = variables || ['diagnostics', 'debug']; | |
for (; i < variables.length; i++) { | |
if ((variable = envy[variables[i]])) break; | |
} | |
if (!variable) return false; | |
variables = variable.split(/[\s,]+/); | |
i = 0; | |
for (; i < variables.length; i++) { | |
variable = variables[i].replace('*', '.*?'); | |
if ('-' === variable.charAt(0)) { | |
if ((new RegExp('^'+ variable.substr(1) +'$')).test(name)) { | |
return false; | |
} | |
continue; | |
} | |
if ((new RegExp('^'+ variable +'$')).test(name)) { | |
return true; | |
} | |
} | |
return false; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/env-variable/index.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/env-variable/index.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var has = Object.prototype.hasOwnProperty; | |
/** | |
* Gather environment variables from various locations. | |
* | |
* @param {Object} environment The default environment variables. | |
* @returns {Object} environment. | |
* @api public | |
*/ | |
function env(environment) { | |
environment = environment || {}; | |
if ('object' === typeof process && 'object' === typeof process.env) { | |
env.merge(environment, process.env); | |
} | |
if ('undefined' !== typeof window) { | |
if ('string' === window.name && window.name.length) { | |
env.merge(environment, env.parse(window.name)); | |
} | |
try { | |
if (window.localStorage) { | |
env.merge(environment, env.parse(window.localStorage.env || window.localStorage.debug)); | |
} | |
} catch (e) {} | |
if ( | |
'object' === typeof window.location | |
&& 'string' === typeof window.location.hash | |
&& window.location.hash.length | |
) { | |
env.merge(environment, env.parse(window.location.hash.charAt(0) === '#' | |
? window.location.hash.slice(1) | |
: window.location.hash | |
)); | |
} | |
} | |
// | |
// Also add lower case variants to the object for easy access. | |
// | |
var key, lower; | |
for (key in environment) { | |
lower = key.toLowerCase(); | |
if (!(lower in environment)) { | |
environment[lower] = environment[key]; | |
} | |
} | |
return environment; | |
} | |
/** | |
* A poor man's merge utility. | |
* | |
* @param {Object} base Object where the add object is merged in. | |
* @param {Object} add Object that needs to be added to the base object. | |
* @returns {Object} base | |
* @api private | |
*/ | |
env.merge = function merge(base, add) { | |
for (var key in add) { | |
if (has.call(add, key)) { | |
base[key] = add[key]; | |
} | |
} | |
return base; | |
}; | |
/** | |
* A poor man's query string parser. | |
* | |
* @param {String} query The query string that needs to be parsed. | |
* @returns {Object} Key value mapped query string. | |
* @api private | |
*/ | |
env.parse = function parse(query) { | |
var parser = /([^=?&]+)=([^&]*)/g | |
, result = {} | |
, part; | |
if (!query) return result; | |
for (; | |
part = parser.exec(query); | |
result[decodeURIComponent(part[1])] = decodeURIComponent(part[2]) | |
); | |
return result.env || result; | |
}; | |
// | |
// Expose the module | |
// | |
module.exports = env; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/fast-safe-stringify/index.js": | |
/*!****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/fast-safe-stringify/index.js ***! | |
\****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module.exports = stringify | |
stringify.default = stringify | |
stringify.stable = deterministicStringify | |
stringify.stableStringify = deterministicStringify | |
var arr = [] | |
var replacerStack = [] | |
// Regular stringify | |
function stringify (obj, replacer, spacer) { | |
decirc(obj, '', [], undefined) | |
var res | |
if (replacerStack.length === 0) { | |
res = JSON.stringify(obj, replacer, spacer) | |
} else { | |
res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) | |
} | |
while (arr.length !== 0) { | |
var part = arr.pop() | |
if (part.length === 4) { | |
Object.defineProperty(part[0], part[1], part[3]) | |
} else { | |
part[0][part[1]] = part[2] | |
} | |
} | |
return res | |
} | |
function decirc (val, k, stack, parent) { | |
var i | |
if (typeof val === 'object' && val !== null) { | |
for (i = 0; i < stack.length; i++) { | |
if (stack[i] === val) { | |
var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) | |
if (propertyDescriptor.get !== undefined) { | |
if (propertyDescriptor.configurable) { | |
Object.defineProperty(parent, k, { value: '[Circular]' }) | |
arr.push([parent, k, val, propertyDescriptor]) | |
} else { | |
replacerStack.push([val, k]) | |
} | |
} else { | |
parent[k] = '[Circular]' | |
arr.push([parent, k, val]) | |
} | |
return | |
} | |
} | |
stack.push(val) | |
// Optimize for Arrays. Big arrays could kill the performance otherwise! | |
if (Array.isArray(val)) { | |
for (i = 0; i < val.length; i++) { | |
decirc(val[i], i, stack, val) | |
} | |
} else { | |
var keys = Object.keys(val) | |
for (i = 0; i < keys.length; i++) { | |
var key = keys[i] | |
decirc(val[key], key, stack, val) | |
} | |
} | |
stack.pop() | |
} | |
} | |
// Stable-stringify | |
function compareFunction (a, b) { | |
if (a < b) { | |
return -1 | |
} | |
if (a > b) { | |
return 1 | |
} | |
return 0 | |
} | |
function deterministicStringify (obj, replacer, spacer) { | |
var tmp = deterministicDecirc(obj, '', [], undefined) || obj | |
var res | |
if (replacerStack.length === 0) { | |
res = JSON.stringify(tmp, replacer, spacer) | |
} else { | |
res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) | |
} | |
while (arr.length !== 0) { | |
var part = arr.pop() | |
if (part.length === 4) { | |
Object.defineProperty(part[0], part[1], part[3]) | |
} else { | |
part[0][part[1]] = part[2] | |
} | |
} | |
return res | |
} | |
function deterministicDecirc (val, k, stack, parent) { | |
var i | |
if (typeof val === 'object' && val !== null) { | |
for (i = 0; i < stack.length; i++) { | |
if (stack[i] === val) { | |
var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) | |
if (propertyDescriptor.get !== undefined) { | |
if (propertyDescriptor.configurable) { | |
Object.defineProperty(parent, k, { value: '[Circular]' }) | |
arr.push([parent, k, val, propertyDescriptor]) | |
} else { | |
replacerStack.push([val, k]) | |
} | |
} else { | |
parent[k] = '[Circular]' | |
arr.push([parent, k, val]) | |
} | |
return | |
} | |
} | |
if (typeof val.toJSON === 'function') { | |
return | |
} | |
stack.push(val) | |
// Optimize for Arrays. Big arrays could kill the performance otherwise! | |
if (Array.isArray(val)) { | |
for (i = 0; i < val.length; i++) { | |
deterministicDecirc(val[i], i, stack, val) | |
} | |
} else { | |
// Create a temporary object in the required way | |
var tmp = {} | |
var keys = Object.keys(val).sort(compareFunction) | |
for (i = 0; i < keys.length; i++) { | |
var key = keys[i] | |
deterministicDecirc(val[key], key, stack, val) | |
tmp[key] = val[key] | |
} | |
if (parent !== undefined) { | |
arr.push([parent, k, val]) | |
parent[k] = tmp | |
} else { | |
return tmp | |
} | |
} | |
stack.pop() | |
} | |
} | |
// wraps replacer function to handle values we couldn't replace | |
// and mark them as [Circular] | |
function replaceGetterValues (replacer) { | |
replacer = replacer !== undefined ? replacer : function (k, v) { return v } | |
return function (key, val) { | |
if (replacerStack.length > 0) { | |
for (var i = 0; i < replacerStack.length; i++) { | |
var part = replacerStack[i] | |
if (part[1] === key && part[0] === val) { | |
val = '[Circular]' | |
replacerStack.splice(i, 1) | |
break | |
} | |
} | |
} | |
return replacer.call(this, key, val) | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/fecha/lib/fecha.js": | |
/*!******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/fecha/lib/fecha.js ***! | |
\******************************************************************************/ | |
/*! exports provided: default, assign, format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks */ | |
/***/ (function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
__webpack_require__.r(__webpack_exports__); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return assign; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultI18n", function() { return defaultI18n; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setGlobalDateI18n", function() { return setGlobalDateI18n; }); | |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setGlobalDateMasks", function() { return setGlobalDateMasks; }); | |
var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; | |
var twoDigitsOptional = "[1-9]\\d?"; | |
var twoDigits = "\\d\\d"; | |
var threeDigits = "\\d{3}"; | |
var fourDigits = "\\d{4}"; | |
var word = "[^\\s]+"; | |
var literal = /\[([^]*?)\]/gm; | |
function shorten(arr, sLen) { | |
var newArr = []; | |
for (var i = 0, len = arr.length; i < len; i++) { | |
newArr.push(arr[i].substr(0, sLen)); | |
} | |
return newArr; | |
} | |
var monthUpdate = function (arrName) { return function (v, i18n) { | |
var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); }); | |
var index = lowerCaseArr.indexOf(v.toLowerCase()); | |
if (index > -1) { | |
return index; | |
} | |
return null; | |
}; }; | |
function assign(origObj) { | |
var args = []; | |
for (var _i = 1; _i < arguments.length; _i++) { | |
args[_i - 1] = arguments[_i]; | |
} | |
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { | |
var obj = args_1[_a]; | |
for (var key in obj) { | |
// @ts-ignore ex | |
origObj[key] = obj[key]; | |
} | |
} | |
return origObj; | |
} | |
var dayNames = [ | |
"Sunday", | |
"Monday", | |
"Tuesday", | |
"Wednesday", | |
"Thursday", | |
"Friday", | |
"Saturday" | |
]; | |
var monthNames = [ | |
"January", | |
"February", | |
"March", | |
"April", | |
"May", | |
"June", | |
"July", | |
"August", | |
"September", | |
"October", | |
"November", | |
"December" | |
]; | |
var monthNamesShort = shorten(monthNames, 3); | |
var dayNamesShort = shorten(dayNames, 3); | |
var defaultI18n = { | |
dayNamesShort: dayNamesShort, | |
dayNames: dayNames, | |
monthNamesShort: monthNamesShort, | |
monthNames: monthNames, | |
amPm: ["am", "pm"], | |
DoFn: function (dayOfMonth) { | |
return (dayOfMonth + | |
["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 | |
? 0 | |
: ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]); | |
} | |
}; | |
var globalI18n = assign({}, defaultI18n); | |
var setGlobalDateI18n = function (i18n) { | |
return (globalI18n = assign(globalI18n, i18n)); | |
}; | |
var regexEscape = function (str) { | |
return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); | |
}; | |
var pad = function (val, len) { | |
if (len === void 0) { len = 2; } | |
val = String(val); | |
while (val.length < len) { | |
val = "0" + val; | |
} | |
return val; | |
}; | |
var formatFlags = { | |
D: function (dateObj) { return String(dateObj.getDate()); }, | |
DD: function (dateObj) { return pad(dateObj.getDate()); }, | |
Do: function (dateObj, i18n) { | |
return i18n.DoFn(dateObj.getDate()); | |
}, | |
d: function (dateObj) { return String(dateObj.getDay()); }, | |
dd: function (dateObj) { return pad(dateObj.getDay()); }, | |
ddd: function (dateObj, i18n) { | |
return i18n.dayNamesShort[dateObj.getDay()]; | |
}, | |
dddd: function (dateObj, i18n) { | |
return i18n.dayNames[dateObj.getDay()]; | |
}, | |
M: function (dateObj) { return String(dateObj.getMonth() + 1); }, | |
MM: function (dateObj) { return pad(dateObj.getMonth() + 1); }, | |
MMM: function (dateObj, i18n) { | |
return i18n.monthNamesShort[dateObj.getMonth()]; | |
}, | |
MMMM: function (dateObj, i18n) { | |
return i18n.monthNames[dateObj.getMonth()]; | |
}, | |
YY: function (dateObj) { | |
return pad(String(dateObj.getFullYear()), 4).substr(2); | |
}, | |
YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); }, | |
h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); }, | |
hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); }, | |
H: function (dateObj) { return String(dateObj.getHours()); }, | |
HH: function (dateObj) { return pad(dateObj.getHours()); }, | |
m: function (dateObj) { return String(dateObj.getMinutes()); }, | |
mm: function (dateObj) { return pad(dateObj.getMinutes()); }, | |
s: function (dateObj) { return String(dateObj.getSeconds()); }, | |
ss: function (dateObj) { return pad(dateObj.getSeconds()); }, | |
S: function (dateObj) { | |
return String(Math.round(dateObj.getMilliseconds() / 100)); | |
}, | |
SS: function (dateObj) { | |
return pad(Math.round(dateObj.getMilliseconds() / 10), 2); | |
}, | |
SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); }, | |
a: function (dateObj, i18n) { | |
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; | |
}, | |
A: function (dateObj, i18n) { | |
return dateObj.getHours() < 12 | |
? i18n.amPm[0].toUpperCase() | |
: i18n.amPm[1].toUpperCase(); | |
}, | |
ZZ: function (dateObj) { | |
var offset = dateObj.getTimezoneOffset(); | |
return ((offset > 0 ? "-" : "+") + | |
pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)); | |
}, | |
Z: function (dateObj) { | |
var offset = dateObj.getTimezoneOffset(); | |
return ((offset > 0 ? "-" : "+") + | |
pad(Math.floor(Math.abs(offset) / 60), 2) + | |
":" + | |
pad(Math.abs(offset) % 60, 2)); | |
} | |
}; | |
var monthParse = function (v) { return +v - 1; }; | |
var emptyDigits = [null, twoDigitsOptional]; | |
var emptyWord = [null, word]; | |
var amPm = [ | |
"isPm", | |
word, | |
function (v, i18n) { | |
var val = v.toLowerCase(); | |
if (val === i18n.amPm[0]) { | |
return 0; | |
} | |
else if (val === i18n.amPm[1]) { | |
return 1; | |
} | |
return null; | |
} | |
]; | |
var timezoneOffset = [ | |
"timezoneOffset", | |
"[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", | |
function (v) { | |
var parts = (v + "").match(/([+-]|\d\d)/gi); | |
if (parts) { | |
var minutes = +parts[1] * 60 + parseInt(parts[2], 10); | |
return parts[0] === "+" ? minutes : -minutes; | |
} | |
return 0; | |
} | |
]; | |
var parseFlags = { | |
D: ["day", twoDigitsOptional], | |
DD: ["day", twoDigits], | |
Do: ["day", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }], | |
M: ["month", twoDigitsOptional, monthParse], | |
MM: ["month", twoDigits, monthParse], | |
YY: [ | |
"year", | |
twoDigits, | |
function (v) { | |
var now = new Date(); | |
var cent = +("" + now.getFullYear()).substr(0, 2); | |
return +("" + (+v > 68 ? cent - 1 : cent) + v); | |
} | |
], | |
h: ["hour", twoDigitsOptional, undefined, "isPm"], | |
hh: ["hour", twoDigits, undefined, "isPm"], | |
H: ["hour", twoDigitsOptional], | |
HH: ["hour", twoDigits], | |
m: ["minute", twoDigitsOptional], | |
mm: ["minute", twoDigits], | |
s: ["second", twoDigitsOptional], | |
ss: ["second", twoDigits], | |
YYYY: ["year", fourDigits], | |
S: ["millisecond", "\\d", function (v) { return +v * 100; }], | |
SS: ["millisecond", twoDigits, function (v) { return +v * 10; }], | |
SSS: ["millisecond", threeDigits], | |
d: emptyDigits, | |
dd: emptyDigits, | |
ddd: emptyWord, | |
dddd: emptyWord, | |
MMM: ["month", word, monthUpdate("monthNamesShort")], | |
MMMM: ["month", word, monthUpdate("monthNames")], | |
a: amPm, | |
A: amPm, | |
ZZ: timezoneOffset, | |
Z: timezoneOffset | |
}; | |
// Some common format strings | |
var globalMasks = { | |
default: "ddd MMM DD YYYY HH:mm:ss", | |
shortDate: "M/D/YY", | |
mediumDate: "MMM D, YYYY", | |
longDate: "MMMM D, YYYY", | |
fullDate: "dddd, MMMM D, YYYY", | |
isoDate: "YYYY-MM-DD", | |
isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", | |
shortTime: "HH:mm", | |
mediumTime: "HH:mm:ss", | |
longTime: "HH:mm:ss.SSS" | |
}; | |
var setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); }; | |
/*** | |
* Format a date | |
* @method format | |
* @param {Date|number} dateObj | |
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' | |
* @returns {string} Formatted date string | |
*/ | |
var format = function (dateObj, mask, i18n) { | |
if (mask === void 0) { mask = globalMasks["default"]; } | |
if (i18n === void 0) { i18n = {}; } | |
if (typeof dateObj === "number") { | |
dateObj = new Date(dateObj); | |
} | |
if (Object.prototype.toString.call(dateObj) !== "[object Date]" || | |
isNaN(dateObj.getTime())) { | |
throw new Error("Invalid Date pass to format"); | |
} | |
mask = globalMasks[mask] || mask; | |
var literals = []; | |
// Make literals inactive by replacing them with @@@ | |
mask = mask.replace(literal, function ($0, $1) { | |
literals.push($1); | |
return "@@@"; | |
}); | |
var combinedI18nSettings = assign(assign({}, globalI18n), i18n); | |
// Apply formatting rules | |
mask = mask.replace(token, function ($0) { | |
return formatFlags[$0](dateObj, combinedI18nSettings); | |
}); | |
// Inline literal values back into the formatted value | |
return mask.replace(/@@@/g, function () { return literals.shift(); }); | |
}; | |
/** | |
* Parse a date string into a Javascript Date object / | |
* @method parse | |
* @param {string} dateStr Date string | |
* @param {string} format Date parse format | |
* @param {i18n} I18nSettingsOptional Full or subset of I18N settings | |
* @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format | |
*/ | |
function parse(dateStr, format, i18n) { | |
if (i18n === void 0) { i18n = {}; } | |
if (typeof format !== "string") { | |
throw new Error("Invalid format in fecha parse"); | |
} | |
// Check to see if the format is actually a mask | |
format = globalMasks[format] || format; | |
// Avoid regular expression denial of service, fail early for really long strings | |
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS | |
if (dateStr.length > 1000) { | |
return null; | |
} | |
// Default to the beginning of the year. | |
var today = new Date(); | |
var dateInfo = { | |
year: today.getFullYear(), | |
month: 0, | |
day: 1, | |
hour: 0, | |
minute: 0, | |
second: 0, | |
millisecond: 0, | |
isPm: null, | |
timezoneOffset: null | |
}; | |
var parseInfo = []; | |
var literals = []; | |
// Replace all the literals with @@@. Hopefully a string that won't exist in the format | |
var newFormat = format.replace(literal, function ($0, $1) { | |
literals.push(regexEscape($1)); | |
return "@@@"; | |
}); | |
var specifiedFields = {}; | |
var requiredFields = {}; | |
// Change every token that we find into the correct regex | |
newFormat = regexEscape(newFormat).replace(token, function ($0) { | |
var info = parseFlags[$0]; | |
var field = info[0], regex = info[1], requiredField = info[3]; | |
// Check if the person has specified the same field twice. This will lead to confusing results. | |
if (specifiedFields[field]) { | |
throw new Error("Invalid format. " + field + " specified twice in format"); | |
} | |
specifiedFields[field] = true; | |
// Check if there are any required fields. For instance, 12 hour time requires AM/PM specified | |
if (requiredField) { | |
requiredFields[requiredField] = true; | |
} | |
parseInfo.push(info); | |
return "(" + regex + ")"; | |
}); | |
// Check all the required fields are present | |
Object.keys(requiredFields).forEach(function (field) { | |
if (!specifiedFields[field]) { | |
throw new Error("Invalid format. " + field + " is required in specified format"); | |
} | |
}); | |
// Add back all the literals after | |
newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); }); | |
// Check if the date string matches the format. If it doesn't return null | |
var matches = dateStr.match(new RegExp(newFormat, "i")); | |
if (!matches) { | |
return null; | |
} | |
var combinedI18nSettings = assign(assign({}, globalI18n), i18n); | |
// For each match, call the parser function for that date part | |
for (var i = 1; i < matches.length; i++) { | |
var _a = parseInfo[i - 1], field = _a[0], parser = _a[2]; | |
var value = parser | |
? parser(matches[i], combinedI18nSettings) | |
: +matches[i]; | |
// If the parser can't make sense of the value, return null | |
if (value == null) { | |
return null; | |
} | |
dateInfo[field] = value; | |
} | |
if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { | |
dateInfo.hour = +dateInfo.hour + 12; | |
} | |
else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { | |
dateInfo.hour = 0; | |
} | |
var dateWithoutTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond); | |
var validateFields = [ | |
["month", "getMonth"], | |
["day", "getDate"], | |
["hour", "getHours"], | |
["minute", "getMinutes"], | |
["second", "getSeconds"] | |
]; | |
for (var i = 0, len = validateFields.length; i < len; i++) { | |
// Check to make sure the date field is within the allowed range. Javascript dates allows values | |
// outside the allowed range. If the values don't match the value was invalid | |
if (specifiedFields[validateFields[i][0]] && | |
dateInfo[validateFields[i][0]] !== dateWithoutTZ[validateFields[i][1]]()) { | |
return null; | |
} | |
} | |
if (dateInfo.timezoneOffset == null) { | |
return dateWithoutTZ; | |
} | |
return new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond)); | |
} | |
var fecha = { | |
format: format, | |
parse: parse, | |
defaultI18n: defaultI18n, | |
setGlobalDateI18n: setGlobalDateI18n, | |
setGlobalDateMasks: setGlobalDateMasks | |
}; | |
/* harmony default export */ __webpack_exports__["default"] = (fecha); | |
//# sourceMappingURL=fecha.js.map | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/inherits/inherits.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/inherits/inherits.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
try { | |
var util = __webpack_require__(/*! util */ "util"); | |
/* istanbul ignore next */ | |
if (typeof util.inherits !== 'function') throw ''; | |
module.exports = util.inherits; | |
} catch (e) { | |
/* istanbul ignore next */ | |
module.exports = __webpack_require__(/*! ./inherits_browser.js */ "../fabric8-analytics-lsp-server/output/node_modules/inherits/inherits_browser.js"); | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/inherits/inherits_browser.js": | |
/*!****************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/inherits/inherits_browser.js ***! | |
\****************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
if (typeof Object.create === 'function') { | |
// implementation from standard node.js 'util' module | |
module.exports = function inherits(ctor, superCtor) { | |
if (superCtor) { | |
ctor.super_ = superCtor | |
ctor.prototype = Object.create(superCtor.prototype, { | |
constructor: { | |
value: ctor, | |
enumerable: false, | |
writable: true, | |
configurable: true | |
} | |
}) | |
} | |
}; | |
} else { | |
// old school shim for old browsers | |
module.exports = function inherits(ctor, superCtor) { | |
if (superCtor) { | |
ctor.super_ = superCtor | |
var TempCtor = function () {} | |
TempCtor.prototype = superCtor.prototype | |
ctor.prototype = new TempCtor() | |
ctor.prototype.constructor = ctor | |
} | |
} | |
} | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/is-arrayish/index.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/is-arrayish/index.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
module.exports = function isArrayish(obj) { | |
if (!obj || typeof obj === 'string') { | |
return false; | |
} | |
return obj instanceof Array || Array.isArray(obj) || | |
(obj.length >= 0 && (obj.splice instanceof Function || | |
(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/is-stream/index.js": | |
/*!******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/is-stream/index.js ***! | |
\******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var isStream = module.exports = function (stream) { | |
return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function'; | |
}; | |
isStream.writable = function (stream) { | |
return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object'; | |
}; | |
isStream.readable = function (stream) { | |
return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object'; | |
}; | |
isStream.duplex = function (stream) { | |
return isStream.writable(stream) && isStream.readable(stream); | |
}; | |
isStream.transform = function (stream) { | |
return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object'; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/isarray/index.js": | |
/*!****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/isarray/index.js ***! | |
\****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
var toString = {}.toString; | |
module.exports = Array.isArray || function (arr) { | |
return toString.call(arr) == '[object Array]'; | |
}; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/json-to-ast/build.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/json-to-ast/build.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
(function (global, factory) { | |
true ? module.exports = factory() : | |
undefined; | |
}(this, (function () { 'use strict'; | |
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | |
function createCommonjsModule(fn, module) { | |
return module = { exports: {} }, fn(module, module.exports), module.exports; | |
} | |
var graphemeSplitter = createCommonjsModule(function (module) { | |
/* | |
Breaks a Javascript string into individual user-perceived "characters" | |
called extended grapheme clusters by implementing the Unicode UAX-29 standard, version 10.0.0 | |
Usage: | |
var splitter = new GraphemeSplitter(); | |
//returns an array of strings, one string for each grapheme cluster | |
var graphemes = splitter.splitGraphemes(string); | |
*/ | |
function GraphemeSplitter() { | |
var CR = 0, | |
LF = 1, | |
Control = 2, | |
Extend = 3, | |
Regional_Indicator = 4, | |
SpacingMark = 5, | |
L = 6, | |
V = 7, | |
T = 8, | |
LV = 9, | |
LVT = 10, | |
Other = 11, | |
Prepend = 12, | |
E_Base = 13, | |
E_Modifier = 14, | |
ZWJ = 15, | |
Glue_After_Zwj = 16, | |
E_Base_GAZ = 17; | |
// BreakTypes | |
var NotBreak = 0, | |
BreakStart = 1, | |
Break = 2, | |
BreakLastRegional = 3, | |
BreakPenultimateRegional = 4; | |
function isSurrogate(str, pos) { | |
return 0xd800 <= str.charCodeAt(pos) && str.charCodeAt(pos) <= 0xdbff && 0xdc00 <= str.charCodeAt(pos + 1) && str.charCodeAt(pos + 1) <= 0xdfff; | |
} | |
// Private function, gets a Unicode code point from a JavaScript UTF-16 string | |
// handling surrogate pairs appropriately | |
function codePointAt(str, idx) { | |
if (idx === undefined) { | |
idx = 0; | |
} | |
var code = str.charCodeAt(idx); | |
// if a high surrogate | |
if (0xD800 <= code && code <= 0xDBFF && idx < str.length - 1) { | |
var hi = code; | |
var low = str.charCodeAt(idx + 1); | |
if (0xDC00 <= low && low <= 0xDFFF) { | |
return (hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000; | |
} | |
return hi; | |
} | |
// if a low surrogate | |
if (0xDC00 <= code && code <= 0xDFFF && idx >= 1) { | |
var hi = str.charCodeAt(idx - 1); | |
var low = code; | |
if (0xD800 <= hi && hi <= 0xDBFF) { | |
return (hi - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000; | |
} | |
return low; | |
} | |
//just return the char if an unmatched surrogate half or a | |
//single-char codepoint | |
return code; | |
} | |
// Private function, returns whether a break is allowed between the | |
// two given grapheme breaking classes | |
function shouldBreak(start, mid, end) { | |
var all = [start].concat(mid).concat([end]); | |
var previous = all[all.length - 2]; | |
var next = end; | |
// Lookahead termintor for: | |
// GB10. (E_Base | EBG) Extend* ? E_Modifier | |
var eModifierIndex = all.lastIndexOf(E_Modifier); | |
if (eModifierIndex > 1 && all.slice(1, eModifierIndex).every(function (c) { | |
return c == Extend; | |
}) && [Extend, E_Base, E_Base_GAZ].indexOf(start) == -1) { | |
return Break; | |
} | |
// Lookahead termintor for: | |
// GB12. ^ (RI RI)* RI ? RI | |
// GB13. [^RI] (RI RI)* RI ? RI | |
var rIIndex = all.lastIndexOf(Regional_Indicator); | |
if (rIIndex > 0 && all.slice(1, rIIndex).every(function (c) { | |
return c == Regional_Indicator; | |
}) && [Prepend, Regional_Indicator].indexOf(previous) == -1) { | |
if (all.filter(function (c) { | |
return c == Regional_Indicator; | |
}).length % 2 == 1) { | |
return BreakLastRegional; | |
} else { | |
return BreakPenultimateRegional; | |
} | |
} | |
// GB3. CR X LF | |
if (previous == CR && next == LF) { | |
return NotBreak; | |
} | |
// GB4. (Control|CR|LF) ÷ | |
else if (previous == Control || previous == CR || previous == LF) { | |
if (next == E_Modifier && mid.every(function (c) { | |
return c == Extend; | |
})) { | |
return Break; | |
} else { | |
return BreakStart; | |
} | |
} | |
// GB5. ÷ (Control|CR|LF) | |
else if (next == Control || next == CR || next == LF) { | |
return BreakStart; | |
} | |
// GB6. L X (L|V|LV|LVT) | |
else if (previous == L && (next == L || next == V || next == LV || next == LVT)) { | |
return NotBreak; | |
} | |
// GB7. (LV|V) X (V|T) | |
else if ((previous == LV || previous == V) && (next == V || next == T)) { | |
return NotBreak; | |
} | |
// GB8. (LVT|T) X (T) | |
else if ((previous == LVT || previous == T) && next == T) { | |
return NotBreak; | |
} | |
// GB9. X (Extend|ZWJ) | |
else if (next == Extend || next == ZWJ) { | |
return NotBreak; | |
} | |
// GB9a. X SpacingMark | |
else if (next == SpacingMark) { | |
return NotBreak; | |
} | |
// GB9b. Prepend X | |
else if (previous == Prepend) { | |
return NotBreak; | |
} | |
// GB10. (E_Base | EBG) Extend* ? E_Modifier | |
var previousNonExtendIndex = all.indexOf(Extend) != -1 ? all.lastIndexOf(Extend) - 1 : all.length - 2; | |
if ([E_Base, E_Base_GAZ].indexOf(all[previousNonExtendIndex]) != -1 && all.slice(previousNonExtendIndex + 1, -1).every(function (c) { | |
return c == Extend; | |
}) && next == E_Modifier) { | |
return NotBreak; | |
} | |
// GB11. ZWJ ? (Glue_After_Zwj | EBG) | |
if (previous == ZWJ && [Glue_After_Zwj, E_Base_GAZ].indexOf(next) != -1) { | |
return NotBreak; | |
} | |
// GB12. ^ (RI RI)* RI ? RI | |
// GB13. [^RI] (RI RI)* RI ? RI | |
if (mid.indexOf(Regional_Indicator) != -1) { | |
return Break; | |
} | |
if (previous == Regional_Indicator && next == Regional_Indicator) { | |
return NotBreak; | |
} | |
// GB999. Any ? Any | |
return BreakStart; | |
} | |
// Returns the next grapheme break in the string after the given index | |
this.nextBreak = function (string, index) { | |
if (index === undefined) { | |
index = 0; | |
} | |
if (index < 0) { | |
return 0; | |
} | |
if (index >= string.length - 1) { | |
return string.length; | |
} | |
var prev = getGraphemeBreakProperty(codePointAt(string, index)); | |
var mid = []; | |
for (var i = index + 1; i < string.length; i++) { | |
// check for already processed low surrogates | |
if (isSurrogate(string, i - 1)) { | |
continue; | |
} | |
var next = getGraphemeBreakProperty(codePointAt(string, i)); | |
if (shouldBreak(prev, mid, next)) { | |
return i; | |
} | |
mid.push(next); | |
} | |
return string.length; | |
}; | |
// Breaks the given string into an array of grapheme cluster strings | |
this.splitGraphemes = function (str) { | |
var res = []; | |
var index = 0; | |
var brk; | |
while ((brk = this.nextBreak(str, index)) < str.length) { | |
res.push(str.slice(index, brk)); | |
index = brk; | |
} | |
if (index < str.length) { | |
res.push(str.slice(index)); | |
} | |
return res; | |
}; | |
// Returns the iterator of grapheme clusters there are in the given string | |
this.iterateGraphemes = function (str) { | |
var index = 0; | |
var res = { | |
next: function () { | |
var value; | |
var brk; | |
if ((brk = this.nextBreak(str, index)) < str.length) { | |
value = str.slice(index, brk); | |
index = brk; | |
return { value: value, done: false }; | |
} | |
if (index < str.length) { | |
value = str.slice(index); | |
index = str.length; | |
return { value: value, done: false }; | |
} | |
return { value: undefined, done: true }; | |
}.bind(this) | |
}; | |
// ES2015 @@iterator method (iterable) for spread syntax and for...of statement | |
if (typeof Symbol !== 'undefined' && Symbol.iterator) { | |
res[Symbol.iterator] = function () { | |
return res; | |
}; | |
} | |
return res; | |
}; | |
// Returns the number of grapheme clusters there are in the given string | |
this.countGraphemes = function (str) { | |
var count = 0; | |
var index = 0; | |
var brk; | |
while ((brk = this.nextBreak(str, index)) < str.length) { | |
index = brk; | |
count++; | |
} | |
if (index < str.length) { | |
count++; | |
} | |
return count; | |
}; | |
//given a Unicode code point, determines this symbol's grapheme break property | |
function getGraphemeBreakProperty(code) { | |
//grapheme break property for Unicode 10.0.0, | |
//taken from http://www.unicode.org/Public/10.0.0/ucd/auxiliary/GraphemeBreakProperty.txt | |
//and adapted to JavaScript rules | |
if (0x0600 <= code && code <= 0x0605 || // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE | |
0x06DD == code || // Cf ARABIC END OF AYAH | |
0x070F == code || // Cf SYRIAC ABBREVIATION MARK | |
0x08E2 == code || // Cf ARABIC DISPUTED END OF AYAH | |
0x0D4E == code || // Lo MALAYALAM LETTER DOT REPH | |
0x110BD == code || // Cf KAITHI NUMBER SIGN | |
0x111C2 <= code && code <= 0x111C3 || // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA | |
0x11A3A == code || // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA | |
0x11A86 <= code && code <= 0x11A89 || // Lo [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA | |
0x11D46 == code // Lo MASARAM GONDI REPHA | |
) { | |
return Prepend; | |
} | |
if (0x000D == code // Cc <control-000D> | |
) { | |
return CR; | |
} | |
if (0x000A == code // Cc <control-000A> | |
) { | |
return LF; | |
} | |
if (0x0000 <= code && code <= 0x0009 || // Cc [10] <control-0000>..<control-0009> | |
0x000B <= code && code <= 0x000C || // Cc [2] <control-000B>..<control-000C> | |
0x000E <= code && code <= 0x001F || // Cc [18] <control-000E>..<control-001F> | |
0x007F <= code && code <= 0x009F || // Cc [33] <control-007F>..<control-009F> | |
0x00AD == code || // Cf SOFT HYPHEN | |
0x061C == code || // Cf ARABIC LETTER MARK | |
0x180E == code || // Cf MONGOLIAN VOWEL SEPARATOR | |
0x200B == code || // Cf ZERO WIDTH SPACE | |
0x200E <= code && code <= 0x200F || // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK | |
0x2028 == code || // Zl LINE SEPARATOR | |
0x2029 == code || // Zp PARAGRAPH SEPARATOR | |
0x202A <= code && code <= 0x202E || // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE | |
0x2060 <= code && code <= 0x2064 || // Cf [5] WORD JOINER..INVISIBLE PLUS | |
0x2065 == code || // Cn <reserved-2065> | |
0x2066 <= code && code <= 0x206F || // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES | |
0xD800 <= code && code <= 0xDFFF || // Cs [2048] <surrogate-D800>..<surrogate-DFFF> | |
0xFEFF == code || // Cf ZERO WIDTH NO-BREAK SPACE | |
0xFFF0 <= code && code <= 0xFFF8 || // Cn [9] <reserved-FFF0>..<reserved-FFF8> | |
0xFFF9 <= code && code <= 0xFFFB || // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR | |
0x1BCA0 <= code && code <= 0x1BCA3 || // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP | |
0x1D173 <= code && code <= 0x1D17A || // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE | |
0xE0000 == code || // Cn <reserved-E0000> | |
0xE0001 == code || // Cf LANGUAGE TAG | |
0xE0002 <= code && code <= 0xE001F || // Cn [30] <reserved-E0002>..<reserved-E001F> | |
0xE0080 <= code && code <= 0xE00FF || // Cn [128] <reserved-E0080>..<reserved-E00FF> | |
0xE01F0 <= code && code <= 0xE0FFF // Cn [3600] <reserved-E01F0>..<reserved-E0FFF> | |
) { | |
return Control; | |
} | |
if (0x0300 <= code && code <= 0x036F || // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X | |
0x0483 <= code && code <= 0x0487 || // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE | |
0x0488 <= code && code <= 0x0489 || // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN | |
0x0591 <= code && code <= 0x05BD || // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG | |
0x05BF == code || // Mn HEBREW POINT RAFE | |
0x05C1 <= code && code <= 0x05C2 || // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT | |
0x05C4 <= code && code <= 0x05C5 || // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT | |
0x05C7 == code || // Mn HEBREW POINT QAMATS QATAN | |
0x0610 <= code && code <= 0x061A || // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA | |
0x064B <= code && code <= 0x065F || // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW | |
0x0670 == code || // Mn ARABIC LETTER SUPERSCRIPT ALEF | |
0x06D6 <= code && code <= 0x06DC || // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN | |
0x06DF <= code && code <= 0x06E4 || // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA | |
0x06E7 <= code && code <= 0x06E8 || // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON | |
0x06EA <= code && code <= 0x06ED || // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM | |
0x0711 == code || // Mn SYRIAC LETTER SUPERSCRIPT ALAPH | |
0x0730 <= code && code <= 0x074A || // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH | |
0x07A6 <= code && code <= 0x07B0 || // Mn [11] THAANA ABAFILI..THAANA SUKUN | |
0x07EB <= code && code <= 0x07F3 || // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE | |
0x0816 <= code && code <= 0x0819 || // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH | |
0x081B <= code && code <= 0x0823 || // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A | |
0x0825 <= code && code <= 0x0827 || // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U | |
0x0829 <= code && code <= 0x082D || // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA | |
0x0859 <= code && code <= 0x085B || // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK | |
0x08D4 <= code && code <= 0x08E1 || // Mn [14] ARABIC SMALL HIGH WORD AR-RUB..ARABIC SMALL HIGH SIGN SAFHA | |
0x08E3 <= code && code <= 0x0902 || // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA | |
0x093A == code || // Mn DEVANAGARI VOWEL SIGN OE | |
0x093C == code || // Mn DEVANAGARI SIGN NUKTA | |
0x0941 <= code && code <= 0x0948 || // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI | |
0x094D == code || // Mn DEVANAGARI SIGN VIRAMA | |
0x0951 <= code && code <= 0x0957 || // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE | |
0x0962 <= code && code <= 0x0963 || // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL | |
0x0981 == code || // Mn BENGALI SIGN CANDRABINDU | |
0x09BC == code || // Mn BENGALI SIGN NUKTA | |
0x09BE == code || // Mc BENGALI VOWEL SIGN AA | |
0x09C1 <= code && code <= 0x09C4 || // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR | |
0x09CD == code || // Mn BENGALI SIGN VIRAMA | |
0x09D7 == code || // Mc BENGALI AU LENGTH MARK | |
0x09E2 <= code && code <= 0x09E3 || // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL | |
0x0A01 <= code && code <= 0x0A02 || // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI | |
0x0A3C == code || // Mn GURMUKHI SIGN NUKTA | |
0x0A41 <= code && code <= 0x0A42 || // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU | |
0x0A47 <= code && code <= 0x0A48 || // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI | |
0x0A4B <= code && code <= 0x0A4D || // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA | |
0x0A51 == code || // Mn GURMUKHI SIGN UDAAT | |
0x0A70 <= code && code <= 0x0A71 || // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK | |
0x0A75 == code || // Mn GURMUKHI SIGN YAKASH | |
0x0A81 <= code && code <= 0x0A82 || // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA | |
0x0ABC == code || // Mn GUJARATI SIGN NUKTA | |
0x0AC1 <= code && code <= 0x0AC5 || // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E | |
0x0AC7 <= code && code <= 0x0AC8 || // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI | |
0x0ACD == code || // Mn GUJARATI SIGN VIRAMA | |
0x0AE2 <= code && code <= 0x0AE3 || // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL | |
0x0AFA <= code && code <= 0x0AFF || // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE | |
0x0B01 == code || // Mn ORIYA SIGN CANDRABINDU | |
0x0B3C == code || // Mn ORIYA SIGN NUKTA | |
0x0B3E == code || // Mc ORIYA VOWEL SIGN AA | |
0x0B3F == code || // Mn ORIYA VOWEL SIGN I | |
0x0B41 <= code && code <= 0x0B44 || // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR | |
0x0B4D == code || // Mn ORIYA SIGN VIRAMA | |
0x0B56 == code || // Mn ORIYA AI LENGTH MARK | |
0x0B57 == code || // Mc ORIYA AU LENGTH MARK | |
0x0B62 <= code && code <= 0x0B63 || // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL | |
0x0B82 == code || // Mn TAMIL SIGN ANUSVARA | |
0x0BBE == code || // Mc TAMIL VOWEL SIGN AA | |
0x0BC0 == code || // Mn TAMIL VOWEL SIGN II | |
0x0BCD == code || // Mn TAMIL SIGN VIRAMA | |
0x0BD7 == code || // Mc TAMIL AU LENGTH MARK | |
0x0C00 == code || // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE | |
0x0C3E <= code && code <= 0x0C40 || // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II | |
0x0C46 <= code && code <= 0x0C48 || // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI | |
0x0C4A <= code && code <= 0x0C4D || // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA | |
0x0C55 <= code && code <= 0x0C56 || // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK | |
0x0C62 <= code && code <= 0x0C63 || // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL | |
0x0C81 == code || // Mn KANNADA SIGN CANDRABINDU | |
0x0CBC == code || // Mn KANNADA SIGN NUKTA | |
0x0CBF == code || // Mn KANNADA VOWEL SIGN I | |
0x0CC2 == code || // Mc KANNADA VOWEL SIGN UU | |
0x0CC6 == code || // Mn KANNADA VOWEL SIGN E | |
0x0CCC <= code && code <= 0x0CCD || // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA | |
0x0CD5 <= code && code <= 0x0CD6 || // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK | |
0x0CE2 <= code && code <= 0x0CE3 || // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL | |
0x0D00 <= code && code <= 0x0D01 || // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU | |
0x0D3B <= code && code <= 0x0D3C || // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA | |
0x0D3E == code || // Mc MALAYALAM VOWEL SIGN AA | |
0x0D41 <= code && code <= 0x0D44 || // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR | |
0x0D4D == code || // Mn MALAYALAM SIGN VIRAMA | |
0x0D57 == code || // Mc MALAYALAM AU LENGTH MARK | |
0x0D62 <= code && code <= 0x0D63 || // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL | |
0x0DCA == code || // Mn SINHALA SIGN AL-LAKUNA | |
0x0DCF == code || // Mc SINHALA VOWEL SIGN AELA-PILLA | |
0x0DD2 <= code && code <= 0x0DD4 || // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA | |
0x0DD6 == code || // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA | |
0x0DDF == code || // Mc SINHALA VOWEL SIGN GAYANUKITTA | |
0x0E31 == code || // Mn THAI CHARACTER MAI HAN-AKAT | |
0x0E34 <= code && code <= 0x0E3A || // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU | |
0x0E47 <= code && code <= 0x0E4E || // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN | |
0x0EB1 == code || // Mn LAO VOWEL SIGN MAI KAN | |
0x0EB4 <= code && code <= 0x0EB9 || // Mn [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU | |
0x0EBB <= code && code <= 0x0EBC || // Mn [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO | |
0x0EC8 <= code && code <= 0x0ECD || // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA | |
0x0F18 <= code && code <= 0x0F19 || // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS | |
0x0F35 == code || // Mn TIBETAN MARK NGAS BZUNG NYI ZLA | |
0x0F37 == code || // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS | |
0x0F39 == code || // Mn TIBETAN MARK TSA -PHRU | |
0x0F71 <= code && code <= 0x0F7E || // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO | |
0x0F80 <= code && code <= 0x0F84 || // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA | |
0x0F86 <= code && code <= 0x0F87 || // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS | |
0x0F8D <= code && code <= 0x0F97 || // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA | |
0x0F99 <= code && code <= 0x0FBC || // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA | |
0x0FC6 == code || // Mn TIBETAN SYMBOL PADMA GDAN | |
0x102D <= code && code <= 0x1030 || // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU | |
0x1032 <= code && code <= 0x1037 || // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW | |
0x1039 <= code && code <= 0x103A || // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT | |
0x103D <= code && code <= 0x103E || // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA | |
0x1058 <= code && code <= 0x1059 || // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL | |
0x105E <= code && code <= 0x1060 || // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA | |
0x1071 <= code && code <= 0x1074 || // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE | |
0x1082 == code || // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA | |
0x1085 <= code && code <= 0x1086 || // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y | |
0x108D == code || // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE | |
0x109D == code || // Mn MYANMAR VOWEL SIGN AITON AI | |
0x135D <= code && code <= 0x135F || // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK | |
0x1712 <= code && code <= 0x1714 || // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA | |
0x1732 <= code && code <= 0x1734 || // Mn [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD | |
0x1752 <= code && code <= 0x1753 || // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U | |
0x1772 <= code && code <= 0x1773 || // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U | |
0x17B4 <= code && code <= 0x17B5 || // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA | |
0x17B7 <= code && code <= 0x17BD || // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA | |
0x17C6 == code || // Mn KHMER SIGN NIKAHIT | |
0x17C9 <= code && code <= 0x17D3 || // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT | |
0x17DD == code || // Mn KHMER SIGN ATTHACAN | |
0x180B <= code && code <= 0x180D || // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE | |
0x1885 <= code && code <= 0x1886 || // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA | |
0x18A9 == code || // Mn MONGOLIAN LETTER ALI GALI DAGALGA | |
0x1920 <= code && code <= 0x1922 || // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U | |
0x1927 <= code && code <= 0x1928 || // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O | |
0x1932 == code || // Mn LIMBU SMALL LETTER ANUSVARA | |
0x1939 <= code && code <= 0x193B || // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I | |
0x1A17 <= code && code <= 0x1A18 || // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U | |
0x1A1B == code || // Mn BUGINESE VOWEL SIGN AE | |
0x1A56 == code || // Mn TAI THAM CONSONANT SIGN MEDIAL LA | |
0x1A58 <= code && code <= 0x1A5E || // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA | |
0x1A60 == code || // Mn TAI THAM SIGN SAKOT | |
0x1A62 == code || // Mn TAI THAM VOWEL SIGN MAI SAT | |
0x1A65 <= code && code <= 0x1A6C || // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW | |
0x1A73 <= code && code <= 0x1A7C || // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN | |
0x1A7F == code || // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT | |
0x1AB0 <= code && code <= 0x1ABD || // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW | |
0x1ABE == code || // Me COMBINING PARENTHESES OVERLAY | |
0x1B00 <= code && code <= 0x1B03 || // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG | |
0x1B34 == code || // Mn BALINESE SIGN REREKAN | |
0x1B36 <= code && code <= 0x1B3A || // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA | |
0x1B3C == code || // Mn BALINESE VOWEL SIGN LA LENGA | |
0x1B42 == code || // Mn BALINESE VOWEL SIGN PEPET | |
0x1B6B <= code && code <= 0x1B73 || // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG | |
0x1B80 <= code && code <= 0x1B81 || // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR | |
0x1BA2 <= code && code <= 0x1BA5 || // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU | |
0x1BA8 <= code && code <= 0x1BA9 || // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG | |
0x1BAB <= code && code <= 0x1BAD || // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA | |
0x1BE6 == code || // Mn BATAK SIGN TOMPI | |
0x1BE8 <= code && code <= 0x1BE9 || // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE | |
0x1BED == code || // Mn BATAK VOWEL SIGN KARO O | |
0x1BEF <= code && code <= 0x1BF1 || // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H | |
0x1C2C <= code && code <= 0x1C33 || // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T | |
0x1C36 <= code && code <= 0x1C37 || // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA | |
0x1CD0 <= code && code <= 0x1CD2 || // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA | |
0x1CD4 <= code && code <= 0x1CE0 || // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA | |
0x1CE2 <= code && code <= 0x1CE8 || // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL | |
0x1CED == code || // Mn VEDIC SIGN TIRYAK | |
0x1CF4 == code || // Mn VEDIC TONE CANDRA ABOVE | |
0x1CF8 <= code && code <= 0x1CF9 || // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE | |
0x1DC0 <= code && code <= 0x1DF9 || // Mn [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE BELOW | |
0x1DFB <= code && code <= 0x1DFF || // Mn [5] COMBINING DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW | |
0x200C == code || // Cf ZERO WIDTH NON-JOINER | |
0x20D0 <= code && code <= 0x20DC || // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE | |
0x20DD <= code && code <= 0x20E0 || // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH | |
0x20E1 == code || // Mn COMBINING LEFT RIGHT ARROW ABOVE | |
0x20E2 <= code && code <= 0x20E4 || // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE | |
0x20E5 <= code && code <= 0x20F0 || // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE | |
0x2CEF <= code && code <= 0x2CF1 || // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS | |
0x2D7F == code || // Mn TIFINAGH CONSONANT JOINER | |
0x2DE0 <= code && code <= 0x2DFF || // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS | |
0x302A <= code && code <= 0x302D || // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK | |
0x302E <= code && code <= 0x302F || // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK | |
0x3099 <= code && code <= 0x309A || // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK | |
0xA66F == code || // Mn COMBINING CYRILLIC VZMET | |
0xA670 <= code && code <= 0xA672 || // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN | |
0xA674 <= code && code <= 0xA67D || // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK | |
0xA69E <= code && code <= 0xA69F || // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E | |
0xA6F0 <= code && code <= 0xA6F1 || // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS | |
0xA802 == code || // Mn SYLOTI NAGRI SIGN DVISVARA | |
0xA806 == code || // Mn SYLOTI NAGRI SIGN HASANTA | |
0xA80B == code || // Mn SYLOTI NAGRI SIGN ANUSVARA | |
0xA825 <= code && code <= 0xA826 || // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E | |
0xA8C4 <= code && code <= 0xA8C5 || // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU | |
0xA8E0 <= code && code <= 0xA8F1 || // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA | |
0xA926 <= code && code <= 0xA92D || // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU | |
0xA947 <= code && code <= 0xA951 || // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R | |
0xA980 <= code && code <= 0xA982 || // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR | |
0xA9B3 == code || // Mn JAVANESE SIGN CECAK TELU | |
0xA9B6 <= code && code <= 0xA9B9 || // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT | |
0xA9BC == code || // Mn JAVANESE VOWEL SIGN PEPET | |
0xA9E5 == code || // Mn MYANMAR SIGN SHAN SAW | |
0xAA29 <= code && code <= 0xAA2E || // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE | |
0xAA31 <= code && code <= 0xAA32 || // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE | |
0xAA35 <= code && code <= 0xAA36 || // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA | |
0xAA43 == code || // Mn CHAM CONSONANT SIGN FINAL NG | |
0xAA4C == code || // Mn CHAM CONSONANT SIGN FINAL M | |
0xAA7C == code || // Mn MYANMAR SIGN TAI LAING TONE-2 | |
0xAAB0 == code || // Mn TAI VIET MAI KANG | |
0xAAB2 <= code && code <= 0xAAB4 || // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U | |
0xAAB7 <= code && code <= 0xAAB8 || // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA | |
0xAABE <= code && code <= 0xAABF || // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK | |
0xAAC1 == code || // Mn TAI VIET TONE MAI THO | |
0xAAEC <= code && code <= 0xAAED || // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI | |
0xAAF6 == code || // Mn MEETEI MAYEK VIRAMA | |
0xABE5 == code || // Mn MEETEI MAYEK VOWEL SIGN ANAP | |
0xABE8 == code || // Mn MEETEI MAYEK VOWEL SIGN UNAP | |
0xABED == code || // Mn MEETEI MAYEK APUN IYEK | |
0xFB1E == code || // Mn HEBREW POINT JUDEO-SPANISH VARIKA | |
0xFE00 <= code && code <= 0xFE0F || // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 | |
0xFE20 <= code && code <= 0xFE2F || // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF | |
0xFF9E <= code && code <= 0xFF9F || // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK | |
0x101FD == code || // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE | |
0x102E0 == code || // Mn COPTIC EPACT THOUSANDS MARK | |
0x10376 <= code && code <= 0x1037A || // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII | |
0x10A01 <= code && code <= 0x10A03 || // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R | |
0x10A05 <= code && code <= 0x10A06 || // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O | |
0x10A0C <= code && code <= 0x10A0F || // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA | |
0x10A38 <= code && code <= 0x10A3A || // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW | |
0x10A3F == code || // Mn KHAROSHTHI VIRAMA | |
0x10AE5 <= code && code <= 0x10AE6 || // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW | |
0x11001 == code || // Mn BRAHMI SIGN ANUSVARA | |
0x11038 <= code && code <= 0x11046 || // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA | |
0x1107F <= code && code <= 0x11081 || // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA | |
0x110B3 <= code && code <= 0x110B6 || // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI | |
0x110B9 <= code && code <= 0x110BA || // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA | |
0x11100 <= code && code <= 0x11102 || // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA | |
0x11127 <= code && code <= 0x1112B || // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU | |
0x1112D <= code && code <= 0x11134 || // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA | |
0x11173 == code || // Mn MAHAJANI SIGN NUKTA | |
0x11180 <= code && code <= 0x11181 || // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA | |
0x111B6 <= code && code <= 0x111BE || // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O | |
0x111CA <= code && code <= 0x111CC || // Mn [3] SHARADA SIGN NUKTA..SHARADA EXTRA SHORT VOWEL MARK | |
0x1122F <= code && code <= 0x11231 || // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI | |
0x11234 == code || // Mn KHOJKI SIGN ANUSVARA | |
0x11236 <= code && code <= 0x11237 || // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA | |
0x1123E == code || // Mn KHOJKI SIGN SUKUN | |
0x112DF == code || // Mn KHUDAWADI SIGN ANUSVARA | |
0x112E3 <= code && code <= 0x112EA || // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA | |
0x11300 <= code && code <= 0x11301 || // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU | |
0x1133C == code || // Mn GRANTHA SIGN NUKTA | |
0x1133E == code || // Mc GRANTHA VOWEL SIGN AA | |
0x11340 == code || // Mn GRANTHA VOWEL SIGN II | |
0x11357 == code || // Mc GRANTHA AU LENGTH MARK | |
0x11366 <= code && code <= 0x1136C || // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX | |
0x11370 <= code && code <= 0x11374 || // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA | |
0x11438 <= code && code <= 0x1143F || // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI | |
0x11442 <= code && code <= 0x11444 || // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA | |
0x11446 == code || // Mn NEWA SIGN NUKTA | |
0x114B0 == code || // Mc TIRHUTA VOWEL SIGN AA | |
0x114B3 <= code && code <= 0x114B8 || // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL | |
0x114BA == code || // Mn TIRHUTA VOWEL SIGN SHORT E | |
0x114BD == code || // Mc TIRHUTA VOWEL SIGN SHORT O | |
0x114BF <= code && code <= 0x114C0 || // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA | |
0x114C2 <= code && code <= 0x114C3 || // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA | |
0x115AF == code || // Mc SIDDHAM VOWEL SIGN AA | |
0x115B2 <= code && code <= 0x115B5 || // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR | |
0x115BC <= code && code <= 0x115BD || // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA | |
0x115BF <= code && code <= 0x115C0 || // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA | |
0x115DC <= code && code <= 0x115DD || // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU | |
0x11633 <= code && code <= 0x1163A || // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI | |
0x1163D == code || // Mn MODI SIGN ANUSVARA | |
0x1163F <= code && code <= 0x11640 || // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA | |
0x116AB == code || // Mn TAKRI SIGN ANUSVARA | |
0x116AD == code || // Mn TAKRI VOWEL SIGN AA | |
0x116B0 <= code && code <= 0x116B5 || // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU | |
0x116B7 == code || // Mn TAKRI SIGN NUKTA | |
0x1171D <= code && code <= 0x1171F || // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA | |
0x11722 <= code && code <= 0x11725 || // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU | |
0x11727 <= code && code <= 0x1172B || // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER | |
0x11A01 <= code && code <= 0x11A06 || // Mn [6] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL SIGN O | |
0x11A09 <= code && code <= 0x11A0A || // Mn [2] ZANABAZAR SQUARE VOWEL SIGN REVERSED I..ZANABAZAR SQUARE VOWEL LENGTH MARK | |
0x11A33 <= code && code <= 0x11A38 || // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA | |
0x11A3B <= code && code <= 0x11A3E || // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA | |
0x11A47 == code || // Mn ZANABAZAR SQUARE SUBJOINER | |
0x11A51 <= code && code <= 0x11A56 || // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE | |
0x11A59 <= code && code <= 0x11A5B || // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK | |
0x11A8A <= code && code <= 0x11A96 || // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA | |
0x11A98 <= code && code <= 0x11A99 || // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER | |
0x11C30 <= code && code <= 0x11C36 || // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L | |
0x11C38 <= code && code <= 0x11C3D || // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA | |
0x11C3F == code || // Mn BHAIKSUKI SIGN VIRAMA | |
0x11C92 <= code && code <= 0x11CA7 || // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA | |
0x11CAA <= code && code <= 0x11CB0 || // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA | |
0x11CB2 <= code && code <= 0x11CB3 || // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E | |
0x11CB5 <= code && code <= 0x11CB6 || // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU | |
0x11D31 <= code && code <= 0x11D36 || // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R | |
0x11D3A == code || // Mn MASARAM GONDI VOWEL SIGN E | |
0x11D3C <= code && code <= 0x11D3D || // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O | |
0x11D3F <= code && code <= 0x11D45 || // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA | |
0x11D47 == code || // Mn MASARAM GONDI RA-KARA | |
0x16AF0 <= code && code <= 0x16AF4 || // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE | |
0x16B30 <= code && code <= 0x16B36 || // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM | |
0x16F8F <= code && code <= 0x16F92 || // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW | |
0x1BC9D <= code && code <= 0x1BC9E || // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK | |
0x1D165 == code || // Mc MUSICAL SYMBOL COMBINING STEM | |
0x1D167 <= code && code <= 0x1D169 || // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 | |
0x1D16E <= code && code <= 0x1D172 || // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 | |
0x1D17B <= code && code <= 0x1D182 || // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE | |
0x1D185 <= code && code <= 0x1D18B || // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE | |
0x1D1AA <= code && code <= 0x1D1AD || // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO | |
0x1D242 <= code && code <= 0x1D244 || // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME | |
0x1DA00 <= code && code <= 0x1DA36 || // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN | |
0x1DA3B <= code && code <= 0x1DA6C || // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT | |
0x1DA75 == code || // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS | |
0x1DA84 == code || // Mn SIGNWRITING LOCATION HEAD NECK | |
0x1DA9B <= code && code <= 0x1DA9F || // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 | |
0x1DAA1 <= code && code <= 0x1DAAF || // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 | |
0x1E000 <= code && code <= 0x1E006 || // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE | |
0x1E008 <= code && code <= 0x1E018 || // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU | |
0x1E01B <= code && code <= 0x1E021 || // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI | |
0x1E023 <= code && code <= 0x1E024 || // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS | |
0x1E026 <= code && code <= 0x1E02A || // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA | |
0x1E8D0 <= code && code <= 0x1E8D6 || // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS | |
0x1E944 <= code && code <= 0x1E94A || // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA | |
0xE0020 <= code && code <= 0xE007F || // Cf [96] TAG SPACE..CANCEL TAG | |
0xE0100 <= code && code <= 0xE01EF // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 | |
) { | |
return Extend; | |
} | |
if (0x1F1E6 <= code && code <= 0x1F1FF) // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z | |
{ | |
return Regional_Indicator; | |
} | |
if (0x0903 == code || // Mc DEVANAGARI SIGN VISARGA | |
0x093B == code || // Mc DEVANAGARI VOWEL SIGN OOE | |
0x093E <= code && code <= 0x0940 || // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II | |
0x0949 <= code && code <= 0x094C || // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU | |
0x094E <= code && code <= 0x094F || // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW | |
0x0982 <= code && code <= 0x0983 || // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA | |
0x09BF <= code && code <= 0x09C0 || // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II | |
0x09C7 <= code && code <= 0x09C8 || // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI | |
0x09CB <= code && code <= 0x09CC || // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU | |
0x0A03 == code || // Mc GURMUKHI SIGN VISARGA | |
0x0A3E <= code && code <= 0x0A40 || // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II | |
0x0A83 == code || // Mc GUJARATI SIGN VISARGA | |
0x0ABE <= code && code <= 0x0AC0 || // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II | |
0x0AC9 == code || // Mc GUJARATI VOWEL SIGN CANDRA O | |
0x0ACB <= code && code <= 0x0ACC || // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU | |
0x0B02 <= code && code <= 0x0B03 || // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA | |
0x0B40 == code || // Mc ORIYA VOWEL SIGN II | |
0x0B47 <= code && code <= 0x0B48 || // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI | |
0x0B4B <= code && code <= 0x0B4C || // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU | |
0x0BBF == code || // Mc TAMIL VOWEL SIGN I | |
0x0BC1 <= code && code <= 0x0BC2 || // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU | |
0x0BC6 <= code && code <= 0x0BC8 || // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI | |
0x0BCA <= code && code <= 0x0BCC || // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU | |
0x0C01 <= code && code <= 0x0C03 || // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA | |
0x0C41 <= code && code <= 0x0C44 || // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR | |
0x0C82 <= code && code <= 0x0C83 || // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA | |
0x0CBE == code || // Mc KANNADA VOWEL SIGN AA | |
0x0CC0 <= code && code <= 0x0CC1 || // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U | |
0x0CC3 <= code && code <= 0x0CC4 || // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR | |
0x0CC7 <= code && code <= 0x0CC8 || // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI | |
0x0CCA <= code && code <= 0x0CCB || // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO | |
0x0D02 <= code && code <= 0x0D03 || // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA | |
0x0D3F <= code && code <= 0x0D40 || // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II | |
0x0D46 <= code && code <= 0x0D48 || // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI | |
0x0D4A <= code && code <= 0x0D4C || // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU | |
0x0D82 <= code && code <= 0x0D83 || // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA | |
0x0DD0 <= code && code <= 0x0DD1 || // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA | |
0x0DD8 <= code && code <= 0x0DDE || // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA | |
0x0DF2 <= code && code <= 0x0DF3 || // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA | |
0x0E33 == code || // Lo THAI CHARACTER SARA AM | |
0x0EB3 == code || // Lo LAO VOWEL SIGN AM | |
0x0F3E <= code && code <= 0x0F3F || // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES | |
0x0F7F == code || // Mc TIBETAN SIGN RNAM BCAD | |
0x1031 == code || // Mc MYANMAR VOWEL SIGN E | |
0x103B <= code && code <= 0x103C || // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA | |
0x1056 <= code && code <= 0x1057 || // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR | |
0x1084 == code || // Mc MYANMAR VOWEL SIGN SHAN E | |
0x17B6 == code || // Mc KHMER VOWEL SIGN AA | |
0x17BE <= code && code <= 0x17C5 || // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU | |
0x17C7 <= code && code <= 0x17C8 || // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU | |
0x1923 <= code && code <= 0x1926 || // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU | |
0x1929 <= code && code <= 0x192B || // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA | |
0x1930 <= code && code <= 0x1931 || // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA | |
0x1933 <= code && code <= 0x1938 || // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA | |
0x1A19 <= code && code <= 0x1A1A || // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O | |
0x1A55 == code || // Mc TAI THAM CONSONANT SIGN MEDIAL RA | |
0x1A57 == code || // Mc TAI THAM CONSONANT SIGN LA TANG LAI | |
0x1A6D <= code && code <= 0x1A72 || // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI | |
0x1B04 == code || // Mc BALINESE SIGN BISAH | |
0x1B35 == code || // Mc BALINESE VOWEL SIGN TEDUNG | |
0x1B3B == code || // Mc BALINESE VOWEL SIGN RA REPA TEDUNG | |
0x1B3D <= code && code <= 0x1B41 || // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG | |
0x1B43 <= code && code <= 0x1B44 || // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG | |
0x1B82 == code || // Mc SUNDANESE SIGN PANGWISAD | |
0x1BA1 == code || // Mc SUNDANESE CONSONANT SIGN PAMINGKAL | |
0x1BA6 <= code && code <= 0x1BA7 || // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG | |
0x1BAA == code || // Mc SUNDANESE SIGN PAMAAEH | |
0x1BE7 == code || // Mc BATAK VOWEL SIGN E | |
0x1BEA <= code && code <= 0x1BEC || // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O | |
0x1BEE == code || // Mc BATAK VOWEL SIGN U | |
0x1BF2 <= code && code <= 0x1BF3 || // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN | |
0x1C24 <= code && code <= 0x1C2B || // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU | |
0x1C34 <= code && code <= 0x1C35 || // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG | |
0x1CE1 == code || // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA | |
0x1CF2 <= code && code <= 0x1CF3 || // Mc [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA | |
0x1CF7 == code || // Mc VEDIC SIGN ATIKRAMA | |
0xA823 <= code && code <= 0xA824 || // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I | |
0xA827 == code || // Mc SYLOTI NAGRI VOWEL SIGN OO | |
0xA880 <= code && code <= 0xA881 || // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA | |
0xA8B4 <= code && code <= 0xA8C3 || // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU | |
0xA952 <= code && code <= 0xA953 || // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA | |
0xA983 == code || // Mc JAVANESE SIGN WIGNYAN | |
0xA9B4 <= code && code <= 0xA9B5 || // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG | |
0xA9BA <= code && code <= 0xA9BB || // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE | |
0xA9BD <= code && code <= 0xA9C0 || // Mc [4] JAVANESE CONSONANT SIGN KERET..JAVANESE PANGKON | |
0xAA2F <= code && code <= 0xAA30 || // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI | |
0xAA33 <= code && code <= 0xAA34 || // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA | |
0xAA4D == code || // Mc CHAM CONSONANT SIGN FINAL H | |
0xAAEB == code || // Mc MEETEI MAYEK VOWEL SIGN II | |
0xAAEE <= code && code <= 0xAAEF || // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU | |
0xAAF5 == code || // Mc MEETEI MAYEK VOWEL SIGN VISARGA | |
0xABE3 <= code && code <= 0xABE4 || // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP | |
0xABE6 <= code && code <= 0xABE7 || // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP | |
0xABE9 <= code && code <= 0xABEA || // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG | |
0xABEC == code || // Mc MEETEI MAYEK LUM IYEK | |
0x11000 == code || // Mc BRAHMI SIGN CANDRABINDU | |
0x11002 == code || // Mc BRAHMI SIGN VISARGA | |
0x11082 == code || // Mc KAITHI SIGN VISARGA | |
0x110B0 <= code && code <= 0x110B2 || // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II | |
0x110B7 <= code && code <= 0x110B8 || // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU | |
0x1112C == code || // Mc CHAKMA VOWEL SIGN E | |
0x11182 == code || // Mc SHARADA SIGN VISARGA | |
0x111B3 <= code && code <= 0x111B5 || // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II | |
0x111BF <= code && code <= 0x111C0 || // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA | |
0x1122C <= code && code <= 0x1122E || // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II | |
0x11232 <= code && code <= 0x11233 || // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU | |
0x11235 == code || // Mc KHOJKI SIGN VIRAMA | |
0x112E0 <= code && code <= 0x112E2 || // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II | |
0x11302 <= code && code <= 0x11303 || // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA | |
0x1133F == code || // Mc GRANTHA VOWEL SIGN I | |
0x11341 <= code && code <= 0x11344 || // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR | |
0x11347 <= code && code <= 0x11348 || // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI | |
0x1134B <= code && code <= 0x1134D || // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA | |
0x11362 <= code && code <= 0x11363 || // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL | |
0x11435 <= code && code <= 0x11437 || // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II | |
0x11440 <= code && code <= 0x11441 || // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU | |
0x11445 == code || // Mc NEWA SIGN VISARGA | |
0x114B1 <= code && code <= 0x114B2 || // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II | |
0x114B9 == code || // Mc TIRHUTA VOWEL SIGN E | |
0x114BB <= code && code <= 0x114BC || // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O | |
0x114BE == code || // Mc TIRHUTA VOWEL SIGN AU | |
0x114C1 == code || // Mc TIRHUTA SIGN VISARGA | |
0x115B0 <= code && code <= 0x115B1 || // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II | |
0x115B8 <= code && code <= 0x115BB || // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU | |
0x115BE == code || // Mc SIDDHAM SIGN VISARGA | |
0x11630 <= code && code <= 0x11632 || // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II | |
0x1163B <= code && code <= 0x1163C || // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU | |
0x1163E == code || // Mc MODI SIGN VISARGA | |
0x116AC == code || // Mc TAKRI SIGN VISARGA | |
0x116AE <= code && code <= 0x116AF || // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II | |
0x116B6 == code || // Mc TAKRI SIGN VIRAMA | |
0x11720 <= code && code <= 0x11721 || // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA | |
0x11726 == code || // Mc AHOM VOWEL SIGN E | |
0x11A07 <= code && code <= 0x11A08 || // Mc [2] ZANABAZAR SQUARE VOWEL SIGN AI..ZANABAZAR SQUARE VOWEL SIGN AU | |
0x11A39 == code || // Mc ZANABAZAR SQUARE SIGN VISARGA | |
0x11A57 <= code && code <= 0x11A58 || // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU | |
0x11A97 == code || // Mc SOYOMBO SIGN VISARGA | |
0x11C2F == code || // Mc BHAIKSUKI VOWEL SIGN AA | |
0x11C3E == code || // Mc BHAIKSUKI SIGN VISARGA | |
0x11CA9 == code || // Mc MARCHEN SUBJOINED LETTER YA | |
0x11CB1 == code || // Mc MARCHEN VOWEL SIGN I | |
0x11CB4 == code || // Mc MARCHEN VOWEL SIGN O | |
0x16F51 <= code && code <= 0x16F7E || // Mc [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG | |
0x1D166 == code || // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM | |
0x1D16D == code // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT | |
) { | |
return SpacingMark; | |
} | |
if (0x1100 <= code && code <= 0x115F || // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER | |
0xA960 <= code && code <= 0xA97C // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH | |
) { | |
return L; | |
} | |
if (0x1160 <= code && code <= 0x11A7 || // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE | |
0xD7B0 <= code && code <= 0xD7C6 // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E | |
) { | |
return V; | |
} | |
if (0x11A8 <= code && code <= 0x11FF || // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN | |
0xD7CB <= code && code <= 0xD7FB // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH | |
) { | |
return T; | |
} | |
if (0xAC00 == code || // Lo HANGUL SYLLABLE GA | |
0xAC1C == code || // Lo HANGUL SYLLABLE GAE | |
0xAC38 == code || // Lo HANGUL SYLLABLE GYA | |
0xAC54 == code || // Lo HANGUL SYLLABLE GYAE | |
0xAC70 == code || // Lo HANGUL SYLLABLE GEO | |
0xAC8C == code || // Lo HANGUL SYLLABLE GE | |
0xACA8 == code || // Lo HANGUL SYLLABLE GYEO | |
0xACC4 == code || // Lo HANGUL SYLLABLE GYE | |
0xACE0 == code || // Lo HANGUL SYLLABLE GO | |
0xACFC == code || // Lo HANGUL SYLLABLE GWA | |
0xAD18 == code || // Lo HANGUL SYLLABLE GWAE | |
0xAD34 == code || // Lo HANGUL SYLLABLE GOE | |
0xAD50 == code || // Lo HANGUL SYLLABLE GYO | |
0xAD6C == code || // Lo HANGUL SYLLABLE GU | |
0xAD88 == code || // Lo HANGUL SYLLABLE GWEO | |
0xADA4 == code || // Lo HANGUL SYLLABLE GWE | |
0xADC0 == code || // Lo HANGUL SYLLABLE GWI | |
0xADDC == code || // Lo HANGUL SYLLABLE GYU | |
0xADF8 == code || // Lo HANGUL SYLLABLE GEU | |
0xAE14 == code || // Lo HANGUL SYLLABLE GYI | |
0xAE30 == code || // Lo HANGUL SYLLABLE GI | |
0xAE4C == code || // Lo HANGUL SYLLABLE GGA | |
0xAE68 == code || // Lo HANGUL SYLLABLE GGAE | |
0xAE84 == code || // Lo HANGUL SYLLABLE GGYA | |
0xAEA0 == code || // Lo HANGUL SYLLABLE GGYAE | |
0xAEBC == code || // Lo HANGUL SYLLABLE GGEO | |
0xAED8 == code || // Lo HANGUL SYLLABLE GGE | |
0xAEF4 == code || // Lo HANGUL SYLLABLE GGYEO | |
0xAF10 == code || // Lo HANGUL SYLLABLE GGYE | |
0xAF2C == code || // Lo HANGUL SYLLABLE GGO | |
0xAF48 == code || // Lo HANGUL SYLLABLE GGWA | |
0xAF64 == code || // Lo HANGUL SYLLABLE GGWAE | |
0xAF80 == code || // Lo HANGUL SYLLABLE GGOE | |
0xAF9C == code || // Lo HANGUL SYLLABLE GGYO | |
0xAFB8 == code || // Lo HANGUL SYLLABLE GGU | |
0xAFD4 == code || // Lo HANGUL SYLLABLE GGWEO | |
0xAFF0 == code || // Lo HANGUL SYLLABLE GGWE | |
0xB00C == code || // Lo HANGUL SYLLABLE GGWI | |
0xB028 == code || // Lo HANGUL SYLLABLE GGYU | |
0xB044 == code || // Lo HANGUL SYLLABLE GGEU | |
0xB060 == code || // Lo HANGUL SYLLABLE GGYI | |
0xB07C == code || // Lo HANGUL SYLLABLE GGI | |
0xB098 == code || // Lo HANGUL SYLLABLE NA | |
0xB0B4 == code || // Lo HANGUL SYLLABLE NAE | |
0xB0D0 == code || // Lo HANGUL SYLLABLE NYA | |
0xB0EC == code || // Lo HANGUL SYLLABLE NYAE | |
0xB108 == code || // Lo HANGUL SYLLABLE NEO | |
0xB124 == code || // Lo HANGUL SYLLABLE NE | |
0xB140 == code || // Lo HANGUL SYLLABLE NYEO | |
0xB15C == code || // Lo HANGUL SYLLABLE NYE | |
0xB178 == code || // Lo HANGUL SYLLABLE NO | |
0xB194 == code || // Lo HANGUL SYLLABLE NWA | |
0xB1B0 == code || // Lo HANGUL SYLLABLE NWAE | |
0xB1CC == code || // Lo HANGUL SYLLABLE NOE | |
0xB1E8 == code || // Lo HANGUL SYLLABLE NYO | |
0xB204 == code || // Lo HANGUL SYLLABLE NU | |
0xB220 == code || // Lo HANGUL SYLLABLE NWEO | |
0xB23C == code || // Lo HANGUL SYLLABLE NWE | |
0xB258 == code || // Lo HANGUL SYLLABLE NWI | |
0xB274 == code || // Lo HANGUL SYLLABLE NYU | |
0xB290 == code || // Lo HANGUL SYLLABLE NEU | |
0xB2AC == code || // Lo HANGUL SYLLABLE NYI | |
0xB2C8 == code || // Lo HANGUL SYLLABLE NI | |
0xB2E4 == code || // Lo HANGUL SYLLABLE DA | |
0xB300 == code || // Lo HANGUL SYLLABLE DAE | |
0xB31C == code || // Lo HANGUL SYLLABLE DYA | |
0xB338 == code || // Lo HANGUL SYLLABLE DYAE | |
0xB354 == code || // Lo HANGUL SYLLABLE DEO | |
0xB370 == code || // Lo HANGUL SYLLABLE DE | |
0xB38C == code || // Lo HANGUL SYLLABLE DYEO | |
0xB3A8 == code || // Lo HANGUL SYLLABLE DYE | |
0xB3C4 == code || // Lo HANGUL SYLLABLE DO | |
0xB3E0 == code || // Lo HANGUL SYLLABLE DWA | |
0xB3FC == code || // Lo HANGUL SYLLABLE DWAE | |
0xB418 == code || // Lo HANGUL SYLLABLE DOE | |
0xB434 == code || // Lo HANGUL SYLLABLE DYO | |
0xB450 == code || // Lo HANGUL SYLLABLE DU | |
0xB46C == code || // Lo HANGUL SYLLABLE DWEO | |
0xB488 == code || // Lo HANGUL SYLLABLE DWE | |
0xB4A4 == code || // Lo HANGUL SYLLABLE DWI | |
0xB4C0 == code || // Lo HANGUL SYLLABLE DYU | |
0xB4DC == code || // Lo HANGUL SYLLABLE DEU | |
0xB4F8 == code || // Lo HANGUL SYLLABLE DYI | |
0xB514 == code || // Lo HANGUL SYLLABLE DI | |
0xB530 == code || // Lo HANGUL SYLLABLE DDA | |
0xB54C == code || // Lo HANGUL SYLLABLE DDAE | |
0xB568 == code || // Lo HANGUL SYLLABLE DDYA | |
0xB584 == code || // Lo HANGUL SYLLABLE DDYAE | |
0xB5A0 == code || // Lo HANGUL SYLLABLE DDEO | |
0xB5BC == code || // Lo HANGUL SYLLABLE DDE | |
0xB5D8 == code || // Lo HANGUL SYLLABLE DDYEO | |
0xB5F4 == code || // Lo HANGUL SYLLABLE DDYE | |
0xB610 == code || // Lo HANGUL SYLLABLE DDO | |
0xB62C == code || // Lo HANGUL SYLLABLE DDWA | |
0xB648 == code || // Lo HANGUL SYLLABLE DDWAE | |
0xB664 == code || // Lo HANGUL SYLLABLE DDOE | |
0xB680 == code || // Lo HANGUL SYLLABLE DDYO | |
0xB69C == code || // Lo HANGUL SYLLABLE DDU | |
0xB6B8 == code || // Lo HANGUL SYLLABLE DDWEO | |
0xB6D4 == code || // Lo HANGUL SYLLABLE DDWE | |
0xB6F0 == code || // Lo HANGUL SYLLABLE DDWI | |
0xB70C == code || // Lo HANGUL SYLLABLE DDYU | |
0xB728 == code || // Lo HANGUL SYLLABLE DDEU | |
0xB744 == code || // Lo HANGUL SYLLABLE DDYI | |
0xB760 == code || // Lo HANGUL SYLLABLE DDI | |
0xB77C == code || // Lo HANGUL SYLLABLE RA | |
0xB798 == code || // Lo HANGUL SYLLABLE RAE | |
0xB7B4 == code || // Lo HANGUL SYLLABLE RYA | |
0xB7D0 == code || // Lo HANGUL SYLLABLE RYAE | |
0xB7EC == code || // Lo HANGUL SYLLABLE REO | |
0xB808 == code || // Lo HANGUL SYLLABLE RE | |
0xB824 == code || // Lo HANGUL SYLLABLE RYEO | |
0xB840 == code || // Lo HANGUL SYLLABLE RYE | |
0xB85C == code || // Lo HANGUL SYLLABLE RO | |
0xB878 == code || // Lo HANGUL SYLLABLE RWA | |
0xB894 == code || // Lo HANGUL SYLLABLE RWAE | |
0xB8B0 == code || // Lo HANGUL SYLLABLE ROE | |
0xB8CC == code || // Lo HANGUL SYLLABLE RYO | |
0xB8E8 == code || // Lo HANGUL SYLLABLE RU | |
0xB904 == code || // Lo HANGUL SYLLABLE RWEO | |
0xB920 == code || // Lo HANGUL SYLLABLE RWE | |
0xB93C == code || // Lo HANGUL SYLLABLE RWI | |
0xB958 == code || // Lo HANGUL SYLLABLE RYU | |
0xB974 == code || // Lo HANGUL SYLLABLE REU | |
0xB990 == code || // Lo HANGUL SYLLABLE RYI | |
0xB9AC == code || // Lo HANGUL SYLLABLE RI | |
0xB9C8 == code || // Lo HANGUL SYLLABLE MA | |
0xB9E4 == code || // Lo HANGUL SYLLABLE MAE | |
0xBA00 == code || // Lo HANGUL SYLLABLE MYA | |
0xBA1C == code || // Lo HANGUL SYLLABLE MYAE | |
0xBA38 == code || // Lo HANGUL SYLLABLE MEO | |
0xBA54 == code || // Lo HANGUL SYLLABLE ME | |
0xBA70 == code || // Lo HANGUL SYLLABLE MYEO | |
0xBA8C == code || // Lo HANGUL SYLLABLE MYE | |
0xBAA8 == code || // Lo HANGUL SYLLABLE MO | |
0xBAC4 == code || // Lo HANGUL SYLLABLE MWA | |
0xBAE0 == code || // Lo HANGUL SYLLABLE MWAE | |
0xBAFC == code || // Lo HANGUL SYLLABLE MOE | |
0xBB18 == code || // Lo HANGUL SYLLABLE MYO | |
0xBB34 == code || // Lo HANGUL SYLLABLE MU | |
0xBB50 == code || // Lo HANGUL SYLLABLE MWEO | |
0xBB6C == code || // Lo HANGUL SYLLABLE MWE | |
0xBB88 == code || // Lo HANGUL SYLLABLE MWI | |
0xBBA4 == code || // Lo HANGUL SYLLABLE MYU | |
0xBBC0 == code || // Lo HANGUL SYLLABLE MEU | |
0xBBDC == code || // Lo HANGUL SYLLABLE MYI | |
0xBBF8 == code || // Lo HANGUL SYLLABLE MI | |
0xBC14 == code || // Lo HANGUL SYLLABLE BA | |
0xBC30 == code || // Lo HANGUL SYLLABLE BAE | |
0xBC4C == code || // Lo HANGUL SYLLABLE BYA | |
0xBC68 == code || // Lo HANGUL SYLLABLE BYAE | |
0xBC84 == code || // Lo HANGUL SYLLABLE BEO | |
0xBCA0 == code || // Lo HANGUL SYLLABLE BE | |
0xBCBC == code || // Lo HANGUL SYLLABLE BYEO | |
0xBCD8 == code || // Lo HANGUL SYLLABLE BYE | |
0xBCF4 == code || // Lo HANGUL SYLLABLE BO | |
0xBD10 == code || // Lo HANGUL SYLLABLE BWA | |
0xBD2C == code || // Lo HANGUL SYLLABLE BWAE | |
0xBD48 == code || // Lo HANGUL SYLLABLE BOE | |
0xBD64 == code || // Lo HANGUL SYLLABLE BYO | |
0xBD80 == code || // Lo HANGUL SYLLABLE BU | |
0xBD9C == code || // Lo HANGUL SYLLABLE BWEO | |
0xBDB8 == code || // Lo HANGUL SYLLABLE BWE | |
0xBDD4 == code || // Lo HANGUL SYLLABLE BWI | |
0xBDF0 == code || // Lo HANGUL SYLLABLE BYU | |
0xBE0C == code || // Lo HANGUL SYLLABLE BEU | |
0xBE28 == code || // Lo HANGUL SYLLABLE BYI | |
0xBE44 == code || // Lo HANGUL SYLLABLE BI | |
0xBE60 == code || // Lo HANGUL SYLLABLE BBA | |
0xBE7C == code || // Lo HANGUL SYLLABLE BBAE | |
0xBE98 == code || // Lo HANGUL SYLLABLE BBYA | |
0xBEB4 == code || // Lo HANGUL SYLLABLE BBYAE | |
0xBED0 == code || // Lo HANGUL SYLLABLE BBEO | |
0xBEEC == code || // Lo HANGUL SYLLABLE BBE | |
0xBF08 == code || // Lo HANGUL SYLLABLE BBYEO | |
0xBF24 == code || // Lo HANGUL SYLLABLE BBYE | |
0xBF40 == code || // Lo HANGUL SYLLABLE BBO | |
0xBF5C == code || // Lo HANGUL SYLLABLE BBWA | |
0xBF78 == code || // Lo HANGUL SYLLABLE BBWAE | |
0xBF94 == code || // Lo HANGUL SYLLABLE BBOE | |
0xBFB0 == code || // Lo HANGUL SYLLABLE BBYO | |
0xBFCC == code || // Lo HANGUL SYLLABLE BBU | |
0xBFE8 == code || // Lo HANGUL SYLLABLE BBWEO | |
0xC004 == code || // Lo HANGUL SYLLABLE BBWE | |
0xC020 == code || // Lo HANGUL SYLLABLE BBWI | |
0xC03C == code || // Lo HANGUL SYLLABLE BBYU | |
0xC058 == code || // Lo HANGUL SYLLABLE BBEU | |
0xC074 == code || // Lo HANGUL SYLLABLE BBYI | |
0xC090 == code || // Lo HANGUL SYLLABLE BBI | |
0xC0AC == code || // Lo HANGUL SYLLABLE SA | |
0xC0C8 == code || // Lo HANGUL SYLLABLE SAE | |
0xC0E4 == code || // Lo HANGUL SYLLABLE SYA | |
0xC100 == code || // Lo HANGUL SYLLABLE SYAE | |
0xC11C == code || // Lo HANGUL SYLLABLE SEO | |
0xC138 == code || // Lo HANGUL SYLLABLE SE | |
0xC154 == code || // Lo HANGUL SYLLABLE SYEO | |
0xC170 == code || // Lo HANGUL SYLLABLE SYE | |
0xC18C == code || // Lo HANGUL SYLLABLE SO | |
0xC1A8 == code || // Lo HANGUL SYLLABLE SWA | |
0xC1C4 == code || // Lo HANGUL SYLLABLE SWAE | |
0xC1E0 == code || // Lo HANGUL SYLLABLE SOE | |
0xC1FC == code || // Lo HANGUL SYLLABLE SYO | |
0xC218 == code || // Lo HANGUL SYLLABLE SU | |
0xC234 == code || // Lo HANGUL SYLLABLE SWEO | |
0xC250 == code || // Lo HANGUL SYLLABLE SWE | |
0xC26C == code || // Lo HANGUL SYLLABLE SWI | |
0xC288 == code || // Lo HANGUL SYLLABLE SYU | |
0xC2A4 == code || // Lo HANGUL SYLLABLE SEU | |
0xC2C0 == code || // Lo HANGUL SYLLABLE SYI | |
0xC2DC == code || // Lo HANGUL SYLLABLE SI | |
0xC2F8 == code || // Lo HANGUL SYLLABLE SSA | |
0xC314 == code || // Lo HANGUL SYLLABLE SSAE | |
0xC330 == code || // Lo HANGUL SYLLABLE SSYA | |
0xC34C == code || // Lo HANGUL SYLLABLE SSYAE | |
0xC368 == code || // Lo HANGUL SYLLABLE SSEO | |
0xC384 == code || // Lo HANGUL SYLLABLE SSE | |
0xC3A0 == code || // Lo HANGUL SYLLABLE SSYEO | |
0xC3BC == code || // Lo HANGUL SYLLABLE SSYE | |
0xC3D8 == code || // Lo HANGUL SYLLABLE SSO | |
0xC3F4 == code || // Lo HANGUL SYLLABLE SSWA | |
0xC410 == code || // Lo HANGUL SYLLABLE SSWAE | |
0xC42C == code || // Lo HANGUL SYLLABLE SSOE | |
0xC448 == code || // Lo HANGUL SYLLABLE SSYO | |
0xC464 == code || // Lo HANGUL SYLLABLE SSU | |
0xC480 == code || // Lo HANGUL SYLLABLE SSWEO | |
0xC49C == code || // Lo HANGUL SYLLABLE SSWE | |
0xC4B8 == code || // Lo HANGUL SYLLABLE SSWI | |
0xC4D4 == code || // Lo HANGUL SYLLABLE SSYU | |
0xC4F0 == code || // Lo HANGUL SYLLABLE SSEU | |
0xC50C == code || // Lo HANGUL SYLLABLE SSYI | |
0xC528 == code || // Lo HANGUL SYLLABLE SSI | |
0xC544 == code || // Lo HANGUL SYLLABLE A | |
0xC560 == code || // Lo HANGUL SYLLABLE AE | |
0xC57C == code || // Lo HANGUL SYLLABLE YA | |
0xC598 == code || // Lo HANGUL SYLLABLE YAE | |
0xC5B4 == code || // Lo HANGUL SYLLABLE EO | |
0xC5D0 == code || // Lo HANGUL SYLLABLE E | |
0xC5EC == code || // Lo HANGUL SYLLABLE YEO | |
0xC608 == code || // Lo HANGUL SYLLABLE YE | |
0xC624 == code || // Lo HANGUL SYLLABLE O | |
0xC640 == code || // Lo HANGUL SYLLABLE WA | |
0xC65C == code || // Lo HANGUL SYLLABLE WAE | |
0xC678 == code || // Lo HANGUL SYLLABLE OE | |
0xC694 == code || // Lo HANGUL SYLLABLE YO | |
0xC6B0 == code || // Lo HANGUL SYLLABLE U | |
0xC6CC == code || // Lo HANGUL SYLLABLE WEO | |
0xC6E8 == code || // Lo HANGUL SYLLABLE WE | |
0xC704 == code || // Lo HANGUL SYLLABLE WI | |
0xC720 == code || // Lo HANGUL SYLLABLE YU | |
0xC73C == code || // Lo HANGUL SYLLABLE EU | |
0xC758 == code || // Lo HANGUL SYLLABLE YI | |
0xC774 == code || // Lo HANGUL SYLLABLE I | |
0xC790 == code || // Lo HANGUL SYLLABLE JA | |
0xC7AC == code || // Lo HANGUL SYLLABLE JAE | |
0xC7C8 == code || // Lo HANGUL SYLLABLE JYA | |
0xC7E4 == code || // Lo HANGUL SYLLABLE JYAE | |
0xC800 == code || // Lo HANGUL SYLLABLE JEO | |
0xC81C == code || // Lo HANGUL SYLLABLE JE | |
0xC838 == code || // Lo HANGUL SYLLABLE JYEO | |
0xC854 == code || // Lo HANGUL SYLLABLE JYE | |
0xC870 == code || // Lo HANGUL SYLLABLE JO | |
0xC88C == code || // Lo HANGUL SYLLABLE JWA | |
0xC8A8 == code || // Lo HANGUL SYLLABLE JWAE | |
0xC8C4 == code || // Lo HANGUL SYLLABLE JOE | |
0xC8E0 == code || // Lo HANGUL SYLLABLE JYO | |
0xC8FC == code || // Lo HANGUL SYLLABLE JU | |
0xC918 == code || // Lo HANGUL SYLLABLE JWEO | |
0xC934 == code || // Lo HANGUL SYLLABLE JWE | |
0xC950 == code || // Lo HANGUL SYLLABLE JWI | |
0xC96C == code || // Lo HANGUL SYLLABLE JYU | |
0xC988 == code || // Lo HANGUL SYLLABLE JEU | |
0xC9A4 == code || // Lo HANGUL SYLLABLE JYI | |
0xC9C0 == code || // Lo HANGUL SYLLABLE JI | |
0xC9DC == code || // Lo HANGUL SYLLABLE JJA | |
0xC9F8 == code || // Lo HANGUL SYLLABLE JJAE | |
0xCA14 == code || // Lo HANGUL SYLLABLE JJYA | |
0xCA30 == code || // Lo HANGUL SYLLABLE JJYAE | |
0xCA4C == code || // Lo HANGUL SYLLABLE JJEO | |
0xCA68 == code || // Lo HANGUL SYLLABLE JJE | |
0xCA84 == code || // Lo HANGUL SYLLABLE JJYEO | |
0xCAA0 == code || // Lo HANGUL SYLLABLE JJYE | |
0xCABC == code || // Lo HANGUL SYLLABLE JJO | |
0xCAD8 == code || // Lo HANGUL SYLLABLE JJWA | |
0xCAF4 == code || // Lo HANGUL SYLLABLE JJWAE | |
0xCB10 == code || // Lo HANGUL SYLLABLE JJOE | |
0xCB2C == code || // Lo HANGUL SYLLABLE JJYO | |
0xCB48 == code || // Lo HANGUL SYLLABLE JJU | |
0xCB64 == code || // Lo HANGUL SYLLABLE JJWEO | |
0xCB80 == code || // Lo HANGUL SYLLABLE JJWE | |
0xCB9C == code || // Lo HANGUL SYLLABLE JJWI | |
0xCBB8 == code || // Lo HANGUL SYLLABLE JJYU | |
0xCBD4 == code || // Lo HANGUL SYLLABLE JJEU | |
0xCBF0 == code || // Lo HANGUL SYLLABLE JJYI | |
0xCC0C == code || // Lo HANGUL SYLLABLE JJI | |
0xCC28 == code || // Lo HANGUL SYLLABLE CA | |
0xCC44 == code || // Lo HANGUL SYLLABLE CAE | |
0xCC60 == code || // Lo HANGUL SYLLABLE CYA | |
0xCC7C == code || // Lo HANGUL SYLLABLE CYAE | |
0xCC98 == code || // Lo HANGUL SYLLABLE CEO | |
0xCCB4 == code || // Lo HANGUL SYLLABLE CE | |
0xCCD0 == code || // Lo HANGUL SYLLABLE CYEO | |
0xCCEC == code || // Lo HANGUL SYLLABLE CYE | |
0xCD08 == code || // Lo HANGUL SYLLABLE CO | |
0xCD24 == code || // Lo HANGUL SYLLABLE CWA | |
0xCD40 == code || // Lo HANGUL SYLLABLE CWAE | |
0xCD5C == code || // Lo HANGUL SYLLABLE COE | |
0xCD78 == code || // Lo HANGUL SYLLABLE CYO | |
0xCD94 == code || // Lo HANGUL SYLLABLE CU | |
0xCDB0 == code || // Lo HANGUL SYLLABLE CWEO | |
0xCDCC == code || // Lo HANGUL SYLLABLE CWE | |
0xCDE8 == code || // Lo HANGUL SYLLABLE CWI | |
0xCE04 == code || // Lo HANGUL SYLLABLE CYU | |
0xCE20 == code || // Lo HANGUL SYLLABLE CEU | |
0xCE3C == code || // Lo HANGUL SYLLABLE CYI | |
0xCE58 == code || // Lo HANGUL SYLLABLE CI | |
0xCE74 == code || // Lo HANGUL SYLLABLE KA | |
0xCE90 == code || // Lo HANGUL SYLLABLE KAE | |
0xCEAC == code || // Lo HANGUL SYLLABLE KYA | |
0xCEC8 == code || // Lo HANGUL SYLLABLE KYAE | |
0xCEE4 == code || // Lo HANGUL SYLLABLE KEO | |
0xCF00 == code || // Lo HANGUL SYLLABLE KE | |
0xCF1C == code || // Lo HANGUL SYLLABLE KYEO | |
0xCF38 == code || // Lo HANGUL SYLLABLE KYE | |
0xCF54 == code || // Lo HANGUL SYLLABLE KO | |
0xCF70 == code || // Lo HANGUL SYLLABLE KWA | |
0xCF8C == code || // Lo HANGUL SYLLABLE KWAE | |
0xCFA8 == code || // Lo HANGUL SYLLABLE KOE | |
0xCFC4 == code || // Lo HANGUL SYLLABLE KYO | |
0xCFE0 == code || // Lo HANGUL SYLLABLE KU | |
0xCFFC == code || // Lo HANGUL SYLLABLE KWEO | |
0xD018 == code || // Lo HANGUL SYLLABLE KWE | |
0xD034 == code || // Lo HANGUL SYLLABLE KWI | |
0xD050 == code || // Lo HANGUL SYLLABLE KYU | |
0xD06C == code || // Lo HANGUL SYLLABLE KEU | |
0xD088 == code || // Lo HANGUL SYLLABLE KYI | |
0xD0A4 == code || // Lo HANGUL SYLLABLE KI | |
0xD0C0 == code || // Lo HANGUL SYLLABLE TA | |
0xD0DC == code || // Lo HANGUL SYLLABLE TAE | |
0xD0F8 == code || // Lo HANGUL SYLLABLE TYA | |
0xD114 == code || // Lo HANGUL SYLLABLE TYAE | |
0xD130 == code || // Lo HANGUL SYLLABLE TEO | |
0xD14C == code || // Lo HANGUL SYLLABLE TE | |
0xD168 == code || // Lo HANGUL SYLLABLE TYEO | |
0xD184 == code || // Lo HANGUL SYLLABLE TYE | |
0xD1A0 == code || // Lo HANGUL SYLLABLE TO | |
0xD1BC == code || // Lo HANGUL SYLLABLE TWA | |
0xD1D8 == code || // Lo HANGUL SYLLABLE TWAE | |
0xD1F4 == code || // Lo HANGUL SYLLABLE TOE | |
0xD210 == code || // Lo HANGUL SYLLABLE TYO | |
0xD22C == code || // Lo HANGUL SYLLABLE TU | |
0xD248 == code || // Lo HANGUL SYLLABLE TWEO | |
0xD264 == code || // Lo HANGUL SYLLABLE TWE | |
0xD280 == code || // Lo HANGUL SYLLABLE TWI | |
0xD29C == code || // Lo HANGUL SYLLABLE TYU | |
0xD2B8 == code || // Lo HANGUL SYLLABLE TEU | |
0xD2D4 == code || // Lo HANGUL SYLLABLE TYI | |
0xD2F0 == code || // Lo HANGUL SYLLABLE TI | |
0xD30C == code || // Lo HANGUL SYLLABLE PA | |
0xD328 == code || // Lo HANGUL SYLLABLE PAE | |
0xD344 == code || // Lo HANGUL SYLLABLE PYA | |
0xD360 == code || // Lo HANGUL SYLLABLE PYAE | |
0xD37C == code || // Lo HANGUL SYLLABLE PEO | |
0xD398 == code || // Lo HANGUL SYLLABLE PE | |
0xD3B4 == code || // Lo HANGUL SYLLABLE PYEO | |
0xD3D0 == code || // Lo HANGUL SYLLABLE PYE | |
0xD3EC == code || // Lo HANGUL SYLLABLE PO | |
0xD408 == code || // Lo HANGUL SYLLABLE PWA | |
0xD424 == code || // Lo HANGUL SYLLABLE PWAE | |
0xD440 == code || // Lo HANGUL SYLLABLE POE | |
0xD45C == code || // Lo HANGUL SYLLABLE PYO | |
0xD478 == code || // Lo HANGUL SYLLABLE PU | |
0xD494 == code || // Lo HANGUL SYLLABLE PWEO | |
0xD4B0 == code || // Lo HANGUL SYLLABLE PWE | |
0xD4CC == code || // Lo HANGUL SYLLABLE PWI | |
0xD4E8 == code || // Lo HANGUL SYLLABLE PYU | |
0xD504 == code || // Lo HANGUL SYLLABLE PEU | |
0xD520 == code || // Lo HANGUL SYLLABLE PYI | |
0xD53C == code || // Lo HANGUL SYLLABLE PI | |
0xD558 == code || // Lo HANGUL SYLLABLE HA | |
0xD574 == code || // Lo HANGUL SYLLABLE HAE | |
0xD590 == code || // Lo HANGUL SYLLABLE HYA | |
0xD5AC == code || // Lo HANGUL SYLLABLE HYAE | |
0xD5C8 == code || // Lo HANGUL SYLLABLE HEO | |
0xD5E4 == code || // Lo HANGUL SYLLABLE HE | |
0xD600 == code || // Lo HANGUL SYLLABLE HYEO | |
0xD61C == code || // Lo HANGUL SYLLABLE HYE | |
0xD638 == code || // Lo HANGUL SYLLABLE HO | |
0xD654 == code || // Lo HANGUL SYLLABLE HWA | |
0xD670 == code || // Lo HANGUL SYLLABLE HWAE | |
0xD68C == code || // Lo HANGUL SYLLABLE HOE | |
0xD6A8 == code || // Lo HANGUL SYLLABLE HYO | |
0xD6C4 == code || // Lo HANGUL SYLLABLE HU | |
0xD6E0 == code || // Lo HANGUL SYLLABLE HWEO | |
0xD6FC == code || // Lo HANGUL SYLLABLE HWE | |
0xD718 == code || // Lo HANGUL SYLLABLE HWI | |
0xD734 == code || // Lo HANGUL SYLLABLE HYU | |
0xD750 == code || // Lo HANGUL SYLLABLE HEU | |
0xD76C == code || // Lo HANGUL SYLLABLE HYI | |
0xD788 == code // Lo HANGUL SYLLABLE HI | |
) { | |
return LV; | |
} | |
if (0xAC01 <= code && code <= 0xAC1B || // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH | |
0xAC1D <= code && code <= 0xAC37 || // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH | |
0xAC39 <= code && code <= 0xAC53 || // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH | |
0xAC55 <= code && code <= 0xAC6F || // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH | |
0xAC71 <= code && code <= 0xAC8B || // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH | |
0xAC8D <= code && code <= 0xACA7 || // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH | |
0xACA9 <= code && code <= 0xACC3 || // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH | |
0xACC5 <= code && code <= 0xACDF || // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH | |
0xACE1 <= code && code <= 0xACFB || // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH | |
0xACFD <= code && code <= 0xAD17 || // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH | |
0xAD19 <= code && code <= 0xAD33 || // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH | |
0xAD35 <= code && code <= 0xAD4F || // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH | |
0xAD51 <= code && code <= 0xAD6B || // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH | |
0xAD6D <= code && code <= 0xAD87 || // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH | |
0xAD89 <= code && code <= 0xADA3 || // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH | |
0xADA5 <= code && code <= 0xADBF || // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH | |
0xADC1 <= code && code <= 0xADDB || // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH | |
0xADDD <= code && code <= 0xADF7 || // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH | |
0xADF9 <= code && code <= 0xAE13 || // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH | |
0xAE15 <= code && code <= 0xAE2F || // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH | |
0xAE31 <= code && code <= 0xAE4B || // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH | |
0xAE4D <= code && code <= 0xAE67 || // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH | |
0xAE69 <= code && code <= 0xAE83 || // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH | |
0xAE85 <= code && code <= 0xAE9F || // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH | |
0xAEA1 <= code && code <= 0xAEBB || // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH | |
0xAEBD <= code && code <= 0xAED7 || // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH | |
0xAED9 <= code && code <= 0xAEF3 || // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH | |
0xAEF5 <= code && code <= 0xAF0F || // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH | |
0xAF11 <= code && code <= 0xAF2B || // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH | |
0xAF2D <= code && code <= 0xAF47 || // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH | |
0xAF49 <= code && code <= 0xAF63 || // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH | |
0xAF65 <= code && code <= 0xAF7F || // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH | |
0xAF81 <= code && code <= 0xAF9B || // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH | |
0xAF9D <= code && code <= 0xAFB7 || // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH | |
0xAFB9 <= code && code <= 0xAFD3 || // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH | |
0xAFD5 <= code && code <= 0xAFEF || // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH | |
0xAFF1 <= code && code <= 0xB00B || // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH | |
0xB00D <= code && code <= 0xB027 || // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH | |
0xB029 <= code && code <= 0xB043 || // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH | |
0xB045 <= code && code <= 0xB05F || // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH | |
0xB061 <= code && code <= 0xB07B || // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH | |
0xB07D <= code && code <= 0xB097 || // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH | |
0xB099 <= code && code <= 0xB0B3 || // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH | |
0xB0B5 <= code && code <= 0xB0CF || // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH | |
0xB0D1 <= code && code <= 0xB0EB || // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH | |
0xB0ED <= code && code <= 0xB107 || // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH | |
0xB109 <= code && code <= 0xB123 || // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH | |
0xB125 <= code && code <= 0xB13F || // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH | |
0xB141 <= code && code <= 0xB15B || // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH | |
0xB15D <= code && code <= 0xB177 || // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH | |
0xB179 <= code && code <= 0xB193 || // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH | |
0xB195 <= code && code <= 0xB1AF || // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH | |
0xB1B1 <= code && code <= 0xB1CB || // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH | |
0xB1CD <= code && code <= 0xB1E7 || // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH | |
0xB1E9 <= code && code <= 0xB203 || // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH | |
0xB205 <= code && code <= 0xB21F || // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH | |
0xB221 <= code && code <= 0xB23B || // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH | |
0xB23D <= code && code <= 0xB257 || // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH | |
0xB259 <= code && code <= 0xB273 || // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH | |
0xB275 <= code && code <= 0xB28F || // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH | |
0xB291 <= code && code <= 0xB2AB || // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH | |
0xB2AD <= code && code <= 0xB2C7 || // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH | |
0xB2C9 <= code && code <= 0xB2E3 || // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH | |
0xB2E5 <= code && code <= 0xB2FF || // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH | |
0xB301 <= code && code <= 0xB31B || // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH | |
0xB31D <= code && code <= 0xB337 || // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH | |
0xB339 <= code && code <= 0xB353 || // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH | |
0xB355 <= code && code <= 0xB36F || // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH | |
0xB371 <= code && code <= 0xB38B || // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH | |
0xB38D <= code && code <= 0xB3A7 || // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH | |
0xB3A9 <= code && code <= 0xB3C3 || // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH | |
0xB3C5 <= code && code <= 0xB3DF || // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH | |
0xB3E1 <= code && code <= 0xB3FB || // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH | |
0xB3FD <= code && code <= 0xB417 || // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH | |
0xB419 <= code && code <= 0xB433 || // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH | |
0xB435 <= code && code <= 0xB44F || // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH | |
0xB451 <= code && code <= 0xB46B || // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH | |
0xB46D <= code && code <= 0xB487 || // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH | |
0xB489 <= code && code <= 0xB4A3 || // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH | |
0xB4A5 <= code && code <= 0xB4BF || // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH | |
0xB4C1 <= code && code <= 0xB4DB || // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH | |
0xB4DD <= code && code <= 0xB4F7 || // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH | |
0xB4F9 <= code && code <= 0xB513 || // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH | |
0xB515 <= code && code <= 0xB52F || // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH | |
0xB531 <= code && code <= 0xB54B || // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH | |
0xB54D <= code && code <= 0xB567 || // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH | |
0xB569 <= code && code <= 0xB583 || // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH | |
0xB585 <= code && code <= 0xB59F || // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH | |
0xB5A1 <= code && code <= 0xB5BB || // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH | |
0xB5BD <= code && code <= 0xB5D7 || // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH | |
0xB5D9 <= code && code <= 0xB5F3 || // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH | |
0xB5F5 <= code && code <= 0xB60F || // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH | |
0xB611 <= code && code <= 0xB62B || // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH | |
0xB62D <= code && code <= 0xB647 || // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH | |
0xB649 <= code && code <= 0xB663 || // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH | |
0xB665 <= code && code <= 0xB67F || // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH | |
0xB681 <= code && code <= 0xB69B || // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH | |
0xB69D <= code && code <= 0xB6B7 || // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH | |
0xB6B9 <= code && code <= 0xB6D3 || // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH | |
0xB6D5 <= code && code <= 0xB6EF || // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH | |
0xB6F1 <= code && code <= 0xB70B || // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH | |
0xB70D <= code && code <= 0xB727 || // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH | |
0xB729 <= code && code <= 0xB743 || // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH | |
0xB745 <= code && code <= 0xB75F || // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH | |
0xB761 <= code && code <= 0xB77B || // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH | |
0xB77D <= code && code <= 0xB797 || // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH | |
0xB799 <= code && code <= 0xB7B3 || // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH | |
0xB7B5 <= code && code <= 0xB7CF || // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH | |
0xB7D1 <= code && code <= 0xB7EB || // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH | |
0xB7ED <= code && code <= 0xB807 || // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH | |
0xB809 <= code && code <= 0xB823 || // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH | |
0xB825 <= code && code <= 0xB83F || // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH | |
0xB841 <= code && code <= 0xB85B || // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH | |
0xB85D <= code && code <= 0xB877 || // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH | |
0xB879 <= code && code <= 0xB893 || // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH | |
0xB895 <= code && code <= 0xB8AF || // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH | |
0xB8B1 <= code && code <= 0xB8CB || // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH | |
0xB8CD <= code && code <= 0xB8E7 || // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH | |
0xB8E9 <= code && code <= 0xB903 || // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH | |
0xB905 <= code && code <= 0xB91F || // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH | |
0xB921 <= code && code <= 0xB93B || // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH | |
0xB93D <= code && code <= 0xB957 || // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH | |
0xB959 <= code && code <= 0xB973 || // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH | |
0xB975 <= code && code <= 0xB98F || // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH | |
0xB991 <= code && code <= 0xB9AB || // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH | |
0xB9AD <= code && code <= 0xB9C7 || // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH | |
0xB9C9 <= code && code <= 0xB9E3 || // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH | |
0xB9E5 <= code && code <= 0xB9FF || // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH | |
0xBA01 <= code && code <= 0xBA1B || // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH | |
0xBA1D <= code && code <= 0xBA37 || // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH | |
0xBA39 <= code && code <= 0xBA53 || // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH | |
0xBA55 <= code && code <= 0xBA6F || // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH | |
0xBA71 <= code && code <= 0xBA8B || // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH | |
0xBA8D <= code && code <= 0xBAA7 || // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH | |
0xBAA9 <= code && code <= 0xBAC3 || // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH | |
0xBAC5 <= code && code <= 0xBADF || // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH | |
0xBAE1 <= code && code <= 0xBAFB || // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH | |
0xBAFD <= code && code <= 0xBB17 || // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH | |
0xBB19 <= code && code <= 0xBB33 || // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH | |
0xBB35 <= code && code <= 0xBB4F || // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH | |
0xBB51 <= code && code <= 0xBB6B || // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH | |
0xBB6D <= code && code <= 0xBB87 || // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH | |
0xBB89 <= code && code <= 0xBBA3 || // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH | |
0xBBA5 <= code && code <= 0xBBBF || // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH | |
0xBBC1 <= code && code <= 0xBBDB || // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH | |
0xBBDD <= code && code <= 0xBBF7 || // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH | |
0xBBF9 <= code && code <= 0xBC13 || // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH | |
0xBC15 <= code && code <= 0xBC2F || // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH | |
0xBC31 <= code && code <= 0xBC4B || // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH | |
0xBC4D <= code && code <= 0xBC67 || // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH | |
0xBC69 <= code && code <= 0xBC83 || // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH | |
0xBC85 <= code && code <= 0xBC9F || // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH | |
0xBCA1 <= code && code <= 0xBCBB || // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH | |
0xBCBD <= code && code <= 0xBCD7 || // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH | |
0xBCD9 <= code && code <= 0xBCF3 || // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH | |
0xBCF5 <= code && code <= 0xBD0F || // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH | |
0xBD11 <= code && code <= 0xBD2B || // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH | |
0xBD2D <= code && code <= 0xBD47 || // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH | |
0xBD49 <= code && code <= 0xBD63 || // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH | |
0xBD65 <= code && code <= 0xBD7F || // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH | |
0xBD81 <= code && code <= 0xBD9B || // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH | |
0xBD9D <= code && code <= 0xBDB7 || // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH | |
0xBDB9 <= code && code <= 0xBDD3 || // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH | |
0xBDD5 <= code && code <= 0xBDEF || // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH | |
0xBDF1 <= code && code <= 0xBE0B || // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH | |
0xBE0D <= code && code <= 0xBE27 || // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH | |
0xBE29 <= code && code <= 0xBE43 || // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH | |
0xBE45 <= code && code <= 0xBE5F || // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH | |
0xBE61 <= code && code <= 0xBE7B || // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH | |
0xBE7D <= code && code <= 0xBE97 || // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH | |
0xBE99 <= code && code <= 0xBEB3 || // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH | |
0xBEB5 <= code && code <= 0xBECF || // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH | |
0xBED1 <= code && code <= 0xBEEB || // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH | |
0xBEED <= code && code <= 0xBF07 || // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH | |
0xBF09 <= code && code <= 0xBF23 || // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH | |
0xBF25 <= code && code <= 0xBF3F || // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH | |
0xBF41 <= code && code <= 0xBF5B || // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH | |
0xBF5D <= code && code <= 0xBF77 || // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH | |
0xBF79 <= code && code <= 0xBF93 || // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH | |
0xBF95 <= code && code <= 0xBFAF || // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH | |
0xBFB1 <= code && code <= 0xBFCB || // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH | |
0xBFCD <= code && code <= 0xBFE7 || // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH | |
0xBFE9 <= code && code <= 0xC003 || // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH | |
0xC005 <= code && code <= 0xC01F || // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH | |
0xC021 <= code && code <= 0xC03B || // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH | |
0xC03D <= code && code <= 0xC057 || // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH | |
0xC059 <= code && code <= 0xC073 || // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH | |
0xC075 <= code && code <= 0xC08F || // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH | |
0xC091 <= code && code <= 0xC0AB || // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH | |
0xC0AD <= code && code <= 0xC0C7 || // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH | |
0xC0C9 <= code && code <= 0xC0E3 || // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH | |
0xC0E5 <= code && code <= 0xC0FF || // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH | |
0xC101 <= code && code <= 0xC11B || // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH | |
0xC11D <= code && code <= 0xC137 || // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH | |
0xC139 <= code && code <= 0xC153 || // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH | |
0xC155 <= code && code <= 0xC16F || // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH | |
0xC171 <= code && code <= 0xC18B || // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH | |
0xC18D <= code && code <= 0xC1A7 || // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH | |
0xC1A9 <= code && code <= 0xC1C3 || // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH | |
0xC1C5 <= code && code <= 0xC1DF || // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH | |
0xC1E1 <= code && code <= 0xC1FB || // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH | |
0xC1FD <= code && code <= 0xC217 || // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH | |
0xC219 <= code && code <= 0xC233 || // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH | |
0xC235 <= code && code <= 0xC24F || // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH | |
0xC251 <= code && code <= 0xC26B || // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH | |
0xC26D <= code && code <= 0xC287 || // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH | |
0xC289 <= code && code <= 0xC2A3 || // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH | |
0xC2A5 <= code && code <= 0xC2BF || // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH | |
0xC2C1 <= code && code <= 0xC2DB || // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH | |
0xC2DD <= code && code <= 0xC2F7 || // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH | |
0xC2F9 <= code && code <= 0xC313 || // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH | |
0xC315 <= code && code <= 0xC32F || // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH | |
0xC331 <= code && code <= 0xC34B || // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH | |
0xC34D <= code && code <= 0xC367 || // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH | |
0xC369 <= code && code <= 0xC383 || // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH | |
0xC385 <= code && code <= 0xC39F || // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH | |
0xC3A1 <= code && code <= 0xC3BB || // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH | |
0xC3BD <= code && code <= 0xC3D7 || // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH | |
0xC3D9 <= code && code <= 0xC3F3 || // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH | |
0xC3F5 <= code && code <= 0xC40F || // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH | |
0xC411 <= code && code <= 0xC42B || // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH | |
0xC42D <= code && code <= 0xC447 || // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH | |
0xC449 <= code && code <= 0xC463 || // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH | |
0xC465 <= code && code <= 0xC47F || // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH | |
0xC481 <= code && code <= 0xC49B || // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH | |
0xC49D <= code && code <= 0xC4B7 || // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH | |
0xC4B9 <= code && code <= 0xC4D3 || // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH | |
0xC4D5 <= code && code <= 0xC4EF || // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH | |
0xC4F1 <= code && code <= 0xC50B || // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH | |
0xC50D <= code && code <= 0xC527 || // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH | |
0xC529 <= code && code <= 0xC543 || // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH | |
0xC545 <= code && code <= 0xC55F || // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH | |
0xC561 <= code && code <= 0xC57B || // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH | |
0xC57D <= code && code <= 0xC597 || // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH | |
0xC599 <= code && code <= 0xC5B3 || // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH | |
0xC5B5 <= code && code <= 0xC5CF || // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH | |
0xC5D1 <= code && code <= 0xC5EB || // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH | |
0xC5ED <= code && code <= 0xC607 || // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH | |
0xC609 <= code && code <= 0xC623 || // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH | |
0xC625 <= code && code <= 0xC63F || // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH | |
0xC641 <= code && code <= 0xC65B || // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH | |
0xC65D <= code && code <= 0xC677 || // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH | |
0xC679 <= code && code <= 0xC693 || // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH | |
0xC695 <= code && code <= 0xC6AF || // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH | |
0xC6B1 <= code && code <= 0xC6CB || // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH | |
0xC6CD <= code && code <= 0xC6E7 || // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH | |
0xC6E9 <= code && code <= 0xC703 || // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH | |
0xC705 <= code && code <= 0xC71F || // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH | |
0xC721 <= code && code <= 0xC73B || // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH | |
0xC73D <= code && code <= 0xC757 || // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH | |
0xC759 <= code && code <= 0xC773 || // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH | |
0xC775 <= code && code <= 0xC78F || // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH | |
0xC791 <= code && code <= 0xC7AB || // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH | |
0xC7AD <= code && code <= 0xC7C7 || // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH | |
0xC7C9 <= code && code <= 0xC7E3 || // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH | |
0xC7E5 <= code && code <= 0xC7FF || // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH | |
0xC801 <= code && code <= 0xC81B || // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH | |
0xC81D <= code && code <= 0xC837 || // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH | |
0xC839 <= code && code <= 0xC853 || // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH | |
0xC855 <= code && code <= 0xC86F || // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH | |
0xC871 <= code && code <= 0xC88B || // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH | |
0xC88D <= code && code <= 0xC8A7 || // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH | |
0xC8A9 <= code && code <= 0xC8C3 || // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH | |
0xC8C5 <= code && code <= 0xC8DF || // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH | |
0xC8E1 <= code && code <= 0xC8FB || // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH | |
0xC8FD <= code && code <= 0xC917 || // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH | |
0xC919 <= code && code <= 0xC933 || // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH | |
0xC935 <= code && code <= 0xC94F || // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH | |
0xC951 <= code && code <= 0xC96B || // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH | |
0xC96D <= code && code <= 0xC987 || // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH | |
0xC989 <= code && code <= 0xC9A3 || // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH | |
0xC9A5 <= code && code <= 0xC9BF || // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH | |
0xC9C1 <= code && code <= 0xC9DB || // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH | |
0xC9DD <= code && code <= 0xC9F7 || // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH | |
0xC9F9 <= code && code <= 0xCA13 || // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH | |
0xCA15 <= code && code <= 0xCA2F || // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH | |
0xCA31 <= code && code <= 0xCA4B || // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH | |
0xCA4D <= code && code <= 0xCA67 || // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH | |
0xCA69 <= code && code <= 0xCA83 || // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH | |
0xCA85 <= code && code <= 0xCA9F || // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH | |
0xCAA1 <= code && code <= 0xCABB || // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH | |
0xCABD <= code && code <= 0xCAD7 || // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH | |
0xCAD9 <= code && code <= 0xCAF3 || // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH | |
0xCAF5 <= code && code <= 0xCB0F || // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH | |
0xCB11 <= code && code <= 0xCB2B || // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH | |
0xCB2D <= code && code <= 0xCB47 || // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH | |
0xCB49 <= code && code <= 0xCB63 || // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH | |
0xCB65 <= code && code <= 0xCB7F || // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH | |
0xCB81 <= code && code <= 0xCB9B || // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH | |
0xCB9D <= code && code <= 0xCBB7 || // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH | |
0xCBB9 <= code && code <= 0xCBD3 || // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH | |
0xCBD5 <= code && code <= 0xCBEF || // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH | |
0xCBF1 <= code && code <= 0xCC0B || // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH | |
0xCC0D <= code && code <= 0xCC27 || // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH | |
0xCC29 <= code && code <= 0xCC43 || // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH | |
0xCC45 <= code && code <= 0xCC5F || // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH | |
0xCC61 <= code && code <= 0xCC7B || // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH | |
0xCC7D <= code && code <= 0xCC97 || // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH | |
0xCC99 <= code && code <= 0xCCB3 || // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH | |
0xCCB5 <= code && code <= 0xCCCF || // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH | |
0xCCD1 <= code && code <= 0xCCEB || // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH | |
0xCCED <= code && code <= 0xCD07 || // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH | |
0xCD09 <= code && code <= 0xCD23 || // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH | |
0xCD25 <= code && code <= 0xCD3F || // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH | |
0xCD41 <= code && code <= 0xCD5B || // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH | |
0xCD5D <= code && code <= 0xCD77 || // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH | |
0xCD79 <= code && code <= 0xCD93 || // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH | |
0xCD95 <= code && code <= 0xCDAF || // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH | |
0xCDB1 <= code && code <= 0xCDCB || // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH | |
0xCDCD <= code && code <= 0xCDE7 || // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH | |
0xCDE9 <= code && code <= 0xCE03 || // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH | |
0xCE05 <= code && code <= 0xCE1F || // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH | |
0xCE21 <= code && code <= 0xCE3B || // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH | |
0xCE3D <= code && code <= 0xCE57 || // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH | |
0xCE59 <= code && code <= 0xCE73 || // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH | |
0xCE75 <= code && code <= 0xCE8F || // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH | |
0xCE91 <= code && code <= 0xCEAB || // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH | |
0xCEAD <= code && code <= 0xCEC7 || // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH | |
0xCEC9 <= code && code <= 0xCEE3 || // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH | |
0xCEE5 <= code && code <= 0xCEFF || // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH | |
0xCF01 <= code && code <= 0xCF1B || // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH | |
0xCF1D <= code && code <= 0xCF37 || // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH | |
0xCF39 <= code && code <= 0xCF53 || // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH | |
0xCF55 <= code && code <= 0xCF6F || // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH | |
0xCF71 <= code && code <= 0xCF8B || // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH | |
0xCF8D <= code && code <= 0xCFA7 || // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH | |
0xCFA9 <= code && code <= 0xCFC3 || // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH | |
0xCFC5 <= code && code <= 0xCFDF || // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH | |
0xCFE1 <= code && code <= 0xCFFB || // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH | |
0xCFFD <= code && code <= 0xD017 || // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH | |
0xD019 <= code && code <= 0xD033 || // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH | |
0xD035 <= code && code <= 0xD04F || // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH | |
0xD051 <= code && code <= 0xD06B || // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH | |
0xD06D <= code && code <= 0xD087 || // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH | |
0xD089 <= code && code <= 0xD0A3 || // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH | |
0xD0A5 <= code && code <= 0xD0BF || // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH | |
0xD0C1 <= code && code <= 0xD0DB || // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH | |
0xD0DD <= code && code <= 0xD0F7 || // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH | |
0xD0F9 <= code && code <= 0xD113 || // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH | |
0xD115 <= code && code <= 0xD12F || // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH | |
0xD131 <= code && code <= 0xD14B || // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH | |
0xD14D <= code && code <= 0xD167 || // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH | |
0xD169 <= code && code <= 0xD183 || // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH | |
0xD185 <= code && code <= 0xD19F || // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH | |
0xD1A1 <= code && code <= 0xD1BB || // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH | |
0xD1BD <= code && code <= 0xD1D7 || // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH | |
0xD1D9 <= code && code <= 0xD1F3 || // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH | |
0xD1F5 <= code && code <= 0xD20F || // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH | |
0xD211 <= code && code <= 0xD22B || // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH | |
0xD22D <= code && code <= 0xD247 || // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH | |
0xD249 <= code && code <= 0xD263 || // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH | |
0xD265 <= code && code <= 0xD27F || // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH | |
0xD281 <= code && code <= 0xD29B || // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH | |
0xD29D <= code && code <= 0xD2B7 || // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH | |
0xD2B9 <= code && code <= 0xD2D3 || // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH | |
0xD2D5 <= code && code <= 0xD2EF || // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH | |
0xD2F1 <= code && code <= 0xD30B || // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH | |
0xD30D <= code && code <= 0xD327 || // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH | |
0xD329 <= code && code <= 0xD343 || // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH | |
0xD345 <= code && code <= 0xD35F || // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH | |
0xD361 <= code && code <= 0xD37B || // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH | |
0xD37D <= code && code <= 0xD397 || // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH | |
0xD399 <= code && code <= 0xD3B3 || // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH | |
0xD3B5 <= code && code <= 0xD3CF || // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH | |
0xD3D1 <= code && code <= 0xD3EB || // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH | |
0xD3ED <= code && code <= 0xD407 || // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH | |
0xD409 <= code && code <= 0xD423 || // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH | |
0xD425 <= code && code <= 0xD43F || // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH | |
0xD441 <= code && code <= 0xD45B || // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH | |
0xD45D <= code && code <= 0xD477 || // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH | |
0xD479 <= code && code <= 0xD493 || // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH | |
0xD495 <= code && code <= 0xD4AF || // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH | |
0xD4B1 <= code && code <= 0xD4CB || // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH | |
0xD4CD <= code && code <= 0xD4E7 || // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH | |
0xD4E9 <= code && code <= 0xD503 || // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH | |
0xD505 <= code && code <= 0xD51F || // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH | |
0xD521 <= code && code <= 0xD53B || // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH | |
0xD53D <= code && code <= 0xD557 || // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH | |
0xD559 <= code && code <= 0xD573 || // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH | |
0xD575 <= code && code <= 0xD58F || // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH | |
0xD591 <= code && code <= 0xD5AB || // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH | |
0xD5AD <= code && code <= 0xD5C7 || // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH | |
0xD5C9 <= code && code <= 0xD5E3 || // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH | |
0xD5E5 <= code && code <= 0xD5FF || // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH | |
0xD601 <= code && code <= 0xD61B || // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH | |
0xD61D <= code && code <= 0xD637 || // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH | |
0xD639 <= code && code <= 0xD653 || // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH | |
0xD655 <= code && code <= 0xD66F || // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH | |
0xD671 <= code && code <= 0xD68B || // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH | |
0xD68D <= code && code <= 0xD6A7 || // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH | |
0xD6A9 <= code && code <= 0xD6C3 || // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH | |
0xD6C5 <= code && code <= 0xD6DF || // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH | |
0xD6E1 <= code && code <= 0xD6FB || // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH | |
0xD6FD <= code && code <= 0xD717 || // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH | |
0xD719 <= code && code <= 0xD733 || // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH | |
0xD735 <= code && code <= 0xD74F || // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH | |
0xD751 <= code && code <= 0xD76B || // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH | |
0xD76D <= code && code <= 0xD787 || // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH | |
0xD789 <= code && code <= 0xD7A3 // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH | |
) { | |
return LVT; | |
} | |
if (0x261D == code || // So WHITE UP POINTING INDEX | |
0x26F9 == code || // So PERSON WITH BALL | |
0x270A <= code && code <= 0x270D || // So [4] RAISED FIST..WRITING HAND | |
0x1F385 == code || // So FATHER CHRISTMAS | |
0x1F3C2 <= code && code <= 0x1F3C4 || // So [3] SNOWBOARDER..SURFER | |
0x1F3C7 == code || // So HORSE RACING | |
0x1F3CA <= code && code <= 0x1F3CC || // So [3] SWIMMER..GOLFER | |
0x1F442 <= code && code <= 0x1F443 || // So [2] EAR..NOSE | |
0x1F446 <= code && code <= 0x1F450 || // So [11] WHITE UP POINTING BACKHAND INDEX..OPEN HANDS SIGN | |
0x1F46E == code || // So POLICE OFFICER | |
0x1F470 <= code && code <= 0x1F478 || // So [9] BRIDE WITH VEIL..PRINCESS | |
0x1F47C == code || // So BABY ANGEL | |
0x1F481 <= code && code <= 0x1F483 || // So [3] INFORMATION DESK PERSON..DANCER | |
0x1F485 <= code && code <= 0x1F487 || // So [3] NAIL POLISH..HAIRCUT | |
0x1F4AA == code || // So FLEXED BICEPS | |
0x1F574 <= code && code <= 0x1F575 || // So [2] MAN IN BUSINESS SUIT LEVITATING..SLEUTH OR SPY | |
0x1F57A == code || // So MAN DANCING | |
0x1F590 == code || // So RAISED HAND WITH FINGERS SPLAYED | |
0x1F595 <= code && code <= 0x1F596 || // So [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS | |
0x1F645 <= code && code <= 0x1F647 || // So [3] FACE WITH NO GOOD GESTURE..PERSON BOWING DEEPLY | |
0x1F64B <= code && code <= 0x1F64F || // So [5] HAPPY PERSON RAISING ONE HAND..PERSON WITH FOLDED HANDS | |
0x1F6A3 == code || // So ROWBOAT | |
0x1F6B4 <= code && code <= 0x1F6B6 || // So [3] BICYCLIST..PEDESTRIAN | |
0x1F6C0 == code || // So BATH | |
0x1F6CC == code || // So SLEEPING ACCOMMODATION | |
0x1F918 <= code && code <= 0x1F91C || // So [5] SIGN OF THE HORNS..RIGHT-FACING FIST | |
0x1F91E <= code && code <= 0x1F91F || // So [2] HAND WITH INDEX AND MIDDLE FINGERS CROSSED..I LOVE YOU HAND SIGN | |
0x1F926 == code || // So FACE PALM | |
0x1F930 <= code && code <= 0x1F939 || // So [10] PREGNANT WOMAN..JUGGLING | |
0x1F93D <= code && code <= 0x1F93E || // So [2] WATER POLO..HANDBALL | |
0x1F9D1 <= code && code <= 0x1F9DD // So [13] ADULT..ELF | |
) { | |
return E_Base; | |
} | |
if (0x1F3FB <= code && code <= 0x1F3FF) // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 | |
{ | |
return E_Modifier; | |
} | |
if (0x200D == code // Cf ZERO WIDTH JOINER | |
) { | |
return ZWJ; | |
} | |
if (0x2640 == code || // So FEMALE SIGN | |
0x2642 == code || // So MALE SIGN | |
0x2695 <= code && code <= 0x2696 || // So [2] STAFF OF AESCULAPIUS..SCALES | |
0x2708 == code || // So AIRPLANE | |
0x2764 == code || // So HEAVY BLACK HEART | |
0x1F308 == code || // So RAINBOW | |
0x1F33E == code || // So EAR OF RICE | |
0x1F373 == code || // So COOKING | |
0x1F393 == code || // So GRADUATION CAP | |
0x1F3A4 == code || // So MICROPHONE | |
0x1F3A8 == code || // So ARTIST PALETTE | |
0x1F3EB == code || // So SCHOOL | |
0x1F3ED == code || // So FACTORY | |
0x1F48B == code || // So KISS MARK | |
0x1F4BB <= code && code <= 0x1F4BC || // So [2] PERSONAL COMPUTER..BRIEFCASE | |
0x1F527 == code || // So WRENCH | |
0x1F52C == code || // So MICROSCOPE | |
0x1F5E8 == code || // So LEFT SPEECH BUBBLE | |
0x1F680 == code || // So ROCKET | |
0x1F692 == code // So FIRE ENGINE | |
) { | |
return Glue_After_Zwj; | |
} | |
if (0x1F466 <= code && code <= 0x1F469) // So [4] BOY..WOMAN | |
{ | |
return E_Base_GAZ; | |
} | |
//all unlisted characters have a grapheme break property of "Other" | |
return Other; | |
} | |
return this; | |
} | |
if ( true && module.exports) { | |
module.exports = GraphemeSplitter; | |
} | |
}); | |
var splitter = new graphemeSplitter(); | |
var substring = function substring(str, start, end) { | |
var iterator = splitter.iterateGraphemes(str.substring(start)); | |
var value = ''; | |
for (var pos = 0; pos < end - start; pos++) { | |
var next = iterator.next(); | |
value += next.value; | |
if (next.done) { | |
break; | |
} | |
} | |
return value; | |
}; | |
var location = (function (startLine, startColumn, startOffset, endLine, endColumn, endOffset, source) { | |
return { | |
start: { | |
line: startLine, | |
column: startColumn, | |
offset: startOffset | |
}, | |
end: { | |
line: endLine, | |
column: endColumn, | |
offset: endOffset | |
}, | |
source: source || null | |
}; | |
}); | |
var build = createCommonjsModule(function (module, exports) { | |
(function (global, factory) { | |
module.exports = factory(); | |
})(commonjsGlobal, function () { | |
'use strict'; | |
/*! | |
* repeat-string <https://github.com/jonschlinkert/repeat-string> | |
* | |
* Copyright (c) 2014-2015, Jon Schlinkert. | |
* Licensed under the MIT License. | |
*/ | |
'use strict'; | |
/** | |
* Results cache | |
*/ | |
var res = ''; | |
var cache; | |
/** | |
* Expose `repeat` | |
*/ | |
var repeatString = repeat; | |
/** | |
* Repeat the given `string` the specified `number` | |
* of times. | |
* | |
* **Example:** | |
* | |
* ```js | |
* var repeat = require('repeat-string'); | |
* repeat('A', 5); | |
* //=> AAAAA | |
* ``` | |
* | |
* @param {String} `string` The string to repeat | |
* @param {Number} `number` The number of times to repeat the string | |
* @return {String} Repeated string | |
* @api public | |
*/ | |
function repeat(str, num) { | |
if (typeof str !== 'string') { | |
throw new TypeError('expected a string'); | |
} | |
// cover common, quick use cases | |
if (num === 1) return str; | |
if (num === 2) return str + str; | |
var max = str.length * num; | |
if (cache !== str || typeof cache === 'undefined') { | |
cache = str; | |
res = ''; | |
} else if (res.length >= max) { | |
return res.substr(0, max); | |
} | |
while (max > res.length && num > 1) { | |
if (num & 1) { | |
res += str; | |
} | |
num >>= 1; | |
str += str; | |
} | |
res += str; | |
res = res.substr(0, max); | |
return res; | |
} | |
'use strict'; | |
var padStart = function padStart(string, maxLength, fillString) { | |
if (string == null || maxLength == null) { | |
return string; | |
} | |
var result = String(string); | |
var targetLen = typeof maxLength === 'number' ? maxLength : parseInt(maxLength, 10); | |
if (isNaN(targetLen) || !isFinite(targetLen)) { | |
return result; | |
} | |
var length = result.length; | |
if (length >= targetLen) { | |
return result; | |
} | |
var fill = fillString == null ? '' : String(fillString); | |
if (fill === '') { | |
fill = ' '; | |
} | |
var fillLen = targetLen - length; | |
while (fill.length < fillLen) { | |
fill += fill; | |
} | |
var truncated = fill.length > fillLen ? fill.substr(0, fillLen) : fill; | |
return truncated + result; | |
}; | |
var _extends = Object.assign || function (target) { | |
for (var i = 1; i < arguments.length; i++) { | |
var source = arguments[i]; | |
for (var key in source) { | |
if (Object.prototype.hasOwnProperty.call(source, key)) { | |
target[key] = source[key]; | |
} | |
} | |
} | |
return target; | |
}; | |
function printLine(line, position, maxNumLength, settings) { | |
var num = String(position); | |
var formattedNum = padStart(num, maxNumLength, ' '); | |
var tabReplacement = repeatString(' ', settings.tabSize); | |
return formattedNum + ' | ' + line.replace(/\t/g, tabReplacement); | |
} | |
function printLines(lines, start, end, maxNumLength, settings) { | |
return lines.slice(start, end).map(function (line, i) { | |
return printLine(line, start + i + 1, maxNumLength, settings); | |
}).join('\n'); | |
} | |
var defaultSettings = { | |
extraLines: 2, | |
tabSize: 4 | |
}; | |
var index = function index(input, linePos, columnPos, settings) { | |
settings = _extends({}, defaultSettings, settings); | |
var lines = input.split(/\r\n?|\n|\f/); | |
var startLinePos = Math.max(1, linePos - settings.extraLines) - 1; | |
var endLinePos = Math.min(linePos + settings.extraLines, lines.length); | |
var maxNumLength = String(endLinePos).length; | |
var prevLines = printLines(lines, startLinePos, linePos, maxNumLength, settings); | |
var targetLineBeforeCursor = printLine(lines[linePos - 1].substring(0, columnPos - 1), linePos, maxNumLength, settings); | |
var cursorLine = repeatString(' ', targetLineBeforeCursor.length) + '^'; | |
var nextLines = printLines(lines, linePos, endLinePos, maxNumLength, settings); | |
return [prevLines, cursorLine, nextLines].filter(Boolean).join('\n'); | |
}; | |
return index; | |
}); | |
}); | |
var errorStack = new Error().stack; | |
var createError = (function (props) { | |
// use Object.create(), because some VMs prevent setting line/column otherwise | |
// (iOS Safari 10 even throws an exception) | |
var error = Object.create(SyntaxError.prototype); | |
Object.assign(error, props, { | |
name: 'SyntaxError' | |
}); | |
Object.defineProperty(error, 'stack', { | |
get: function get() { | |
return errorStack ? errorStack.replace(/^(.+\n){1,3}/, String(error) + '\n') : ''; | |
} | |
}); | |
return error; | |
}); | |
var error = (function (message, input, source, line, column) { | |
throw createError({ | |
message: line ? message + '\n' + build(input, line, column) : message, | |
rawMessage: message, | |
source: source, | |
line: line, | |
column: column | |
}); | |
}); | |
var parseErrorTypes = { | |
unexpectedEnd: function unexpectedEnd() { | |
return 'Unexpected end of input'; | |
}, | |
unexpectedToken: function unexpectedToken(token) { | |
for (var _len = arguments.length, position = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
position[_key - 1] = arguments[_key]; | |
} | |
return 'Unexpected token <' + token + '> at ' + position.filter(Boolean).join(':'); | |
} | |
}; | |
var tokenizeErrorTypes = { | |
unexpectedSymbol: function unexpectedSymbol(symbol) { | |
for (var _len = arguments.length, position = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
position[_key - 1] = arguments[_key]; | |
} | |
return 'Unexpected symbol <' + symbol + '> at ' + position.filter(Boolean).join(':'); | |
} | |
}; | |
var tokenTypes = { | |
LEFT_BRACE: 0, // { | |
RIGHT_BRACE: 1, // } | |
LEFT_BRACKET: 2, // [ | |
RIGHT_BRACKET: 3, // ] | |
COLON: 4, // : | |
COMMA: 5, // , | |
STRING: 6, // | |
NUMBER: 7, // | |
TRUE: 8, // true | |
FALSE: 9, // false | |
NULL: 10 // null | |
}; | |
var punctuatorTokensMap = { // Lexeme: Token | |
'{': tokenTypes.LEFT_BRACE, | |
'}': tokenTypes.RIGHT_BRACE, | |
'[': tokenTypes.LEFT_BRACKET, | |
']': tokenTypes.RIGHT_BRACKET, | |
':': tokenTypes.COLON, | |
',': tokenTypes.COMMA | |
}; | |
var keywordTokensMap = { // Lexeme: Token | |
'true': tokenTypes.TRUE, | |
'false': tokenTypes.FALSE, | |
'null': tokenTypes.NULL | |
}; | |
var stringStates = { | |
_START_: 0, | |
START_QUOTE_OR_CHAR: 1, | |
ESCAPE: 2 | |
}; | |
var escapes$1 = { | |
'"': 0, // Quotation mask | |
'\\': 1, // Reverse solidus | |
'/': 2, // Solidus | |
'b': 3, // Backspace | |
'f': 4, // Form feed | |
'n': 5, // New line | |
'r': 6, // Carriage return | |
't': 7, // Horizontal tab | |
'u': 8 // 4 hexadecimal digits | |
}; | |
var numberStates = { | |
_START_: 0, | |
MINUS: 1, | |
ZERO: 2, | |
DIGIT: 3, | |
POINT: 4, | |
DIGIT_FRACTION: 5, | |
EXP: 6, | |
EXP_DIGIT_OR_SIGN: 7 | |
}; | |
// HELPERS | |
function isDigit1to9(char) { | |
return char >= '1' && char <= '9'; | |
} | |
function isDigit(char) { | |
return char >= '0' && char <= '9'; | |
} | |
function isHex(char) { | |
return isDigit(char) || char >= 'a' && char <= 'f' || char >= 'A' && char <= 'F'; | |
} | |
function isExp(char) { | |
return char === 'e' || char === 'E'; | |
} | |
// PARSERS | |
function parseWhitespace(input, index, line, column) { | |
var char = input.charAt(index); | |
if (char === '\r') { | |
// CR (Unix) | |
index++; | |
line++; | |
column = 1; | |
if (input.charAt(index) === '\n') { | |
// CRLF (Windows) | |
index++; | |
} | |
} else if (char === '\n') { | |
// LF (MacOS) | |
index++; | |
line++; | |
column = 1; | |
} else if (char === '\t' || char === ' ') { | |
index++; | |
column++; | |
} else { | |
return null; | |
} | |
return { | |
index: index, | |
line: line, | |
column: column | |
}; | |
} | |
function parseChar(input, index, line, column) { | |
var char = input.charAt(index); | |
if (char in punctuatorTokensMap) { | |
return { | |
type: punctuatorTokensMap[char], | |
line: line, | |
column: column + 1, | |
index: index + 1, | |
value: null | |
}; | |
} | |
return null; | |
} | |
function parseKeyword(input, index, line, column) { | |
for (var name in keywordTokensMap) { | |
if (keywordTokensMap.hasOwnProperty(name) && input.substr(index, name.length) === name) { | |
return { | |
type: keywordTokensMap[name], | |
line: line, | |
column: column + name.length, | |
index: index + name.length, | |
value: name | |
}; | |
} | |
} | |
return null; | |
} | |
function parseString$1(input, index, line, column) { | |
var startIndex = index; | |
var state = stringStates._START_; | |
while (index < input.length) { | |
var char = input.charAt(index); | |
switch (state) { | |
case stringStates._START_: | |
{ | |
if (char === '"') { | |
index++; | |
state = stringStates.START_QUOTE_OR_CHAR; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case stringStates.START_QUOTE_OR_CHAR: | |
{ | |
if (char === '\\') { | |
index++; | |
state = stringStates.ESCAPE; | |
} else if (char === '"') { | |
index++; | |
return { | |
type: tokenTypes.STRING, | |
line: line, | |
column: column + index - startIndex, | |
index: index, | |
value: input.slice(startIndex, index) | |
}; | |
} else { | |
index++; | |
} | |
break; | |
} | |
case stringStates.ESCAPE: | |
{ | |
if (char in escapes$1) { | |
index++; | |
if (char === 'u') { | |
for (var i = 0; i < 4; i++) { | |
var curChar = input.charAt(index); | |
if (curChar && isHex(curChar)) { | |
index++; | |
} else { | |
return null; | |
} | |
} | |
} | |
state = stringStates.START_QUOTE_OR_CHAR; | |
} else { | |
return null; | |
} | |
break; | |
} | |
} | |
} | |
} | |
function parseNumber(input, index, line, column) { | |
var startIndex = index; | |
var passedValueIndex = index; | |
var state = numberStates._START_; | |
iterator: while (index < input.length) { | |
var char = input.charAt(index); | |
switch (state) { | |
case numberStates._START_: | |
{ | |
if (char === '-') { | |
state = numberStates.MINUS; | |
} else if (char === '0') { | |
passedValueIndex = index + 1; | |
state = numberStates.ZERO; | |
} else if (isDigit1to9(char)) { | |
passedValueIndex = index + 1; | |
state = numberStates.DIGIT; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case numberStates.MINUS: | |
{ | |
if (char === '0') { | |
passedValueIndex = index + 1; | |
state = numberStates.ZERO; | |
} else if (isDigit1to9(char)) { | |
passedValueIndex = index + 1; | |
state = numberStates.DIGIT; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case numberStates.ZERO: | |
{ | |
if (char === '.') { | |
state = numberStates.POINT; | |
} else if (isExp(char)) { | |
state = numberStates.EXP; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
case numberStates.DIGIT: | |
{ | |
if (isDigit(char)) { | |
passedValueIndex = index + 1; | |
} else if (char === '.') { | |
state = numberStates.POINT; | |
} else if (isExp(char)) { | |
state = numberStates.EXP; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
case numberStates.POINT: | |
{ | |
if (isDigit(char)) { | |
passedValueIndex = index + 1; | |
state = numberStates.DIGIT_FRACTION; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
case numberStates.DIGIT_FRACTION: | |
{ | |
if (isDigit(char)) { | |
passedValueIndex = index + 1; | |
} else if (isExp(char)) { | |
state = numberStates.EXP; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
case numberStates.EXP: | |
{ | |
if (char === '+' || char === '-') { | |
state = numberStates.EXP_DIGIT_OR_SIGN; | |
} else if (isDigit(char)) { | |
passedValueIndex = index + 1; | |
state = numberStates.EXP_DIGIT_OR_SIGN; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
case numberStates.EXP_DIGIT_OR_SIGN: | |
{ | |
if (isDigit(char)) { | |
passedValueIndex = index + 1; | |
} else { | |
break iterator; | |
} | |
break; | |
} | |
} | |
index++; | |
} | |
if (passedValueIndex > 0) { | |
return { | |
type: tokenTypes.NUMBER, | |
line: line, | |
column: column + passedValueIndex - startIndex, | |
index: passedValueIndex, | |
value: input.slice(startIndex, passedValueIndex) | |
}; | |
} | |
return null; | |
} | |
var tokenize = function tokenize(input, settings) { | |
var line = 1; | |
var column = 1; | |
var index = 0; | |
var tokens = []; | |
while (index < input.length) { | |
var args = [input, index, line, column]; | |
var whitespace = parseWhitespace.apply(undefined, args); | |
if (whitespace) { | |
index = whitespace.index; | |
line = whitespace.line; | |
column = whitespace.column; | |
continue; | |
} | |
var matched = parseChar.apply(undefined, args) || parseKeyword.apply(undefined, args) || parseString$1.apply(undefined, args) || parseNumber.apply(undefined, args); | |
if (matched) { | |
var token = { | |
type: matched.type, | |
value: matched.value, | |
loc: location(line, column, index, matched.line, matched.column, matched.index, settings.source) | |
}; | |
tokens.push(token); | |
index = matched.index; | |
line = matched.line; | |
column = matched.column; | |
} else { | |
error(tokenizeErrorTypes.unexpectedSymbol(substring(input, index, index + 1), settings.source, line, column), input, settings.source, line, column); | |
} | |
} | |
return tokens; | |
}; | |
var objectStates = { | |
_START_: 0, | |
OPEN_OBJECT: 1, | |
PROPERTY: 2, | |
COMMA: 3 | |
}; | |
var propertyStates = { | |
_START_: 0, | |
KEY: 1, | |
COLON: 2 | |
}; | |
var arrayStates = { | |
_START_: 0, | |
OPEN_ARRAY: 1, | |
VALUE: 2, | |
COMMA: 3 | |
}; | |
var defaultSettings = { | |
loc: true, | |
source: null | |
}; | |
function errorEof(input, tokenList, settings) { | |
var loc = tokenList.length > 0 ? tokenList[tokenList.length - 1].loc.end : { line: 1, column: 1 }; | |
error(parseErrorTypes.unexpectedEnd(), input, settings.source, loc.line, loc.column); | |
} | |
/** @param hexCode {string} hexCode without '\u' prefix */ | |
function parseHexEscape(hexCode) { | |
var charCode = 0; | |
for (var i = 0; i < 4; i++) { | |
charCode = charCode * 16 + parseInt(hexCode[i], 16); | |
} | |
return String.fromCharCode(charCode); | |
} | |
var escapes = { | |
'b': '\b', // Backspace | |
'f': '\f', // Form feed | |
'n': '\n', // New line | |
'r': '\r', // Carriage return | |
't': '\t' // Horizontal tab | |
}; | |
var passEscapes = ['"', '\\', '/']; | |
function parseString( /** string */string) { | |
var result = ''; | |
for (var i = 0; i < string.length; i++) { | |
var char = string.charAt(i); | |
if (char === '\\') { | |
i++; | |
var nextChar = string.charAt(i); | |
if (nextChar === 'u') { | |
result += parseHexEscape(string.substr(i + 1, 4)); | |
i += 4; | |
} else if (passEscapes.indexOf(nextChar) !== -1) { | |
result += nextChar; | |
} else if (nextChar in escapes) { | |
result += escapes[nextChar]; | |
} else { | |
break; | |
} | |
} else { | |
result += char; | |
} | |
} | |
return result; | |
} | |
function parseObject(input, tokenList, index, settings) { | |
// object: LEFT_BRACE (property (COMMA property)*)? RIGHT_BRACE | |
var startToken = void 0; | |
var object = { | |
type: 'Object', | |
children: [] | |
}; | |
var state = objectStates._START_; | |
while (index < tokenList.length) { | |
var token = tokenList[index]; | |
switch (state) { | |
case objectStates._START_: | |
{ | |
if (token.type === tokenTypes.LEFT_BRACE) { | |
startToken = token; | |
state = objectStates.OPEN_OBJECT; | |
index++; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case objectStates.OPEN_OBJECT: | |
{ | |
if (token.type === tokenTypes.RIGHT_BRACE) { | |
if (settings.loc) { | |
object.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source); | |
} | |
return { | |
value: object, | |
index: index + 1 | |
}; | |
} else { | |
var property = parseProperty(input, tokenList, index, settings); | |
object.children.push(property.value); | |
state = objectStates.PROPERTY; | |
index = property.index; | |
} | |
break; | |
} | |
case objectStates.PROPERTY: | |
{ | |
if (token.type === tokenTypes.RIGHT_BRACE) { | |
if (settings.loc) { | |
object.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source); | |
} | |
return { | |
value: object, | |
index: index + 1 | |
}; | |
} else if (token.type === tokenTypes.COMMA) { | |
state = objectStates.COMMA; | |
index++; | |
} else { | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
} | |
break; | |
} | |
case objectStates.COMMA: | |
{ | |
var _property = parseProperty(input, tokenList, index, settings); | |
if (_property) { | |
index = _property.index; | |
object.children.push(_property.value); | |
state = objectStates.PROPERTY; | |
} else { | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
} | |
break; | |
} | |
} | |
} | |
errorEof(input, tokenList, settings); | |
} | |
function parseProperty(input, tokenList, index, settings) { | |
// property: STRING COLON value | |
var startToken = void 0; | |
var property = { | |
type: 'Property', | |
key: null, | |
value: null | |
}; | |
var state = propertyStates._START_; | |
while (index < tokenList.length) { | |
var token = tokenList[index]; | |
switch (state) { | |
case propertyStates._START_: | |
{ | |
if (token.type === tokenTypes.STRING) { | |
var key = { | |
type: 'Identifier', | |
value: parseString(input.slice(token.loc.start.offset + 1, token.loc.end.offset - 1)), | |
raw: token.value | |
}; | |
if (settings.loc) { | |
key.loc = token.loc; | |
} | |
startToken = token; | |
property.key = key; | |
state = propertyStates.KEY; | |
index++; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case propertyStates.KEY: | |
{ | |
if (token.type === tokenTypes.COLON) { | |
state = propertyStates.COLON; | |
index++; | |
} else { | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
} | |
break; | |
} | |
case propertyStates.COLON: | |
{ | |
var value = parseValue(input, tokenList, index, settings); | |
property.value = value.value; | |
if (settings.loc) { | |
property.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, value.value.loc.end.line, value.value.loc.end.column, value.value.loc.end.offset, settings.source); | |
} | |
return { | |
value: property, | |
index: value.index | |
}; | |
} | |
} | |
} | |
} | |
function parseArray(input, tokenList, index, settings) { | |
// array: LEFT_BRACKET (value (COMMA value)*)? RIGHT_BRACKET | |
var startToken = void 0; | |
var array = { | |
type: 'Array', | |
children: [] | |
}; | |
var state = arrayStates._START_; | |
var token = void 0; | |
while (index < tokenList.length) { | |
token = tokenList[index]; | |
switch (state) { | |
case arrayStates._START_: | |
{ | |
if (token.type === tokenTypes.LEFT_BRACKET) { | |
startToken = token; | |
state = arrayStates.OPEN_ARRAY; | |
index++; | |
} else { | |
return null; | |
} | |
break; | |
} | |
case arrayStates.OPEN_ARRAY: | |
{ | |
if (token.type === tokenTypes.RIGHT_BRACKET) { | |
if (settings.loc) { | |
array.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source); | |
} | |
return { | |
value: array, | |
index: index + 1 | |
}; | |
} else { | |
var value = parseValue(input, tokenList, index, settings); | |
index = value.index; | |
array.children.push(value.value); | |
state = arrayStates.VALUE; | |
} | |
break; | |
} | |
case arrayStates.VALUE: | |
{ | |
if (token.type === tokenTypes.RIGHT_BRACKET) { | |
if (settings.loc) { | |
array.loc = location(startToken.loc.start.line, startToken.loc.start.column, startToken.loc.start.offset, token.loc.end.line, token.loc.end.column, token.loc.end.offset, settings.source); | |
} | |
return { | |
value: array, | |
index: index + 1 | |
}; | |
} else if (token.type === tokenTypes.COMMA) { | |
state = arrayStates.COMMA; | |
index++; | |
} else { | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
} | |
break; | |
} | |
case arrayStates.COMMA: | |
{ | |
var _value = parseValue(input, tokenList, index, settings); | |
index = _value.index; | |
array.children.push(_value.value); | |
state = arrayStates.VALUE; | |
break; | |
} | |
} | |
} | |
errorEof(input, tokenList, settings); | |
} | |
function parseLiteral(input, tokenList, index, settings) { | |
// literal: STRING | NUMBER | TRUE | FALSE | NULL | |
var token = tokenList[index]; | |
var value = null; | |
switch (token.type) { | |
case tokenTypes.STRING: | |
{ | |
value = parseString(input.slice(token.loc.start.offset + 1, token.loc.end.offset - 1)); | |
break; | |
} | |
case tokenTypes.NUMBER: | |
{ | |
value = Number(token.value); | |
break; | |
} | |
case tokenTypes.TRUE: | |
{ | |
value = true; | |
break; | |
} | |
case tokenTypes.FALSE: | |
{ | |
value = false; | |
break; | |
} | |
case tokenTypes.NULL: | |
{ | |
value = null; | |
break; | |
} | |
default: | |
{ | |
return null; | |
} | |
} | |
var literal = { | |
type: 'Literal', | |
value: value, | |
raw: token.value | |
}; | |
if (settings.loc) { | |
literal.loc = token.loc; | |
} | |
return { | |
value: literal, | |
index: index + 1 | |
}; | |
} | |
function parseValue(input, tokenList, index, settings) { | |
// value: literal | object | array | |
var token = tokenList[index]; | |
var value = parseLiteral.apply(undefined, arguments) || parseObject.apply(undefined, arguments) || parseArray.apply(undefined, arguments); | |
if (value) { | |
return value; | |
} else { | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
} | |
} | |
var parse$1 = (function (input, settings) { | |
settings = Object.assign({}, defaultSettings, settings); | |
var tokenList = tokenize(input, settings); | |
if (tokenList.length === 0) { | |
errorEof(input, tokenList, settings); | |
} | |
var value = parseValue(input, tokenList, 0, settings); | |
if (value.index === tokenList.length) { | |
return value.value; | |
} | |
var token = tokenList[value.index]; | |
error(parseErrorTypes.unexpectedToken(substring(input, token.loc.start.offset, token.loc.end.offset), settings.source, token.loc.start.line, token.loc.start.column), input, settings.source, token.loc.start.line, token.loc.start.column); | |
}); | |
return parse$1; | |
}))); | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/kuler/index.js": | |
/*!**************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/kuler/index.js ***! | |
\**************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
"use strict"; | |
var colornames = __webpack_require__(/*! colornames */ "../fabric8-analytics-lsp-server/output/node_modules/colornames/index.js"); | |
/** | |
* Kuler: Color text using CSS colors | |
* | |
* @constructor | |
* @param {String} text The text that needs to be styled | |
* @param {String} color Optional color for alternate API. | |
* @api public | |
*/ | |
function Kuler(text, color) { | |
if (color) return (new Kuler(text)).style(color); | |
if (!(this instanceof Kuler)) return new Kuler(text); | |
this.text = text; | |
} | |
/** | |
* ANSI color codes. | |
* | |
* @type {String} | |
* @private | |
*/ | |
Kuler.prototype.prefix = '\x1b['; | |
Kuler.prototype.suffix = 'm'; | |
/** | |
* Parse a hex color string and parse it to it's RGB equiv. | |
* | |
* @param {String} color | |
* @returns {Array} | |
* @api private | |
*/ | |
Kuler.prototype.hex = function hex(color) { | |
color = color[0] === '#' ? color.substring(1) : color; | |
// | |
// Pre-parse for shorthand hex colors. | |
// | |
if (color.length === 3) { | |
color = color.split(''); | |
color[5] = color[2]; // F60##0 | |
color[4] = color[2]; // F60#00 | |
color[3] = color[1]; // F60600 | |
color[2] = color[1]; // F66600 | |
color[1] = color[0]; // FF6600 | |
color = color.join(''); | |
} | |
var r = color.substring(0, 2) | |
, g = color.substring(2, 4) | |
, b = color.substring(4, 6); | |
return [ parseInt(r, 16), parseInt(g, 16), parseInt(b, 16) ]; | |
}; | |
/** | |
* Transform a 255 RGB value to an RGV code. | |
* | |
* @param {Number} r Red color channel. | |
* @param {Number} g Green color channel. | |
* @param {Number} b Blue color channel. | |
* @returns {String} | |
* @api public | |
*/ | |
Kuler.prototype.rgb = function rgb(r, g, b) { | |
var red = r / 255 * 5 | |
, green = g / 255 * 5 | |
, blue = b / 255 * 5; | |
return this.ansi(red, green, blue); | |
}; | |
/** | |
* Turns RGB 0-5 values into a single ANSI code. | |
* | |
* @param {Number} r Red color channel. | |
* @param {Number} g Green color channel. | |
* @param {Number} b Blue color channel. | |
* @returns {String} | |
* @api public | |
*/ | |
Kuler.prototype.ansi = function ansi(r, g, b) { | |
var red = Math.round(r) | |
, green = Math.round(g) | |
, blue = Math.round(b); | |
return 16 + (red * 36) + (green * 6) + blue; | |
}; | |
/** | |
* Marks an end of color sequence. | |
* | |
* @returns {String} Reset sequence. | |
* @api public | |
*/ | |
Kuler.prototype.reset = function reset() { | |
return this.prefix +'39;49'+ this.suffix; | |
}; | |
/** | |
* Colour the terminal using CSS. | |
* | |
* @param {String} color The HEX color code. | |
* @returns {String} the escape code. | |
* @api public | |
*/ | |
Kuler.prototype.style = function style(color) { | |
// | |
// We've been supplied a CSS color name instead of a hex color format so we | |
// need to transform it to proper CSS color and continue with our execution | |
// flow. | |
// | |
if (!/^#?(?:[0-9a-fA-F]{3}){1,2}$/.test(color)) { | |
color = colornames(color); | |
} | |
return this.prefix +'38;5;'+ this.rgb.apply(this, this.hex(color)) + this.suffix + this.text + this.reset(); | |
}; | |
// | |
// Expose the actual interface. | |
// | |
module.exports = Kuler; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_Symbol.js": | |
/*!*****************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_Symbol.js ***! | |
\*****************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var root = __webpack_require__(/*! ./_root */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_root.js"); | |
/** Built-in value references. */ | |
var Symbol = root.Symbol; | |
module.exports = Symbol; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_arrayLikeKeys.js": | |
/*!************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_arrayLikeKeys.js ***! | |
\************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var baseTimes = __webpack_require__(/*! ./_baseTimes */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseTimes.js"), | |
isArguments = __webpack_require__(/*! ./isArguments */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isArguments.js"), | |
isArray = __webpack_require__(/*! ./isArray */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isArray.js"), | |
isBuffer = __webpack_require__(/*! ./isBuffer */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isBuffer.js"), | |
isIndex = __webpack_require__(/*! ./_isIndex */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_isIndex.js"), | |
isTypedArray = __webpack_require__(/*! ./isTypedArray */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isTypedArray.js"); | |
/** Used for built-in method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Creates an array of the enumerable property names of the array-like `value`. | |
* | |
* @private | |
* @param {*} value The value to query. | |
* @param {boolean} inherited Specify returning inherited property names. | |
* @returns {Array} Returns the array of property names. | |
*/ | |
function arrayLikeKeys(value, inherited) { | |
var isArr = isArray(value), | |
isArg = !isArr && isArguments(value), | |
isBuff = !isArr && !isArg && isBuffer(value), | |
isType = !isArr && !isArg && !isBuff && isTypedArray(value), | |
skipIndexes = isArr || isArg || isBuff || isType, | |
result = skipIndexes ? baseTimes(value.length, String) : [], | |
length = result.length; | |
for (var key in value) { | |
if ((inherited || hasOwnProperty.call(value, key)) && | |
!(skipIndexes && ( | |
// Safari 9 has enumerable `arguments.length` in strict mode. | |
key == 'length' || | |
// Node.js 0.10 has enumerable non-index properties on buffers. | |
(isBuff && (key == 'offset' || key == 'parent')) || | |
// PhantomJS 2 has enumerable non-index properties on typed arrays. | |
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || | |
// Skip index properties. | |
isIndex(key, length) | |
))) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = arrayLikeKeys; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseGetTag.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseGetTag.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var Symbol = __webpack_require__(/*! ./_Symbol */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_Symbol.js"), | |
getRawTag = __webpack_require__(/*! ./_getRawTag */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_getRawTag.js"), | |
objectToString = __webpack_require__(/*! ./_objectToString */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_objectToString.js"); | |
/** `Object#toString` result references. */ | |
var nullTag = '[object Null]', | |
undefinedTag = '[object Undefined]'; | |
/** Built-in value references. */ | |
var symToStringTag = Symbol ? Symbol.toStringTag : undefined; | |
/** | |
* The base implementation of `getTag` without fallbacks for buggy environments. | |
* | |
* @private | |
* @param {*} value The value to query. | |
* @returns {string} Returns the `toStringTag`. | |
*/ | |
function baseGetTag(value) { | |
if (value == null) { | |
return value === undefined ? undefinedTag : nullTag; | |
} | |
return (symToStringTag && symToStringTag in Object(value)) | |
? getRawTag(value) | |
: objectToString(value); | |
} | |
module.exports = baseGetTag; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseIsArguments.js": | |
/*!**************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseIsArguments.js ***! | |
\**************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseGetTag.js"), | |
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isObjectLike.js"); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]'; | |
/** | |
* The base implementation of `_.isArguments`. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is an `arguments` object, | |
*/ | |
function baseIsArguments(value) { | |
return isObjectLike(value) && baseGetTag(value) == argsTag; | |
} | |
module.exports = baseIsArguments; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseIsTypedArray.js": | |
/*!***************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseIsTypedArray.js ***! | |
\***************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseGetTag.js"), | |
isLength = __webpack_require__(/*! ./isLength */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isLength.js"), | |
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/isObjectLike.js"); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
funcTag = '[object Function]', | |
mapTag = '[object Map]', | |
numberTag = '[object Number]', | |
objectTag = '[object Object]', | |
regexpTag = '[object RegExp]', | |
setTag = '[object Set]', | |
stringTag = '[object String]', | |
weakMapTag = '[object WeakMap]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
dataViewTag = '[object DataView]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to identify `toStringTag` values of typed arrays. */ | |
var typedArrayTags = {}; | |
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = | |
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = | |
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = | |
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = | |
typedArrayTags[uint32Tag] = true; | |
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = | |
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = | |
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = | |
typedArrayTags[errorTag] = typedArrayTags[funcTag] = | |
typedArrayTags[mapTag] = typedArrayTags[numberTag] = | |
typedArrayTags[objectTag] = typedArrayTags[regexpTag] = | |
typedArrayTags[setTag] = typedArrayTags[stringTag] = | |
typedArrayTags[weakMapTag] = false; | |
/** | |
* The base implementation of `_.isTypedArray` without Node.js optimizations. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`. | |
*/ | |
function baseIsTypedArray(value) { | |
return isObjectLike(value) && | |
isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; | |
} | |
module.exports = baseIsTypedArray; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseKeys.js": | |
/*!*******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseKeys.js ***! | |
\*******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var isPrototype = __webpack_require__(/*! ./_isPrototype */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_isPrototype.js"), | |
nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_nativeKeys.js"); | |
/** Used for built-in method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense. | |
* | |
* @private | |
* @param {Object} object The object to query. | |
* @returns {Array} Returns the array of property names. | |
*/ | |
function baseKeys(object) { | |
if (!isPrototype(object)) { | |
return nativeKeys(object); | |
} | |
var result = []; | |
for (var key in Object(object)) { | |
if (hasOwnProperty.call(object, key) && key != 'constructor') { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = baseKeys; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseTimes.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseTimes.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** | |
* The base implementation of `_.times` without support for iteratee shorthands | |
* or max array length checks. | |
* | |
* @private | |
* @param {number} n The number of times to invoke `iteratee`. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array} Returns the array of results. | |
*/ | |
function baseTimes(n, iteratee) { | |
var index = -1, | |
result = Array(n); | |
while (++index < n) { | |
result[index] = iteratee(index); | |
} | |
return result; | |
} | |
module.exports = baseTimes; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseUnary.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_baseUnary.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** | |
* The base implementation of `_.unary` without support for storing metadata. | |
* | |
* @private | |
* @param {Function} func The function to cap arguments for. | |
* @returns {Function} Returns the new capped function. | |
*/ | |
function baseUnary(func) { | |
return function(value) { | |
return func(value); | |
}; | |
} | |
module.exports = baseUnary; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_freeGlobal.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_freeGlobal.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** Detect free variable `global` from Node.js. */ | |
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; | |
module.exports = freeGlobal; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_getRawTag.js": | |
/*!********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_getRawTag.js ***! | |
\********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var Symbol = __webpack_require__(/*! ./_Symbol */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_Symbol.js"); | |
/** Used for built-in method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Used to resolve the | |
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var nativeObjectToString = objectProto.toString; | |
/** Built-in value references. */ | |
var symToStringTag = Symbol ? Symbol.toStringTag : undefined; | |
/** | |
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. | |
* | |
* @private | |
* @param {*} value The value to query. | |
* @returns {string} Returns the raw `toStringTag`. | |
*/ | |
function getRawTag(value) { | |
var isOwn = hasOwnProperty.call(value, symToStringTag), | |
tag = value[symToStringTag]; | |
try { | |
value[symToStringTag] = undefined; | |
var unmasked = true; | |
} catch (e) {} | |
var result = nativeObjectToString.call(value); | |
if (unmasked) { | |
if (isOwn) { | |
value[symToStringTag] = tag; | |
} else { | |
delete value[symToStringTag]; | |
} | |
} | |
return result; | |
} | |
module.exports = getRawTag; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_isIndex.js": | |
/*!******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_isIndex.js ***! | |
\******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** Used as references for various `Number` constants. */ | |
var MAX_SAFE_INTEGER = 9007199254740991; | |
/** Used to detect unsigned integer values. */ | |
var reIsUint = /^(?:0|[1-9]\d*)$/; | |
/** | |
* Checks if `value` is a valid array-like index. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | |
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | |
*/ | |
function isIndex(value, length) { | |
var type = typeof value; | |
length = length == null ? MAX_SAFE_INTEGER : length; | |
return !!length && | |
(type == 'number' || | |
(type != 'symbol' && reIsUint.test(value))) && | |
(value > -1 && value % 1 == 0 && value < length); | |
} | |
module.exports = isIndex; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_isPrototype.js": | |
/*!**********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_isPrototype.js ***! | |
\**********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** Used for built-in method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Checks if `value` is likely a prototype object. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`. | |
*/ | |
function isPrototype(value) { | |
var Ctor = value && value.constructor, | |
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; | |
return value === proto; | |
} | |
module.exports = isPrototype; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_nativeKeys.js": | |
/*!*********************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_nativeKeys.js ***! | |
\*********************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
var overArg = __webpack_require__(/*! ./_overArg */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_overArg.js"); | |
/* Built-in method references for those with the same name as other `lodash` methods. */ | |
var nativeKeys = overArg(Object.keys, Object); | |
module.exports = nativeKeys; | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_nodeUtil.js": | |
/*!*******************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_nodeUtil.js ***! | |
\*******************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports, __webpack_require__) { | |
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_freeGlobal.js"); | |
/** Detect free variable `exports`. */ | |
var freeExports = true && exports && !exports.nodeType && exports; | |
/** Detect free variable `module`. */ | |
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; | |
/** Detect the popular CommonJS extension `module.exports`. */ | |
var moduleExports = freeModule && freeModule.exports === freeExports; | |
/** Detect free variable `process` from Node.js. */ | |
var freeProcess = moduleExports && freeGlobal.process; | |
/** Used to access faster Node.js helpers. */ | |
var nodeUtil = (function() { | |
try { | |
// Use `util.types` for Node.js 10+. | |
var types = freeModule && freeModule.require && freeModule.require('util').types; | |
if (types) { | |
return types; | |
} | |
// Legacy `process.binding('util')` for Node.js < 10. | |
return freeProcess && freeProcess.binding && freeProcess.binding('util'); | |
} catch (e) {} | |
}()); | |
module.exports = nodeUtil; | |
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../fabric8-analytics-vscode-extension/node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) | |
/***/ }), | |
/***/ "../fabric8-analytics-lsp-server/output/node_modules/lodash/_objectToString.js": | |
/*!*************************************************************************************!*\ | |
!*** ../fabric8-analytics-lsp-server/output/node_modules/lodash/_objectToString.js ***! | |
\*************************************************************************************/ | |
/*! no static exports found */ | |
/***/ (function(module, exports) { | |
/** Used for built-in method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the | |
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) | |
* of values. | |
*/ | |
var nativeObjectToString = objectProto.toString; | |
/** | |
* Converts `value` to a string using `Object.prototype.toString`. | |
* | |
* @private | |
* @param {*} value The value to convert. | |
* @returns {string} Returns the converted string. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment