Created
February 11, 2023 11:05
-
-
Save McNull/819e38dea0776ca3c135983d21535dc8 to your computer and use it in GitHub Desktop.
Disable inlay hints and color picker WebGL GLSL editor
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
/* | |
Hack to disable color picker and inlay hints. | |
~/.vscode/extensions/raczzalan.webgl-glsl-editor-1.3.3-darwin-arm64/dist/extension.js | |
*/ | |
/*! For license information please see extension.js.LICENSE.txt */ | |
(() => { | |
"use strict"; | |
var e = { | |
1466: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
1597: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
8623: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ANTLRInputStream = void 0); | |
const i = r(9491), | |
s = r(8042), | |
o = r(3227); | |
class a { | |
constructor(e) { | |
(this.p = 0), (this.data = e), (this.n = e.length); | |
} | |
reset() { | |
this.p = 0; | |
} | |
consume() { | |
if (this.p >= this.n) throw (i(this.LA(1) === o.IntStream.EOF), new Error("cannot consume EOF")); | |
this.p < this.n && this.p++; | |
} | |
LA(e) { | |
return 0 === e ? 0 : (e < 0 && (e++, this.p + e - 1 < 0)) || this.p + e - 1 >= this.n ? o.IntStream.EOF : this.data.charCodeAt(this.p + e - 1); | |
} | |
LT(e) { | |
return this.LA(e); | |
} | |
get index() { | |
return this.p; | |
} | |
get size() { | |
return this.n; | |
} | |
mark() { | |
return -1; | |
} | |
release(e) {} | |
seek(e) { | |
if (e <= this.p) this.p = e; | |
else for (e = Math.min(e, this.n); this.p < e; ) this.consume(); | |
} | |
getText(e) { | |
let t = e.a, | |
r = e.b; | |
r >= this.n && (r = this.n - 1); | |
let n = r - t + 1; | |
return t >= this.n ? "" : this.data.substr(t, n); | |
} | |
get sourceName() { | |
return this.name ? this.name : o.IntStream.UNKNOWN_SOURCE_NAME; | |
} | |
toString() { | |
return this.data; | |
} | |
} | |
n([s.Override], a.prototype, "consume", null), | |
n([s.Override], a.prototype, "LA", null), | |
n([s.Override], a.prototype, "index", null), | |
n([s.Override], a.prototype, "size", null), | |
n([s.Override], a.prototype, "mark", null), | |
n([s.Override], a.prototype, "release", null), | |
n([s.Override], a.prototype, "seek", null), | |
n([s.Override], a.prototype, "getText", null), | |
n([s.Override], a.prototype, "sourceName", null), | |
n([s.Override], a.prototype, "toString", null), | |
(t.ANTLRInputStream = a); | |
}, | |
9701: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BailErrorStrategy = void 0); | |
const i = r(3992), | |
s = r(4837), | |
o = r(8042), | |
a = r(156); | |
class l extends i.DefaultErrorStrategy { | |
recover(e, t) { | |
for (let r = e.context; r; r = r.parent) r.exception = t; | |
throw new a.ParseCancellationException(t); | |
} | |
recoverInline(e) { | |
let t = new s.InputMismatchException(e); | |
for (let r = e.context; r; r = r.parent) r.exception = t; | |
throw new a.ParseCancellationException(t); | |
} | |
sync(e) {} | |
} | |
n([o.Override], l.prototype, "recover", null), n([o.Override], l.prototype, "recoverInline", null), n([o.Override], l.prototype, "sync", null), (t.BailErrorStrategy = l); | |
}, | |
8218: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BufferedTokenStream = void 0); | |
const s = r(9491), | |
o = r(824), | |
a = r(8813), | |
l = r(9557), | |
c = r(8042), | |
u = r(4966); | |
let h = class { | |
constructor(e) { | |
if (((this.tokens = []), (this.p = -1), (this.fetchedEOF = !1), null == e)) throw new Error("tokenSource cannot be null"); | |
this._tokenSource = e; | |
} | |
get tokenSource() { | |
return this._tokenSource; | |
} | |
set tokenSource(e) { | |
(this._tokenSource = e), (this.tokens.length = 0), (this.p = -1), (this.fetchedEOF = !1); | |
} | |
get index() { | |
return this.p; | |
} | |
mark() { | |
return 0; | |
} | |
release(e) {} | |
seek(e) { | |
this.lazyInit(), (this.p = this.adjustSeekIndex(e)); | |
} | |
get size() { | |
return this.tokens.length; | |
} | |
consume() { | |
let e; | |
if (((e = this.p >= 0 && (this.fetchedEOF ? this.p < this.tokens.length - 1 : this.p < this.tokens.length)), !e && this.LA(1) === u.Token.EOF)) throw new Error("cannot consume EOF"); | |
this.sync(this.p + 1) && (this.p = this.adjustSeekIndex(this.p + 1)); | |
} | |
sync(e) { | |
s(e >= 0); | |
let t = e - this.tokens.length + 1; | |
return !(t > 0) || this.fetch(t) >= t; | |
} | |
fetch(e) { | |
if (this.fetchedEOF) return 0; | |
for (let t = 0; t < e; t++) { | |
let e = this.tokenSource.nextToken(); | |
if ((this.isWritableToken(e) && (e.tokenIndex = this.tokens.length), this.tokens.push(e), e.type === u.Token.EOF)) return (this.fetchedEOF = !0), t + 1; | |
} | |
return e; | |
} | |
get(e) { | |
if (e < 0 || e >= this.tokens.length) throw new RangeError("token index " + e + " out of range 0.." + (this.tokens.length - 1)); | |
return this.tokens[e]; | |
} | |
getRange(e, t) { | |
if (e < 0 || t < 0) return []; | |
this.lazyInit(); | |
let r = new Array(); | |
t >= this.tokens.length && (t = this.tokens.length - 1); | |
for (let n = e; n <= t; n++) { | |
let e = this.tokens[n]; | |
if (e.type === u.Token.EOF) break; | |
r.push(e); | |
} | |
return r; | |
} | |
LA(e) { | |
let t = this.LT(e); | |
return t ? t.type : u.Token.INVALID_TYPE; | |
} | |
tryLB(e) { | |
if (!(this.p - e < 0)) return this.tokens[this.p - e]; | |
} | |
LT(e) { | |
let t = this.tryLT(e); | |
if (void 0 === t) throw new RangeError("requested lookback index out of range"); | |
return t; | |
} | |
tryLT(e) { | |
if ((this.lazyInit(), 0 === e)) throw new RangeError("0 is not a valid lookahead index"); | |
if (e < 0) return this.tryLB(-e); | |
let t = this.p + e - 1; | |
return this.sync(t), t >= this.tokens.length ? this.tokens[this.tokens.length - 1] : this.tokens[t]; | |
} | |
adjustSeekIndex(e) { | |
return e; | |
} | |
lazyInit() { | |
-1 === this.p && this.setup(); | |
} | |
setup() { | |
this.sync(0), (this.p = this.adjustSeekIndex(0)); | |
} | |
getTokens(e, t, r) { | |
if ((this.lazyInit(), void 0 === e)) return s(void 0 === t && void 0 === r), this.tokens; | |
if ((void 0 === t && (t = this.tokens.length - 1), e < 0 || t >= this.tokens.length || t < 0 || e >= this.tokens.length)) throw new RangeError("start " + e + " or stop " + t + " not in 0.." + (this.tokens.length - 1)); | |
if (e > t) return []; | |
if (void 0 === r) return this.tokens.slice(e, t + 1); | |
"number" == typeof r && (r = new Set().add(r)); | |
let n = r, | |
i = this.tokens.slice(e, t + 1); | |
return (i = i.filter((e) => n.has(e.type))), i; | |
} | |
nextTokenOnChannel(e, t) { | |
if ((this.sync(e), e >= this.size)) return this.size - 1; | |
let r = this.tokens[e]; | |
for (; r.channel !== t; ) { | |
if (r.type === u.Token.EOF) return e; | |
e++, this.sync(e), (r = this.tokens[e]); | |
} | |
return e; | |
} | |
previousTokenOnChannel(e, t) { | |
if ((this.sync(e), e >= this.size)) return this.size - 1; | |
for (; e >= 0; ) { | |
let r = this.tokens[e]; | |
if (r.type === u.Token.EOF || r.channel === t) return e; | |
e--; | |
} | |
return e; | |
} | |
getHiddenTokensToRight(e, t = -1) { | |
if ((this.lazyInit(), e < 0 || e >= this.tokens.length)) throw new RangeError(e + " not in 0.." + (this.tokens.length - 1)); | |
let r, | |
n = this.nextTokenOnChannel(e + 1, l.Lexer.DEFAULT_TOKEN_CHANNEL), | |
i = e + 1; | |
return (r = -1 === n ? this.size - 1 : n), this.filterForChannel(i, r, t); | |
} | |
getHiddenTokensToLeft(e, t = -1) { | |
if ((this.lazyInit(), e < 0 || e >= this.tokens.length)) throw new RangeError(e + " not in 0.." + (this.tokens.length - 1)); | |
if (0 === e) return []; | |
let r = this.previousTokenOnChannel(e - 1, l.Lexer.DEFAULT_TOKEN_CHANNEL); | |
if (r === e - 1) return []; | |
let n = r + 1, | |
i = e - 1; | |
return this.filterForChannel(n, i, t); | |
} | |
filterForChannel(e, t, r) { | |
let n = new Array(); | |
for (let i = e; i <= t; i++) { | |
let e = this.tokens[i]; | |
-1 === r ? e.channel !== l.Lexer.DEFAULT_TOKEN_CHANNEL && n.push(e) : e.channel === r && n.push(e); | |
} | |
return n; | |
} | |
get sourceName() { | |
return this.tokenSource.sourceName; | |
} | |
getText(e) { | |
void 0 === e ? (e = a.Interval.of(0, this.size - 1)) : e instanceof a.Interval || (e = e.sourceInterval); | |
let t = e.a, | |
r = e.b; | |
if (t < 0 || r < 0) return ""; | |
this.fill(), r >= this.tokens.length && (r = this.tokens.length - 1); | |
let n = ""; | |
for (let e = t; e <= r; e++) { | |
let t = this.tokens[e]; | |
if (t.type === u.Token.EOF) break; | |
n += t.text; | |
} | |
return n.toString(); | |
} | |
getTextFromRange(e, t) { | |
return this.isToken(e) && this.isToken(t) ? this.getText(a.Interval.of(e.tokenIndex, t.tokenIndex)) : ""; | |
} | |
fill() { | |
for (this.lazyInit(); ; ) if (this.fetch(1e3) < 1e3) return; | |
} | |
isWritableToken(e) { | |
return e instanceof o.CommonToken; | |
} | |
isToken(e) { | |
return e instanceof o.CommonToken; | |
} | |
}; | |
n([c.NotNull], h.prototype, "_tokenSource", void 0), | |
n([c.Override], h.prototype, "tokenSource", null), | |
n([c.Override], h.prototype, "index", null), | |
n([c.Override], h.prototype, "mark", null), | |
n([c.Override], h.prototype, "release", null), | |
n([c.Override], h.prototype, "seek", null), | |
n([c.Override], h.prototype, "size", null), | |
n([c.Override], h.prototype, "consume", null), | |
n([c.Override], h.prototype, "get", null), | |
n([c.Override], h.prototype, "LA", null), | |
n([c.NotNull, c.Override], h.prototype, "LT", null), | |
n([c.Override], h.prototype, "sourceName", null), | |
n([c.NotNull, c.Override], h.prototype, "getText", null), | |
n([c.NotNull, c.Override], h.prototype, "getTextFromRange", null), | |
(h = n([i(0, c.NotNull)], h)), | |
(t.BufferedTokenStream = h); | |
}, | |
5699: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
3675: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CharStreams = void 0); | |
const n = r(5444), | |
i = r(1540), | |
s = r(3227); | |
(t.CharStreams || (t.CharStreams = {})).fromString = function (e, t) { | |
(void 0 !== t && 0 !== t.length) || (t = s.IntStream.UNKNOWN_SOURCE_NAME); | |
let r = n.CodePointBuffer.builder(e.length), | |
o = new Uint16Array(e.length); | |
for (let t = 0; t < e.length; t++) o[t] = e.charCodeAt(t); | |
return r.append(o), i.CodePointCharStream.fromBuffer(r.build(), t); | |
}; | |
}, | |
5444: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CodePointBuffer = void 0); | |
const n = r(9491), | |
i = r(9363); | |
class s { | |
constructor(e, t) { | |
(this.buffer = e), (this._position = 0), (this._size = t); | |
} | |
static withArray(e) { | |
return new s(e, e.length); | |
} | |
get position() { | |
return this._position; | |
} | |
set position(e) { | |
if (e < 0 || e > this._size) throw new RangeError(); | |
this._position = e; | |
} | |
get remaining() { | |
return this._size - this.position; | |
} | |
get(e) { | |
return this.buffer[e]; | |
} | |
array() { | |
return this.buffer.slice(0, this._size); | |
} | |
static builder(e) { | |
return new s.Builder(e); | |
} | |
} | |
(t.CodePointBuffer = s), | |
(function (e) { | |
let t; | |
!(function (e) { | |
(e[(e.BYTE = 0)] = "BYTE"), (e[(e.CHAR = 1)] = "CHAR"), (e[(e.INT = 2)] = "INT"); | |
})(t || (t = {})); | |
class r { | |
constructor(e) { | |
(this.type = 0), (this.buffer = new Uint8Array(e)), (this.prevHighSurrogate = -1), (this.position = 0); | |
} | |
build() { | |
return new e(this.buffer, this.position); | |
} | |
static roundUpToNextPowerOfTwo(e) { | |
let t = 32 - Math.clz32(e - 1); | |
return Math.pow(2, t); | |
} | |
ensureRemaining(e) { | |
switch (this.type) { | |
case 0: | |
if (this.buffer.length - this.position < e) { | |
let t = r.roundUpToNextPowerOfTwo(this.buffer.length + e), | |
n = new Uint8Array(t); | |
n.set(this.buffer.subarray(0, this.position), 0), (this.buffer = n); | |
} | |
break; | |
case 1: | |
if (this.buffer.length - this.position < e) { | |
let t = r.roundUpToNextPowerOfTwo(this.buffer.length + e), | |
n = new Uint16Array(t); | |
n.set(this.buffer.subarray(0, this.position), 0), (this.buffer = n); | |
} | |
break; | |
case 2: | |
if (this.buffer.length - this.position < e) { | |
let t = r.roundUpToNextPowerOfTwo(this.buffer.length + e), | |
n = new Int32Array(t); | |
n.set(this.buffer.subarray(0, this.position), 0), (this.buffer = n); | |
} | |
} | |
} | |
append(e) { | |
this.ensureRemaining(e.length), this.appendArray(e); | |
} | |
appendArray(e) { | |
switch (this.type) { | |
case 0: | |
this.appendArrayByte(e); | |
break; | |
case 1: | |
this.appendArrayChar(e); | |
break; | |
case 2: | |
this.appendArrayInt(e); | |
} | |
} | |
appendArrayByte(e) { | |
n(-1 === this.prevHighSurrogate); | |
let t = e, | |
r = 0, | |
s = e.length, | |
o = this.buffer, | |
a = this.position; | |
for (; r < s; ) { | |
let n = t[r]; | |
if (!(n <= 255)) return (e = e.subarray(r, s)), (this.position = a), i.isHighSurrogate(n) ? (this.byteToIntBuffer(e.length), void this.appendArrayInt(e)) : (this.byteToCharBuffer(e.length), void this.appendArrayChar(e)); | |
(o[a] = n), r++, a++; | |
} | |
this.position = a; | |
} | |
appendArrayChar(e) { | |
n(-1 === this.prevHighSurrogate); | |
let t = e, | |
r = 0, | |
s = e.length, | |
o = this.buffer, | |
a = this.position; | |
for (; r < s; ) { | |
let n = t[r]; | |
if (i.isHighSurrogate(n)) return (e = e.subarray(r, s)), (this.position = a), this.charToIntBuffer(e.length), void this.appendArrayInt(e); | |
(o[a] = n), r++, a++; | |
} | |
this.position = a; | |
} | |
appendArrayInt(e) { | |
let t = e, | |
r = 0, | |
n = e.length, | |
s = this.buffer, | |
o = this.position; | |
for (; r < n; ) { | |
let e = t[r]; | |
r++, | |
-1 !== this.prevHighSurrogate | |
? i.isLowSurrogate(e) | |
? ((s[o] = String.fromCharCode(this.prevHighSurrogate, e).codePointAt(0)), o++, (this.prevHighSurrogate = -1)) | |
: ((s[o] = this.prevHighSurrogate), o++, i.isHighSurrogate(e) ? (this.prevHighSurrogate = e) : ((s[o] = e), o++, (this.prevHighSurrogate = -1))) | |
: i.isHighSurrogate(e) | |
? (this.prevHighSurrogate = e) | |
: ((s[o] = e), o++); | |
} | |
-1 !== this.prevHighSurrogate && ((s[o] = this.prevHighSurrogate), o++), (this.position = o); | |
} | |
byteToCharBuffer(e) { | |
let t = new Uint16Array(Math.max(this.position + e, this.buffer.length >> 1)); | |
t.set(this.buffer.subarray(0, this.position), 0), (this.type = 1), (this.buffer = t); | |
} | |
byteToIntBuffer(e) { | |
let t = new Int32Array(Math.max(this.position + e, this.buffer.length >> 2)); | |
t.set(this.buffer.subarray(0, this.position), 0), (this.type = 2), (this.buffer = t); | |
} | |
charToIntBuffer(e) { | |
let t = new Int32Array(Math.max(this.position + e, this.buffer.length >> 1)); | |
t.set(this.buffer.subarray(0, this.position), 0), (this.type = 2), (this.buffer = t); | |
} | |
} | |
e.Builder = r; | |
})((s = t.CodePointBuffer || (t.CodePointBuffer = {}))); | |
}, | |
1540: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CodePointCharStream = void 0); | |
const i = r(9491), | |
s = r(3227), | |
o = r(8813), | |
a = r(8042); | |
class l { | |
constructor(e, t, r, n) { | |
i(0 === t), (this._array = e), (this._size = r), (this._name = n), (this._position = 0); | |
} | |
get internalStorage() { | |
return this._array; | |
} | |
static fromBuffer(e, t) { | |
return (void 0 !== t && 0 !== t.length) || (t = s.IntStream.UNKNOWN_SOURCE_NAME), new l(e.array(), e.position, e.remaining, t); | |
} | |
consume() { | |
if (this._size - this._position == 0) throw (i(this.LA(1) === s.IntStream.EOF), new RangeError("cannot consume EOF")); | |
this._position++; | |
} | |
get index() { | |
return this._position; | |
} | |
get size() { | |
return this._size; | |
} | |
mark() { | |
return -1; | |
} | |
release(e) {} | |
seek(e) { | |
this._position = e; | |
} | |
get sourceName() { | |
return this._name; | |
} | |
toString() { | |
return this.getText(o.Interval.of(0, this.size - 1)); | |
} | |
LA(e) { | |
let t; | |
switch (Math.sign(e)) { | |
case -1: | |
return (t = this.index + e), t < 0 ? s.IntStream.EOF : this._array[t]; | |
case 0: | |
return 0; | |
case 1: | |
return (t = this.index + e - 1), t >= this.size ? s.IntStream.EOF : this._array[t]; | |
} | |
throw new RangeError("Not reached"); | |
} | |
getText(e) { | |
const t = Math.min(e.a, this.size), | |
r = Math.min(e.b - e.a + 1, this.size - t); | |
return this._array instanceof Int32Array ? String.fromCodePoint(...Array.from(this._array.subarray(t, t + r))) : String.fromCharCode(...Array.from(this._array.subarray(t, t + r))); | |
} | |
} | |
n([a.Override], l.prototype, "consume", null), | |
n([a.Override], l.prototype, "index", null), | |
n([a.Override], l.prototype, "size", null), | |
n([a.Override], l.prototype, "mark", null), | |
n([a.Override], l.prototype, "release", null), | |
n([a.Override], l.prototype, "seek", null), | |
n([a.Override], l.prototype, "sourceName", null), | |
n([a.Override], l.prototype, "toString", null), | |
n([a.Override], l.prototype, "LA", null), | |
n([a.Override], l.prototype, "getText", null), | |
(t.CodePointCharStream = l); | |
}, | |
824: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CommonToken = void 0); | |
const s = r(8813), | |
o = r(8042), | |
a = r(4966); | |
let l = class e { | |
constructor(t, r, n = e.EMPTY_SOURCE, i = a.Token.DEFAULT_CHANNEL, s = 0, o = 0) { | |
(this._line = 0), | |
(this._charPositionInLine = -1), | |
(this._channel = a.Token.DEFAULT_CHANNEL), | |
(this.index = -1), | |
(this._text = r), | |
(this._type = t), | |
(this.source = n), | |
(this._channel = i), | |
(this.start = s), | |
(this.stop = o), | |
null != n.source && ((this._line = n.source.line), (this._charPositionInLine = n.source.charPositionInLine)); | |
} | |
static fromToken(t) { | |
let r = new e(t.type, void 0, e.EMPTY_SOURCE, t.channel, t.startIndex, t.stopIndex); | |
return ( | |
(r._line = t.line), | |
(r.index = t.tokenIndex), | |
(r._charPositionInLine = t.charPositionInLine), | |
t instanceof e ? ((r._text = t._text), (r.source = t.source)) : ((r._text = t.text), (r.source = { source: t.tokenSource, stream: t.inputStream })), | |
r | |
); | |
} | |
get type() { | |
return this._type; | |
} | |
set type(e) { | |
this._type = e; | |
} | |
get line() { | |
return this._line; | |
} | |
set line(e) { | |
this._line = e; | |
} | |
get text() { | |
if (null != this._text) return this._text; | |
let e = this.inputStream; | |
if (null == e) return; | |
let t = e.size; | |
return this.start < t && this.stop < t ? e.getText(s.Interval.of(this.start, this.stop)) : "<EOF>"; | |
} | |
set text(e) { | |
this._text = e; | |
} | |
get charPositionInLine() { | |
return this._charPositionInLine; | |
} | |
set charPositionInLine(e) { | |
this._charPositionInLine = e; | |
} | |
get channel() { | |
return this._channel; | |
} | |
set channel(e) { | |
this._channel = e; | |
} | |
get startIndex() { | |
return this.start; | |
} | |
set startIndex(e) { | |
this.start = e; | |
} | |
get stopIndex() { | |
return this.stop; | |
} | |
set stopIndex(e) { | |
this.stop = e; | |
} | |
get tokenIndex() { | |
return this.index; | |
} | |
set tokenIndex(e) { | |
this.index = e; | |
} | |
get tokenSource() { | |
return this.source.source; | |
} | |
get inputStream() { | |
return this.source.stream; | |
} | |
toString(e) { | |
let t = ""; | |
this._channel > 0 && (t = ",channel=" + this._channel); | |
let r = this.text; | |
null != r ? ((r = r.replace(/\n/g, "\\n")), (r = r.replace(/\r/g, "\\r")), (r = r.replace(/\t/g, "\\t"))) : (r = "<no text>"); | |
let n = String(this._type); | |
return e && (n = e.vocabulary.getDisplayName(this._type)), "[@" + this.tokenIndex + "," + this.start + ":" + this.stop + "='" + r + "',<" + n + ">" + t + "," + this._line + ":" + this.charPositionInLine + "]"; | |
} | |
}; | |
(l.EMPTY_SOURCE = { source: void 0, stream: void 0 }), | |
n([o.NotNull], l.prototype, "source", void 0), | |
n([o.Override], l.prototype, "type", null), | |
n([o.Override], l.prototype, "line", null), | |
n([o.Override], l.prototype, "text", null), | |
n([o.Override], l.prototype, "charPositionInLine", null), | |
n([o.Override], l.prototype, "channel", null), | |
n([o.Override], l.prototype, "startIndex", null), | |
n([o.Override], l.prototype, "stopIndex", null), | |
n([o.Override], l.prototype, "tokenIndex", null), | |
n([o.Override], l.prototype, "tokenSource", null), | |
n([o.Override], l.prototype, "inputStream", null), | |
n([o.Override], l.prototype, "toString", null), | |
n([i(0, o.NotNull)], l, "fromToken", null), | |
(l = n([i(2, o.NotNull)], l)), | |
(t.CommonToken = l); | |
}, | |
8735: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CommonTokenFactory = void 0); | |
const i = r(824), | |
s = r(8813), | |
o = r(8042); | |
class a { | |
constructor(e = !1) { | |
this.copyText = e; | |
} | |
create(e, t, r, n, o, a, l, c) { | |
let u = new i.CommonToken(t, r, e, n, o, a); | |
return (u.line = l), (u.charPositionInLine = c), null == r && this.copyText && null != e.stream && (u.text = e.stream.getText(s.Interval.of(o, a))), u; | |
} | |
createSimple(e, t) { | |
return new i.CommonToken(e, t); | |
} | |
} | |
n([o.Override], a.prototype, "create", null), | |
n([o.Override], a.prototype, "createSimple", null), | |
(t.CommonTokenFactory = a), | |
(function (e) { | |
e.DEFAULT = new e(); | |
})((a = t.CommonTokenFactory || (t.CommonTokenFactory = {}))); | |
}, | |
4321: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.CommonTokenStream = void 0); | |
const s = r(8218), | |
o = r(8042), | |
a = r(4966); | |
let l = class extends s.BufferedTokenStream { | |
constructor(e, t = a.Token.DEFAULT_CHANNEL) { | |
super(e), (this.channel = t); | |
} | |
adjustSeekIndex(e) { | |
return this.nextTokenOnChannel(e, this.channel); | |
} | |
tryLB(e) { | |
if (this.p - e < 0) return; | |
let t = this.p, | |
r = 1; | |
for (; r <= e && t > 0; ) (t = this.previousTokenOnChannel(t - 1, this.channel)), r++; | |
return t < 0 ? void 0 : this.tokens[t]; | |
} | |
tryLT(e) { | |
if ((this.lazyInit(), 0 === e)) throw new RangeError("0 is not a valid lookahead index"); | |
if (e < 0) return this.tryLB(-e); | |
let t = this.p, | |
r = 1; | |
for (; r < e; ) this.sync(t + 1) && (t = this.nextTokenOnChannel(t + 1, this.channel)), r++; | |
return this.tokens[t]; | |
} | |
getNumberOfOnChannelTokens() { | |
let e = 0; | |
this.fill(); | |
for (let t of this.tokens) if ((t.channel === this.channel && e++, t.type === a.Token.EOF)) break; | |
return e; | |
} | |
}; | |
n([o.Override], l.prototype, "adjustSeekIndex", null), n([o.Override], l.prototype, "tryLB", null), n([o.Override], l.prototype, "tryLT", null), (l = n([i(0, o.NotNull)], l)), (t.CommonTokenStream = l); | |
}, | |
4525: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ConsoleErrorListener = void 0); | |
class r { | |
syntaxError(e, t, r, n, i, s) { | |
console.error(`line ${r}:${n} ${i}`); | |
} | |
} | |
(t.ConsoleErrorListener = r), (r.INSTANCE = new r()); | |
}, | |
8042: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.SuppressWarnings = t.Override = t.Nullable = t.NotNull = void 0), | |
(t.NotNull = function (e, t, r) {}), | |
(t.Nullable = function (e, t, r) {}), | |
(t.Override = function (e, t, r) {}), | |
(t.SuppressWarnings = function (e) { | |
return (e, t, r) => {}; | |
}); | |
}, | |
3992: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DefaultErrorStrategy = void 0); | |
const s = r(3269), | |
o = r(4700), | |
a = r(2915), | |
l = r(4837), | |
c = r(4405), | |
u = r(4609), | |
h = r(9767), | |
p = r(4966), | |
d = r(8042); | |
class m { | |
constructor() { | |
(this.errorRecoveryMode = !1), (this.lastErrorIndex = -1), (this.nextTokensState = s.ATNState.INVALID_STATE_NUMBER); | |
} | |
reset(e) { | |
this.endErrorCondition(e); | |
} | |
beginErrorCondition(e) { | |
this.errorRecoveryMode = !0; | |
} | |
inErrorRecoveryMode(e) { | |
return this.errorRecoveryMode; | |
} | |
endErrorCondition(e) { | |
(this.errorRecoveryMode = !1), (this.lastErrorStates = void 0), (this.lastErrorIndex = -1); | |
} | |
reportMatch(e) { | |
this.endErrorCondition(e); | |
} | |
reportError(e, t) { | |
this.inErrorRecoveryMode(e) || | |
(this.beginErrorCondition(e), | |
t instanceof u.NoViableAltException | |
? this.reportNoViableAlternative(e, t) | |
: t instanceof l.InputMismatchException | |
? this.reportInputMismatch(e, t) | |
: t instanceof a.FailedPredicateException | |
? this.reportFailedPredicate(e, t) | |
: (console.error(`unknown recognition error type: ${t}`), this.notifyErrorListeners(e, t.toString(), t))); | |
} | |
notifyErrorListeners(e, t, r) { | |
let n = r.getOffendingToken(e); | |
void 0 === n && (n = null), e.notifyErrorListeners(t, n, r); | |
} | |
recover(e, t) { | |
this.lastErrorIndex === e.inputStream.index && this.lastErrorStates && this.lastErrorStates.contains(e.state) && e.consume(), | |
(this.lastErrorIndex = e.inputStream.index), | |
this.lastErrorStates || (this.lastErrorStates = new c.IntervalSet()), | |
this.lastErrorStates.add(e.state); | |
let r = this.getErrorRecoverySet(e); | |
this.consumeUntil(e, r); | |
} | |
sync(e) { | |
let t = e.interpreter.atn.states[e.state]; | |
if (this.inErrorRecoveryMode(e)) return; | |
let r = e.inputStream.LA(1), | |
n = e.atn.nextTokens(t); | |
if (n.contains(r)) return (this.nextTokensContext = void 0), void (this.nextTokensState = s.ATNState.INVALID_STATE_NUMBER); | |
if (n.contains(p.Token.EPSILON)) void 0 === this.nextTokensContext && ((this.nextTokensContext = e.context), (this.nextTokensState = e.state)); | |
else | |
switch (t.stateType) { | |
case o.ATNStateType.BLOCK_START: | |
case o.ATNStateType.STAR_BLOCK_START: | |
case o.ATNStateType.PLUS_BLOCK_START: | |
case o.ATNStateType.STAR_LOOP_ENTRY: | |
if (this.singleTokenDeletion(e)) return; | |
throw new l.InputMismatchException(e); | |
case o.ATNStateType.PLUS_LOOP_BACK: | |
case o.ATNStateType.STAR_LOOP_BACK: | |
this.reportUnwantedToken(e); | |
let t = e.getExpectedTokens().or(this.getErrorRecoverySet(e)); | |
this.consumeUntil(e, t); | |
} | |
} | |
reportNoViableAlternative(e, t) { | |
let r, | |
n = e.inputStream; | |
r = n ? (t.startToken.type === p.Token.EOF ? "<EOF>" : n.getTextFromRange(t.startToken, t.getOffendingToken())) : "<unknown input>"; | |
let i = "no viable alternative at input " + this.escapeWSAndQuote(r); | |
this.notifyErrorListeners(e, i, t); | |
} | |
reportInputMismatch(e, t) { | |
let r = t.expectedTokens, | |
n = r ? r.toStringVocabulary(e.vocabulary) : "", | |
i = "mismatched input " + this.getTokenErrorDisplay(t.getOffendingToken(e)) + " expecting " + n; | |
this.notifyErrorListeners(e, i, t); | |
} | |
reportFailedPredicate(e, t) { | |
let r = "rule " + e.ruleNames[e.context.ruleIndex] + " " + t.message; | |
this.notifyErrorListeners(e, r, t); | |
} | |
reportUnwantedToken(e) { | |
if (this.inErrorRecoveryMode(e)) return; | |
this.beginErrorCondition(e); | |
let t = e.currentToken, | |
r = "extraneous input " + this.getTokenErrorDisplay(t) + " expecting " + this.getExpectedTokens(e).toStringVocabulary(e.vocabulary); | |
e.notifyErrorListeners(r, t, void 0); | |
} | |
reportMissingToken(e) { | |
if (this.inErrorRecoveryMode(e)) return; | |
this.beginErrorCondition(e); | |
let t = e.currentToken, | |
r = "missing " + this.getExpectedTokens(e).toStringVocabulary(e.vocabulary) + " at " + this.getTokenErrorDisplay(t); | |
e.notifyErrorListeners(r, t, void 0); | |
} | |
recoverInline(e) { | |
let t = this.singleTokenDeletion(e); | |
if (t) return e.consume(), t; | |
if (this.singleTokenInsertion(e)) return this.getMissingSymbol(e); | |
throw void 0 === this.nextTokensContext ? new l.InputMismatchException(e) : new l.InputMismatchException(e, this.nextTokensState, this.nextTokensContext); | |
} | |
singleTokenInsertion(e) { | |
let t = e.inputStream.LA(1), | |
r = e.interpreter.atn.states[e.state].transition(0).target, | |
n = e.interpreter.atn; | |
return !!n.nextTokens(r, h.PredictionContext.fromRuleContext(n, e.context)).contains(t) && (this.reportMissingToken(e), !0); | |
} | |
singleTokenDeletion(e) { | |
let t = e.inputStream.LA(2); | |
if (this.getExpectedTokens(e).contains(t)) { | |
this.reportUnwantedToken(e), e.consume(); | |
let t = e.currentToken; | |
return this.reportMatch(e), t; | |
} | |
} | |
getMissingSymbol(e) { | |
let t, | |
r = e.currentToken, | |
n = this.getExpectedTokens(e), | |
i = p.Token.INVALID_TYPE; | |
n.isNil || (i = n.minElement), (t = i === p.Token.EOF ? "<missing EOF>" : "<missing " + e.vocabulary.getDisplayName(i) + ">"); | |
let s = r, | |
o = e.inputStream.tryLT(-1); | |
return s.type === p.Token.EOF && null != o && (s = o), this.constructToken(e.inputStream.tokenSource, i, t, s); | |
} | |
constructToken(e, t, r, n) { | |
let i = e.tokenFactory, | |
s = n.tokenSource, | |
o = s ? s.inputStream : void 0; | |
return i.create({ source: e, stream: o }, t, r, p.Token.DEFAULT_CHANNEL, -1, -1, n.line, n.charPositionInLine); | |
} | |
getExpectedTokens(e) { | |
return e.getExpectedTokens(); | |
} | |
getTokenErrorDisplay(e) { | |
if (!e) return "<no token>"; | |
let t = this.getSymbolText(e); | |
return t || (t = this.getSymbolType(e) === p.Token.EOF ? "<EOF>" : `<${this.getSymbolType(e)}>`), this.escapeWSAndQuote(t); | |
} | |
getSymbolText(e) { | |
return e.text; | |
} | |
getSymbolType(e) { | |
return e.type; | |
} | |
escapeWSAndQuote(e) { | |
return "'" + (e = (e = (e = e.replace("\n", "\\n")).replace("\r", "\\r")).replace("\t", "\\t")) + "'"; | |
} | |
getErrorRecoverySet(e) { | |
let t = e.interpreter.atn, | |
r = e.context, | |
n = new c.IntervalSet(); | |
for (; r && r.invokingState >= 0; ) { | |
let e = t.states[r.invokingState].transition(0), | |
i = t.nextTokens(e.followState); | |
n.addAll(i), (r = r._parent); | |
} | |
return n.remove(p.Token.EPSILON), n; | |
} | |
consumeUntil(e, t) { | |
let r = e.inputStream.LA(1); | |
for (; r !== p.Token.EOF && !t.contains(r); ) e.consume(), (r = e.inputStream.LA(1)); | |
} | |
} | |
n([d.Override], m.prototype, "reset", null), | |
n([i(0, d.NotNull)], m.prototype, "beginErrorCondition", null), | |
n([d.Override], m.prototype, "inErrorRecoveryMode", null), | |
n([i(0, d.NotNull)], m.prototype, "endErrorCondition", null), | |
n([d.Override], m.prototype, "reportMatch", null), | |
n([d.Override], m.prototype, "reportError", null), | |
n([i(0, d.NotNull)], m.prototype, "notifyErrorListeners", null), | |
n([d.Override], m.prototype, "recover", null), | |
n([d.Override], m.prototype, "sync", null), | |
n([i(0, d.NotNull), i(1, d.NotNull)], m.prototype, "reportNoViableAlternative", null), | |
n([i(0, d.NotNull), i(1, d.NotNull)], m.prototype, "reportInputMismatch", null), | |
n([i(0, d.NotNull), i(1, d.NotNull)], m.prototype, "reportFailedPredicate", null), | |
n([i(0, d.NotNull)], m.prototype, "reportUnwantedToken", null), | |
n([i(0, d.NotNull)], m.prototype, "reportMissingToken", null), | |
n([d.Override], m.prototype, "recoverInline", null), | |
n([i(0, d.NotNull)], m.prototype, "singleTokenInsertion", null), | |
n([i(0, d.NotNull)], m.prototype, "singleTokenDeletion", null), | |
n([d.NotNull, i(0, d.NotNull)], m.prototype, "getMissingSymbol", null), | |
n([d.NotNull, i(0, d.NotNull)], m.prototype, "getExpectedTokens", null), | |
n([i(0, d.NotNull)], m.prototype, "getSymbolText", null), | |
n([i(0, d.NotNull)], m.prototype, "getSymbolType", null), | |
n([d.NotNull, i(0, d.NotNull)], m.prototype, "escapeWSAndQuote", null), | |
n([d.NotNull, i(0, d.NotNull)], m.prototype, "getErrorRecoverySet", null), | |
n([i(0, d.NotNull), i(1, d.NotNull)], m.prototype, "consumeUntil", null), | |
(t.DefaultErrorStrategy = m); | |
}, | |
4361: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.Dependents = void 0), | |
((r = t.Dependents || (t.Dependents = {}))[(r.SELF = 0)] = "SELF"), | |
(r[(r.PARENTS = 1)] = "PARENTS"), | |
(r[(r.CHILDREN = 2)] = "CHILDREN"), | |
(r[(r.ANCESTORS = 3)] = "ANCESTORS"), | |
(r[(r.DESCENDANTS = 4)] = "DESCENDANTS"), | |
(r[(r.SIBLINGS = 5)] = "SIBLINGS"), | |
(r[(r.PRECEEDING_SIBLINGS = 6)] = "PRECEEDING_SIBLINGS"), | |
(r[(r.FOLLOWING_SIBLINGS = 7)] = "FOLLOWING_SIBLINGS"), | |
(r[(r.PRECEEDING = 8)] = "PRECEEDING"), | |
(r[(r.FOLLOWING = 9)] = "FOLLOWING"); | |
}, | |
7574: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DiagnosticErrorListener = void 0); | |
const s = r(5280), | |
o = r(8042), | |
a = r(8813); | |
class l { | |
constructor(e = !0) { | |
(this.exactOnly = e), (this.exactOnly = e); | |
} | |
syntaxError(e, t, r, n, i, s) {} | |
reportAmbiguity(e, t, r, n, i, s, o) { | |
if (this.exactOnly && !i) return; | |
let l = `reportAmbiguity d=${this.getDecisionDescription(e, t)}: ambigAlts=${this.getConflictingAlts(s, o)}, input='${e.inputStream.getText(a.Interval.of(r, n))}'`; | |
e.notifyErrorListeners(l); | |
} | |
reportAttemptingFullContext(e, t, r, n, i, s) { | |
let o = `reportAttemptingFullContext d=${this.getDecisionDescription(e, t)}, input='${e.inputStream.getText(a.Interval.of(r, n))}'`; | |
e.notifyErrorListeners(o); | |
} | |
reportContextSensitivity(e, t, r, n, i, s) { | |
let o = `reportContextSensitivity d=${this.getDecisionDescription(e, t)}, input='${e.inputStream.getText(a.Interval.of(r, n))}'`; | |
e.notifyErrorListeners(o); | |
} | |
getDecisionDescription(e, t) { | |
let r = t.decision, | |
n = t.atnStartState.ruleIndex, | |
i = e.ruleNames; | |
if (n < 0 || n >= i.length) return r.toString(); | |
let s = i[n]; | |
return s ? `${r} (${s})` : r.toString(); | |
} | |
getConflictingAlts(e, t) { | |
if (null != e) return e; | |
let r = new s.BitSet(); | |
for (let e of t) r.set(e.alt); | |
return r; | |
} | |
} | |
n([o.Override], l.prototype, "syntaxError", null), | |
n([o.Override, i(0, o.NotNull), i(1, o.NotNull), i(6, o.NotNull)], l.prototype, "reportAmbiguity", null), | |
n([o.Override, i(0, o.NotNull), i(1, o.NotNull), i(5, o.NotNull)], l.prototype, "reportAttemptingFullContext", null), | |
n([o.Override, i(0, o.NotNull), i(1, o.NotNull), i(5, o.NotNull)], l.prototype, "reportContextSensitivity", null), | |
n([i(0, o.NotNull), i(1, o.NotNull)], l.prototype, "getDecisionDescription", null), | |
n([o.NotNull, i(1, o.NotNull)], l.prototype, "getConflictingAlts", null), | |
(t.DiagnosticErrorListener = l); | |
}, | |
2915: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.FailedPredicateException = void 0); | |
const s = r(3998), | |
o = r(8042), | |
a = r(3233); | |
let l = class e extends s.RecognitionException { | |
constructor(t, r, n) { | |
super(t, t.inputStream, t.context, e.formatMessage(r, n)); | |
let i = t.interpreter.atn.states[t.state].transition(0); | |
i instanceof a.PredicateTransition ? ((this._ruleIndex = i.ruleIndex), (this._predicateIndex = i.predIndex)) : ((this._ruleIndex = 0), (this._predicateIndex = 0)), | |
(this._predicate = r), | |
super.setOffendingToken(t, t.currentToken); | |
} | |
get ruleIndex() { | |
return this._ruleIndex; | |
} | |
get predicateIndex() { | |
return this._predicateIndex; | |
} | |
get predicate() { | |
return this._predicate; | |
} | |
static formatMessage(e, t) { | |
return t || `failed predicate: {${e}}?`; | |
} | |
}; | |
n([o.NotNull], l, "formatMessage", null), (l = n([i(0, o.NotNull)], l)), (t.FailedPredicateException = l); | |
}, | |
4837: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.InputMismatchException = void 0); | |
const s = r(3998), | |
o = r(8042); | |
let a = class extends s.RecognitionException { | |
constructor(e, t, r) { | |
void 0 === r && (r = e.context), super(e, e.inputStream, r), void 0 !== t && this.setOffendingState(t), this.setOffendingToken(e, e.currentToken); | |
} | |
}; | |
(a = n([i(0, o.NotNull)], a)), (t.InputMismatchException = a); | |
}, | |
3227: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.IntStream = void 0), ((r = t.IntStream || (t.IntStream = {})).EOF = -1), (r.UNKNOWN_SOURCE_NAME = "<unknown>"); | |
}, | |
4126: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.InterpreterRuleContext = void 0); | |
const i = r(8042), | |
s = r(3208); | |
class o extends s.ParserRuleContext { | |
constructor(e, t, r) { | |
void 0 !== r ? super(t, r) : super(), (this._ruleIndex = e); | |
} | |
get ruleIndex() { | |
return this._ruleIndex; | |
} | |
} | |
n([i.Override], o.prototype, "ruleIndex", null), (t.InterpreterRuleContext = o); | |
}, | |
9557: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Lexer = void 0); | |
const i = r(8735), | |
s = r(1350), | |
o = r(8813), | |
a = r(3227), | |
l = r(2178), | |
c = r(5324), | |
u = r(8042), | |
h = r(8610), | |
p = r(4966); | |
class d extends h.Recognizer { | |
constructor(e) { | |
super(), | |
(this._factory = i.CommonTokenFactory.DEFAULT), | |
(this._tokenStartCharIndex = -1), | |
(this._tokenStartLine = 0), | |
(this._tokenStartCharPositionInLine = 0), | |
(this._hitEOF = !1), | |
(this._channel = 0), | |
(this._type = 0), | |
(this._modeStack = new s.IntegerStack()), | |
(this._mode = d.DEFAULT_MODE), | |
(this._input = e), | |
(this._tokenFactorySourcePair = { source: this, stream: e }); | |
} | |
static get DEFAULT_TOKEN_CHANNEL() { | |
return p.Token.DEFAULT_CHANNEL; | |
} | |
static get HIDDEN() { | |
return p.Token.HIDDEN_CHANNEL; | |
} | |
reset(e) { | |
(void 0 === e || e) && this._input.seek(0), | |
(this._token = void 0), | |
(this._type = p.Token.INVALID_TYPE), | |
(this._channel = p.Token.DEFAULT_CHANNEL), | |
(this._tokenStartCharIndex = -1), | |
(this._tokenStartCharPositionInLine = -1), | |
(this._tokenStartLine = -1), | |
(this._text = void 0), | |
(this._hitEOF = !1), | |
(this._mode = d.DEFAULT_MODE), | |
this._modeStack.clear(), | |
this.interpreter.reset(); | |
} | |
nextToken() { | |
if (null == this._input) throw new Error("nextToken requires a non-null input stream."); | |
let e = this._input.mark(); | |
try { | |
e: for (;;) { | |
if (this._hitEOF) return this.emitEOF(); | |
(this._token = void 0), | |
(this._channel = p.Token.DEFAULT_CHANNEL), | |
(this._tokenStartCharIndex = this._input.index), | |
(this._tokenStartCharPositionInLine = this.interpreter.charPositionInLine), | |
(this._tokenStartLine = this.interpreter.line), | |
(this._text = void 0); | |
do { | |
let e; | |
this._type = p.Token.INVALID_TYPE; | |
try { | |
e = this.interpreter.match(this._input, this._mode); | |
} catch (t) { | |
if (!(t instanceof c.LexerNoViableAltException)) throw t; | |
this.notifyListeners(t), this.recover(t), (e = d.SKIP); | |
} | |
if ((this._input.LA(1) === a.IntStream.EOF && (this._hitEOF = !0), this._type === p.Token.INVALID_TYPE && (this._type = e), this._type === d.SKIP)) continue e; | |
} while (this._type === d.MORE); | |
return null == this._token ? this.emit() : this._token; | |
} | |
} finally { | |
this._input.release(e); | |
} | |
} | |
skip() { | |
this._type = d.SKIP; | |
} | |
more() { | |
this._type = d.MORE; | |
} | |
mode(e) { | |
this._mode = e; | |
} | |
pushMode(e) { | |
l.LexerATNSimulator.debug && console.log("pushMode " + e), this._modeStack.push(this._mode), this.mode(e); | |
} | |
popMode() { | |
if (this._modeStack.isEmpty) throw new Error("EmptyStackException"); | |
return l.LexerATNSimulator.debug && console.log("popMode back to " + this._modeStack.peek()), this.mode(this._modeStack.pop()), this._mode; | |
} | |
get tokenFactory() { | |
return this._factory; | |
} | |
set tokenFactory(e) { | |
this._factory = e; | |
} | |
get inputStream() { | |
return this._input; | |
} | |
set inputStream(e) { | |
this.reset(!1), (this._input = e), (this._tokenFactorySourcePair = { source: this, stream: this._input }); | |
} | |
get sourceName() { | |
return this._input.sourceName; | |
} | |
emit(e) { | |
return ( | |
e || (e = this._factory.create(this._tokenFactorySourcePair, this._type, this._text, this._channel, this._tokenStartCharIndex, this.charIndex - 1, this._tokenStartLine, this._tokenStartCharPositionInLine)), | |
(this._token = e), | |
e | |
); | |
} | |
emitEOF() { | |
let e = this.charPositionInLine, | |
t = this.line, | |
r = this._factory.create(this._tokenFactorySourcePair, p.Token.EOF, void 0, p.Token.DEFAULT_CHANNEL, this._input.index, this._input.index - 1, t, e); | |
return this.emit(r), r; | |
} | |
get line() { | |
return this.interpreter.line; | |
} | |
set line(e) { | |
this.interpreter.line = e; | |
} | |
get charPositionInLine() { | |
return this.interpreter.charPositionInLine; | |
} | |
set charPositionInLine(e) { | |
this.interpreter.charPositionInLine = e; | |
} | |
get charIndex() { | |
return this._input.index; | |
} | |
get text() { | |
return null != this._text ? this._text : this.interpreter.getText(this._input); | |
} | |
set text(e) { | |
this._text = e; | |
} | |
get token() { | |
return this._token; | |
} | |
set token(e) { | |
this._token = e; | |
} | |
set type(e) { | |
this._type = e; | |
} | |
get type() { | |
return this._type; | |
} | |
set channel(e) { | |
this._channel = e; | |
} | |
get channel() { | |
return this._channel; | |
} | |
getAllTokens() { | |
let e = [], | |
t = this.nextToken(); | |
for (; t.type !== p.Token.EOF; ) e.push(t), (t = this.nextToken()); | |
return e; | |
} | |
notifyListeners(e) { | |
let t = this._input.getText(o.Interval.of(this._tokenStartCharIndex, this._input.index)), | |
r = "token recognition error at: '" + this.getErrorDisplay(t) + "'", | |
n = this.getErrorListenerDispatch(); | |
n.syntaxError && n.syntaxError(this, void 0, this._tokenStartLine, this._tokenStartCharPositionInLine, r, e); | |
} | |
getErrorDisplay(e) { | |
if ("number" == typeof e) { | |
switch (e) { | |
case p.Token.EOF: | |
return "<EOF>"; | |
case 10: | |
return "\\n"; | |
case 9: | |
return "\\t"; | |
case 13: | |
return "\\r"; | |
} | |
return String.fromCharCode(e); | |
} | |
return e.replace(/\n/g, "\\n").replace(/\t/g, "\\t").replace(/\r/g, "\\r"); | |
} | |
getCharErrorDisplay(e) { | |
return "'" + this.getErrorDisplay(e) + "'"; | |
} | |
recover(e) { | |
e instanceof c.LexerNoViableAltException ? this._input.LA(1) !== a.IntStream.EOF && this.interpreter.consume(this._input) : this._input.consume(); | |
} | |
} | |
(d.DEFAULT_MODE = 0), | |
(d.MORE = -2), | |
(d.SKIP = -3), | |
(d.MIN_CHAR_VALUE = 0), | |
(d.MAX_CHAR_VALUE = 1114111), | |
n([u.Override], d.prototype, "nextToken", null), | |
n([u.Override], d.prototype, "tokenFactory", null), | |
n([u.Override], d.prototype, "inputStream", null), | |
n([u.Override], d.prototype, "sourceName", null), | |
n([u.Override], d.prototype, "line", null), | |
n([u.Override], d.prototype, "charPositionInLine", null), | |
(t.Lexer = d); | |
}, | |
7301: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerInterpreter = void 0); | |
const s = r(9557), | |
o = r(2178), | |
a = r(8042), | |
l = r(8042); | |
let c = class extends s.Lexer { | |
constructor(e, t, r, n, i, s, a) { | |
if ((super(a), 0 !== s.grammarType)) throw new Error("IllegalArgumentException: The ATN must be a lexer ATN."); | |
(this._grammarFileName = e), (this._atn = s), (this._ruleNames = r.slice(0)), (this._channelNames = n.slice(0)), (this._modeNames = i.slice(0)), (this._vocabulary = t), (this._interp = new o.LexerATNSimulator(s, this)); | |
} | |
get atn() { | |
return this._atn; | |
} | |
get grammarFileName() { | |
return this._grammarFileName; | |
} | |
get ruleNames() { | |
return this._ruleNames; | |
} | |
get channelNames() { | |
return this._channelNames; | |
} | |
get modeNames() { | |
return this._modeNames; | |
} | |
get vocabulary() { | |
return this._vocabulary; | |
} | |
}; | |
n([a.NotNull], c.prototype, "_vocabulary", void 0), | |
n([l.Override], c.prototype, "atn", null), | |
n([l.Override], c.prototype, "grammarFileName", null), | |
n([l.Override], c.prototype, "ruleNames", null), | |
n([l.Override], c.prototype, "channelNames", null), | |
n([l.Override], c.prototype, "modeNames", null), | |
n([l.Override], c.prototype, "vocabulary", null), | |
(c = n([i(1, a.NotNull)], c)), | |
(t.LexerInterpreter = c); | |
}, | |
5324: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerNoViableAltException = void 0); | |
const s = r(3998), | |
o = r(8042), | |
a = r(8813), | |
l = r(5103); | |
let c = class extends s.RecognitionException { | |
constructor(e, t, r, n) { | |
super(e, t), (this._startIndex = r), (this._deadEndConfigs = n); | |
} | |
get startIndex() { | |
return this._startIndex; | |
} | |
get deadEndConfigs() { | |
return this._deadEndConfigs; | |
} | |
get inputStream() { | |
return super.inputStream; | |
} | |
toString() { | |
let e = ""; | |
return ( | |
this._startIndex >= 0 && this._startIndex < this.inputStream.size && ((e = this.inputStream.getText(a.Interval.of(this._startIndex, this._startIndex))), (e = l.escapeWhitespace(e, !1))), `LexerNoViableAltException('${e}')` | |
); | |
} | |
}; | |
n([o.Override], c.prototype, "inputStream", null), n([o.Override], c.prototype, "toString", null), (c = n([i(1, o.NotNull)], c)), (t.LexerNoViableAltException = c); | |
}, | |
7683: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ListTokenSource = void 0); | |
const s = r(8735), | |
o = r(8042), | |
a = r(4966); | |
let l = class { | |
constructor(e, t) { | |
if (((this.i = 0), (this._factory = s.CommonTokenFactory.DEFAULT), null == e)) throw new Error("tokens cannot be null"); | |
(this.tokens = e), (this._sourceName = t); | |
} | |
get charPositionInLine() { | |
if (this.i < this.tokens.length) return this.tokens[this.i].charPositionInLine; | |
if (null != this.eofToken) return this.eofToken.charPositionInLine; | |
if (this.tokens.length > 0) { | |
let e = this.tokens[this.tokens.length - 1], | |
t = e.text; | |
if (null != t) { | |
let e = t.lastIndexOf("\n"); | |
if (e >= 0) return t.length - e - 1; | |
} | |
return e.charPositionInLine + e.stopIndex - e.startIndex + 1; | |
} | |
return 0; | |
} | |
nextToken() { | |
if (this.i >= this.tokens.length) { | |
if (null == this.eofToken) { | |
let e = -1; | |
if (this.tokens.length > 0) { | |
let t = this.tokens[this.tokens.length - 1].stopIndex; | |
-1 !== t && (e = t + 1); | |
} | |
let t = Math.max(-1, e - 1); | |
this.eofToken = this._factory.create({ source: this, stream: this.inputStream }, a.Token.EOF, "EOF", a.Token.DEFAULT_CHANNEL, e, t, this.line, this.charPositionInLine); | |
} | |
return this.eofToken; | |
} | |
let e = this.tokens[this.i]; | |
return this.i === this.tokens.length - 1 && e.type === a.Token.EOF && (this.eofToken = e), this.i++, e; | |
} | |
get line() { | |
if (this.i < this.tokens.length) return this.tokens[this.i].line; | |
if (null != this.eofToken) return this.eofToken.line; | |
if (this.tokens.length > 0) { | |
let e = this.tokens[this.tokens.length - 1], | |
t = e.line, | |
r = e.text; | |
if (null != r) for (let e = 0; e < r.length; e++) "\n" === r.charAt(e) && t++; | |
return t; | |
} | |
return 1; | |
} | |
get inputStream() { | |
return this.i < this.tokens.length ? this.tokens[this.i].inputStream : null != this.eofToken ? this.eofToken.inputStream : this.tokens.length > 0 ? this.tokens[this.tokens.length - 1].inputStream : void 0; | |
} | |
get sourceName() { | |
if (this._sourceName) return this._sourceName; | |
let e = this.inputStream; | |
return null != e ? e.sourceName : "List"; | |
} | |
set tokenFactory(e) { | |
this._factory = e; | |
} | |
get tokenFactory() { | |
return this._factory; | |
} | |
}; | |
n([o.Override], l.prototype, "charPositionInLine", null), | |
n([o.Override], l.prototype, "nextToken", null), | |
n([o.Override], l.prototype, "line", null), | |
n([o.Override], l.prototype, "inputStream", null), | |
n([o.Override], l.prototype, "sourceName", null), | |
n([o.Override, o.NotNull, i(0, o.NotNull)], l.prototype, "tokenFactory", null), | |
(l = n([i(0, o.NotNull)], l)), | |
(t.ListTokenSource = l); | |
}, | |
4609: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.NoViableAltException = void 0); | |
const i = r(2824), | |
s = r(3998), | |
o = r(8042); | |
class a extends s.RecognitionException { | |
constructor(e, t, r, n, s, o) { | |
e instanceof i.Parser && (void 0 === t && (t = e.inputStream), void 0 === r && (r = e.currentToken), void 0 === n && (n = e.currentToken), void 0 === o && (o = e.context)), | |
super(e, t, o), | |
(this._deadEndConfigs = s), | |
(this._startToken = r), | |
this.setOffendingToken(e, n); | |
} | |
get startToken() { | |
return this._startToken; | |
} | |
get deadEndConfigs() { | |
return this._deadEndConfigs; | |
} | |
} | |
n([o.NotNull], a.prototype, "_startToken", void 0), (t.NoViableAltException = a); | |
}, | |
2824: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}, | |
s = | |
(this && this.__awaiter) || | |
function (e, t, r, n) { | |
return new (r || (r = Promise))(function (i, s) { | |
function o(e) { | |
try { | |
l(n.next(e)); | |
} catch (e) { | |
s(e); | |
} | |
} | |
function a(e) { | |
try { | |
l(n.throw(e)); | |
} catch (e) { | |
s(e); | |
} | |
} | |
function l(e) { | |
var t; | |
e.done | |
? i(e.value) | |
: ((t = e.value), | |
t instanceof r | |
? t | |
: new r(function (e) { | |
e(t); | |
})).then(o, a); | |
} | |
l((n = n.apply(e, t || [])).next()); | |
}); | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Parser = void 0); | |
const o = r(5103), | |
a = r(9704), | |
l = r(9963), | |
c = r(3992), | |
u = r(6912), | |
h = r(1350), | |
p = r(9557), | |
d = r(8042), | |
m = r(6019), | |
f = r(4584), | |
y = r(6454), | |
g = r(8610), | |
_ = r(8011), | |
T = r(4966); | |
class x { | |
constructor(e, t) { | |
(this.ruleNames = e), (this.tokenStream = t); | |
} | |
enterEveryRule(e) { | |
console.log("enter " + this.ruleNames[e.ruleIndex] + ", LT(1)=" + this.tokenStream.LT(1).text); | |
} | |
exitEveryRule(e) { | |
console.log("exit " + this.ruleNames[e.ruleIndex] + ", LT(1)=" + this.tokenStream.LT(1).text); | |
} | |
visitErrorNode(e) {} | |
visitTerminal(e) { | |
let t = e.parent.ruleContext, | |
r = e.symbol; | |
console.log("consume " + r + " rule " + this.ruleNames[t.ruleIndex]); | |
} | |
} | |
n([d.Override], x.prototype, "enterEveryRule", null), n([d.Override], x.prototype, "exitEveryRule", null), n([d.Override], x.prototype, "visitErrorNode", null), n([d.Override], x.prototype, "visitTerminal", null); | |
class v extends g.Recognizer { | |
constructor(e) { | |
super(), | |
(this._errHandler = new c.DefaultErrorStrategy()), | |
(this._precedenceStack = new h.IntegerStack()), | |
(this._buildParseTrees = !0), | |
(this._parseListeners = []), | |
(this._syntaxErrors = 0), | |
(this.matchedEOF = !1), | |
this._precedenceStack.push(0), | |
(this.inputStream = e); | |
} | |
reset(e) { | |
(void 0 === e || e) && this.inputStream.seek(0), | |
this._errHandler.reset(this), | |
(this._ctx = void 0), | |
(this._syntaxErrors = 0), | |
(this.matchedEOF = !1), | |
(this.isTrace = !1), | |
this._precedenceStack.clear(), | |
this._precedenceStack.push(0); | |
let t = this.interpreter; | |
null != t && t.reset(); | |
} | |
match(e) { | |
let t = this.currentToken; | |
return ( | |
t.type === e | |
? (e === T.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()) | |
: ((t = this._errHandler.recoverInline(this)), this._buildParseTrees && -1 === t.tokenIndex && this._ctx.addErrorNode(this.createErrorNode(this._ctx, t))), | |
t | |
); | |
} | |
matchWildcard() { | |
let e = this.currentToken; | |
return ( | |
e.type > 0 ? (this._errHandler.reportMatch(this), this.consume()) : ((e = this._errHandler.recoverInline(this)), this._buildParseTrees && -1 === e.tokenIndex && this._ctx.addErrorNode(this.createErrorNode(this._ctx, e))), e | |
); | |
} | |
set buildParseTree(e) { | |
this._buildParseTrees = e; | |
} | |
get buildParseTree() { | |
return this._buildParseTrees; | |
} | |
getParseListeners() { | |
return this._parseListeners; | |
} | |
addParseListener(e) { | |
if (null == e) throw new TypeError("listener cannot be null"); | |
this._parseListeners.push(e); | |
} | |
removeParseListener(e) { | |
let t = this._parseListeners.findIndex((t) => t === e); | |
-1 !== t && this._parseListeners.splice(t, 1); | |
} | |
removeParseListeners() { | |
this._parseListeners.length = 0; | |
} | |
triggerEnterRuleEvent() { | |
for (let e of this._parseListeners) e.enterEveryRule && e.enterEveryRule(this._ctx), this._ctx.enterRule(e); | |
} | |
triggerExitRuleEvent() { | |
for (let e = this._parseListeners.length - 1; e >= 0; e--) { | |
let t = this._parseListeners[e]; | |
this._ctx.exitRule(t), t.exitEveryRule && t.exitEveryRule(this._ctx); | |
} | |
} | |
get numberOfSyntaxErrors() { | |
return this._syntaxErrors; | |
} | |
get tokenFactory() { | |
return this._input.tokenSource.tokenFactory; | |
} | |
getATNWithBypassAlts() { | |
let e = this.serializedATN; | |
if (null == e) throw new Error("The current parser does not support an ATN with bypass alternatives."); | |
let t = v.bypassAltsAtnCache.get(e); | |
if (null == t) { | |
let r = new a.ATNDeserializationOptions(); | |
(r.isGenerateRuleBypassTransitions = !0), (t = new l.ATNDeserializer(r).deserialize(o.toCharArray(e))), v.bypassAltsAtnCache.set(e, t); | |
} | |
return t; | |
} | |
compileParseTreePattern(e, t, n) { | |
return s(this, void 0, void 0, function* () { | |
if (!n) { | |
if (this.inputStream) { | |
let e = this.inputStream.tokenSource; | |
e instanceof p.Lexer && (n = e); | |
} | |
if (!n) throw new Error("Parser can't discover a lexer to use"); | |
} | |
let i = n; | |
return new (yield Promise.resolve().then(() => r(1293))).ParseTreePatternMatcher(i, this).compile(e, t); | |
}); | |
} | |
get errorHandler() { | |
return this._errHandler; | |
} | |
set errorHandler(e) { | |
this._errHandler = e; | |
} | |
get inputStream() { | |
return this._input; | |
} | |
set inputStream(e) { | |
this.reset(!1), (this._input = e); | |
} | |
get currentToken() { | |
return this._input.LT(1); | |
} | |
notifyErrorListeners(e, t, r) { | |
void 0 === t ? (t = this.currentToken) : null === t && (t = void 0), this._syntaxErrors++; | |
let n = -1, | |
i = -1; | |
null != t && ((n = t.line), (i = t.charPositionInLine)); | |
let s = this.getErrorListenerDispatch(); | |
s.syntaxError && s.syntaxError(this, t, n, i, e, r); | |
} | |
consume() { | |
let e = this.currentToken; | |
e.type !== v.EOF && this.inputStream.consume(); | |
let t = 0 !== this._parseListeners.length; | |
if (this._buildParseTrees || t) | |
if (this._errHandler.inErrorRecoveryMode(this)) { | |
let r = this._ctx.addErrorNode(this.createErrorNode(this._ctx, e)); | |
if (t) for (let e of this._parseListeners) e.visitErrorNode && e.visitErrorNode(r); | |
} else { | |
let r = this.createTerminalNode(this._ctx, e); | |
if ((this._ctx.addChild(r), t)) for (let e of this._parseListeners) e.visitTerminal && e.visitTerminal(r); | |
} | |
return e; | |
} | |
createTerminalNode(e, t) { | |
return new _.TerminalNode(t); | |
} | |
createErrorNode(e, t) { | |
return new u.ErrorNode(t); | |
} | |
addContextToParseTree() { | |
let e = this._ctx._parent; | |
null != e && e.addChild(this._ctx); | |
} | |
enterRule(e, t, r) { | |
(this.state = t), (this._ctx = e), (this._ctx._start = this._input.LT(1)), this._buildParseTrees && this.addContextToParseTree(), this.triggerEnterRuleEvent(); | |
} | |
enterLeftFactoredRule(e, t, r) { | |
if (((this.state = t), this._buildParseTrees)) { | |
let t = this._ctx.getChild(this._ctx.childCount - 1); | |
this._ctx.removeLastChild(), (t._parent = e), e.addChild(t); | |
} | |
(this._ctx = e), (this._ctx._start = this._input.LT(1)), this._buildParseTrees && this.addContextToParseTree(), this.triggerEnterRuleEvent(); | |
} | |
exitRule() { | |
this.matchedEOF ? (this._ctx._stop = this._input.LT(1)) : (this._ctx._stop = this._input.tryLT(-1)), this.triggerExitRuleEvent(), (this.state = this._ctx.invokingState), (this._ctx = this._ctx._parent); | |
} | |
enterOuterAlt(e, t) { | |
if (((e.altNumber = t), this._buildParseTrees && this._ctx !== e)) { | |
let t = this._ctx._parent; | |
null != t && (t.removeLastChild(), t.addChild(e)); | |
} | |
this._ctx = e; | |
} | |
get precedence() { | |
return this._precedenceStack.isEmpty ? -1 : this._precedenceStack.peek(); | |
} | |
enterRecursionRule(e, t, r, n) { | |
(this.state = t), this._precedenceStack.push(n), (this._ctx = e), (this._ctx._start = this._input.LT(1)), this.triggerEnterRuleEvent(); | |
} | |
pushNewRecursionContext(e, t, r) { | |
let n = this._ctx; | |
(n._parent = e), (n.invokingState = t), (n._stop = this._input.tryLT(-1)), (this._ctx = e), (this._ctx._start = n._start), this._buildParseTrees && this._ctx.addChild(n), this.triggerEnterRuleEvent(); | |
} | |
unrollRecursionContexts(e) { | |
this._precedenceStack.pop(), (this._ctx._stop = this._input.tryLT(-1)); | |
let t = this._ctx; | |
if (this._parseListeners.length > 0) for (; this._ctx !== e; ) this.triggerExitRuleEvent(), (this._ctx = this._ctx._parent); | |
else this._ctx = e; | |
(t._parent = e), this._buildParseTrees && null != e && e.addChild(t); | |
} | |
getInvokingContext(e) { | |
let t = this._ctx; | |
for (; t && t.ruleIndex !== e; ) t = t._parent; | |
return t; | |
} | |
get context() { | |
return this._ctx; | |
} | |
set context(e) { | |
this._ctx = e; | |
} | |
precpred(e, t) { | |
return t >= this._precedenceStack.peek(); | |
} | |
getErrorListenerDispatch() { | |
return new y.ProxyParserErrorListener(this.getErrorListeners()); | |
} | |
inContext(e) { | |
return !1; | |
} | |
isExpectedToken(e) { | |
let t = this.interpreter.atn, | |
r = this._ctx, | |
n = t.states[this.state], | |
i = t.nextTokens(n); | |
if (i.contains(e)) return !0; | |
if (!i.contains(T.Token.EPSILON)) return !1; | |
for (; null != r && r.invokingState >= 0 && i.contains(T.Token.EPSILON); ) { | |
let n = t.states[r.invokingState].transition(0); | |
if (((i = t.nextTokens(n.followState)), i.contains(e))) return !0; | |
r = r._parent; | |
} | |
return !(!i.contains(T.Token.EPSILON) || e !== T.Token.EOF); | |
} | |
get isMatchedEOF() { | |
return this.matchedEOF; | |
} | |
getExpectedTokens() { | |
return this.atn.getExpectedTokens(this.state, this.context); | |
} | |
getExpectedTokensWithinCurrentRule() { | |
let e = this.interpreter.atn, | |
t = e.states[this.state]; | |
return e.nextTokens(t); | |
} | |
getRuleIndex(e) { | |
let t = this.getRuleIndexMap().get(e); | |
return null != t ? t : -1; | |
} | |
get ruleContext() { | |
return this._ctx; | |
} | |
getRuleInvocationStack(e = this._ctx) { | |
let t = e, | |
r = this.ruleNames, | |
n = []; | |
for (; null != t; ) { | |
let e = t.ruleIndex; | |
e < 0 ? n.push("n/a") : n.push(r[e]), (t = t._parent); | |
} | |
return n; | |
} | |
getDFAStrings() { | |
let e = []; | |
for (let t of this._interp.atn.decisionToDFA) e.push(t.toString(this.vocabulary, this.ruleNames)); | |
return e; | |
} | |
dumpDFA() { | |
let e = !1; | |
for (let t of this._interp.atn.decisionToDFA) t.isEmpty || (e && console.log(), console.log("Decision " + t.decision + ":"), process.stdout.write(t.toString(this.vocabulary, this.ruleNames)), (e = !0)); | |
} | |
get sourceName() { | |
return this._input.sourceName; | |
} | |
get parseInfo() { | |
return Promise.resolve() | |
.then(() => r(2527)) | |
.then((e) => { | |
let t = this.interpreter; | |
if (t instanceof e.ProfilingATNSimulator) return new m.ParseInfo(t); | |
}); | |
} | |
setProfile(e) { | |
return s(this, void 0, void 0, function* () { | |
let t = yield Promise.resolve().then(() => r(2527)), | |
n = this.interpreter; | |
e ? n instanceof t.ProfilingATNSimulator || (this.interpreter = new t.ProfilingATNSimulator(this)) : n instanceof t.ProfilingATNSimulator && (this.interpreter = new f.ParserATNSimulator(this.atn, this)), | |
this.interpreter.setPredictionMode(n.getPredictionMode()); | |
}); | |
} | |
set isTrace(e) { | |
e | |
? (this._tracer ? this.removeParseListener(this._tracer) : (this._tracer = new x(this.ruleNames, this._input)), this.addParseListener(this._tracer)) | |
: this._tracer && (this.removeParseListener(this._tracer), (this._tracer = void 0)); | |
} | |
get isTrace() { | |
return null != this._tracer; | |
} | |
} | |
(v.bypassAltsAtnCache = new Map()), | |
n([d.NotNull], v.prototype, "_errHandler", void 0), | |
n([d.NotNull], v.prototype, "match", null), | |
n([d.NotNull], v.prototype, "matchWildcard", null), | |
n([d.NotNull], v.prototype, "getParseListeners", null), | |
n([i(0, d.NotNull)], v.prototype, "addParseListener", null), | |
n([d.NotNull], v.prototype, "getATNWithBypassAlts", null), | |
n([d.NotNull, i(0, d.NotNull)], v.prototype, "errorHandler", null), | |
n([d.Override], v.prototype, "inputStream", null), | |
n([d.NotNull], v.prototype, "currentToken", null), | |
n([i(0, d.NotNull)], v.prototype, "enterRule", null), | |
n([d.Override, i(0, d.Nullable)], v.prototype, "precpred", null), | |
n([d.Override], v.prototype, "getErrorListenerDispatch", null), | |
n([d.NotNull], v.prototype, "getExpectedTokens", null), | |
n([d.NotNull], v.prototype, "getExpectedTokensWithinCurrentRule", null), | |
n([d.Override], v.prototype, "parseInfo", null), | |
(t.Parser = v); | |
}, | |
1603: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
627: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParserInterpreter = void 0); | |
const s = r(3269), | |
o = r(4700), | |
a = r(5280), | |
l = r(2915), | |
c = r(4837), | |
u = r(4126), | |
h = r(4068), | |
p = r(8042), | |
d = r(8042), | |
m = r(2824), | |
f = r(4584), | |
y = r(3998), | |
g = r(7165), | |
_ = r(4966); | |
let T = class e extends m.Parser { | |
constructor(t, r, n, i, s) { | |
if ( | |
(super(t instanceof e ? t.inputStream : s), | |
(this._parentContextStack = []), | |
(this.overrideDecision = -1), | |
(this.overrideDecisionInputIndex = -1), | |
(this.overrideDecisionAlt = -1), | |
(this.overrideDecisionReached = !1), | |
(this._overrideDecisionRoot = void 0), | |
t instanceof e) | |
) { | |
let e = t; | |
(this._grammarFileName = e._grammarFileName), | |
(this._atn = e._atn), | |
(this.pushRecursionContextStates = e.pushRecursionContextStates), | |
(this._ruleNames = e._ruleNames), | |
(this._vocabulary = e._vocabulary), | |
(this.interpreter = new f.ParserATNSimulator(this._atn, this)); | |
} else { | |
(this._grammarFileName = t), (this._atn = i), (this._ruleNames = n.slice(0)), (this._vocabulary = r), (this.pushRecursionContextStates = new a.BitSet(i.states.length)); | |
for (let e of i.states) e instanceof g.StarLoopEntryState && e.precedenceRuleDecision && this.pushRecursionContextStates.set(e.stateNumber); | |
this.interpreter = new f.ParserATNSimulator(i, this); | |
} | |
} | |
reset(e) { | |
void 0 === e ? super.reset() : super.reset(e), (this.overrideDecisionReached = !1), (this._overrideDecisionRoot = void 0); | |
} | |
get atn() { | |
return this._atn; | |
} | |
get vocabulary() { | |
return this._vocabulary; | |
} | |
get ruleNames() { | |
return this._ruleNames; | |
} | |
get grammarFileName() { | |
return this._grammarFileName; | |
} | |
parse(e) { | |
let t = this._atn.ruleToStartState[e]; | |
for ( | |
this._rootContext = this.createInterpreterRuleContext(void 0, s.ATNState.INVALID_STATE_NUMBER, e), | |
t.isPrecedenceRule ? this.enterRecursionRule(this._rootContext, t.stateNumber, e, 0) : this.enterRule(this._rootContext, t.stateNumber, e); | |
; | |
) { | |
let e = this.atnState; | |
if (e.stateType === o.ATNStateType.RULE_STOP) { | |
if (this._ctx.isEmpty) { | |
if (t.isPrecedenceRule) { | |
let e = this._ctx, | |
t = this._parentContextStack.pop(); | |
return this.unrollRecursionContexts(t[0]), e; | |
} | |
return this.exitRule(), this._rootContext; | |
} | |
this.visitRuleStopState(e); | |
} else | |
try { | |
this.visitState(e); | |
} catch (t) { | |
if (!(t instanceof y.RecognitionException)) throw t; | |
(this.state = this._atn.ruleToStopState[e.ruleIndex].stateNumber), (this.context.exception = t), this.errorHandler.reportError(this, t), this.recover(t); | |
} | |
} | |
} | |
enterRecursionRule(e, t, r, n) { | |
this._parentContextStack.push([this._ctx, e.invokingState]), super.enterRecursionRule(e, t, r, n); | |
} | |
get atnState() { | |
return this._atn.states[this.state]; | |
} | |
visitState(e) { | |
let t = 1; | |
e.numberOfTransitions > 1 && (t = this.visitDecisionState(e)); | |
let r = e.transition(t - 1); | |
switch (r.serializationType) { | |
case 1: | |
if (this.pushRecursionContextStates.get(e.stateNumber) && !(r.target instanceof h.LoopEndState)) { | |
let t = this._parentContextStack[this._parentContextStack.length - 1], | |
r = this.createInterpreterRuleContext(t[0], t[1], this._ctx.ruleIndex); | |
this.pushNewRecursionContext(r, this._atn.ruleToStartState[e.ruleIndex].stateNumber, this._ctx.ruleIndex); | |
} | |
break; | |
case 5: | |
this.match(r._label); | |
break; | |
case 2: | |
case 7: | |
case 8: | |
r.matches(this._input.LA(1), _.Token.MIN_USER_TOKEN_TYPE, 65535) || this.recoverInline(), this.matchWildcard(); | |
break; | |
case 9: | |
this.matchWildcard(); | |
break; | |
case 3: | |
let t = r.target, | |
n = t.ruleIndex, | |
i = this.createInterpreterRuleContext(this._ctx, e.stateNumber, n); | |
t.isPrecedenceRule ? this.enterRecursionRule(i, t.stateNumber, n, r.precedence) : this.enterRule(i, r.target.stateNumber, n); | |
break; | |
case 4: | |
let s = r; | |
if (!this.sempred(this._ctx, s.ruleIndex, s.predIndex)) throw new l.FailedPredicateException(this); | |
break; | |
case 6: | |
let o = r; | |
this.action(this._ctx, o.ruleIndex, o.actionIndex); | |
break; | |
case 10: | |
if (!this.precpred(this._ctx, r.precedence)) { | |
let e = r.precedence; | |
throw new l.FailedPredicateException(this, `precpred(_ctx, ${e})`); | |
} | |
break; | |
default: | |
throw new Error("UnsupportedOperationException: Unrecognized ATN transition type."); | |
} | |
this.state = r.target.stateNumber; | |
} | |
visitDecisionState(e) { | |
let t; | |
this.errorHandler.sync(this); | |
let r = e.decision; | |
return ( | |
r !== this.overrideDecision || this._input.index !== this.overrideDecisionInputIndex || this.overrideDecisionReached | |
? (t = this.interpreter.adaptivePredict(this._input, r, this._ctx)) | |
: ((t = this.overrideDecisionAlt), (this.overrideDecisionReached = !0)), | |
t | |
); | |
} | |
createInterpreterRuleContext(e, t, r) { | |
return new u.InterpreterRuleContext(r, e, t); | |
} | |
visitRuleStopState(e) { | |
if (this._atn.ruleToStartState[e.ruleIndex].isPrecedenceRule) { | |
let e = this._parentContextStack.pop(); | |
this.unrollRecursionContexts(e[0]), (this.state = e[1]); | |
} else this.exitRule(); | |
let t = this._atn.states[this.state].transition(0); | |
this.state = t.followState.stateNumber; | |
} | |
addDecisionOverride(e, t, r) { | |
(this.overrideDecision = e), (this.overrideDecisionInputIndex = t), (this.overrideDecisionAlt = r); | |
} | |
get overrideDecisionRoot() { | |
return this._overrideDecisionRoot; | |
} | |
recover(e) { | |
let t = this._input.index; | |
if ((this.errorHandler.recover(this, e), this._input.index === t)) { | |
let t = e.getOffendingToken(); | |
if (!t) throw new Error("Expected exception to have an offending token"); | |
let r = t.tokenSource, | |
n = { source: r, stream: void 0 !== r ? r.inputStream : void 0 }; | |
if (e instanceof c.InputMismatchException) { | |
let r = e.expectedTokens; | |
if (void 0 === r) throw new Error("Expected the exception to provide expected tokens"); | |
let i = _.Token.INVALID_TYPE; | |
r.isNil || (i = r.minElement); | |
let s = this.tokenFactory.create(n, i, t.text, _.Token.DEFAULT_CHANNEL, -1, -1, t.line, t.charPositionInLine); | |
this._ctx.addErrorNode(this.createErrorNode(this._ctx, s)); | |
} else { | |
t.tokenSource; | |
let e = this.tokenFactory.create(n, _.Token.INVALID_TYPE, t.text, _.Token.DEFAULT_CHANNEL, -1, -1, t.line, t.charPositionInLine); | |
this._ctx.addErrorNode(this.createErrorNode(this._ctx, e)); | |
} | |
} | |
} | |
recoverInline() { | |
return this._errHandler.recoverInline(this); | |
} | |
get rootContext() { | |
return this._rootContext; | |
} | |
}; | |
n([p.NotNull], T.prototype, "_vocabulary", void 0), | |
n([d.Override], T.prototype, "reset", null), | |
n([d.Override], T.prototype, "atn", null), | |
n([d.Override], T.prototype, "vocabulary", null), | |
n([d.Override], T.prototype, "ruleNames", null), | |
n([d.Override], T.prototype, "grammarFileName", null), | |
n([d.Override], T.prototype, "enterRecursionRule", null), | |
(T = n([i(1, p.NotNull)], T)), | |
(t.ParserInterpreter = T); | |
}, | |
3208: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParserRuleContext = void 0); | |
const i = r(6912), | |
s = r(8813), | |
o = r(8042), | |
a = r(7423), | |
l = r(8011); | |
class c extends a.RuleContext { | |
constructor(e, t) { | |
null == t ? super() : super(e, t); | |
} | |
static emptyContext() { | |
return c.EMPTY; | |
} | |
copyFrom(e) { | |
if (((this._parent = e._parent), (this.invokingState = e.invokingState), (this._start = e._start), (this._stop = e._stop), e.children)) { | |
this.children = []; | |
for (let t of e.children) t instanceof i.ErrorNode && this.addChild(t); | |
} | |
} | |
enterRule(e) {} | |
exitRule(e) {} | |
addAnyChild(e) { | |
return this.children ? this.children.push(e) : (this.children = [e]), e; | |
} | |
addChild(e) { | |
return e instanceof l.TerminalNode ? (e.setParent(this), void this.addAnyChild(e)) : e instanceof a.RuleContext ? void this.addAnyChild(e) : ((e = new l.TerminalNode(e)), this.addAnyChild(e), e.setParent(this), e); | |
} | |
addErrorNode(e) { | |
if (e instanceof i.ErrorNode) { | |
const t = e; | |
return t.setParent(this), this.addAnyChild(t); | |
} | |
{ | |
const t = e; | |
let r = new i.ErrorNode(t); | |
return this.addAnyChild(r), r.setParent(this), r; | |
} | |
} | |
removeLastChild() { | |
this.children && this.children.pop(); | |
} | |
get parent() { | |
let e = super.parent; | |
if (void 0 === e || e instanceof c) return e; | |
throw new TypeError("Invalid parent type for ParserRuleContext"); | |
} | |
getChild(e, t) { | |
if (!this.children || e < 0 || e >= this.children.length) throw new RangeError("index parameter must be between >= 0 and <= number of children."); | |
if (null == t) return this.children[e]; | |
let r = this.tryGetChild(e, t); | |
if (void 0 === r) throw new Error("The specified node does not exist"); | |
return r; | |
} | |
tryGetChild(e, t) { | |
if (!this.children || e < 0 || e >= this.children.length) return; | |
let r = -1; | |
for (let n of this.children) if (n instanceof t && (r++, r === e)) return n; | |
} | |
getToken(e, t) { | |
let r = this.tryGetToken(e, t); | |
if (void 0 === r) throw new Error("The specified token does not exist"); | |
return r; | |
} | |
tryGetToken(e, t) { | |
if (!this.children || t < 0 || t >= this.children.length) return; | |
let r = -1; | |
for (let n of this.children) if (n instanceof l.TerminalNode && n.symbol.type === e && (r++, r === t)) return n; | |
} | |
getTokens(e) { | |
let t = []; | |
if (!this.children) return t; | |
for (let r of this.children) r instanceof l.TerminalNode && r.symbol.type === e && t.push(r); | |
return t; | |
} | |
get ruleContext() { | |
return this; | |
} | |
getRuleContext(e, t) { | |
return this.getChild(e, t); | |
} | |
tryGetRuleContext(e, t) { | |
return this.tryGetChild(e, t); | |
} | |
getRuleContexts(e) { | |
let t = []; | |
if (!this.children) return t; | |
for (let r of this.children) r instanceof e && t.push(r); | |
return t; | |
} | |
get childCount() { | |
return this.children ? this.children.length : 0; | |
} | |
get sourceInterval() { | |
return this._start | |
? !this._stop || this._stop.tokenIndex < this._start.tokenIndex | |
? s.Interval.of(this._start.tokenIndex, this._start.tokenIndex - 1) | |
: s.Interval.of(this._start.tokenIndex, this._stop.tokenIndex) | |
: s.Interval.INVALID; | |
} | |
get start() { | |
return this._start; | |
} | |
get stop() { | |
return this._stop; | |
} | |
toInfoString(e) { | |
return "ParserRuleContext" + e.getRuleInvocationStack(this).reverse() + "{start=" + this._start + ", stop=" + this._stop + "}"; | |
} | |
} | |
(c.EMPTY = new c()), n([o.Override], c.prototype, "parent", null), n([o.Override], c.prototype, "childCount", null), n([o.Override], c.prototype, "sourceInterval", null), (t.ParserRuleContext = c); | |
}, | |
9583: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProxyErrorListener = void 0); | |
const s = r(8042); | |
class o { | |
constructor(e) { | |
if (((this.delegates = e), !e)) throw new Error("Invalid delegates"); | |
} | |
getDelegates() { | |
return this.delegates; | |
} | |
syntaxError(e, t, r, n, i, s) { | |
this.delegates.forEach((o) => { | |
o.syntaxError && o.syntaxError(e, t, r, n, i, s); | |
}); | |
} | |
} | |
n([s.Override, i(0, s.NotNull), i(4, s.NotNull)], o.prototype, "syntaxError", null), (t.ProxyErrorListener = o); | |
}, | |
6454: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProxyParserErrorListener = void 0); | |
const i = r(9583), | |
s = r(8042); | |
class o extends i.ProxyErrorListener { | |
constructor(e) { | |
super(e); | |
} | |
reportAmbiguity(e, t, r, n, i, s, o) { | |
this.getDelegates().forEach((a) => { | |
a.reportAmbiguity && a.reportAmbiguity(e, t, r, n, i, s, o); | |
}); | |
} | |
reportAttemptingFullContext(e, t, r, n, i, s) { | |
this.getDelegates().forEach((o) => { | |
o.reportAttemptingFullContext && o.reportAttemptingFullContext(e, t, r, n, i, s); | |
}); | |
} | |
reportContextSensitivity(e, t, r, n, i, s) { | |
this.getDelegates().forEach((o) => { | |
o.reportContextSensitivity && o.reportContextSensitivity(e, t, r, n, i, s); | |
}); | |
} | |
} | |
n([s.Override], o.prototype, "reportAmbiguity", null), n([s.Override], o.prototype, "reportAttemptingFullContext", null), n([s.Override], o.prototype, "reportContextSensitivity", null), (t.ProxyParserErrorListener = o); | |
}, | |
3998: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RecognitionException = void 0); | |
class r extends Error { | |
constructor(e, t, r, n) { | |
super(n), (this._offendingState = -1), (this._recognizer = e), (this.input = t), (this.ctx = r), e && (this._offendingState = e.state); | |
} | |
get offendingState() { | |
return this._offendingState; | |
} | |
setOffendingState(e) { | |
this._offendingState = e; | |
} | |
get expectedTokens() { | |
if (this._recognizer) return this._recognizer.atn.getExpectedTokens(this._offendingState, this.ctx); | |
} | |
get context() { | |
return this.ctx; | |
} | |
get inputStream() { | |
return this.input; | |
} | |
getOffendingToken(e) { | |
if (!e || e === this._recognizer) return this.offendingToken; | |
} | |
setOffendingToken(e, t) { | |
e === this._recognizer && (this.offendingToken = t); | |
} | |
get recognizer() { | |
return this._recognizer; | |
} | |
} | |
t.RecognitionException = r; | |
}, | |
8610: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Recognizer = void 0); | |
const s = r(4525), | |
o = r(9583), | |
a = r(8042), | |
l = r(4966), | |
c = r(5103); | |
class u { | |
constructor() { | |
(this._listeners = [s.ConsoleErrorListener.INSTANCE]), (this._stateNumber = -1); | |
} | |
getTokenTypeMap() { | |
let e = this.vocabulary, | |
t = u.tokenTypeMapCache.get(e); | |
if (null == t) { | |
let r = new Map(); | |
for (let t = 0; t <= this.atn.maxTokenType; t++) { | |
let n = e.getLiteralName(t); | |
null != n && r.set(n, t); | |
let i = e.getSymbolicName(t); | |
null != i && r.set(i, t); | |
} | |
r.set("EOF", l.Token.EOF), (t = r), u.tokenTypeMapCache.set(e, t); | |
} | |
return t; | |
} | |
getRuleIndexMap() { | |
let e = this.ruleNames; | |
if (null == e) throw new Error("The current recognizer does not provide a list of rule names."); | |
let t = u.ruleIndexMapCache.get(e); | |
return null == t && ((t = c.toMap(e)), u.ruleIndexMapCache.set(e, t)), t; | |
} | |
getTokenType(e) { | |
let t = this.getTokenTypeMap().get(e); | |
return null != t ? t : l.Token.INVALID_TYPE; | |
} | |
get serializedATN() { | |
throw new Error("there is no serialized ATN"); | |
} | |
get atn() { | |
return this._interp.atn; | |
} | |
get interpreter() { | |
return this._interp; | |
} | |
set interpreter(e) { | |
this._interp = e; | |
} | |
get parseInfo() { | |
return Promise.resolve(void 0); | |
} | |
getErrorHeader(e) { | |
let t = e.getOffendingToken(); | |
return t ? "line " + t.line + ":" + t.charPositionInLine : ""; | |
} | |
addErrorListener(e) { | |
if (!e) throw new TypeError("listener must not be null"); | |
this._listeners.push(e); | |
} | |
removeErrorListener(e) { | |
let t = this._listeners.indexOf(e); | |
-1 !== t && this._listeners.splice(t, 1); | |
} | |
removeErrorListeners() { | |
this._listeners.length = 0; | |
} | |
getErrorListeners() { | |
return this._listeners.slice(0); | |
} | |
getErrorListenerDispatch() { | |
return new o.ProxyErrorListener(this.getErrorListeners()); | |
} | |
sempred(e, t, r) { | |
return !0; | |
} | |
precpred(e, t) { | |
return !0; | |
} | |
action(e, t, r) {} | |
get state() { | |
return this._stateNumber; | |
} | |
set state(e) { | |
this._stateNumber = e; | |
} | |
} | |
(u.EOF = -1), | |
(u.tokenTypeMapCache = new WeakMap()), | |
(u.ruleIndexMapCache = new WeakMap()), | |
n([a.SuppressWarnings("serial"), a.NotNull], u.prototype, "_listeners", void 0), | |
n([a.NotNull], u.prototype, "getTokenTypeMap", null), | |
n([a.NotNull], u.prototype, "getRuleIndexMap", null), | |
n([a.NotNull], u.prototype, "serializedATN", null), | |
n([a.NotNull], u.prototype, "atn", null), | |
n([a.NotNull, i(0, a.NotNull)], u.prototype, "interpreter", null), | |
n([a.NotNull, i(0, a.NotNull)], u.prototype, "getErrorHeader", null), | |
n([i(0, a.NotNull)], u.prototype, "addErrorListener", null), | |
n([i(0, a.NotNull)], u.prototype, "removeErrorListener", null), | |
n([a.NotNull], u.prototype, "getErrorListeners", null), | |
(t.Recognizer = u); | |
}, | |
7423: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleContext = void 0); | |
const i = r(7949), | |
s = r(8610), | |
o = r(3627), | |
a = r(8813), | |
l = r(8042), | |
c = r(5194), | |
u = r(3208); | |
class h extends o.RuleNode { | |
constructor(e, t) { | |
super(), (this._parent = e), (this.invokingState = null != t ? t : -1); | |
} | |
static getChildContext(e, t) { | |
return new h(e, t); | |
} | |
depth() { | |
let e = 0, | |
t = this; | |
for (; t; ) (t = t._parent), e++; | |
return e; | |
} | |
get isEmpty() { | |
return -1 === this.invokingState; | |
} | |
get sourceInterval() { | |
return a.Interval.INVALID; | |
} | |
get ruleContext() { | |
return this; | |
} | |
get parent() { | |
return this._parent; | |
} | |
setParent(e) { | |
this._parent = e; | |
} | |
get payload() { | |
return this; | |
} | |
get text() { | |
if (0 === this.childCount) return ""; | |
let e = ""; | |
for (let t = 0; t < this.childCount; t++) e += this.getChild(t).text; | |
return e.toString(); | |
} | |
get ruleIndex() { | |
return -1; | |
} | |
get altNumber() { | |
return i.ATN.INVALID_ALT_NUMBER; | |
} | |
set altNumber(e) {} | |
getChild(e) { | |
throw new RangeError("i must be greater than or equal to 0 and less than childCount"); | |
} | |
get childCount() { | |
return 0; | |
} | |
accept(e) { | |
return e.visitChildren(this); | |
} | |
toStringTree(e) { | |
return c.Trees.toStringTree(this, e); | |
} | |
toString(e, t) { | |
const r = e instanceof s.Recognizer ? e.ruleNames : e; | |
t = t || u.ParserRuleContext.emptyContext(); | |
let n = "", | |
i = this; | |
for (n += "["; i && i !== t; ) { | |
if (r) { | |
let e = i.ruleIndex; | |
n += e >= 0 && e < r.length ? r[e] : e.toString(); | |
} else i.isEmpty || (n += i.invokingState); | |
!i._parent || (!r && i._parent.isEmpty) || (n += " "), (i = i._parent); | |
} | |
return (n += "]"), n.toString(); | |
} | |
} | |
n([l.Override], h.prototype, "sourceInterval", null), | |
n([l.Override], h.prototype, "ruleContext", null), | |
n([l.Override], h.prototype, "parent", null), | |
n([l.Override], h.prototype, "setParent", null), | |
n([l.Override], h.prototype, "payload", null), | |
n([l.Override], h.prototype, "text", null), | |
n([l.Override], h.prototype, "getChild", null), | |
n([l.Override], h.prototype, "childCount", null), | |
n([l.Override], h.prototype, "accept", null), | |
n([l.Override], h.prototype, "toStringTree", null), | |
(t.RuleContext = h); | |
}, | |
6599: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleContextWithAltNum = void 0); | |
const i = r(7949), | |
s = r(8042), | |
o = r(3208); | |
class a extends o.ParserRuleContext { | |
constructor(e, t) { | |
void 0 !== t ? super(e, t) : super(), (this._altNumber = i.ATN.INVALID_ALT_NUMBER); | |
} | |
get altNumber() { | |
return this._altNumber; | |
} | |
set altNumber(e) { | |
this._altNumber = e; | |
} | |
} | |
n([s.Override], a.prototype, "altNumber", null), (t.RuleContextWithAltNum = a); | |
}, | |
3252: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.RuleDependency = void 0), | |
(t.RuleDependency = function (e) { | |
return (e, t, r) => {}; | |
}); | |
}, | |
345: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.RuleVersion = void 0), | |
(t.RuleVersion = function (e) { | |
return (e, t, r) => {}; | |
}); | |
}, | |
4966: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Token = void 0); | |
const n = r(3227); | |
var i; | |
((i = t.Token || (t.Token = {})).INVALID_TYPE = 0), (i.EPSILON = -2), (i.MIN_USER_TOKEN_TYPE = 1), (i.EOF = n.IntStream.EOF), (i.DEFAULT_CHANNEL = 0), (i.HIDDEN_CHANNEL = 1), (i.MIN_USER_CHANNEL_VALUE = 2); | |
}, | |
2362: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
9089: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
9293: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
8091: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RewriteOperation = t.TokenStreamRewriter = void 0); | |
const i = r(8813), | |
s = r(8042), | |
o = r(4966); | |
class a { | |
constructor(e) { | |
(this.tokens = e), (this.programs = new Map()), this.programs.set(a.DEFAULT_PROGRAM_NAME, []), (this.lastRewriteTokenIndexes = new Map()); | |
} | |
getTokenStream() { | |
return this.tokens; | |
} | |
rollback(e, t = a.DEFAULT_PROGRAM_NAME) { | |
let r = this.programs.get(t); | |
null != r && this.programs.set(t, r.slice(a.MIN_TOKEN_INDEX, e)); | |
} | |
deleteProgram(e = a.DEFAULT_PROGRAM_NAME) { | |
this.rollback(a.MIN_TOKEN_INDEX, e); | |
} | |
insertAfter(e, t, r = a.DEFAULT_PROGRAM_NAME) { | |
let n; | |
n = "number" == typeof e ? e : e.tokenIndex; | |
let i = this.getProgram(r), | |
s = new u(this.tokens, n, i.length, t); | |
i.push(s); | |
} | |
insertBefore(e, t, r = a.DEFAULT_PROGRAM_NAME) { | |
let n; | |
n = "number" == typeof e ? e : e.tokenIndex; | |
let i = this.getProgram(r), | |
s = new c(this.tokens, n, i.length, t); | |
i.push(s); | |
} | |
replaceSingle(e, t) { | |
this.replace(e, e, t); | |
} | |
replace(e, t, r, n = a.DEFAULT_PROGRAM_NAME) { | |
if (("number" != typeof e && (e = e.tokenIndex), "number" != typeof t && (t = t.tokenIndex), e > t || e < 0 || t < 0 || t >= this.tokens.size)) | |
throw new RangeError(`replace: range invalid: ${e}..${t}(size=${this.tokens.size})`); | |
let i = this.getProgram(n), | |
s = new h(this.tokens, e, t, i.length, r); | |
i.push(s); | |
} | |
delete(e, t, r = a.DEFAULT_PROGRAM_NAME) { | |
void 0 === t && (t = e), this.replace(e, t, "", r); | |
} | |
getLastRewriteTokenIndex(e = a.DEFAULT_PROGRAM_NAME) { | |
let t = this.lastRewriteTokenIndexes.get(e); | |
return null == t ? -1 : t; | |
} | |
setLastRewriteTokenIndex(e, t) { | |
this.lastRewriteTokenIndexes.set(e, t); | |
} | |
getProgram(e) { | |
let t = this.programs.get(e); | |
return null == t && (t = this.initializeProgram(e)), t; | |
} | |
initializeProgram(e) { | |
let t = []; | |
return this.programs.set(e, t), t; | |
} | |
getText(e, t = a.DEFAULT_PROGRAM_NAME) { | |
let r; | |
(r = e instanceof i.Interval ? e : i.Interval.of(0, this.tokens.size - 1)), "string" == typeof e && (t = e); | |
let n = this.programs.get(t), | |
s = r.a, | |
l = r.b; | |
if ((l > this.tokens.size - 1 && (l = this.tokens.size - 1), s < 0 && (s = 0), null == n || 0 === n.length)) return this.tokens.getText(r); | |
let c = [], | |
u = this.reduceToSingleOperationPerIndex(n), | |
h = s; | |
for (; h <= l && h < this.tokens.size; ) { | |
let e = u.get(h); | |
u.delete(h); | |
let t = this.tokens.get(h); | |
null == e ? (t.type !== o.Token.EOF && c.push(String(t.text)), h++) : (h = e.execute(c)); | |
} | |
if (l === this.tokens.size - 1) for (let e of u.values()) e.index >= this.tokens.size - 1 && c.push(e.text.toString()); | |
return c.join(""); | |
} | |
reduceToSingleOperationPerIndex(e) { | |
for (let t = 0; t < e.length; t++) { | |
let r = e[t]; | |
if (null == r) continue; | |
if (!(r instanceof h)) continue; | |
let n = r, | |
i = this.getKindOfOps(e, c, t); | |
for (let t of i) | |
t.index === n.index ? ((e[t.instructionIndex] = void 0), (n.text = t.text.toString() + (null != n.text ? n.text.toString() : ""))) : t.index > n.index && t.index <= n.lastIndex && (e[t.instructionIndex] = void 0); | |
let s = this.getKindOfOps(e, h, t); | |
for (let t of s) { | |
if (t.index >= n.index && t.lastIndex <= n.lastIndex) { | |
e[t.instructionIndex] = void 0; | |
continue; | |
} | |
let r = t.lastIndex < n.index || t.index > n.lastIndex; | |
if (null != t.text || null != n.text || r) { | |
if (!r) throw new Error(`replace op boundaries of ${n} overlap with previous ${t}`); | |
} else (e[t.instructionIndex] = void 0), (n.index = Math.min(t.index, n.index)), (n.lastIndex = Math.max(t.lastIndex, n.lastIndex)); | |
} | |
} | |
for (let t = 0; t < e.length; t++) { | |
let r = e[t]; | |
if (null == r) continue; | |
if (!(r instanceof c)) continue; | |
let n = r, | |
i = this.getKindOfOps(e, c, t); | |
for (let t of i) | |
t.index === n.index && (t instanceof u ? ((n.text = this.catOpText(t.text, n.text)), (e[t.instructionIndex] = void 0)) : t instanceof c && ((n.text = this.catOpText(n.text, t.text)), (e[t.instructionIndex] = void 0))); | |
let s = this.getKindOfOps(e, h, t); | |
for (let r of s) | |
if (n.index !== r.index) { | |
if (n.index >= r.index && n.index <= r.lastIndex) throw new Error(`insert op ${n} within boundaries of previous ${r}`); | |
} else (r.text = this.catOpText(n.text, r.text)), (e[t] = void 0); | |
} | |
let t = new Map(); | |
for (let r of e) | |
if (null != r) { | |
if (null != t.get(r.index)) throw new Error("should only be one op per index"); | |
t.set(r.index, r); | |
} | |
return t; | |
} | |
catOpText(e, t) { | |
let r = "", | |
n = ""; | |
return null != e && (r = e.toString()), null != t && (n = t.toString()), r + n; | |
} | |
getKindOfOps(e, t, r) { | |
let n = []; | |
for (let i = 0; i < r && i < e.length; i++) { | |
let r = e[i]; | |
null != r && r instanceof t && n.push(r); | |
} | |
return n; | |
} | |
} | |
(t.TokenStreamRewriter = a), (a.DEFAULT_PROGRAM_NAME = "default"), (a.PROGRAM_INIT_SIZE = 100), (a.MIN_TOKEN_INDEX = 0); | |
class l { | |
constructor(e, t, r, n) { | |
(this.tokens = e), (this.instructionIndex = r), (this.index = t), (this.text = void 0 === n ? "" : n); | |
} | |
execute(e) { | |
return this.index; | |
} | |
toString() { | |
let e = this.constructor.name, | |
t = e.indexOf("$"); | |
return (e = e.substring(t + 1, e.length)), "<" + e + "@" + this.tokens.get(this.index) + ':"' + this.text + '">'; | |
} | |
} | |
n([s.Override], l.prototype, "toString", null), (t.RewriteOperation = l); | |
class c extends l { | |
constructor(e, t, r, n) { | |
super(e, t, r, n); | |
} | |
execute(e) { | |
return e.push(this.text.toString()), this.tokens.get(this.index).type !== o.Token.EOF && e.push(String(this.tokens.get(this.index).text)), this.index + 1; | |
} | |
} | |
n([s.Override], c.prototype, "execute", null); | |
class u extends c { | |
constructor(e, t, r, n) { | |
super(e, t + 1, r, n); | |
} | |
} | |
class h extends l { | |
constructor(e, t, r, n, i) { | |
super(e, t, n, i), (this.lastIndex = r); | |
} | |
execute(e) { | |
return null != this.text && e.push(this.text.toString()), this.lastIndex + 1; | |
} | |
toString() { | |
return null == this.text | |
? "<DeleteOp@" + this.tokens.get(this.index) + ".." + this.tokens.get(this.lastIndex) + ">" | |
: "<ReplaceOp@" + this.tokens.get(this.index) + ".." + this.tokens.get(this.lastIndex) + ':"' + this.text + '">'; | |
} | |
} | |
n([s.Override], h.prototype, "execute", null), n([s.Override], h.prototype, "toString", null); | |
}, | |
2499: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
6763: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.VocabularyImpl = void 0); | |
const i = r(8042), | |
s = r(4966); | |
class o { | |
constructor(e, t, r) { | |
(this.literalNames = e), (this.symbolicNames = t), (this.displayNames = r), (this._maxTokenType = Math.max(this.displayNames.length, Math.max(this.literalNames.length, this.symbolicNames.length)) - 1); | |
} | |
get maxTokenType() { | |
return this._maxTokenType; | |
} | |
getLiteralName(e) { | |
if (e >= 0 && e < this.literalNames.length) return this.literalNames[e]; | |
} | |
getSymbolicName(e) { | |
return e >= 0 && e < this.symbolicNames.length ? this.symbolicNames[e] : e === s.Token.EOF ? "EOF" : void 0; | |
} | |
getDisplayName(e) { | |
if (e >= 0 && e < this.displayNames.length) { | |
let t = this.displayNames[e]; | |
if (t) return t; | |
} | |
let t = this.getLiteralName(e); | |
return t || this.getSymbolicName(e) || String(e); | |
} | |
} | |
(o.EMPTY_VOCABULARY = new o([], [], [])), | |
n([i.NotNull], o.prototype, "literalNames", void 0), | |
n([i.NotNull], o.prototype, "symbolicNames", void 0), | |
n([i.NotNull], o.prototype, "displayNames", void 0), | |
n([i.Override], o.prototype, "maxTokenType", null), | |
n([i.Override], o.prototype, "getLiteralName", null), | |
n([i.Override], o.prototype, "getSymbolicName", null), | |
n([i.Override, i.NotNull], o.prototype, "getDisplayName", null), | |
n([i.NotNull], o, "EMPTY_VOCABULARY", void 0), | |
(t.VocabularyImpl = o); | |
}, | |
4955: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }); | |
}, | |
7949: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATN = void 0); | |
const s = r(3874), | |
o = r(7055), | |
a = r(4405), | |
l = r(4834), | |
c = r(4334), | |
u = r(8042), | |
h = r(8842), | |
p = r(9767), | |
d = r(4966), | |
m = r(9491); | |
let f = class { | |
constructor(e, t) { | |
(this.states = []), | |
(this.decisionToState = []), | |
(this.modeNameToStartState = new Map()), | |
(this.modeToStartState = []), | |
(this.contextCache = new s.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE)), | |
(this.decisionToDFA = []), | |
(this.modeToDFA = []), | |
(this.LL1Table = new Map()), | |
(this.grammarType = e), | |
(this.maxTokenType = t); | |
} | |
clearDFA() { | |
this.decisionToDFA = new Array(this.decisionToState.length); | |
for (let e = 0; e < this.decisionToDFA.length; e++) this.decisionToDFA[e] = new o.DFA(this.decisionToState[e], e); | |
this.modeToDFA = new Array(this.modeToStartState.length); | |
for (let e = 0; e < this.modeToDFA.length; e++) this.modeToDFA[e] = new o.DFA(this.modeToStartState[e]); | |
this.contextCache.clear(), this.LL1Table.clear(); | |
} | |
get contextCacheSize() { | |
return this.contextCache.size; | |
} | |
getCachedContext(e) { | |
return p.PredictionContext.getCachedContext(e, this.contextCache, new p.PredictionContext.IdentityHashMap()); | |
} | |
getDecisionToDFA() { | |
return m(null != this.decisionToDFA && this.decisionToDFA.length === this.decisionToState.length), this.decisionToDFA; | |
} | |
nextTokens(e, t) { | |
return t ? new c.LL1Analyzer(this).LOOK(e, t) : (e.nextTokenWithinRule || ((e.nextTokenWithinRule = this.nextTokens(e, p.PredictionContext.EMPTY_LOCAL)), e.nextTokenWithinRule.setReadonly(!0)), e.nextTokenWithinRule); | |
} | |
addState(e) { | |
(e.atn = this), (e.stateNumber = this.states.length), this.states.push(e); | |
} | |
removeState(e) { | |
let t = new l.InvalidState(); | |
(t.atn = this), (t.stateNumber = e.stateNumber), (this.states[e.stateNumber] = t); | |
} | |
defineMode(e, t) { | |
this.modeNameToStartState.set(e, t), this.modeToStartState.push(t), this.modeToDFA.push(new o.DFA(t)), this.defineDecisionState(t); | |
} | |
defineDecisionState(e) { | |
return this.decisionToState.push(e), (e.decision = this.decisionToState.length - 1), this.decisionToDFA.push(new o.DFA(e, e.decision)), e.decision; | |
} | |
getDecisionState(e) { | |
if (this.decisionToState.length > 0) return this.decisionToState[e]; | |
} | |
get numberOfDecisions() { | |
return this.decisionToState.length; | |
} | |
getExpectedTokens(e, t) { | |
if (e < 0 || e >= this.states.length) throw new RangeError("Invalid state number."); | |
let r = t, | |
n = this.states[e], | |
i = this.nextTokens(n); | |
if (!i.contains(d.Token.EPSILON)) return i; | |
let s = new a.IntervalSet(); | |
for (s.addAll(i), s.remove(d.Token.EPSILON); null != r && r.invokingState >= 0 && i.contains(d.Token.EPSILON); ) { | |
let e = this.states[r.invokingState].transition(0); | |
(i = this.nextTokens(e.followState)), s.addAll(i), s.remove(d.Token.EPSILON), (r = r._parent); | |
} | |
return i.contains(d.Token.EPSILON) && s.add(d.Token.EOF), s; | |
} | |
}; | |
n([u.NotNull], f.prototype, "states", void 0), | |
n([u.NotNull], f.prototype, "decisionToState", void 0), | |
n([u.NotNull], f.prototype, "modeNameToStartState", void 0), | |
n([u.NotNull], f.prototype, "modeToStartState", void 0), | |
n([u.NotNull], f.prototype, "decisionToDFA", void 0), | |
n([u.NotNull], f.prototype, "modeToDFA", void 0), | |
n([u.NotNull], f.prototype, "nextTokens", null), | |
n([i(0, u.NotNull)], f.prototype, "removeState", null), | |
n([i(0, u.NotNull), i(1, u.NotNull)], f.prototype, "defineMode", null), | |
n([i(0, u.NotNull)], f.prototype, "defineDecisionState", null), | |
n([u.NotNull], f.prototype, "getExpectedTokens", null), | |
(f = n([i(0, u.NotNull)], f)), | |
(t.ATN = f), | |
(function (e) { | |
e.INVALID_ALT_NUMBER = 0; | |
})((f = t.ATN || (t.ATN = {}))), | |
(t.ATN = f); | |
}, | |
8595: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNConfig = void 0); | |
const s = r(3874), | |
o = r(213), | |
a = r(3943), | |
l = r(8042), | |
c = r(8842), | |
u = r(9767), | |
h = r(1888), | |
p = r(9491), | |
d = 2147483648; | |
let m = class e { | |
constructor(e, t, r) { | |
"number" == typeof t ? (p((16777215 & t) === t), (this._state = e), (this.altAndOuterContextDepth = t), (this._context = r)) : ((this._state = e), (this.altAndOuterContextDepth = t.altAndOuterContextDepth), (this._context = r)); | |
} | |
static create(t, r, n, i = h.SemanticContext.NONE, s) { | |
return i !== h.SemanticContext.NONE ? (null != s ? new g(s, i, t, r, n, !1) : new f(i, t, r, n)) : null != s ? new y(s, t, r, n, !1) : new e(t, r, n); | |
} | |
get state() { | |
return this._state; | |
} | |
get alt() { | |
return 16777215 & this.altAndOuterContextDepth; | |
} | |
get context() { | |
return this._context; | |
} | |
set context(e) { | |
this._context = e; | |
} | |
get reachesIntoOuterContext() { | |
return 0 !== this.outerContextDepth; | |
} | |
get outerContextDepth() { | |
return (this.altAndOuterContextDepth >>> 24) & 127; | |
} | |
set outerContextDepth(e) { | |
p(e >= 0), (e = Math.min(e, 127)), (this.altAndOuterContextDepth = (e << 24) | ((-2130706433 & this.altAndOuterContextDepth) >>> 0)); | |
} | |
get lexerActionExecutor() {} | |
get semanticContext() { | |
return h.SemanticContext.NONE; | |
} | |
get hasPassedThroughNonGreedyDecision() { | |
return !1; | |
} | |
clone() { | |
return this.transform(this.state, !1); | |
} | |
transform(e, t, r) { | |
return null == r | |
? this.transformImpl(e, this._context, this.semanticContext, t, this.lexerActionExecutor) | |
: r instanceof u.PredictionContext | |
? this.transformImpl(e, r, this.semanticContext, t, this.lexerActionExecutor) | |
: r instanceof h.SemanticContext | |
? this.transformImpl(e, this._context, r, t, this.lexerActionExecutor) | |
: this.transformImpl(e, this._context, this.semanticContext, t, r); | |
} | |
transformImpl(t, r, n, i, s) { | |
let o = i && e.checkNonGreedyDecision(this, t); | |
return n !== h.SemanticContext.NONE ? (null != s || o ? new g(s, n, t, this, r, o) : new f(n, t, this, r)) : null != s || o ? new y(s, t, this, r, o) : new e(t, this, r); | |
} | |
static checkNonGreedyDecision(e, t) { | |
return e.hasPassedThroughNonGreedyDecision || (t instanceof o.DecisionState && t.nonGreedy); | |
} | |
appendContext(e, t) { | |
if ("number" == typeof e) { | |
let r = this.context.appendSingleContext(e, t); | |
return this.transform(this.state, !1, r); | |
} | |
{ | |
let r = this.context.appendContext(e, t); | |
return this.transform(this.state, !1, r); | |
} | |
} | |
contains(e) { | |
if (this.state.stateNumber !== e.state.stateNumber || this.alt !== e.alt || !this.semanticContext.equals(e.semanticContext)) return !1; | |
let t = [], | |
r = []; | |
for (t.push(this.context), r.push(e.context); ; ) { | |
let e = t.pop(), | |
n = r.pop(); | |
if (!e || !n) break; | |
if (e === n) return !0; | |
if (e.size < n.size) return !1; | |
if (n.isEmpty) return e.hasEmpty; | |
for (let i = 0; i < n.size; i++) { | |
let s = e.findReturnState(n.getReturnState(i)); | |
if (s < 0) return !1; | |
t.push(e.getParent(s)), r.push(n.getParent(i)); | |
} | |
} | |
return !1; | |
} | |
get isPrecedenceFilterSuppressed() { | |
return 0 != (this.altAndOuterContextDepth & d); | |
} | |
set isPrecedenceFilterSuppressed(e) { | |
e ? (this.altAndOuterContextDepth |= d) : (this.altAndOuterContextDepth &= 2147483647); | |
} | |
equals(t) { | |
return ( | |
this === t || | |
(t instanceof e && | |
this.state.stateNumber === t.state.stateNumber && | |
this.alt === t.alt && | |
this.reachesIntoOuterContext === t.reachesIntoOuterContext && | |
this.context.equals(t.context) && | |
this.semanticContext.equals(t.semanticContext) && | |
this.isPrecedenceFilterSuppressed === t.isPrecedenceFilterSuppressed && | |
this.hasPassedThroughNonGreedyDecision === t.hasPassedThroughNonGreedyDecision && | |
c.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor, t.lexerActionExecutor)) | |
); | |
} | |
hashCode() { | |
let e = a.MurmurHash.initialize(7); | |
return ( | |
(e = a.MurmurHash.update(e, this.state.stateNumber)), | |
(e = a.MurmurHash.update(e, this.alt)), | |
(e = a.MurmurHash.update(e, this.reachesIntoOuterContext ? 1 : 0)), | |
(e = a.MurmurHash.update(e, this.context)), | |
(e = a.MurmurHash.update(e, this.semanticContext)), | |
(e = a.MurmurHash.update(e, this.hasPassedThroughNonGreedyDecision ? 1 : 0)), | |
(e = a.MurmurHash.update(e, this.lexerActionExecutor)), | |
(e = a.MurmurHash.finish(e, 7)), | |
e | |
); | |
} | |
toDotString() { | |
let e = ""; | |
(e += "digraph G {\n"), (e += "rankdir=LR;\n"); | |
let t = new s.Array2DHashMap(u.PredictionContext.IdentityEqualityComparator.INSTANCE), | |
r = []; | |
function n(e) { | |
let n = t.size, | |
i = t.putIfAbsent(e, n); | |
return null != i ? i : (r.push(e), n); | |
} | |
for (r.push(this.context), t.put(this.context, 0); ; ) { | |
let t = r.pop(); | |
if (!t) break; | |
for (let r = 0; r < t.size; r++) (e += " s" + n(t)), (e += "->"), (e += "s" + n(t.getParent(r))), (e += '[label="' + t.getReturnState(r) + '"];\n'); | |
} | |
return (e += "}\n"), e.toString(); | |
} | |
toString(e, t, r) { | |
null == r && (r = null != t), null == t && (t = !0); | |
let n, | |
i = ""; | |
n = r ? this.context.toStrings(e, this.state.stateNumber) : ["?"]; | |
let s = !0; | |
for (let e of n) | |
s ? (s = !1) : (i += ", "), | |
(i += "("), | |
(i += this.state), | |
t && ((i += ","), (i += this.alt)), | |
this.context && ((i += ","), (i += e)), | |
this.semanticContext !== h.SemanticContext.NONE && ((i += ","), (i += this.semanticContext)), | |
this.reachesIntoOuterContext && (i += ",up=" + this.outerContextDepth), | |
(i += ")"); | |
return i.toString(); | |
} | |
}; | |
n([l.NotNull], m.prototype, "_state", void 0), | |
n([l.NotNull], m.prototype, "_context", void 0), | |
n([l.NotNull], m.prototype, "state", null), | |
n([l.NotNull, i(0, l.NotNull)], m.prototype, "context", null), | |
n([l.NotNull], m.prototype, "semanticContext", null), | |
n([l.Override], m.prototype, "clone", null), | |
n([i(0, l.NotNull), i(2, l.NotNull)], m.prototype, "transformImpl", null), | |
n([l.Override], m.prototype, "equals", null), | |
n([l.Override], m.prototype, "hashCode", null), | |
n([i(0, l.NotNull), i(3, l.NotNull)], m, "create", null), | |
(m = n([i(0, l.NotNull), i(2, l.NotNull)], m)), | |
(t.ATNConfig = m); | |
let f = class extends m { | |
constructor(e, t, r, n) { | |
super(t, r, n), (this._semanticContext = e); | |
} | |
get semanticContext() { | |
return this._semanticContext; | |
} | |
}; | |
n([l.NotNull], f.prototype, "_semanticContext", void 0), n([l.Override], f.prototype, "semanticContext", null), (f = n([i(1, l.NotNull), i(2, l.NotNull)], f)); | |
let y = class extends m { | |
constructor(e, t, r, n, i) { | |
if ("number" == typeof r) super(t, r, n); | |
else if ((super(t, r, n), r.semanticContext !== h.SemanticContext.NONE)) throw new Error("Not supported"); | |
(this._lexerActionExecutor = e), (this.passedThroughNonGreedyDecision = i); | |
} | |
get lexerActionExecutor() { | |
return this._lexerActionExecutor; | |
} | |
get hasPassedThroughNonGreedyDecision() { | |
return this.passedThroughNonGreedyDecision; | |
} | |
}; | |
n([l.Override], y.prototype, "lexerActionExecutor", null), n([l.Override], y.prototype, "hasPassedThroughNonGreedyDecision", null), (y = n([i(1, l.NotNull), i(2, l.NotNull)], y)); | |
let g = class extends f { | |
constructor(e, t, r, n, i, s) { | |
super(t, r, n, i), (this._lexerActionExecutor = e), (this.passedThroughNonGreedyDecision = s); | |
} | |
get lexerActionExecutor() { | |
return this._lexerActionExecutor; | |
} | |
get hasPassedThroughNonGreedyDecision() { | |
return this.passedThroughNonGreedyDecision; | |
} | |
}; | |
n([l.Override], g.prototype, "lexerActionExecutor", null), n([l.Override], g.prototype, "hasPassedThroughNonGreedyDecision", null), (g = n([i(1, l.NotNull), i(2, l.NotNull)], g)); | |
}, | |
7176: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNConfigSet = void 0); | |
const i = r(3874), | |
s = r(9026), | |
o = r(5192), | |
a = r(7949), | |
l = r(8595), | |
c = r(5280), | |
u = r(8042), | |
h = r(8842), | |
p = r(9767), | |
d = r(604), | |
m = r(1888), | |
f = r(9491), | |
y = r(5103); | |
class g { | |
hashCode(e) { | |
return e.state ^ e.alt; | |
} | |
equals(e, t) { | |
return e.state === t.state && e.alt === t.alt; | |
} | |
} | |
function _(e) { | |
return e ? new i.Array2DHashMap(e) : new i.Array2DHashMap(g.INSTANCE); | |
} | |
g.INSTANCE = new g(); | |
class T { | |
constructor(e, t) { | |
(this._uniqueAlt = 0), | |
(this._hasSemanticContext = !1), | |
(this._dipsIntoOuterContext = !1), | |
(this.outermostConfigSet = !1), | |
(this.cachedHashCode = -1), | |
e | |
? (t ? ((this.mergedConfigs = void 0), (this.unmerged = void 0)) : e.isReadOnly ? ((this.mergedConfigs = _()), (this.unmerged = [])) : ((this.mergedConfigs = _(e.mergedConfigs)), (this.unmerged = e.unmerged.slice(0))), | |
(this.configs = e.configs.slice(0)), | |
(this._dipsIntoOuterContext = e._dipsIntoOuterContext), | |
(this._hasSemanticContext = e._hasSemanticContext), | |
(this.outermostConfigSet = e.outermostConfigSet), | |
(!t && e.isReadOnly) || ((this._uniqueAlt = e._uniqueAlt), (this._conflictInfo = e._conflictInfo))) | |
: ((this.mergedConfigs = _()), (this.unmerged = []), (this.configs = []), (this._uniqueAlt = a.ATN.INVALID_ALT_NUMBER)); | |
} | |
getRepresentedAlternatives() { | |
if (null != this._conflictInfo) return this._conflictInfo.conflictedAlts.clone(); | |
let e = new c.BitSet(); | |
for (let t of this) e.set(t.alt); | |
return e; | |
} | |
get isReadOnly() { | |
return null == this.mergedConfigs; | |
} | |
get isOutermostConfigSet() { | |
return this.outermostConfigSet; | |
} | |
set isOutermostConfigSet(e) { | |
if (this.outermostConfigSet && !e) throw new Error("IllegalStateException"); | |
f(!e || !this._dipsIntoOuterContext), (this.outermostConfigSet = e); | |
} | |
getStates() { | |
let e = new s.Array2DHashSet(h.ObjectEqualityComparator.INSTANCE); | |
for (let t of this.configs) e.add(t.state); | |
return e; | |
} | |
optimizeConfigs(e) { | |
if (0 !== this.configs.length) for (let t of this.configs) t.context = e.atn.getCachedContext(t.context); | |
} | |
clone(e) { | |
let t = new T(this, e); | |
return !e && this.isReadOnly && t.addAll(this.configs), t; | |
} | |
get size() { | |
return this.configs.length; | |
} | |
get isEmpty() { | |
return 0 === this.configs.length; | |
} | |
contains(e) { | |
if (!(e instanceof l.ATNConfig)) return !1; | |
if (this.mergedConfigs && this.unmerged) { | |
let t = e, | |
r = this.getKey(t), | |
n = this.mergedConfigs.get(r); | |
if (null != n && this.canMerge(t, r, n)) return n.contains(t); | |
for (let t of this.unmerged) if (t.contains(e)) return !0; | |
} else for (let t of this.configs) if (t.contains(e)) return !0; | |
return !1; | |
} | |
*[Symbol.iterator]() { | |
yield* this.configs; | |
} | |
toArray() { | |
return this.configs; | |
} | |
add(e, t) { | |
if ((this.ensureWritable(), !this.mergedConfigs || !this.unmerged)) throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation"); | |
let r; | |
f(!this.outermostConfigSet || !e.reachesIntoOuterContext), null == t && (t = d.PredictionContextCache.UNCACHED); | |
let n = this.getKey(e), | |
i = this.mergedConfigs.get(n); | |
if (((r = null == i), null != i && this.canMerge(e, n, i))) { | |
(i.outerContextDepth = Math.max(i.outerContextDepth, e.outerContextDepth)), e.isPrecedenceFilterSuppressed && (i.isPrecedenceFilterSuppressed = !0); | |
let r = p.PredictionContext.join(i.context, e.context, t); | |
return this.updatePropertiesForMergedConfig(e), i.context !== r && ((i.context = r), !0); | |
} | |
for (let i = 0; i < this.unmerged.length; i++) { | |
let s = this.unmerged[i]; | |
if (this.canMerge(e, n, s)) { | |
(s.outerContextDepth = Math.max(s.outerContextDepth, e.outerContextDepth)), e.isPrecedenceFilterSuppressed && (s.isPrecedenceFilterSuppressed = !0); | |
let o = p.PredictionContext.join(s.context, e.context, t); | |
return this.updatePropertiesForMergedConfig(e), s.context !== o && ((s.context = o), r && (this.mergedConfigs.put(n, s), this.unmerged.splice(i, 1)), !0); | |
} | |
} | |
return this.configs.push(e), r ? this.mergedConfigs.put(n, e) : this.unmerged.push(e), this.updatePropertiesForAddedConfig(e), !0; | |
} | |
updatePropertiesForMergedConfig(e) { | |
(this._dipsIntoOuterContext = this._dipsIntoOuterContext || e.reachesIntoOuterContext), f(!this.outermostConfigSet || !this._dipsIntoOuterContext); | |
} | |
updatePropertiesForAddedConfig(e) { | |
1 === this.configs.length ? (this._uniqueAlt = e.alt) : this._uniqueAlt !== e.alt && (this._uniqueAlt = a.ATN.INVALID_ALT_NUMBER), | |
(this._hasSemanticContext = this._hasSemanticContext || !m.SemanticContext.NONE.equals(e.semanticContext)), | |
(this._dipsIntoOuterContext = this._dipsIntoOuterContext || e.reachesIntoOuterContext), | |
f(!this.outermostConfigSet || !this._dipsIntoOuterContext); | |
} | |
canMerge(e, t, r) { | |
return e.state.stateNumber === r.state.stateNumber && t.alt === r.alt && e.semanticContext.equals(r.semanticContext); | |
} | |
getKey(e) { | |
return { state: e.state.stateNumber, alt: e.alt }; | |
} | |
containsAll(e) { | |
for (let t of e) { | |
if (!(t instanceof l.ATNConfig)) return !1; | |
if (!this.contains(t)) return !1; | |
} | |
return !0; | |
} | |
addAll(e, t) { | |
this.ensureWritable(); | |
let r = !1; | |
for (let n of e) this.add(n, t) && (r = !0); | |
return r; | |
} | |
clear() { | |
if ((this.ensureWritable(), !this.mergedConfigs || !this.unmerged)) throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation"); | |
this.mergedConfigs.clear(), (this.unmerged.length = 0), (this.configs.length = 0), (this._dipsIntoOuterContext = !1), (this._hasSemanticContext = !1), (this._uniqueAlt = a.ATN.INVALID_ALT_NUMBER), (this._conflictInfo = void 0); | |
} | |
equals(e) { | |
return this === e || (e instanceof T && this.outermostConfigSet === e.outermostConfigSet && y.equals(this._conflictInfo, e._conflictInfo) && o.ArrayEqualityComparator.INSTANCE.equals(this.configs, e.configs)); | |
} | |
hashCode() { | |
if (this.isReadOnly && -1 !== this.cachedHashCode) return this.cachedHashCode; | |
let e = 1; | |
return (e = (5 * e) ^ (this.outermostConfigSet ? 1 : 0)), (e = (5 * e) ^ o.ArrayEqualityComparator.INSTANCE.hashCode(this.configs)), this.isReadOnly && (this.cachedHashCode = e), e; | |
} | |
toString(e) { | |
null == e && (e = !1); | |
let t = "", | |
r = this.configs.slice(0); | |
r.sort((e, t) => (e.alt !== t.alt ? e.alt - t.alt : e.state.stateNumber !== t.state.stateNumber ? e.state.stateNumber - t.state.stateNumber : e.semanticContext.toString().localeCompare(t.semanticContext.toString()))), | |
(t += "["); | |
for (let n = 0; n < r.length; n++) n > 0 && (t += ", "), (t += r[n].toString(void 0, !0, e)); | |
return ( | |
(t += "]"), | |
this._hasSemanticContext && (t += ",hasSemanticContext=" + this._hasSemanticContext), | |
this._uniqueAlt !== a.ATN.INVALID_ALT_NUMBER && (t += ",uniqueAlt=" + this._uniqueAlt), | |
null != this._conflictInfo && ((t += ",conflictingAlts=" + this._conflictInfo.conflictedAlts), this._conflictInfo.isExact || (t += "*")), | |
this._dipsIntoOuterContext && (t += ",dipsIntoOuterContext"), | |
t.toString() | |
); | |
} | |
get uniqueAlt() { | |
return this._uniqueAlt; | |
} | |
get hasSemanticContext() { | |
return this._hasSemanticContext; | |
} | |
set hasSemanticContext(e) { | |
this.ensureWritable(), (this._hasSemanticContext = e); | |
} | |
get conflictInfo() { | |
return this._conflictInfo; | |
} | |
set conflictInfo(e) { | |
this.ensureWritable(), (this._conflictInfo = e); | |
} | |
get conflictingAlts() { | |
if (null != this._conflictInfo) return this._conflictInfo.conflictedAlts; | |
} | |
get isExactConflict() { | |
return null != this._conflictInfo && this._conflictInfo.isExact; | |
} | |
get dipsIntoOuterContext() { | |
return this._dipsIntoOuterContext; | |
} | |
get(e) { | |
return this.configs[e]; | |
} | |
ensureWritable() { | |
if (this.isReadOnly) throw new Error("This ATNConfigSet is read only."); | |
} | |
} | |
n([u.NotNull], T.prototype, "getRepresentedAlternatives", null), | |
n([u.Override], T.prototype, "size", null), | |
n([u.Override], T.prototype, "isEmpty", null), | |
n([u.Override], T.prototype, "contains", null), | |
n([u.Override], T.prototype, Symbol.iterator, null), | |
n([u.Override], T.prototype, "toArray", null), | |
n([u.Override], T.prototype, "containsAll", null), | |
n([u.Override], T.prototype, "clear", null), | |
n([u.Override], T.prototype, "equals", null), | |
n([u.Override], T.prototype, "hashCode", null), | |
(t.ATNConfigSet = T); | |
}, | |
9704: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNDeserializationOptions = void 0); | |
const i = r(8042); | |
class s { | |
constructor(e) { | |
(this.readOnly = !1), | |
e | |
? ((this.verifyATN = e.verifyATN), (this.generateRuleBypassTransitions = e.generateRuleBypassTransitions), (this.optimize = e.optimize)) | |
: ((this.verifyATN = !0), (this.generateRuleBypassTransitions = !1), (this.optimize = !0)); | |
} | |
static get defaultOptions() { | |
return null == s._defaultOptions && ((s._defaultOptions = new s()), s._defaultOptions.makeReadOnly()), s._defaultOptions; | |
} | |
get isReadOnly() { | |
return this.readOnly; | |
} | |
makeReadOnly() { | |
this.readOnly = !0; | |
} | |
get isVerifyATN() { | |
return this.verifyATN; | |
} | |
set isVerifyATN(e) { | |
this.throwIfReadOnly(), (this.verifyATN = e); | |
} | |
get isGenerateRuleBypassTransitions() { | |
return this.generateRuleBypassTransitions; | |
} | |
set isGenerateRuleBypassTransitions(e) { | |
this.throwIfReadOnly(), (this.generateRuleBypassTransitions = e); | |
} | |
get isOptimize() { | |
return this.optimize; | |
} | |
set isOptimize(e) { | |
this.throwIfReadOnly(), (this.optimize = e); | |
} | |
throwIfReadOnly() { | |
if (this.isReadOnly) throw new Error("The object is read only."); | |
} | |
} | |
n([i.NotNull], s, "defaultOptions", null), (t.ATNDeserializationOptions = s); | |
}, | |
9963: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNDeserializer = void 0); | |
const s = r(212), | |
o = r(9026), | |
a = r(7949), | |
l = r(9704), | |
c = r(4700), | |
u = r(4389), | |
h = r(9291), | |
p = r(4743), | |
d = r(5280), | |
m = r(3374), | |
f = r(4136), | |
y = r(213), | |
g = r(7055), | |
_ = r(628), | |
T = r(4405), | |
x = r(4834), | |
v = r(8363), | |
S = r(614), | |
E = r(8525), | |
O = r(4222), | |
I = r(3642), | |
N = r(9917), | |
C = r(3609), | |
A = r(5834), | |
R = r(4068), | |
P = r(8042), | |
b = r(3973), | |
L = r(4584), | |
w = r(4604), | |
D = r(8080), | |
k = r(4649), | |
F = r(3233), | |
M = r(2751), | |
U = r(6557), | |
B = r(5337), | |
j = r(4704), | |
G = r(6765), | |
H = r(1069), | |
z = r(8303), | |
V = r(7165), | |
q = r(4966), | |
W = r(5223), | |
Q = r(4117), | |
K = r(8844); | |
var Y; | |
!(function (e) { | |
(e[(e.UNICODE_BMP = 0)] = "UNICODE_BMP"), (e[(e.UNICODE_SMP = 1)] = "UNICODE_SMP"); | |
})(Y || (Y = {})); | |
class $ { | |
constructor(e) { | |
void 0 === e && (e = l.ATNDeserializationOptions.defaultOptions), (this.deserializationOptions = e); | |
} | |
static get SERIALIZED_VERSION() { | |
return 3; | |
} | |
static isFeatureSupported(e, t) { | |
let r = $.SUPPORTED_UUIDS.findIndex((t) => t.equals(e)); | |
return !(r < 0) && $.SUPPORTED_UUIDS.findIndex((e) => e.equals(t)) >= r; | |
} | |
static getUnicodeDeserializer(e) { | |
return 0 === e ? { readUnicode: (e, t) => $.toInt(e[t]), size: 1 } : { readUnicode: (e, t) => $.toInt32(e, t), size: 2 }; | |
} | |
deserialize(e) { | |
e = e.slice(0); | |
for (let t = 1; t < e.length; t++) e[t] = (e[t] - 2) & 65535; | |
let t = 0, | |
r = $.toInt(e[t++]); | |
if (r !== $.SERIALIZED_VERSION) { | |
let e = `Could not deserialize ATN with version ${r} (expected ${$.SERIALIZED_VERSION}).`; | |
throw new Error(e); | |
} | |
let n = $.toUUID(e, t); | |
if (((t += 8), $.SUPPORTED_UUIDS.findIndex((e) => e.equals(n)) < 0)) { | |
let e = `Could not deserialize ATN with UUID ${n} (expected ${$.SERIALIZED_UUID} or a legacy UUID).`; | |
throw new Error(e); | |
} | |
let i = $.isFeatureSupported($.ADDED_LEXER_ACTIONS, n), | |
l = $.toInt(e[t++]), | |
d = $.toInt(e[t++]), | |
y = new a.ATN(l, d), | |
T = [], | |
v = [], | |
E = $.toInt(e[t++]); | |
for (let r = 0; r < E; r++) { | |
let r = $.toInt(e[t++]); | |
if (r === c.ATNStateType.INVALID_TYPE) { | |
y.addState(new x.InvalidState()); | |
continue; | |
} | |
let n = $.toInt(e[t++]); | |
65535 === n && (n = -1); | |
let i = this.stateFactory(r, n); | |
if (r === c.ATNStateType.LOOP_END) { | |
let r = $.toInt(e[t++]); | |
T.push([i, r]); | |
} else if (i instanceof f.BlockStartState) { | |
let r = $.toInt(e[t++]); | |
v.push([i, r]); | |
} | |
y.addState(i); | |
} | |
for (let e of T) e[0].loopBackState = y.states[e[1]]; | |
for (let e of v) e[0].endState = y.states[e[1]]; | |
let O = $.toInt(e[t++]); | |
for (let r = 0; r < O; r++) { | |
let r = $.toInt(e[t++]); | |
y.states[r].nonGreedy = !0; | |
} | |
let I = $.toInt(e[t++]); | |
for (let r = 0; r < I; r++) { | |
let r = $.toInt(e[t++]); | |
y.states[r].sll = !0; | |
} | |
let N = $.toInt(e[t++]); | |
for (let r = 0; r < N; r++) { | |
let r = $.toInt(e[t++]); | |
y.states[r].isPrecedenceRule = !0; | |
} | |
let C = $.toInt(e[t++]); | |
0 === y.grammarType && (y.ruleToTokenType = new Int32Array(C)), (y.ruleToStartState = new Array(C)); | |
for (let r = 0; r < C; r++) { | |
let i = $.toInt(e[t++]), | |
s = y.states[i]; | |
if (((s.leftFactored = 0 !== $.toInt(e[t++])), (y.ruleToStartState[r] = s), 0 === y.grammarType)) { | |
let i = $.toInt(e[t++]); | |
if ((65535 === i && (i = q.Token.EOF), (y.ruleToTokenType[r] = i), !$.isFeatureSupported($.ADDED_LEXER_ACTIONS, n))) { | |
let r = $.toInt(e[t++]); | |
65535 === r && (r = -1); | |
} | |
} | |
} | |
y.ruleToStopState = new Array(C); | |
for (let e of y.states) e instanceof B.RuleStopState && ((y.ruleToStopState[e.ruleIndex] = e), (y.ruleToStartState[e.ruleIndex].stopState = e)); | |
let A = $.toInt(e[t++]); | |
for (let r = 0; r < A; r++) { | |
let r = $.toInt(e[t++]); | |
y.modeToStartState.push(y.states[r]); | |
} | |
y.modeToDFA = new Array(A); | |
for (let e = 0; e < A; e++) y.modeToDFA[e] = new g.DFA(y.modeToStartState[e]); | |
let P = []; | |
(t = this.deserializeSets(e, t, P, $.getUnicodeDeserializer(0))), $.isFeatureSupported($.ADDED_UNICODE_SMP, n) && (t = this.deserializeSets(e, t, P, $.getUnicodeDeserializer(1))); | |
let b = $.toInt(e[t++]); | |
for (let r = 0; r < b; r++) { | |
let r = $.toInt(e[t]), | |
n = $.toInt(e[t + 1]), | |
i = $.toInt(e[t + 2]), | |
s = $.toInt(e[t + 3]), | |
o = $.toInt(e[t + 4]), | |
a = $.toInt(e[t + 5]), | |
l = this.edgeFactory(y, i, r, n, s, o, a, P); | |
y.states[r].addTransition(l), (t += 6); | |
} | |
let L = new o.Array2DHashSet({ | |
hashCode: (e) => e.stopState ^ e.returnState ^ e.outermostPrecedenceReturn, | |
equals: (e, t) => e.stopState === t.stopState && e.returnState === t.returnState && e.outermostPrecedenceReturn === t.outermostPrecedenceReturn, | |
}), | |
k = []; | |
for (let e of y.states) { | |
let t = e.ruleIndex >= 0 && y.ruleToStartState[e.ruleIndex].leftFactored; | |
for (let r = 0; r < e.numberOfTransitions; r++) { | |
let n = e.transition(r); | |
if (!(n instanceof j.RuleTransition)) continue; | |
let i = n; | |
if (!y.ruleToStartState[i.target.ruleIndex].leftFactored && t) continue; | |
let s = -1; | |
y.ruleToStartState[i.target.ruleIndex].isPrecedenceRule && 0 === i.precedence && (s = i.target.ruleIndex); | |
let o = { stopState: i.target.ruleIndex, returnState: i.followState.stateNumber, outermostPrecedenceReturn: s }; | |
L.add(o) && k.push(o); | |
} | |
} | |
for (let e of k) { | |
let t = new _.EpsilonTransition(y.states[e.returnState], e.outermostPrecedenceReturn); | |
y.ruleToStopState[e.stopState].addTransition(t); | |
} | |
for (let e of y.states) { | |
if (e instanceof f.BlockStartState) { | |
if (void 0 === e.endState) throw new Error("IllegalStateException"); | |
if (void 0 !== e.endState.startState) throw new Error("IllegalStateException"); | |
e.endState.startState = e; | |
} | |
if (e instanceof D.PlusLoopbackState) { | |
let t = e; | |
for (let e = 0; e < t.numberOfTransitions; e++) { | |
let r = t.transition(e).target; | |
r instanceof w.PlusBlockStartState && (r.loopBackState = t); | |
} | |
} else if (e instanceof z.StarLoopbackState) { | |
let t = e; | |
for (let e = 0; e < t.numberOfTransitions; e++) { | |
let r = t.transition(e).target; | |
r instanceof V.StarLoopEntryState && (r.loopBackState = t); | |
} | |
} | |
} | |
let F = $.toInt(e[t++]); | |
for (let r = 1; r <= F; r++) { | |
let n = $.toInt(e[t++]), | |
i = y.states[n]; | |
y.decisionToState.push(i), (i.decision = r - 1); | |
} | |
if (0 === y.grammarType) | |
if (i) { | |
y.lexerActions = new Array($.toInt(e[t++])); | |
for (let r = 0; r < y.lexerActions.length; r++) { | |
let n = $.toInt(e[t++]), | |
i = $.toInt(e[t++]); | |
65535 === i && (i = -1); | |
let s = $.toInt(e[t++]); | |
65535 === s && (s = -1); | |
let o = this.lexerActionFactory(n, i, s); | |
y.lexerActions[r] = o; | |
} | |
} else { | |
let e = []; | |
for (let t of y.states) | |
for (let r = 0; r < t.numberOfTransitions; r++) { | |
let n = t.transition(r); | |
if (!(n instanceof s.ActionTransition)) continue; | |
let i = n.ruleIndex, | |
o = n.actionIndex, | |
a = new S.LexerCustomAction(i, o); | |
t.setTransition(r, new s.ActionTransition(n.target, i, e.length, !1)), e.push(a); | |
} | |
y.lexerActions = e; | |
} | |
this.markPrecedenceDecisions(y), (y.decisionToDFA = new Array(F)); | |
for (let e = 0; e < F; e++) y.decisionToDFA[e] = new g.DFA(y.decisionToState[e], e); | |
if ((this.deserializationOptions.isVerifyATN && this.verifyATN(y), this.deserializationOptions.isGenerateRuleBypassTransitions && 1 === y.grammarType)) { | |
y.ruleToTokenType = new Int32Array(y.ruleToStartState.length); | |
for (let e = 0; e < y.ruleToStartState.length; e++) y.ruleToTokenType[e] = y.maxTokenType + e + 1; | |
for (let e = 0; e < y.ruleToStartState.length; e++) { | |
let t = new h.BasicBlockStartState(); | |
(t.ruleIndex = e), y.addState(t); | |
let r, | |
n, | |
i = new m.BlockEndState(); | |
if (((i.ruleIndex = e), y.addState(i), (t.endState = i), y.defineDecisionState(t), (i.startState = t), y.ruleToStartState[e].isPrecedenceRule)) { | |
r = void 0; | |
for (let t of y.states) { | |
if (t.ruleIndex !== e) continue; | |
if (!(t instanceof V.StarLoopEntryState)) continue; | |
let n = t.transition(t.numberOfTransitions - 1).target; | |
if (n instanceof R.LoopEndState && n.epsilonOnlyTransitions && n.transition(0).target instanceof B.RuleStopState) { | |
r = t; | |
break; | |
} | |
} | |
if (!r) throw new Error("Couldn't identify final state of the precedence rule prefix section."); | |
n = r.loopBackState.transition(0); | |
} else r = y.ruleToStopState[e]; | |
for (let e of y.states) | |
for (let t = 0; t < e.numberOfTransitions; t++) { | |
let s = e.transition(t); | |
s !== n && s.target === r && (s.target = i); | |
} | |
for (; y.ruleToStartState[e].numberOfTransitions > 0; ) { | |
let r = y.ruleToStartState[e].removeTransition(y.ruleToStartState[e].numberOfTransitions - 1); | |
t.addTransition(r); | |
} | |
y.ruleToStartState[e].addTransition(new _.EpsilonTransition(t)), i.addTransition(new _.EpsilonTransition(r)); | |
let s = new p.BasicState(); | |
y.addState(s), s.addTransition(new u.AtomTransition(i, y.ruleToTokenType[e])), t.addTransition(new _.EpsilonTransition(s)); | |
} | |
this.deserializationOptions.isVerifyATN && this.verifyATN(y); | |
} | |
if (this.deserializationOptions.isOptimize) { | |
for (;;) { | |
let e = 0; | |
(e += $.inlineSetRules(y)), (e += $.combineChainedEpsilons(y)); | |
let t = 0 === y.grammarType; | |
if (((e += $.optimizeSets(y, t)), 0 === e)) break; | |
} | |
this.deserializationOptions.isVerifyATN && this.verifyATN(y); | |
} | |
return $.identifyTailCalls(y), y; | |
} | |
deserializeSets(e, t, r, n) { | |
let i = $.toInt(e[t++]); | |
for (let s = 0; s < i; s++) { | |
let i = $.toInt(e[t]); | |
t++; | |
let s = new T.IntervalSet(); | |
r.push(s), 0 !== $.toInt(e[t++]) && s.add(-1); | |
for (let r = 0; r < i; r++) { | |
let r = n.readUnicode(e, t); | |
t += n.size; | |
let i = n.readUnicode(e, t); | |
(t += n.size), s.add(r, i); | |
} | |
} | |
return t; | |
} | |
markPrecedenceDecisions(e) { | |
let t = new Map(); | |
for (let r of e.states) | |
if (r instanceof V.StarLoopEntryState && e.ruleToStartState[r.ruleIndex].isPrecedenceRule) { | |
let n = r.transition(r.numberOfTransitions - 1).target; | |
n instanceof R.LoopEndState && | |
n.epsilonOnlyTransitions && | |
n.transition(0).target instanceof B.RuleStopState && | |
(t.set(r.ruleIndex, r), (r.precedenceRuleDecision = !0), (r.precedenceLoopbackStates = new d.BitSet(e.states.length))); | |
} | |
for (let r of t) for (let t of e.ruleToStopState[r[0]].getTransitions()) 1 === t.serializationType && -1 === t.outermostPrecedenceReturn && r[1].precedenceLoopbackStates.set(t.target.stateNumber); | |
} | |
verifyATN(e) { | |
for (let t of e.states) | |
if ((this.checkCondition(void 0 !== t, "ATN states should not be undefined."), t.stateType !== c.ATNStateType.INVALID_TYPE)) { | |
if ((this.checkCondition(t.onlyHasEpsilonTransitions || t.numberOfTransitions <= 1), t instanceof w.PlusBlockStartState && this.checkCondition(void 0 !== t.loopBackState), t instanceof V.StarLoopEntryState)) { | |
let e = t; | |
if ((this.checkCondition(void 0 !== e.loopBackState), this.checkCondition(2 === e.numberOfTransitions), e.transition(0).target instanceof H.StarBlockStartState)) | |
this.checkCondition(e.transition(1).target instanceof R.LoopEndState), this.checkCondition(!e.nonGreedy); | |
else { | |
if (!(e.transition(0).target instanceof R.LoopEndState)) throw new Error("IllegalStateException"); | |
this.checkCondition(e.transition(1).target instanceof H.StarBlockStartState), this.checkCondition(e.nonGreedy); | |
} | |
} | |
if ( | |
(t instanceof z.StarLoopbackState && (this.checkCondition(1 === t.numberOfTransitions), this.checkCondition(t.transition(0).target instanceof V.StarLoopEntryState)), | |
t instanceof R.LoopEndState && this.checkCondition(void 0 !== t.loopBackState), | |
t instanceof U.RuleStartState && this.checkCondition(void 0 !== t.stopState), | |
t instanceof f.BlockStartState && this.checkCondition(void 0 !== t.endState), | |
t instanceof m.BlockEndState && this.checkCondition(void 0 !== t.startState), | |
t instanceof y.DecisionState) | |
) { | |
let e = t; | |
this.checkCondition(e.numberOfTransitions <= 1 || e.decision >= 0); | |
} else this.checkCondition(t.numberOfTransitions <= 1 || t instanceof B.RuleStopState); | |
} | |
} | |
checkCondition(e, t) { | |
if (!e) throw new Error("IllegalStateException: " + t); | |
} | |
static inlineSetRules(e) { | |
let t = 0, | |
r = new Array(e.ruleToStartState.length); | |
for (let t = 0; t < e.ruleToStartState.length; t++) { | |
let n = e.ruleToStartState[t]; | |
for (; n.onlyHasEpsilonTransitions && 1 === n.numberOfOptimizedTransitions && 1 === n.getOptimizedTransition(0).serializationType; ) n = n.getOptimizedTransition(0).target; | |
if (1 !== n.numberOfOptimizedTransitions) continue; | |
let i = n.getOptimizedTransition(0), | |
s = i.target; | |
if (!i.isEpsilon && s.onlyHasEpsilonTransitions && 1 === s.numberOfOptimizedTransitions && s.getOptimizedTransition(0).target instanceof B.RuleStopState) | |
switch (i.serializationType) { | |
case 5: | |
case 2: | |
case 7: | |
r[t] = i; | |
break; | |
default: | |
continue; | |
} | |
} | |
for (let n of e.states) { | |
if (n.ruleIndex < 0) continue; | |
let i; | |
for (let s = 0; s < n.numberOfOptimizedTransitions; s++) { | |
let o = n.getOptimizedTransition(s); | |
if (!(o instanceof j.RuleTransition)) { | |
void 0 !== i && i.push(o); | |
continue; | |
} | |
let a = o, | |
l = r[a.target.ruleIndex]; | |
if (void 0 === l) { | |
void 0 !== i && i.push(o); | |
continue; | |
} | |
if (void 0 === i) { | |
i = []; | |
for (let e = 0; e < s; e++) i.push(n.getOptimizedTransition(s)); | |
} | |
t++; | |
let c = a.followState, | |
h = new p.BasicState(); | |
switch ((h.setRuleIndex(c.ruleIndex), e.addState(h), i.push(new _.EpsilonTransition(h)), l.serializationType)) { | |
case 5: | |
h.addTransition(new u.AtomTransition(c, l._label)); | |
break; | |
case 2: | |
h.addTransition(new M.RangeTransition(c, l.from, l.to)); | |
break; | |
case 7: | |
h.addTransition(new G.SetTransition(c, l.label)); | |
break; | |
default: | |
throw new Error("UnsupportedOperationException"); | |
} | |
} | |
if (void 0 !== i) { | |
if (n.isOptimized) for (; n.numberOfOptimizedTransitions > 0; ) n.removeOptimizedTransition(n.numberOfOptimizedTransitions - 1); | |
for (let e of i) n.addOptimizedTransition(e); | |
} | |
} | |
return L.ParserATNSimulator.debug && console.log("ATN runtime optimizer removed " + t + " rule invocations by inlining sets."), t; | |
} | |
static combineChainedEpsilons(e) { | |
let t = 0; | |
for (let r of e.states) { | |
if (!r.onlyHasEpsilonTransitions || r instanceof B.RuleStopState) continue; | |
let e; | |
e: for (let n = 0; n < r.numberOfOptimizedTransitions; n++) { | |
let i = r.getOptimizedTransition(n), | |
s = i.target; | |
if (1 === i.serializationType && -1 === i.outermostPrecedenceReturn && s.stateType === c.ATNStateType.BASIC && s.onlyHasEpsilonTransitions) { | |
for (let t = 0; t < s.numberOfOptimizedTransitions; t++) | |
if (1 !== s.getOptimizedTransition(t).serializationType || -1 !== s.getOptimizedTransition(t).outermostPrecedenceReturn) { | |
void 0 !== e && e.push(i); | |
continue e; | |
} | |
if ((t++, void 0 === e)) { | |
e = []; | |
for (let t = 0; t < n; t++) e.push(r.getOptimizedTransition(t)); | |
} | |
for (let t = 0; t < s.numberOfOptimizedTransitions; t++) { | |
let r = s.getOptimizedTransition(t).target; | |
e.push(new _.EpsilonTransition(r)); | |
} | |
} else void 0 !== e && e.push(i); | |
} | |
if (void 0 !== e) { | |
if (r.isOptimized) for (; r.numberOfOptimizedTransitions > 0; ) r.removeOptimizedTransition(r.numberOfOptimizedTransitions - 1); | |
for (let t of e) r.addOptimizedTransition(t); | |
} | |
} | |
return L.ParserATNSimulator.debug && console.log("ATN runtime optimizer removed " + t + " transitions by combining chained epsilon transitions."), t; | |
} | |
static optimizeSets(e, t) { | |
if (t) return 0; | |
let r = 0, | |
n = e.decisionToState; | |
for (let t of n) { | |
let n = new T.IntervalSet(); | |
for (let e = 0; e < t.numberOfOptimizedTransitions; e++) { | |
let r = t.getOptimizedTransition(e); | |
if (!(r instanceof _.EpsilonTransition)) continue; | |
if (1 !== r.target.numberOfOptimizedTransitions) continue; | |
let i = r.target.getOptimizedTransition(0); | |
i.target instanceof m.BlockEndState && (i instanceof b.NotSetTransition || ((i instanceof u.AtomTransition || i instanceof M.RangeTransition || i instanceof G.SetTransition) && n.add(e))); | |
} | |
if (n.size <= 1) continue; | |
let i = []; | |
for (let e = 0; e < t.numberOfOptimizedTransitions; e++) n.contains(e) || i.push(t.getOptimizedTransition(e)); | |
let s, | |
o = t.getOptimizedTransition(n.minElement).target.getOptimizedTransition(0).target, | |
a = new T.IntervalSet(); | |
for (let e of n.intervals) | |
for (let r = e.a; r <= e.b; r++) { | |
let e = t.getOptimizedTransition(r).target.getOptimizedTransition(0); | |
if (e instanceof b.NotSetTransition) throw new Error("Not yet implemented."); | |
a.addAll(e.label); | |
} | |
if (1 === a.intervals.length) | |
if (1 === a.size) s = new u.AtomTransition(o, a.minElement); | |
else { | |
let e = a.intervals[0]; | |
s = new M.RangeTransition(o, e.a, e.b); | |
} | |
else s = new G.SetTransition(o, a); | |
let l = new p.BasicState(); | |
if ((l.setRuleIndex(t.ruleIndex), e.addState(l), l.addTransition(s), i.push(new _.EpsilonTransition(l)), (r += t.numberOfOptimizedTransitions - i.length), t.isOptimized)) | |
for (; t.numberOfOptimizedTransitions > 0; ) t.removeOptimizedTransition(t.numberOfOptimizedTransitions - 1); | |
for (let e of i) t.addOptimizedTransition(e); | |
} | |
return L.ParserATNSimulator.debug && console.log("ATN runtime optimizer removed " + r + " paths by collapsing sets."), r; | |
} | |
static identifyTailCalls(e) { | |
for (let t of e.states) { | |
for (let r = 0; r < t.numberOfTransitions; r++) { | |
let n = t.transition(r); | |
n instanceof j.RuleTransition && ((n.tailCall = this.testTailCall(e, n, !1)), (n.optimizedTailCall = this.testTailCall(e, n, !0))); | |
} | |
if (t.isOptimized) | |
for (let r = 0; r < t.numberOfOptimizedTransitions; r++) { | |
let n = t.getOptimizedTransition(r); | |
n instanceof j.RuleTransition && ((n.tailCall = this.testTailCall(e, n, !1)), (n.optimizedTailCall = this.testTailCall(e, n, !0))); | |
} | |
} | |
} | |
static testTailCall(e, t, r) { | |
if (!r && t.tailCall) return !0; | |
if (r && t.optimizedTailCall) return !0; | |
let n = new d.BitSet(e.states.length), | |
i = []; | |
for (i.push(t.followState); ; ) { | |
let e = i.pop(); | |
if (!e) break; | |
if (n.get(e.stateNumber)) continue; | |
if (e instanceof B.RuleStopState) continue; | |
if (!e.onlyHasEpsilonTransitions) return !1; | |
let t = r ? e.numberOfOptimizedTransitions : e.numberOfTransitions; | |
for (let n = 0; n < t; n++) { | |
let t = r ? e.getOptimizedTransition(n) : e.transition(n); | |
if (1 !== t.serializationType) return !1; | |
i.push(t.target); | |
} | |
} | |
return !0; | |
} | |
static toInt(e) { | |
return e; | |
} | |
static toInt32(e, t) { | |
return (e[t] | (e[t + 1] << 16)) >>> 0; | |
} | |
static toUUID(e, t) { | |
let r = $.toInt32(e, t), | |
n = $.toInt32(e, t + 2), | |
i = $.toInt32(e, t + 4), | |
s = $.toInt32(e, t + 6); | |
return new Q.UUID(s, i, n, r); | |
} | |
edgeFactory(e, t, r, n, i, o, a, l) { | |
let c = e.states[n]; | |
switch (t) { | |
case 1: | |
return new _.EpsilonTransition(c); | |
case 2: | |
return 0 !== a ? new M.RangeTransition(c, q.Token.EOF, o) : new M.RangeTransition(c, i, o); | |
case 3: | |
return new j.RuleTransition(e.states[i], o, a, c); | |
case 4: | |
return new F.PredicateTransition(c, i, o, 0 !== a); | |
case 10: | |
return new k.PrecedencePredicateTransition(c, i); | |
case 5: | |
return 0 !== a ? new u.AtomTransition(c, q.Token.EOF) : new u.AtomTransition(c, i); | |
case 6: | |
return new s.ActionTransition(c, i, o, 0 !== a); | |
case 7: | |
return new G.SetTransition(c, l[i]); | |
case 8: | |
return new b.NotSetTransition(c, l[i]); | |
case 9: | |
return new K.WildcardTransition(c); | |
} | |
throw new Error("The specified transition type is not valid."); | |
} | |
stateFactory(e, t) { | |
let r; | |
switch (e) { | |
case c.ATNStateType.INVALID_TYPE: | |
return new x.InvalidState(); | |
case c.ATNStateType.BASIC: | |
r = new p.BasicState(); | |
break; | |
case c.ATNStateType.RULE_START: | |
r = new U.RuleStartState(); | |
break; | |
case c.ATNStateType.BLOCK_START: | |
r = new h.BasicBlockStartState(); | |
break; | |
case c.ATNStateType.PLUS_BLOCK_START: | |
r = new w.PlusBlockStartState(); | |
break; | |
case c.ATNStateType.STAR_BLOCK_START: | |
r = new H.StarBlockStartState(); | |
break; | |
case c.ATNStateType.TOKEN_START: | |
r = new W.TokensStartState(); | |
break; | |
case c.ATNStateType.RULE_STOP: | |
r = new B.RuleStopState(); | |
break; | |
case c.ATNStateType.BLOCK_END: | |
r = new m.BlockEndState(); | |
break; | |
case c.ATNStateType.STAR_LOOP_BACK: | |
r = new z.StarLoopbackState(); | |
break; | |
case c.ATNStateType.STAR_LOOP_ENTRY: | |
r = new V.StarLoopEntryState(); | |
break; | |
case c.ATNStateType.PLUS_LOOP_BACK: | |
r = new D.PlusLoopbackState(); | |
break; | |
case c.ATNStateType.LOOP_END: | |
r = new R.LoopEndState(); | |
break; | |
default: | |
throw new Error(`The specified state type ${e} is not valid.`); | |
} | |
return (r.ruleIndex = t), r; | |
} | |
lexerActionFactory(e, t, r) { | |
switch (e) { | |
case 0: | |
return new v.LexerChannelAction(t); | |
case 1: | |
return new S.LexerCustomAction(t, r); | |
case 2: | |
return new E.LexerModeAction(t); | |
case 3: | |
return O.LexerMoreAction.INSTANCE; | |
case 4: | |
return I.LexerPopModeAction.INSTANCE; | |
case 5: | |
return new N.LexerPushModeAction(t); | |
case 6: | |
return C.LexerSkipAction.INSTANCE; | |
case 7: | |
return new A.LexerTypeAction(t); | |
default: | |
throw new Error(`The specified lexer action type ${e} is not valid.`); | |
} | |
} | |
} | |
($.BASE_SERIALIZED_UUID = Q.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3")), | |
($.ADDED_LEXER_ACTIONS = Q.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D")), | |
($.ADDED_UNICODE_SMP = Q.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B")), | |
($.SUPPORTED_UUIDS = [$.BASE_SERIALIZED_UUID, $.ADDED_LEXER_ACTIONS, $.ADDED_UNICODE_SMP]), | |
($.SERIALIZED_UUID = $.ADDED_UNICODE_SMP), | |
n([P.NotNull], $.prototype, "deserializationOptions", void 0), | |
n([i(0, P.NotNull)], $.prototype, "deserialize", null), | |
n([i(0, P.NotNull)], $.prototype, "markPrecedenceDecisions", null), | |
n([P.NotNull, i(0, P.NotNull)], $.prototype, "edgeFactory", null), | |
(t.ATNDeserializer = $); | |
}, | |
7643: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNSimulator = void 0); | |
const s = r(7176), | |
o = r(1186), | |
a = r(8042), | |
l = r(9767); | |
let c = class e { | |
constructor(e) { | |
this.atn = e; | |
} | |
static get ERROR() { | |
return e._ERROR || ((e._ERROR = new o.DFAState(new s.ATNConfigSet())), (e._ERROR.stateNumber = l.PredictionContext.EMPTY_FULL_STATE_KEY)), e._ERROR; | |
} | |
clearDFA() { | |
this.atn.clearDFA(); | |
} | |
}; | |
n([a.NotNull], c.prototype, "atn", void 0), n([a.NotNull], c, "ERROR", null), (c = n([i(0, a.NotNull)], c)), (t.ATNSimulator = c), (c = t.ATNSimulator || (t.ATNSimulator = {})), (t.ATNSimulator = c); | |
}, | |
3269: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ATNState = void 0); | |
const i = r(8042); | |
class s { | |
constructor() { | |
(this.stateNumber = s.INVALID_STATE_NUMBER), (this.ruleIndex = 0), (this.epsilonOnlyTransitions = !1), (this.transitions = []), (this.optimizedTransitions = this.transitions); | |
} | |
getStateNumber() { | |
return this.stateNumber; | |
} | |
get nonStopStateNumber() { | |
return this.getStateNumber(); | |
} | |
hashCode() { | |
return this.stateNumber; | |
} | |
equals(e) { | |
return e instanceof s && this.stateNumber === e.stateNumber; | |
} | |
get isNonGreedyExitState() { | |
return !1; | |
} | |
toString() { | |
return String(this.stateNumber); | |
} | |
getTransitions() { | |
return this.transitions.slice(0); | |
} | |
get numberOfTransitions() { | |
return this.transitions.length; | |
} | |
addTransition(e, t) { | |
if (0 === this.transitions.length) this.epsilonOnlyTransitions = e.isEpsilon; | |
else if (this.epsilonOnlyTransitions !== e.isEpsilon) throw ((this.epsilonOnlyTransitions = !1), new Error("ATN state " + this.stateNumber + " has both epsilon and non-epsilon transitions.")); | |
this.transitions.splice(void 0 !== t ? t : this.transitions.length, 0, e); | |
} | |
transition(e) { | |
return this.transitions[e]; | |
} | |
setTransition(e, t) { | |
this.transitions[e] = t; | |
} | |
removeTransition(e) { | |
return this.transitions.splice(e, 1)[0]; | |
} | |
get onlyHasEpsilonTransitions() { | |
return this.epsilonOnlyTransitions; | |
} | |
setRuleIndex(e) { | |
this.ruleIndex = e; | |
} | |
get isOptimized() { | |
return this.optimizedTransitions !== this.transitions; | |
} | |
get numberOfOptimizedTransitions() { | |
return this.optimizedTransitions.length; | |
} | |
getOptimizedTransition(e) { | |
return this.optimizedTransitions[e]; | |
} | |
addOptimizedTransition(e) { | |
this.isOptimized || (this.optimizedTransitions = new Array()), this.optimizedTransitions.push(e); | |
} | |
setOptimizedTransition(e, t) { | |
if (!this.isOptimized) throw new Error("This ATNState is not optimized."); | |
this.optimizedTransitions[e] = t; | |
} | |
removeOptimizedTransition(e) { | |
if (!this.isOptimized) throw new Error("This ATNState is not optimized."); | |
this.optimizedTransitions.splice(e, 1); | |
} | |
} | |
n([i.Override], s.prototype, "hashCode", null), | |
n([i.Override], s.prototype, "equals", null), | |
n([i.Override], s.prototype, "toString", null), | |
(t.ATNState = s), | |
(function (e) { | |
e.INVALID_STATE_NUMBER = -1; | |
})((s = t.ATNState || (t.ATNState = {}))); | |
}, | |
4700: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.ATNStateType = void 0), | |
((r = t.ATNStateType || (t.ATNStateType = {}))[(r.INVALID_TYPE = 0)] = "INVALID_TYPE"), | |
(r[(r.BASIC = 1)] = "BASIC"), | |
(r[(r.RULE_START = 2)] = "RULE_START"), | |
(r[(r.BLOCK_START = 3)] = "BLOCK_START"), | |
(r[(r.PLUS_BLOCK_START = 4)] = "PLUS_BLOCK_START"), | |
(r[(r.STAR_BLOCK_START = 5)] = "STAR_BLOCK_START"), | |
(r[(r.TOKEN_START = 6)] = "TOKEN_START"), | |
(r[(r.RULE_STOP = 7)] = "RULE_STOP"), | |
(r[(r.BLOCK_END = 8)] = "BLOCK_END"), | |
(r[(r.STAR_LOOP_BACK = 9)] = "STAR_LOOP_BACK"), | |
(r[(r.STAR_LOOP_ENTRY = 10)] = "STAR_LOOP_ENTRY"), | |
(r[(r.PLUS_LOOP_BACK = 11)] = "PLUS_LOOP_BACK"), | |
(r[(r.LOOP_END = 12)] = "LOOP_END"); | |
}, | |
7520: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.AbstractPredicateTransition = void 0); | |
const n = r(312); | |
class i extends n.Transition { | |
constructor(e) { | |
super(e); | |
} | |
} | |
t.AbstractPredicateTransition = i; | |
}, | |
212: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ActionTransition = void 0); | |
const s = r(8042), | |
o = r(312); | |
let a = class extends o.Transition { | |
constructor(e, t, r = -1, n = !1) { | |
super(e), (this.ruleIndex = t), (this.actionIndex = r), (this.isCtxDependent = n); | |
} | |
get serializationType() { | |
return 6; | |
} | |
get isEpsilon() { | |
return !0; | |
} | |
matches(e, t, r) { | |
return !1; | |
} | |
toString() { | |
return "action_" + this.ruleIndex + ":" + this.actionIndex; | |
} | |
}; | |
n([s.Override], a.prototype, "serializationType", null), | |
n([s.Override], a.prototype, "isEpsilon", null), | |
n([s.Override], a.prototype, "matches", null), | |
n([s.Override], a.prototype, "toString", null), | |
(a = n([i(0, s.NotNull)], a)), | |
(t.ActionTransition = a); | |
}, | |
1305: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.AmbiguityInfo = void 0); | |
const s = r(794), | |
o = r(8042); | |
let a = class extends s.DecisionEventInfo { | |
constructor(e, t, r, n, i, s) { | |
super(e, t, n, i, s, t.useContext), (this.ambigAlts = r); | |
} | |
get ambiguousAlternatives() { | |
return this.ambigAlts; | |
} | |
}; | |
n([o.NotNull], a.prototype, "ambigAlts", void 0), n([o.NotNull], a.prototype, "ambiguousAlternatives", null), (a = n([i(1, o.NotNull), i(2, o.NotNull), i(3, o.NotNull)], a)), (t.AmbiguityInfo = a); | |
}, | |
4389: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.AtomTransition = void 0); | |
const s = r(4405), | |
o = r(8042), | |
a = r(312); | |
let l = class extends a.Transition { | |
constructor(e, t) { | |
super(e), (this._label = t); | |
} | |
get serializationType() { | |
return 5; | |
} | |
get label() { | |
return s.IntervalSet.of(this._label); | |
} | |
matches(e, t, r) { | |
return this._label === e; | |
} | |
toString() { | |
return String(this.label); | |
} | |
}; | |
n([o.Override], l.prototype, "serializationType", null), | |
n([o.Override, o.NotNull], l.prototype, "label", null), | |
n([o.Override], l.prototype, "matches", null), | |
n([o.Override, o.NotNull], l.prototype, "toString", null), | |
(l = n([i(0, o.NotNull)], l)), | |
(t.AtomTransition = l); | |
}, | |
9291: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BasicBlockStartState = void 0); | |
const i = r(4700), | |
s = r(4136), | |
o = r(8042); | |
class a extends s.BlockStartState { | |
get stateType() { | |
return i.ATNStateType.BLOCK_START; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.BasicBlockStartState = a); | |
}, | |
4743: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BasicState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
get stateType() { | |
return s.ATNStateType.BASIC; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.BasicState = a); | |
}, | |
3374: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BlockEndState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
get stateType() { | |
return s.ATNStateType.BLOCK_END; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.BlockEndState = a); | |
}, | |
4136: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BlockStartState = void 0); | |
const n = r(213); | |
class i extends n.DecisionState {} | |
t.BlockStartState = i; | |
}, | |
9619: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ConflictInfo = void 0); | |
const i = r(8042), | |
s = r(5103); | |
class o { | |
constructor(e, t) { | |
(this._conflictedAlts = e), (this.exact = t); | |
} | |
get conflictedAlts() { | |
return this._conflictedAlts; | |
} | |
get isExact() { | |
return this.exact; | |
} | |
equals(e) { | |
return e === this || (e instanceof o && this.isExact === e.isExact && s.equals(this.conflictedAlts, e.conflictedAlts)); | |
} | |
hashCode() { | |
return this.conflictedAlts.hashCode(); | |
} | |
} | |
n([i.Override], o.prototype, "equals", null), n([i.Override], o.prototype, "hashCode", null), (t.ConflictInfo = o); | |
}, | |
8862: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ContextSensitivityInfo = void 0); | |
const s = r(794), | |
o = r(8042); | |
let a = class extends s.DecisionEventInfo { | |
constructor(e, t, r, n, i) { | |
super(e, t, r, n, i, !0); | |
} | |
}; | |
(a = n([i(1, o.NotNull), i(2, o.NotNull)], a)), (t.ContextSensitivityInfo = a); | |
}, | |
794: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DecisionEventInfo = void 0); | |
const s = r(8042); | |
let o = class { | |
constructor(e, t, r, n, i, s) { | |
(this.decision = e), (this.fullCtx = s), (this.stopIndex = i), (this.input = r), (this.startIndex = n), (this.state = t); | |
} | |
}; | |
n([s.NotNull], o.prototype, "input", void 0), (o = n([i(2, s.NotNull)], o)), (t.DecisionEventInfo = o); | |
}, | |
8966: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DecisionInfo = void 0); | |
const i = r(8042); | |
class s { | |
constructor(e) { | |
(this.invocations = 0), | |
(this.timeInPrediction = 0), | |
(this.SLL_TotalLook = 0), | |
(this.SLL_MinLook = 0), | |
(this.SLL_MaxLook = 0), | |
(this.LL_TotalLook = 0), | |
(this.LL_MinLook = 0), | |
(this.LL_MaxLook = 0), | |
(this.contextSensitivities = []), | |
(this.errors = []), | |
(this.ambiguities = []), | |
(this.predicateEvals = []), | |
(this.SLL_ATNTransitions = 0), | |
(this.SLL_DFATransitions = 0), | |
(this.LL_Fallback = 0), | |
(this.LL_ATNTransitions = 0), | |
(this.LL_DFATransitions = 0), | |
(this.decision = e); | |
} | |
toString() { | |
return ( | |
"{decision=" + | |
this.decision + | |
", contextSensitivities=" + | |
this.contextSensitivities.length + | |
", errors=" + | |
this.errors.length + | |
", ambiguities=" + | |
this.ambiguities.length + | |
", SLL_lookahead=" + | |
this.SLL_TotalLook + | |
", SLL_ATNTransitions=" + | |
this.SLL_ATNTransitions + | |
", SLL_DFATransitions=" + | |
this.SLL_DFATransitions + | |
", LL_Fallback=" + | |
this.LL_Fallback + | |
", LL_lookahead=" + | |
this.LL_TotalLook + | |
", LL_ATNTransitions=" + | |
this.LL_ATNTransitions + | |
"}" | |
); | |
} | |
} | |
n([i.Override], s.prototype, "toString", null), (t.DecisionInfo = s); | |
}, | |
213: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DecisionState = void 0); | |
const n = r(3269); | |
class i extends n.ATNState { | |
constructor() { | |
super(...arguments), (this.decision = -1), (this.nonGreedy = !1), (this.sll = !1); | |
} | |
} | |
t.DecisionState = i; | |
}, | |
628: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.EpsilonTransition = void 0); | |
const s = r(8042), | |
o = r(312); | |
let a = class extends o.Transition { | |
constructor(e, t = -1) { | |
super(e), (this._outermostPrecedenceReturn = t); | |
} | |
get outermostPrecedenceReturn() { | |
return this._outermostPrecedenceReturn; | |
} | |
get serializationType() { | |
return 1; | |
} | |
get isEpsilon() { | |
return !0; | |
} | |
matches(e, t, r) { | |
return !1; | |
} | |
toString() { | |
return "epsilon"; | |
} | |
}; | |
n([s.Override], a.prototype, "serializationType", null), | |
n([s.Override], a.prototype, "isEpsilon", null), | |
n([s.Override], a.prototype, "matches", null), | |
n([s.Override, s.NotNull], a.prototype, "toString", null), | |
(a = n([i(0, s.NotNull)], a)), | |
(t.EpsilonTransition = a); | |
}, | |
291: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ErrorInfo = void 0); | |
const s = r(794), | |
o = r(8042); | |
let a = class extends s.DecisionEventInfo { | |
constructor(e, t, r, n, i) { | |
super(e, t, r, n, i, t.useContext); | |
} | |
}; | |
(a = n([i(1, o.NotNull), i(2, o.NotNull)], a)), (t.ErrorInfo = a); | |
}, | |
4834: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.InvalidState = void 0); | |
const i = r(4700), | |
s = r(4743), | |
o = r(8042); | |
class a extends s.BasicState { | |
get stateType() { | |
return i.ATNStateType.INVALID_TYPE; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.InvalidState = a); | |
}, | |
4334: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LL1Analyzer = void 0); | |
const s = r(7520), | |
o = r(9026), | |
a = r(8595), | |
l = r(5280), | |
c = r(4405), | |
u = r(8042), | |
h = r(3973), | |
p = r(8842), | |
d = r(9767), | |
m = r(5337), | |
f = r(4704), | |
y = r(4966), | |
g = r(8844); | |
let _ = class e { | |
constructor(e) { | |
this.atn = e; | |
} | |
getDecisionLookahead(t) { | |
if (null == t) return; | |
let r = new Array(t.numberOfTransitions); | |
for (let n = 0; n < t.numberOfTransitions; n++) { | |
let i = new c.IntervalSet(); | |
r[n] = i; | |
let s = new o.Array2DHashSet(p.ObjectEqualityComparator.INSTANCE), | |
a = !1; | |
this._LOOK(t.transition(n).target, void 0, d.PredictionContext.EMPTY_LOCAL, i, s, new l.BitSet(), a, !1), (0 === i.size || i.contains(e.HIT_PRED)) && ((i = void 0), (r[n] = i)); | |
} | |
return r; | |
} | |
LOOK(e, t, r) { | |
if (void 0 === r) { | |
if (null == e.atn) throw new Error("Illegal state"); | |
r = e.atn.ruleToStopState[e.ruleIndex]; | |
} else null === r && (r = void 0); | |
let n = new c.IntervalSet(); | |
return this._LOOK(e, r, t, n, new o.Array2DHashSet(), new l.BitSet(), !0, !0), n; | |
} | |
_LOOK(t, r, n, i, o, l, u, p) { | |
let _ = a.ATNConfig.create(t, 0, n); | |
if (!o.add(_)) return; | |
if (t === r) { | |
if (d.PredictionContext.isEmptyLocal(n)) return void i.add(y.Token.EPSILON); | |
if (n.isEmpty) return void (p && i.add(y.Token.EOF)); | |
} | |
if (t instanceof m.RuleStopState) { | |
if (n.isEmpty && !d.PredictionContext.isEmptyLocal(n)) return void (p && i.add(y.Token.EOF)); | |
let e = l.get(t.ruleIndex); | |
try { | |
l.clear(t.ruleIndex); | |
for (let e = 0; e < n.size; e++) { | |
if (n.getReturnState(e) === d.PredictionContext.EMPTY_FULL_STATE_KEY) continue; | |
let t = this.atn.states[n.getReturnState(e)]; | |
this._LOOK(t, r, n.getParent(e), i, o, l, u, p); | |
} | |
} finally { | |
e && l.set(t.ruleIndex); | |
} | |
} | |
let T = t.numberOfTransitions; | |
for (let a = 0; a < T; a++) { | |
let d = t.transition(a); | |
if (d instanceof f.RuleTransition) { | |
if (l.get(d.ruleIndex)) continue; | |
let e = n.getChild(d.followState.stateNumber); | |
try { | |
l.set(d.ruleIndex), this._LOOK(d.target, r, e, i, o, l, u, p); | |
} finally { | |
l.clear(d.ruleIndex); | |
} | |
} else if (d instanceof s.AbstractPredicateTransition) u ? this._LOOK(d.target, r, n, i, o, l, u, p) : i.add(e.HIT_PRED); | |
else if (d.isEpsilon) this._LOOK(d.target, r, n, i, o, l, u, p); | |
else if (d instanceof g.WildcardTransition) i.addAll(c.IntervalSet.of(y.Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType)); | |
else { | |
let e = d.label; | |
null != e && (d instanceof h.NotSetTransition && (e = e.complement(c.IntervalSet.of(y.Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType))), i.addAll(e)); | |
} | |
} | |
} | |
}; | |
(_.HIT_PRED = y.Token.INVALID_TYPE), | |
n([u.NotNull], _.prototype, "atn", void 0), | |
n([u.NotNull, i(0, u.NotNull), i(1, u.NotNull)], _.prototype, "LOOK", null), | |
n([i(0, u.NotNull), i(2, u.NotNull), i(3, u.NotNull), i(4, u.NotNull), i(5, u.NotNull)], _.prototype, "_LOOK", null), | |
(_ = n([i(0, u.NotNull)], _)), | |
(t.LL1Analyzer = _); | |
}, | |
2178: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerATNSimulator = void 0); | |
const s = r(1060), | |
o = r(7949), | |
a = r(8595), | |
l = r(7176), | |
c = r(7643), | |
u = r(1186), | |
h = r(8813), | |
p = r(3227), | |
d = r(9557), | |
m = r(6683), | |
f = r(5324), | |
y = r(8042), | |
g = r(3169), | |
_ = r(9767), | |
T = r(5337), | |
x = r(4966), | |
v = r(9491); | |
let S = class e extends c.ATNSimulator { | |
constructor(t, r) { | |
super(t), (this.optimize_tail_calls = !0), (this.startIndex = -1), (this._line = 1), (this._charPositionInLine = 0), (this.mode = d.Lexer.DEFAULT_MODE), (this.prevAccept = new e.SimState()), (this.recog = r); | |
} | |
copyState(e) { | |
(this._charPositionInLine = e.charPositionInLine), (this._line = e._line), (this.mode = e.mode), (this.startIndex = e.startIndex); | |
} | |
match(e, t) { | |
this.mode = t; | |
let r = e.mark(); | |
try { | |
(this.startIndex = e.index), this.prevAccept.reset(); | |
let n = this.atn.modeToDFA[t].s0; | |
return null == n ? this.matchATN(e) : this.execATN(e, n); | |
} finally { | |
e.release(r); | |
} | |
} | |
reset() { | |
this.prevAccept.reset(), (this.startIndex = -1), (this._line = 1), (this._charPositionInLine = 0), (this.mode = d.Lexer.DEFAULT_MODE); | |
} | |
matchATN(t) { | |
let r = this.atn.modeToStartState[this.mode]; | |
e.debug && console.log(`matchATN mode ${this.mode} start: ${r}`); | |
let n = this.mode, | |
i = this.computeStartState(t, r), | |
s = i.hasSemanticContext; | |
s && (i.hasSemanticContext = !1); | |
let o = this.addDFAState(i); | |
if (!s) { | |
let e = this.atn.modeToDFA[this.mode]; | |
e.s0 ? (o = e.s0) : (e.s0 = o); | |
} | |
let a = this.execATN(t, o); | |
return e.debug && console.log(`DFA after matchATN: ${this.atn.modeToDFA[n].toLexerString()}`), a; | |
} | |
execATN(t, r) { | |
e.debug && console.log(`start state closure=${r.configs}`), r.isAcceptState && this.captureSimState(this.prevAccept, t, r); | |
let n = t.LA(1), | |
i = r; | |
for (;;) { | |
e.debug && console.log(`execATN loop starting closure: ${i.configs}`); | |
let r = this.getExistingTargetState(i, n); | |
if ((null == r && (r = this.computeTargetState(t, i, n)), r === c.ATNSimulator.ERROR)) break; | |
if ((n !== p.IntStream.EOF && this.consume(t), r.isAcceptState && (this.captureSimState(this.prevAccept, t, r), n === p.IntStream.EOF))) break; | |
(n = t.LA(1)), (i = r); | |
} | |
return this.failOrAccept(this.prevAccept, t, i.configs, n); | |
} | |
getExistingTargetState(t, r) { | |
let n = t.getTarget(r); | |
return e.debug && null != n && console.log("reuse state " + t.stateNumber + " edge to " + n.stateNumber), n; | |
} | |
computeTargetState(e, t, r) { | |
let n = new g.OrderedATNConfigSet(); | |
return this.getReachableConfigSet(e, t.configs, n, r), n.isEmpty ? (n.hasSemanticContext || this.addDFAEdge(t, r, c.ATNSimulator.ERROR), c.ATNSimulator.ERROR) : this.addDFAEdge(t, r, n); | |
} | |
failOrAccept(e, t, r, n) { | |
if (null != e.dfaState) { | |
let r = e.dfaState.lexerActionExecutor; | |
return this.accept(t, r, this.startIndex, e.index, e.line, e.charPos), e.dfaState.prediction; | |
} | |
if (n === p.IntStream.EOF && t.index === this.startIndex) return x.Token.EOF; | |
throw new f.LexerNoViableAltException(this.recog, t, this.startIndex, r); | |
} | |
getReachableConfigSet(t, r, n, i) { | |
let s = o.ATN.INVALID_ALT_NUMBER; | |
for (let o of r) { | |
let r = o.alt === s; | |
if (r && o.hasPassedThroughNonGreedyDecision) continue; | |
e.debug && console.log(`testing ${this.getTokenName(i)} at ${o.toString(this.recog, !0)}`); | |
let a = o.state.numberOfOptimizedTransitions; | |
for (let e = 0; e < a; e++) { | |
let a = o.state.getOptimizedTransition(e), | |
l = this.getReachableTarget(a, i); | |
if (null != l) { | |
let e, | |
a = o.lexerActionExecutor; | |
null != a ? ((a = a.fixOffsetBeforeMatch(t.index - this.startIndex)), (e = o.transform(l, !0, a))) : (v(null == o.lexerActionExecutor), (e = o.transform(l, !0))); | |
let c = i === p.IntStream.EOF; | |
if (this.closure(t, e, n, r, !0, c)) { | |
s = o.alt; | |
break; | |
} | |
} | |
} | |
} | |
} | |
accept(t, r, n, i, s, o) { | |
e.debug && console.log(`ACTION ${r}`), t.seek(i), (this._line = s), (this._charPositionInLine = o), null != r && null != this.recog && r.execute(this.recog, t, n); | |
} | |
getReachableTarget(e, t) { | |
if (e.matches(t, d.Lexer.MIN_CHAR_VALUE, d.Lexer.MAX_CHAR_VALUE)) return e.target; | |
} | |
computeStartState(e, t) { | |
let r = _.PredictionContext.EMPTY_FULL, | |
n = new g.OrderedATNConfigSet(); | |
for (let i = 0; i < t.numberOfTransitions; i++) { | |
let s = t.transition(i).target, | |
o = a.ATNConfig.create(s, i + 1, r); | |
this.closure(e, o, n, !1, !1, !1); | |
} | |
return n; | |
} | |
closure(t, r, n, i, s, o) { | |
if ((e.debug && console.log("closure(" + r.toString(this.recog, !0) + ")"), r.state instanceof T.RuleStopState)) { | |
e.debug && (null != this.recog ? console.log(`closure at ${this.recog.ruleNames[r.state.ruleIndex]} rule stop ${r}`) : console.log(`closure at rule stop ${r}`)); | |
let a = r.context; | |
if (a.isEmpty) return n.add(r), !0; | |
a.hasEmpty && (n.add(r.transform(r.state, !0, _.PredictionContext.EMPTY_FULL)), (i = !0)); | |
for (let e = 0; e < a.size; e++) { | |
let l = a.getReturnState(e); | |
if (l === _.PredictionContext.EMPTY_FULL_STATE_KEY) continue; | |
let c = a.getParent(e), | |
u = this.atn.states[l], | |
h = r.transform(u, !1, c); | |
i = this.closure(t, h, n, i, s, o); | |
} | |
return i; | |
} | |
r.state.onlyHasEpsilonTransitions || (i && r.hasPassedThroughNonGreedyDecision) || n.add(r); | |
let a = r.state; | |
for (let e = 0; e < a.numberOfOptimizedTransitions; e++) { | |
let l = a.getOptimizedTransition(e), | |
c = this.getEpsilonTarget(t, r, l, n, s, o); | |
null != c && (i = this.closure(t, c, n, i, s, o)); | |
} | |
return i; | |
} | |
getEpsilonTarget(t, r, n, i, s, o) { | |
let a; | |
switch (n.serializationType) { | |
case 3: | |
let l = n; | |
if (this.optimize_tail_calls && l.optimizedTailCall && !r.context.hasEmpty) a = r.transform(n.target, !0); | |
else { | |
let e = r.context.getChild(l.followState.stateNumber); | |
a = r.transform(n.target, !0, e); | |
} | |
break; | |
case 10: | |
throw new Error("Precedence predicates are not supported in lexers."); | |
case 4: | |
let c = n; | |
e.debug && console.log("EVAL rule " + c.ruleIndex + ":" + c.predIndex), (i.hasSemanticContext = !0), (a = this.evaluatePredicate(t, c.ruleIndex, c.predIndex, s) ? r.transform(n.target, !0) : void 0); | |
break; | |
case 6: | |
if (r.context.hasEmpty) { | |
let e = m.LexerActionExecutor.append(r.lexerActionExecutor, this.atn.lexerActions[n.actionIndex]); | |
a = r.transform(n.target, !0, e); | |
break; | |
} | |
a = r.transform(n.target, !0); | |
break; | |
case 1: | |
a = r.transform(n.target, !0); | |
break; | |
case 5: | |
case 2: | |
case 7: | |
if (o && n.matches(p.IntStream.EOF, d.Lexer.MIN_CHAR_VALUE, d.Lexer.MAX_CHAR_VALUE)) { | |
a = r.transform(n.target, !1); | |
break; | |
} | |
a = void 0; | |
break; | |
default: | |
a = void 0; | |
} | |
return a; | |
} | |
evaluatePredicate(e, t, r, n) { | |
if (null == this.recog) return !0; | |
if (!n) return this.recog.sempred(void 0, t, r); | |
let i = this._charPositionInLine, | |
s = this._line, | |
o = e.index, | |
a = e.mark(); | |
try { | |
return this.consume(e), this.recog.sempred(void 0, t, r); | |
} finally { | |
(this._charPositionInLine = i), (this._line = s), e.seek(o), e.release(a); | |
} | |
} | |
captureSimState(e, t, r) { | |
(e.index = t.index), (e.line = this._line), (e.charPos = this._charPositionInLine), (e.dfaState = r); | |
} | |
addDFAEdge(t, r, n) { | |
if (n instanceof l.ATNConfigSet) { | |
let e = n.hasSemanticContext; | |
e && (n.hasSemanticContext = !1); | |
let i = this.addDFAState(n); | |
return e || this.addDFAEdge(t, r, i), i; | |
} | |
e.debug && console.log("EDGE " + t + " -> " + n + " upon " + String.fromCharCode(r)), null != t && t.setTarget(r, n); | |
} | |
addDFAState(e) { | |
v(!e.hasSemanticContext); | |
let t = new u.DFAState(e), | |
r = this.atn.modeToDFA[this.mode].states.get(t); | |
if (null != r) return r; | |
e.optimizeConfigs(this); | |
let n, | |
i = new u.DFAState(e.clone(!0)); | |
for (let t of e) | |
if (t.state instanceof T.RuleStopState) { | |
n = t; | |
break; | |
} | |
if (null != n) { | |
let e = this.atn.ruleToTokenType[n.state.ruleIndex], | |
t = n.lexerActionExecutor; | |
i.acceptStateInfo = new s.AcceptStateInfo(e, t); | |
} | |
return this.atn.modeToDFA[this.mode].addState(i); | |
} | |
getDFA(e) { | |
return this.atn.modeToDFA[e]; | |
} | |
getText(e) { | |
return e.getText(h.Interval.of(this.startIndex, e.index - 1)); | |
} | |
get line() { | |
return this._line; | |
} | |
set line(e) { | |
this._line = e; | |
} | |
get charPositionInLine() { | |
return this._charPositionInLine; | |
} | |
set charPositionInLine(e) { | |
this._charPositionInLine = e; | |
} | |
consume(e) { | |
e.LA(1) === "\n".charCodeAt(0) ? (this._line++, (this._charPositionInLine = 0)) : this._charPositionInLine++, e.consume(); | |
} | |
getTokenName(e) { | |
return -1 === e ? "EOF" : "'" + String.fromCharCode(e) + "'"; | |
} | |
}; | |
n([y.NotNull], S.prototype, "prevAccept", void 0), | |
n([i(0, y.NotNull)], S.prototype, "copyState", null), | |
n([i(0, y.NotNull)], S.prototype, "match", null), | |
n([y.Override], S.prototype, "reset", null), | |
n([i(0, y.NotNull)], S.prototype, "matchATN", null), | |
n([i(0, y.NotNull), i(1, y.NotNull)], S.prototype, "execATN", null), | |
n([i(0, y.NotNull)], S.prototype, "getExistingTargetState", null), | |
n([y.NotNull, i(0, y.NotNull), i(1, y.NotNull)], S.prototype, "computeTargetState", null), | |
n([i(0, y.NotNull), i(1, y.NotNull), i(2, y.NotNull)], S.prototype, "getReachableConfigSet", null), | |
n([i(0, y.NotNull)], S.prototype, "accept", null), | |
n([y.NotNull, i(0, y.NotNull), i(1, y.NotNull)], S.prototype, "computeStartState", null), | |
n([i(0, y.NotNull), i(1, y.NotNull), i(2, y.NotNull)], S.prototype, "closure", null), | |
n([i(0, y.NotNull), i(1, y.NotNull), i(2, y.NotNull), i(3, y.NotNull)], S.prototype, "getEpsilonTarget", null), | |
n([i(0, y.NotNull)], S.prototype, "evaluatePredicate", null), | |
n([i(0, y.NotNull), i(1, y.NotNull), i(2, y.NotNull)], S.prototype, "captureSimState", null), | |
n([y.NotNull, i(0, y.NotNull)], S.prototype, "addDFAState", null), | |
n([y.NotNull], S.prototype, "getDFA", null), | |
n([y.NotNull, i(0, y.NotNull)], S.prototype, "getText", null), | |
n([i(0, y.NotNull)], S.prototype, "consume", null), | |
n([y.NotNull], S.prototype, "getTokenName", null), | |
(S = n([i(0, y.NotNull)], S)), | |
(t.LexerATNSimulator = S), | |
(function (e) { | |
(e.debug = !1), | |
(e.dfa_debug = !1), | |
(e.SimState = class { | |
constructor() { | |
(this.index = -1), (this.line = 0), (this.charPos = -1); | |
} | |
reset() { | |
(this.index = -1), (this.line = 0), (this.charPos = -1), (this.dfaState = void 0); | |
} | |
}); | |
})((S = t.LexerATNSimulator || (t.LexerATNSimulator = {}))), | |
(t.LexerATNSimulator = S); | |
}, | |
6683: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerActionExecutor = void 0); | |
const s = r(5192), | |
o = r(440), | |
a = r(3943), | |
l = r(8042); | |
let c = class e { | |
constructor(e) { | |
this._lexerActions = e; | |
let t = a.MurmurHash.initialize(); | |
for (let r of e) t = a.MurmurHash.update(t, r); | |
this.cachedHashCode = a.MurmurHash.finish(t, e.length); | |
} | |
static append(t, r) { | |
if (!t) return new e([r]); | |
let n = t._lexerActions.slice(0); | |
return n.push(r), new e(n); | |
} | |
fixOffsetBeforeMatch(t) { | |
let r; | |
for (let e = 0; e < this._lexerActions.length; e++) | |
!this._lexerActions[e].isPositionDependent || this._lexerActions[e] instanceof o.LexerIndexedCustomAction || (r || (r = this._lexerActions.slice(0)), (r[e] = new o.LexerIndexedCustomAction(t, this._lexerActions[e]))); | |
return r ? new e(r) : this; | |
} | |
get lexerActions() { | |
return this._lexerActions; | |
} | |
execute(e, t, r) { | |
let n = !1, | |
i = t.index; | |
try { | |
for (let s of this._lexerActions) { | |
if (s instanceof o.LexerIndexedCustomAction) { | |
let e = s.offset; | |
t.seek(r + e), (s = s.action), (n = r + e !== i); | |
} else s.isPositionDependent && (t.seek(i), (n = !1)); | |
s.execute(e); | |
} | |
} finally { | |
n && t.seek(i); | |
} | |
} | |
hashCode() { | |
return this.cachedHashCode; | |
} | |
equals(t) { | |
return t === this || (t instanceof e && this.cachedHashCode === t.cachedHashCode && s.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions, t._lexerActions)); | |
} | |
}; | |
n([l.NotNull], c.prototype, "_lexerActions", void 0), | |
n([l.NotNull], c.prototype, "lexerActions", null), | |
n([i(0, l.NotNull)], c.prototype, "execute", null), | |
n([l.Override], c.prototype, "hashCode", null), | |
n([l.Override], c.prototype, "equals", null), | |
n([l.NotNull, i(1, l.NotNull)], c, "append", null), | |
(c = n([i(0, l.NotNull)], c)), | |
(t.LexerActionExecutor = c); | |
}, | |
8363: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerChannelAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor(e) { | |
this._channel = e; | |
} | |
get channel() { | |
return this._channel; | |
} | |
get actionType() { | |
return 0; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.channel = this._channel; | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), (e = s.MurmurHash.update(e, this._channel)), s.MurmurHash.finish(e, 2); | |
} | |
equals(e) { | |
return e === this || (e instanceof a && this._channel === e._channel); | |
} | |
toString() { | |
return `channel(${this._channel})`; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerChannelAction = a); | |
}, | |
614: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerCustomAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor(e, t) { | |
(this._ruleIndex = e), (this._actionIndex = t); | |
} | |
get ruleIndex() { | |
return this._ruleIndex; | |
} | |
get actionIndex() { | |
return this._actionIndex; | |
} | |
get actionType() { | |
return 1; | |
} | |
get isPositionDependent() { | |
return !0; | |
} | |
execute(e) { | |
e.action(void 0, this._ruleIndex, this._actionIndex); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), (e = s.MurmurHash.update(e, this._ruleIndex)), (e = s.MurmurHash.update(e, this._actionIndex)), s.MurmurHash.finish(e, 3); | |
} | |
equals(e) { | |
return e === this || (e instanceof a && this._ruleIndex === e._ruleIndex && this._actionIndex === e._actionIndex); | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
(t.LexerCustomAction = a); | |
}, | |
440: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerIndexedCustomAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
let a = class e { | |
constructor(e, t) { | |
(this._offset = e), (this._action = t); | |
} | |
get offset() { | |
return this._offset; | |
} | |
get action() { | |
return this._action; | |
} | |
get actionType() { | |
return this._action.actionType; | |
} | |
get isPositionDependent() { | |
return !0; | |
} | |
execute(e) { | |
this._action.execute(e); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this._offset)), (e = s.MurmurHash.update(e, this._action)), s.MurmurHash.finish(e, 2); | |
} | |
equals(t) { | |
return t === this || (t instanceof e && this._offset === t._offset && this._action.equals(t._action)); | |
} | |
}; | |
n([o.NotNull], a.prototype, "action", null), | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
(a = n([i(1, o.NotNull)], a)), | |
(t.LexerIndexedCustomAction = a); | |
}, | |
8525: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerModeAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor(e) { | |
this._mode = e; | |
} | |
get mode() { | |
return this._mode; | |
} | |
get actionType() { | |
return 2; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.mode(this._mode); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), (e = s.MurmurHash.update(e, this._mode)), s.MurmurHash.finish(e, 2); | |
} | |
equals(e) { | |
return e === this || (e instanceof a && this._mode === e._mode); | |
} | |
toString() { | |
return `mode(${this._mode})`; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerModeAction = a); | |
}, | |
4222: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerMoreAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor() {} | |
get actionType() { | |
return 3; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.more(); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), s.MurmurHash.finish(e, 1); | |
} | |
equals(e) { | |
return e === this; | |
} | |
toString() { | |
return "more"; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerMoreAction = a), | |
(function (e) { | |
e.INSTANCE = new e(); | |
})((a = t.LexerMoreAction || (t.LexerMoreAction = {}))); | |
}, | |
3642: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerPopModeAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor() {} | |
get actionType() { | |
return 4; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.popMode(); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), s.MurmurHash.finish(e, 1); | |
} | |
equals(e) { | |
return e === this; | |
} | |
toString() { | |
return "popMode"; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerPopModeAction = a), | |
(function (e) { | |
e.INSTANCE = new e(); | |
})((a = t.LexerPopModeAction || (t.LexerPopModeAction = {}))); | |
}, | |
9917: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerPushModeAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor(e) { | |
this._mode = e; | |
} | |
get mode() { | |
return this._mode; | |
} | |
get actionType() { | |
return 5; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.pushMode(this._mode); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), (e = s.MurmurHash.update(e, this._mode)), s.MurmurHash.finish(e, 2); | |
} | |
equals(e) { | |
return e === this || (e instanceof a && this._mode === e._mode); | |
} | |
toString() { | |
return `pushMode(${this._mode})`; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerPushModeAction = a); | |
}, | |
3609: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerSkipAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor() {} | |
get actionType() { | |
return 6; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.skip(); | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), s.MurmurHash.finish(e, 1); | |
} | |
equals(e) { | |
return e === this; | |
} | |
toString() { | |
return "skip"; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerSkipAction = a), | |
(function (e) { | |
e.INSTANCE = new e(); | |
})((a = t.LexerSkipAction || (t.LexerSkipAction = {}))); | |
}, | |
5834: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerTypeAction = void 0); | |
const s = r(3943), | |
o = r(8042); | |
class a { | |
constructor(e) { | |
this._type = e; | |
} | |
get type() { | |
return this._type; | |
} | |
get actionType() { | |
return 7; | |
} | |
get isPositionDependent() { | |
return !1; | |
} | |
execute(e) { | |
e.type = this._type; | |
} | |
hashCode() { | |
let e = s.MurmurHash.initialize(); | |
return (e = s.MurmurHash.update(e, this.actionType)), (e = s.MurmurHash.update(e, this._type)), s.MurmurHash.finish(e, 2); | |
} | |
equals(e) { | |
return e === this || (e instanceof a && this._type === e._type); | |
} | |
toString() { | |
return `type(${this._type})`; | |
} | |
} | |
n([o.Override], a.prototype, "actionType", null), | |
n([o.Override], a.prototype, "isPositionDependent", null), | |
n([o.Override, i(0, o.NotNull)], a.prototype, "execute", null), | |
n([o.Override], a.prototype, "hashCode", null), | |
n([o.Override], a.prototype, "equals", null), | |
n([o.Override], a.prototype, "toString", null), | |
(t.LexerTypeAction = a); | |
}, | |
5164: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LookaheadEventInfo = void 0); | |
const s = r(794), | |
o = r(8042); | |
let a = class extends s.DecisionEventInfo { | |
constructor(e, t, r, n, i, s, o) { | |
super(e, t, n, i, s, o), (this.predictedAlt = r); | |
} | |
}; | |
(a = n([i(3, o.NotNull)], a)), (t.LookaheadEventInfo = a); | |
}, | |
4068: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LoopEndState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
get stateType() { | |
return s.ATNStateType.LOOP_END; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.LoopEndState = a); | |
}, | |
3973: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.NotSetTransition = void 0); | |
const s = r(8042), | |
o = r(6765); | |
let a = class extends o.SetTransition { | |
constructor(e, t) { | |
super(e, t); | |
} | |
get serializationType() { | |
return 8; | |
} | |
matches(e, t, r) { | |
return e >= t && e <= r && !super.matches(e, t, r); | |
} | |
toString() { | |
return "~" + super.toString(); | |
} | |
}; | |
n([s.Override], a.prototype, "serializationType", null), n([s.Override], a.prototype, "matches", null), n([s.Override], a.prototype, "toString", null), (a = n([i(0, s.NotNull), i(1, s.Nullable)], a)), (t.NotSetTransition = a); | |
}, | |
3169: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.OrderedATNConfigSet = void 0); | |
const i = r(7176), | |
s = r(8042); | |
class o extends i.ATNConfigSet { | |
constructor(e, t) { | |
null != e && null != t ? super(e, t) : super(); | |
} | |
clone(e) { | |
let t = new o(this, e); | |
return !e && this.isReadOnly && t.addAll(this), t; | |
} | |
getKey(e) { | |
return { state: 0, alt: e.hashCode() }; | |
} | |
canMerge(e, t, r) { | |
return e.equals(r); | |
} | |
} | |
n([s.Override], o.prototype, "clone", null), n([s.Override], o.prototype, "getKey", null), n([s.Override], o.prototype, "canMerge", null), (t.OrderedATNConfigSet = o); | |
}, | |
6019: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParseInfo = void 0); | |
const s = r(8042); | |
let o = class { | |
constructor(e) { | |
this.atnSimulator = e; | |
} | |
getDecisionInfo() { | |
return this.atnSimulator.getDecisionInfo(); | |
} | |
getLLDecisions() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = []; | |
for (let r = 0; r < e.length; r++) e[r].LL_Fallback > 0 && t.push(r); | |
return t; | |
} | |
getTotalTimeInPrediction() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) t += r.timeInPrediction; | |
return t; | |
} | |
getTotalSLLLookaheadOps() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) t += r.SLL_TotalLook; | |
return t; | |
} | |
getTotalLLLookaheadOps() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) t += r.LL_TotalLook; | |
return t; | |
} | |
getTotalSLLATNLookaheadOps() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) t += r.SLL_ATNTransitions; | |
return t; | |
} | |
getTotalLLATNLookaheadOps() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) t += r.LL_ATNTransitions; | |
return t; | |
} | |
getTotalATNLookaheadOps() { | |
let e = this.atnSimulator.getDecisionInfo(), | |
t = 0; | |
for (let r of e) (t += r.SLL_ATNTransitions), (t += r.LL_ATNTransitions); | |
return t; | |
} | |
getDFASize(e) { | |
if (e) return this.atnSimulator.atn.decisionToDFA[e].states.size; | |
{ | |
let e = 0, | |
t = this.atnSimulator.atn.decisionToDFA; | |
for (let r = 0; r < t.length; r++) e += this.getDFASize(r); | |
return e; | |
} | |
} | |
}; | |
n([s.NotNull], o.prototype, "getDecisionInfo", null), n([s.NotNull], o.prototype, "getLLDecisions", null), (o = n([i(0, s.NotNull)], o)), (t.ParseInfo = o); | |
}, | |
4584: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParserATNSimulator = void 0); | |
const s = r(1060), | |
o = r(212), | |
a = r(9026), | |
l = r(6005), | |
c = r(7949), | |
u = r(8595), | |
h = r(7176), | |
p = r(7643), | |
d = r(4700), | |
m = r(4389), | |
f = r(5280), | |
y = r(9619), | |
g = r(213), | |
_ = r(1186), | |
T = r(6766), | |
x = r(8813), | |
v = r(3227), | |
S = r(8042), | |
E = r(3973), | |
O = r(4609), | |
I = r(8842), | |
N = r(3208), | |
C = r(9767), | |
A = r(604), | |
R = r(6247), | |
P = r(5337), | |
b = r(4704), | |
L = r(1888), | |
w = r(6765), | |
D = r(1071), | |
k = r(4966), | |
F = r(6763), | |
M = r(9491), | |
U = -2147483648; | |
let B = class e extends p.ATNSimulator { | |
constructor(e, t) { | |
super(e), | |
(this.predictionMode = R.PredictionMode.LL), | |
(this.force_global_context = !1), | |
(this.always_try_local_context = !0), | |
(this.enable_global_context_dfa = !1), | |
(this.optimize_unique_closure = !0), | |
(this.optimize_ll1 = !0), | |
(this.optimize_tail_calls = !0), | |
(this.tail_call_preserves_sll = !0), | |
(this.treat_sllk1_conflict_as_ambiguity = !1), | |
(this.reportAmbiguities = !1), | |
(this.userWantsCtxSensitive = !0), | |
(this._parser = t); | |
} | |
getPredictionMode() { | |
return this.predictionMode; | |
} | |
setPredictionMode(e) { | |
this.predictionMode = e; | |
} | |
reset() {} | |
adaptivePredict(t, r, n, i) { | |
void 0 === i && (i = !1); | |
let s, | |
o = this.atn.decisionToDFA[r]; | |
if ((M(null != o), this.optimize_ll1 && !o.isPrecedenceDfa && !o.isEmpty)) { | |
let e = t.LA(1); | |
if (e >= 0 && e <= 65535) { | |
let t = ((r << 16) >>> 0) + e, | |
n = this.atn.LL1Table.get(t); | |
if (null != n) return n; | |
} | |
} | |
(this.dfa = o), | |
this.force_global_context ? (i = !0) : this.always_try_local_context || (i = i || o.isContextSensitive), | |
(this.userWantsCtxSensitive = i || (this.predictionMode !== R.PredictionMode.SLL && null != n && !this.atn.decisionToState[r].sll)), | |
null == n && (n = N.ParserRuleContext.emptyContext()), | |
o.isEmpty || (s = this.getStartState(o, t, n, i)), | |
null == s && | |
(null == n && (n = N.ParserRuleContext.emptyContext()), | |
e.debug && console.log("ATN decision " + o.decision + " exec LA(1)==" + this.getLookaheadName(t) + ", outerContext=" + n.toString(this._parser)), | |
(s = this.computeStartState(o, n, i))); | |
let a = t.mark(), | |
l = t.index; | |
try { | |
let r = this.execDFA(o, t, l, s); | |
return e.debug && console.log("DFA after predictATN: " + o.toString(this._parser.vocabulary, this._parser.ruleNames)), r; | |
} finally { | |
(this.dfa = void 0), t.seek(l), t.release(a); | |
} | |
} | |
getStartState(e, t, r, n) { | |
if (!n) { | |
if (e.isPrecedenceDfa) { | |
let t = e.getPrecedenceStartState(this._parser.precedence, !1); | |
if (null == t) return; | |
return new D.SimulatorState(r, t, !1, r); | |
} | |
if (null == e.s0) return; | |
return new D.SimulatorState(r, e.s0, !1, r); | |
} | |
if (!this.enable_global_context_dfa) return; | |
let i, | |
s = r; | |
for (M(null != r), i = e.isPrecedenceDfa ? e.getPrecedenceStartState(this._parser.precedence, !0) : e.s0full; null != s && null != i && i.isContextSensitive; ) | |
(s = this.skipTailCalls(s)), (i = i.getContextTarget(this.getReturnState(s))), s.isEmpty ? M(null == i || !i.isContextSensitive) : (s = s.parent); | |
return null != i ? new D.SimulatorState(r, i, n, s) : void 0; | |
} | |
execDFA(t, r, n, i) { | |
let s = i.outerContext; | |
e.dfa_debug && console.log("DFA decision " + t.decision + " exec LA(1)==" + this.getLookaheadName(r) + ", outerContext=" + s.toString(this._parser)), | |
e.dfa_debug && console.log(t.toString(this._parser.vocabulary, this._parser.ruleNames)); | |
let o = i.s0, | |
a = r.LA(1), | |
l = i.remainingOuterContext; | |
for (;;) { | |
if ((e.dfa_debug && console.log("DFA state " + o.stateNumber + " LA(1)==" + this.getLookaheadName(r)), i.useContext)) | |
for (; o.isContextSymbol(a); ) { | |
let e; | |
if ((null != l && ((l = this.skipTailCalls(l)), (e = o.getContextTarget(this.getReturnState(l)))), null == e)) { | |
let e = new D.SimulatorState(i.outerContext, o, i.useContext, l); | |
return this.execATN(t, r, n, e); | |
} | |
M(null != l), (l = l.parent), (o = e); | |
} | |
if (this.isAcceptState(o, i.useContext)) { | |
null != o.predicates ? e.dfa_debug && console.log("accept " + o) : e.dfa_debug && console.log("accept; predict " + o.prediction + " in state " + o.stateNumber); | |
break; | |
} | |
M(!this.isAcceptState(o, i.useContext)); | |
let c = this.getExistingTargetState(o, a); | |
if (null == c) { | |
let c; | |
if ((e.dfa_debug && a >= 0 && console.log("no edge for " + this._parser.vocabulary.getDisplayName(a)), e.dfa_debug)) { | |
let e = x.Interval.of(n, this._parser.inputStream.index); | |
console.log("ATN exec upon " + this._parser.inputStream.getText(e) + " at DFA state " + o.stateNumber); | |
} | |
let u = new D.SimulatorState(s, o, i.useContext, l); | |
return ( | |
(c = this.execATN(t, r, n, u)), | |
e.dfa_debug && console.log("back from DFA update, alt=" + c + ", dfa=\n" + t.toString(this._parser.vocabulary, this._parser.ruleNames)), | |
e.dfa_debug && console.log("DFA decision " + t.decision + " predicts " + c), | |
c | |
); | |
} | |
if (c === p.ATNSimulator.ERROR) { | |
let e = new D.SimulatorState(s, o, i.useContext, l); | |
return this.handleNoViableAlt(r, n, e); | |
} | |
(o = c), this.isAcceptState(o, i.useContext) || a === v.IntStream.EOF || (r.consume(), (a = r.LA(1))); | |
} | |
if ( | |
!i.useContext && | |
null != o.configs.conflictInfo && | |
t.atnStartState instanceof g.DecisionState && | |
!(!this.userWantsCtxSensitive || (!o.configs.dipsIntoOuterContext && o.configs.isExactConflict) || (this.treat_sllk1_conflict_as_ambiguity && r.index === n)) | |
) { | |
let e; | |
M(!i.useContext); | |
let a = o.predicates; | |
if (null != a) { | |
let t = r.index; | |
if ((t !== n && r.seek(n), (e = this.evalSemanticContext(a, s, !0)), 1 === e.cardinality())) return e.nextSetBit(0); | |
t !== n && r.seek(t); | |
} | |
if (this.reportAmbiguities) { | |
let a = new D.SimulatorState(s, o, i.useContext, l); | |
this.reportAttemptingFullContext(t, e, a, n, r.index); | |
} | |
return r.seek(n), this.adaptivePredict(r, t.decision, s, !0); | |
} | |
let c = o.predicates; | |
if (null != c) { | |
let e = r.index; | |
n !== e && r.seek(n); | |
let i = this.evalSemanticContext(c, s, this.reportAmbiguities && this.predictionMode === R.PredictionMode.LL_EXACT_AMBIG_DETECTION); | |
switch (i.cardinality()) { | |
case 0: | |
throw this.noViableAlt(r, s, o.configs, n); | |
case 1: | |
return i.nextSetBit(0); | |
default: | |
return n !== e && r.seek(e), this.reportAmbiguity(t, o, n, e, o.configs.isExactConflict, i, o.configs), i.nextSetBit(0); | |
} | |
} | |
return e.dfa_debug && console.log("DFA decision " + t.decision + " predicts " + o.prediction), o.prediction; | |
} | |
isAcceptState(e, t) { | |
return !!e.isAcceptState && (null == e.configs.conflictingAlts || !t || this.predictionMode !== R.PredictionMode.LL_EXACT_AMBIG_DETECTION || e.configs.isExactConflict); | |
} | |
execATN(t, r, n, i) { | |
e.debug && console.log("execATN decision " + t.decision + " exec LA(1)==" + this.getLookaheadName(r)); | |
let s = i.outerContext, | |
o = i.useContext, | |
a = r.LA(1), | |
l = i, | |
u = new A.PredictionContextCache(); | |
for (;;) { | |
let i = this.computeReachSet(t, l, a, u); | |
if (null == i) return this.setDFAEdge(l.s0, r.LA(1), p.ATNSimulator.ERROR), this.handleNoViableAlt(r, n, l); | |
let h = i.s0; | |
if ((M(h.isAcceptState || h.prediction === c.ATN.INVALID_ALT_NUMBER), M(h.isAcceptState || null == h.configs.conflictInfo), this.isAcceptState(h, o))) { | |
let l = h.configs.conflictingAlts, | |
u = null == l ? h.prediction : c.ATN.INVALID_ALT_NUMBER; | |
if (u !== c.ATN.INVALID_ALT_NUMBER) { | |
if (this.optimize_ll1 && r.index === n && !t.isPrecedenceDfa && i.outerContext === i.remainingOuterContext && t.decision >= 0 && !h.configs.hasSemanticContext && a >= 0 && a <= 65535) { | |
let e = ((t.decision << 16) >>> 0) + a; | |
this.atn.LL1Table.set(e, u); | |
} | |
o && this.always_try_local_context && this.reportContextSensitivity(t, u, i, n, r.index); | |
} | |
u = h.prediction; | |
let p = null != l && this.userWantsCtxSensitive; | |
if ((p && (p = !o && (h.configs.dipsIntoOuterContext || !h.configs.isExactConflict) && (!this.treat_sllk1_conflict_as_ambiguity || r.index !== n)), h.configs.hasSemanticContext)) { | |
let e = h.predicates; | |
if (null != e) { | |
let t = r.index; | |
switch ((t !== n && r.seek(n), (l = this.evalSemanticContext(e, s, p || this.reportAmbiguities)), l.cardinality())) { | |
case 0: | |
throw this.noViableAlt(r, s, h.configs, n); | |
case 1: | |
return l.nextSetBit(0); | |
} | |
t !== n && r.seek(t); | |
} | |
} | |
if (p) { | |
M(!o), M(this.isAcceptState(h, !1)), e.debug && console.log("RETRY with outerContext=" + s); | |
let a = this.computeStartState(t, s, !0); | |
return this.reportAmbiguities && this.reportAttemptingFullContext(t, l, i, n, r.index), r.seek(n), this.execATN(t, r, n, a); | |
} | |
return null != l && (this.reportAmbiguities && l.cardinality() > 1 && this.reportAmbiguity(t, h, n, r.index, h.configs.isExactConflict, l, h.configs), (u = l.nextSetBit(0))), u; | |
} | |
(l = i), a !== v.IntStream.EOF && (r.consume(), (a = r.LA(1))); | |
} | |
} | |
handleNoViableAlt(e, t, r) { | |
if (null != r.s0) { | |
let n = new f.BitSet(), | |
i = 0; | |
for (let e of r.s0.configs) (e.reachesIntoOuterContext || e.state instanceof P.RuleStopState) && (n.set(e.alt), (i = Math.max(i, e.alt))); | |
switch (n.cardinality()) { | |
case 0: | |
break; | |
case 1: | |
return n.nextSetBit(0); | |
default: | |
if (!r.s0.configs.hasSemanticContext) return n.nextSetBit(0); | |
let s = new h.ATNConfigSet(); | |
for (let e of r.s0.configs) (e.reachesIntoOuterContext || e.state instanceof P.RuleStopState) && s.add(e); | |
let o = this.getPredsForAmbigAlts(n, s, i); | |
if (null != o) { | |
let i = this.getPredicatePredictions(n, o); | |
if (null != i) { | |
let n = e.index; | |
try { | |
e.seek(t); | |
let s = this.evalSemanticContext(i, r.outerContext, !1); | |
if (!s.isEmpty) return s.nextSetBit(0); | |
} finally { | |
e.seek(n); | |
} | |
} | |
} | |
return n.nextSetBit(0); | |
} | |
} | |
throw this.noViableAlt(e, r.outerContext, r.s0.configs, t); | |
} | |
computeReachSet(e, t, r, n) { | |
let i = t.useContext, | |
s = t.remainingOuterContext, | |
o = t.s0; | |
if (i) | |
for (; o.isContextSymbol(r); ) { | |
let e; | |
if ((null != s && ((s = this.skipTailCalls(s)), (e = o.getContextTarget(this.getReturnState(s)))), null == e)) break; | |
M(null != s), (s = s.parent), (o = e); | |
} | |
if ((M(!this.isAcceptState(o, i)), this.isAcceptState(o, i))) return new D.SimulatorState(t.outerContext, o, i, s); | |
let a = o, | |
l = this.getExistingTargetState(a, r); | |
if (null == l) { | |
let t = this.computeTargetState(e, a, s, r, i, n); | |
(l = t[0]), (s = t[1]); | |
} | |
return l !== p.ATNSimulator.ERROR ? (M(!i || !l.configs.dipsIntoOuterContext), new D.SimulatorState(t.outerContext, l, i, s)) : void 0; | |
} | |
getExistingTargetState(e, t) { | |
return e.getTarget(t); | |
} | |
computeTargetState(t, r, n, i, s, o) { | |
let a, | |
l, | |
u = r.configs.toArray(), | |
d = new h.ATNConfigSet(); | |
do { | |
let t = !s || null != n; | |
t || (d.isOutermostConfigSet = !0); | |
let r, | |
p = new h.ATNConfigSet(); | |
for (let t of u) { | |
if ((e.debug && console.log("testing " + this.getTokenName(i) + " at " + t.toString()), t.state instanceof P.RuleStopState)) { | |
M(t.context.isEmpty), ((s && !t.reachesIntoOuterContext) || i === v.IntStream.EOF) && (null == r && (r = []), r.push(t)); | |
continue; | |
} | |
let n = t.state.numberOfOptimizedTransitions; | |
for (let e = 0; e < n; e++) { | |
let r = t.state.getOptimizedTransition(e), | |
n = this.getReachableTarget(t, r, i); | |
null != n && p.add(t.transform(n, !1), o); | |
} | |
} | |
if (this.optimize_unique_closure && null == r && i !== k.Token.EOF && p.uniqueAlt !== c.ATN.INVALID_ALT_NUMBER) { | |
(p.isOutermostConfigSet = d.isOutermostConfigSet), (d = p); | |
break; | |
} | |
let m = !1, | |
f = i === k.Token.EOF; | |
if ((this.closure(p, d, m, t, o, f), (l = d.dipsIntoOuterContext), i === v.IntStream.EOF && (d = this.removeAllConfigsNotInRuleStopState(d, o)), !(null == r || (s && R.PredictionMode.hasConfigInRuleStopState(d))))) { | |
M(r.length > 0); | |
for (let e of r) d.add(e, o); | |
} | |
if (s && l) { | |
d.clear(), (n = this.skipTailCalls(n)); | |
let e = this.getReturnState(n); | |
if ((null == a && (a = new T.IntegerList()), (n = n.isEmpty ? void 0 : n.parent), a.add(e), e !== C.PredictionContext.EMPTY_FULL_STATE_KEY)) for (let t = 0; t < u.length; t++) u[t] = u[t].appendContext(e, o); | |
} | |
} while (s && l); | |
return d.isEmpty ? (this.setDFAEdge(r, i, p.ATNSimulator.ERROR), [p.ATNSimulator.ERROR, n]) : [this.addDFAEdge(t, r, i, a, d, o), n]; | |
} | |
removeAllConfigsNotInRuleStopState(e, t) { | |
if (R.PredictionMode.allConfigsInRuleStopStates(e)) return e; | |
let r = new h.ATNConfigSet(); | |
for (let n of e) n.state instanceof P.RuleStopState && r.add(n, t); | |
return r; | |
} | |
computeStartState(e, t, r) { | |
let n = e.isPrecedenceDfa ? e.getPrecedenceStartState(this._parser.precedence, r) : r ? e.s0full : e.s0; | |
if (null != n) { | |
if (!r) return new D.SimulatorState(t, n, r, t); | |
n.setContextSensitive(this.atn); | |
} | |
e.decision; | |
let i = e.atnStartState, | |
s = 0, | |
o = t, | |
a = r ? C.PredictionContext.EMPTY_FULL : C.PredictionContext.EMPTY_LOCAL, | |
l = new A.PredictionContextCache(); | |
if (r) { | |
if (!this.enable_global_context_dfa) for (; null != o; ) o.isEmpty ? ((s = C.PredictionContext.EMPTY_FULL_STATE_KEY), (o = void 0)) : ((s = this.getReturnState(o)), (a = a.appendSingleContext(s, l)), (o = o.parent)); | |
for (; null != n && n.isContextSensitive && null != o; ) { | |
let e; | |
if ( | |
((o = this.skipTailCalls(o)), | |
o.isEmpty | |
? ((e = n.getContextTarget(C.PredictionContext.EMPTY_FULL_STATE_KEY)), (s = C.PredictionContext.EMPTY_FULL_STATE_KEY), (o = void 0)) | |
: ((s = this.getReturnState(o)), (e = n.getContextTarget(s)), (a = a.appendSingleContext(s, l)), (o = o.parent)), | |
null == e) | |
) | |
break; | |
n = e; | |
} | |
} | |
if (null != n && !n.isContextSensitive) return new D.SimulatorState(t, n, r, o); | |
let c = new h.ATNConfigSet(); | |
for (;;) { | |
let p = new h.ATNConfigSet(), | |
d = i.numberOfTransitions; | |
for (let e = 0; e < d; e++) { | |
let t = i.transition(e).target; | |
p.add(u.ATNConfig.create(t, e + 1, a)); | |
} | |
let m = null != o; | |
m || (c.isOutermostConfigSet = !0); | |
let f = !0; | |
this.closure(p, c, f, m, l, !1); | |
let y, | |
g = c.dipsIntoOuterContext; | |
if (r && !this.enable_global_context_dfa) { | |
n = this.addDFAState(e, c, l); | |
break; | |
} | |
if ( | |
(null == n | |
? e.isPrecedenceDfa | |
? ((c = this.applyPrecedenceFilter(c, t, l)), (y = this.addDFAState(e, c, l)), e.setPrecedenceStartState(this._parser.precedence, r, y)) | |
: ((y = this.addDFAState(e, c, l)), r ? (e.s0full ? (y = e.s0full) : (e.s0full = y)) : e.s0 ? (y = e.s0) : (e.s0 = y)) | |
: (e.isPrecedenceDfa && (c = this.applyPrecedenceFilter(c, t, l)), (y = this.addDFAState(e, c, l)), n.setContextTarget(s, y)), | |
(n = y), | |
!r || !g) | |
) | |
break; | |
y.setContextSensitive(this.atn), c.clear(), (o = this.skipTailCalls(o)); | |
let _ = this.getReturnState(o); | |
(o = o.isEmpty ? void 0 : o.parent), _ !== C.PredictionContext.EMPTY_FULL_STATE_KEY && (a = a.appendSingleContext(_, l)), (s = _); | |
} | |
return new D.SimulatorState(t, n, r, o); | |
} | |
applyPrecedenceFilter(e, t, r) { | |
let n = new Map(), | |
i = new h.ATNConfigSet(); | |
for (let s of e) { | |
if (1 !== s.alt) continue; | |
let e = s.semanticContext.evalPrecedence(this._parser, t); | |
null != e && (n.set(s.state.stateNumber, s.context), e !== s.semanticContext ? i.add(s.transform(s.state, !1, e), r) : i.add(s, r)); | |
} | |
for (let t of e) | |
if (1 !== t.alt) { | |
if (!t.isPrecedenceFilterSuppressed) { | |
let e = n.get(t.state.stateNumber); | |
if (null != e && e.equals(t.context)) continue; | |
} | |
i.add(t, r); | |
} | |
return i; | |
} | |
getReachableTarget(e, t, r) { | |
if (t.matches(r, 0, this.atn.maxTokenType)) return t.target; | |
} | |
predicateDFAState(t, r, n) { | |
let i = this.getConflictingAltsFromConfigSet(r); | |
if (!i) throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case."); | |
e.debug && console.log("predicateDFAState " + t); | |
let s, | |
o = this.getPredsForAmbigAlts(i, r, n); | |
return null != o && ((s = this.getPredicatePredictions(i, o)), (t.predicates = s)), s; | |
} | |
getPredsForAmbigAlts(t, r, n) { | |
let i = new Array(n + 1), | |
s = i.length; | |
for (let e of r) t.get(e.alt) && (i[e.alt] = L.SemanticContext.or(i[e.alt], e.semanticContext)); | |
let o = 0; | |
for (let e = 0; e < s; e++) null == i[e] ? (i[e] = L.SemanticContext.NONE) : i[e] !== L.SemanticContext.NONE && o++; | |
let a = i; | |
return 0 === o && (a = void 0), e.debug && console.log("getPredsForAmbigAlts result " + (a ? l.Arrays.toString(a) : "undefined")), a; | |
} | |
getPredicatePredictions(e, t) { | |
let r = [], | |
n = !1; | |
for (let i = 1; i < t.length; i++) { | |
let s = t[i]; | |
M(null != s), null != e && e.get(i) && s === L.SemanticContext.NONE ? r.push(new _.DFAState.PredPrediction(s, i)) : s !== L.SemanticContext.NONE && ((n = !0), r.push(new _.DFAState.PredPrediction(s, i))); | |
} | |
if (n) return r; | |
} | |
evalSemanticContext(t, r, n) { | |
let i = new f.BitSet(); | |
for (let s of t) { | |
if (s.pred === L.SemanticContext.NONE) { | |
if ((i.set(s.alt), !n)) break; | |
continue; | |
} | |
let t = this.evalSemanticContextImpl(s.pred, r, s.alt); | |
if (((e.debug || e.dfa_debug) && console.log("eval pred " + s + "=" + t), t && ((e.debug || e.dfa_debug) && console.log("PREDICT " + s.alt), i.set(s.alt), !n))) break; | |
} | |
return i; | |
} | |
evalSemanticContextImpl(e, t, r) { | |
return e.eval(this._parser, t); | |
} | |
closure(e, t, r, n, i, s) { | |
null == i && (i = A.PredictionContextCache.UNCACHED); | |
let o = e, | |
l = new a.Array2DHashSet(I.ObjectEqualityComparator.INSTANCE); | |
for (; o.size > 0; ) { | |
let e = new h.ATNConfigSet(); | |
for (let a of o) this.closureImpl(a, t, e, l, r, n, i, 0, s); | |
o = e; | |
} | |
} | |
closureImpl(t, r, n, i, s, a, l, c, h) { | |
if ((e.debug && console.log("closure(" + t.toString(this._parser, !0) + ")"), t.state instanceof P.RuleStopState)) | |
if (t.context.isEmpty) { | |
if (!a) return void r.add(t, l); | |
e.debug && console.log("FALLING off rule " + this.getRuleName(t.state.ruleIndex)), | |
t.context === C.PredictionContext.EMPTY_FULL ? (t = t.transform(t.state, !1, C.PredictionContext.EMPTY_LOCAL)) : !t.reachesIntoOuterContext && C.PredictionContext.isEmptyLocal(t.context) && r.add(t, l); | |
} else { | |
let e = t.context.hasEmpty, | |
o = t.context.size - (e ? 1 : 0); | |
for (let e = 0; e < o; e++) { | |
let o = t.context.getParent(e), | |
p = this.atn.states[t.context.getReturnState(e)], | |
d = u.ATNConfig.create(p, t.alt, o, t.semanticContext); | |
(d.outerContextDepth = t.outerContextDepth), (d.isPrecedenceFilterSuppressed = t.isPrecedenceFilterSuppressed), M(c > U), this.closureImpl(d, r, n, i, s, a, l, c - 1, h); | |
} | |
if (!e || !a) return; | |
t = t.transform(t.state, !1, C.PredictionContext.EMPTY_LOCAL); | |
} | |
let p = t.state; | |
p.onlyHasEpsilonTransitions || (r.add(t, l), e.debug && console.log("added config " + r)); | |
for (let u = 0; u < p.numberOfOptimizedTransitions; u++) { | |
if (0 === u && p.stateType === d.ATNStateType.STAR_LOOP_ENTRY && p.precedenceRuleDecision && !t.context.hasEmpty) { | |
let e = p, | |
r = !0; | |
for (let n = 0; n < t.context.size; n++) | |
if (!e.precedenceLoopbackStates.get(t.context.getReturnState(n))) { | |
r = !1; | |
break; | |
} | |
if (r) continue; | |
} | |
let m = p.getOptimizedTransition(u), | |
f = !(m instanceof o.ActionTransition) && s, | |
y = this.getEpsilonTarget(t, m, f, 0 === c, l, h); | |
if (null != y) { | |
if (m instanceof b.RuleTransition && null != n && !s) { | |
n.add(y, l); | |
continue; | |
} | |
let o = c; | |
if (t.state instanceof P.RuleStopState) { | |
if ((null != this.dfa && this.dfa.isPrecedenceDfa && m.outermostPrecedenceReturn === this.dfa.atnStartState.ruleIndex && (y.isPrecedenceFilterSuppressed = !0), (y.outerContextDepth = y.outerContextDepth + 1), !i.add(y))) | |
continue; | |
M(o > U), o--, e.debug && console.log("dips into outer ctx: " + y); | |
} else if (m instanceof b.RuleTransition) | |
!this.optimize_tail_calls || !m.optimizedTailCall || (this.tail_call_preserves_sll && C.PredictionContext.isEmptyLocal(t.context)) | |
? o >= 0 && o++ | |
: (M(y.context === t.context), 0 === o && (o--, !this.tail_call_preserves_sll && C.PredictionContext.isEmptyLocal(t.context) && (y.outerContextDepth = y.outerContextDepth + 1))); | |
else if (!m.isEpsilon && !i.add(y)) continue; | |
this.closureImpl(y, r, n, i, f, a, l, o, h); | |
} | |
} | |
} | |
getRuleName(e) { | |
return null != this._parser && e >= 0 ? this._parser.ruleNames[e] : "<rule " + e + ">"; | |
} | |
getEpsilonTarget(e, t, r, n, i, s) { | |
switch (t.serializationType) { | |
case 3: | |
return this.ruleTransition(e, t, i); | |
case 10: | |
return this.precedenceTransition(e, t, r, n); | |
case 4: | |
return this.predTransition(e, t, r, n); | |
case 6: | |
return this.actionTransition(e, t); | |
case 1: | |
return e.transform(t.target, !1); | |
case 5: | |
case 2: | |
case 7: | |
return s && t.matches(k.Token.EOF, 0, 1) ? e.transform(t.target, !1) : void 0; | |
default: | |
return; | |
} | |
} | |
actionTransition(t, r) { | |
return e.debug && console.log("ACTION edge " + r.ruleIndex + ":" + r.actionIndex), t.transform(r.target, !1); | |
} | |
precedenceTransition(t, r, n, i) { | |
let s; | |
if ( | |
(e.debug && (console.log("PRED (collectPredicates=" + n + ") " + r.precedence + ">=_p, ctx dependent=true"), null != this._parser && console.log("context surrounding pred is " + this._parser.getRuleInvocationStack())), n && i) | |
) { | |
let e = L.SemanticContext.and(t.semanticContext, r.predicate); | |
s = t.transform(r.target, !1, e); | |
} else s = t.transform(r.target, !1); | |
return e.debug && console.log("config from pred transition=" + s), s; | |
} | |
predTransition(t, r, n, i) { | |
let s; | |
if ( | |
(e.debug && | |
(console.log("PRED (collectPredicates=" + n + ") " + r.ruleIndex + ":" + r.predIndex + ", ctx dependent=" + r.isCtxDependent), | |
null != this._parser && console.log("context surrounding pred is " + this._parser.getRuleInvocationStack())), | |
n && (!r.isCtxDependent || (r.isCtxDependent && i))) | |
) { | |
let e = L.SemanticContext.and(t.semanticContext, r.predicate); | |
s = t.transform(r.target, !1, e); | |
} else s = t.transform(r.target, !1); | |
return e.debug && console.log("config from pred transition=" + s), s; | |
} | |
ruleTransition(t, r, n) { | |
e.debug && console.log("CALL rule " + this.getRuleName(r.target.ruleIndex) + ", ctx=" + t.context); | |
let i, | |
s = r.followState; | |
return ( | |
(i = | |
!this.optimize_tail_calls || !r.optimizedTailCall || (this.tail_call_preserves_sll && C.PredictionContext.isEmptyLocal(t.context)) | |
? null != n | |
? n.getChild(t.context, s.stateNumber) | |
: t.context.getChild(s.stateNumber) | |
: t.context), | |
t.transform(r.target, !1, i) | |
); | |
} | |
isConflicted(t, r) { | |
if (t.uniqueAlt !== c.ATN.INVALID_ALT_NUMBER || t.size <= 1) return; | |
let n = t.toArray(); | |
n.sort(e.STATE_ALT_SORT_COMPARATOR); | |
let i = !t.dipsIntoOuterContext, | |
s = new f.BitSet(), | |
o = n[0].alt; | |
s.set(o); | |
let a, | |
l = n[0].state.nonStopStateNumber; | |
for (let e of n) { | |
let t = e.state.nonStopStateNumber; | |
if (t !== l) { | |
if (e.alt !== o) return; | |
l = t; | |
} | |
} | |
if (i) { | |
(l = n[0].state.nonStopStateNumber), (a = new f.BitSet()); | |
let e = o; | |
for (let t of n) { | |
if (t.state.nonStopStateNumber !== l) break; | |
let r = t.alt; | |
a.set(r), (e = r); | |
} | |
l = n[0].state.nonStopStateNumber; | |
let t = o; | |
for (let r of n) { | |
let n = r.state.nonStopStateNumber, | |
s = r.alt; | |
if (n !== l) { | |
if (t !== e) { | |
i = !1; | |
break; | |
} | |
(l = n), (t = o); | |
} else if (s !== t) { | |
if (s !== a.nextSetBit(t + 1)) { | |
i = !1; | |
break; | |
} | |
t = s; | |
} | |
} | |
} | |
l = n[0].state.nonStopStateNumber; | |
let u = 0, | |
h = 0, | |
p = n[0].context; | |
for (let e = 1; e < n.length; e++) { | |
let t = n[e]; | |
if (t.alt !== o) break; | |
if (t.state.nonStopStateNumber !== l) break; | |
(h = e), (p = r.join(p, n[e].context)); | |
} | |
for (let e = h + 1; e < n.length; e++) { | |
let t = n[e], | |
a = t.state; | |
if ((s.set(t.alt), a.nonStopStateNumber !== l)) { | |
(l = a.nonStopStateNumber), (u = e), (h = e), (p = t.context); | |
for (let e = u + 1; e < n.length; e++) { | |
let t = n[e]; | |
if (t.alt !== o) break; | |
if (t.state.nonStopStateNumber !== l) break; | |
(h = e), (p = r.join(p, t.context)); | |
} | |
e = h; | |
continue; | |
} | |
let c = t.context, | |
d = t.alt, | |
m = e; | |
for (let e = m + 1; e < n.length; e++) { | |
let t = n[e]; | |
if (t.alt !== d) break; | |
if (t.state.nonStopStateNumber !== l) break; | |
(m = e), (c = r.join(c, t.context)); | |
} | |
e = m; | |
let f = r.join(p, c); | |
if (!p.equals(f)) return; | |
i = i && p.equals(c); | |
} | |
return new y.ConflictInfo(s, i); | |
} | |
getConflictingAltsFromConfigSet(e) { | |
let t = e.conflictingAlts; | |
return null == t && e.uniqueAlt !== c.ATN.INVALID_ALT_NUMBER && ((t = new f.BitSet()), t.set(e.uniqueAlt)), t; | |
} | |
getTokenName(e) { | |
if (e === k.Token.EOF) return "EOF"; | |
let t = (null != this._parser ? this._parser.vocabulary : F.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(e); | |
return t === String(e) ? t : t + "<" + e + ">"; | |
} | |
getLookaheadName(e) { | |
return this.getTokenName(e.LA(1)); | |
} | |
dumpDeadEndConfigs(e) { | |
console.log("dead end configs: "); | |
let t = e.deadEndConfigs; | |
if (t) | |
for (let e of t) { | |
let t = "no edges"; | |
if (e.state.numberOfOptimizedTransitions > 0) { | |
let r = e.state.getOptimizedTransition(0); | |
r instanceof m.AtomTransition ? (t = "Atom " + this.getTokenName(r._label)) : r instanceof w.SetTransition && (t = (r instanceof E.NotSetTransition ? "~" : "") + "Set " + r.set.toString()); | |
} | |
console.log(e.toString(this._parser, !0) + ":" + t); | |
} | |
} | |
noViableAlt(e, t, r, n) { | |
return new O.NoViableAltException(this._parser, e, e.get(n), e.LT(1), r, t); | |
} | |
getUniqueAlt(e) { | |
let t = c.ATN.INVALID_ALT_NUMBER; | |
for (let r of e) | |
if (t === c.ATN.INVALID_ALT_NUMBER) t = r.alt; | |
else if (r.alt !== t) return c.ATN.INVALID_ALT_NUMBER; | |
return t; | |
} | |
configWithAltAtStopState(e, t) { | |
for (let r of e) if (r.alt === t && r.state instanceof P.RuleStopState) return !0; | |
return !1; | |
} | |
addDFAEdge(t, r, n, i, s, o) { | |
M(null == i || i.isEmpty || t.isContextSensitive); | |
let a = r, | |
l = this.addDFAState(t, s, o); | |
if (null != i) | |
for (let e of i.toArray()) { | |
if (e === C.PredictionContext.EMPTY_FULL_STATE_KEY && a.configs.isOutermostConfigSet) continue; | |
a.setContextSensitive(this.atn), a.setContextSymbol(n); | |
let r = a.getContextTarget(e); | |
null == r ? ((r = this.addDFAContextState(t, a.configs, e, o)), M(e !== C.PredictionContext.EMPTY_FULL_STATE_KEY || r.configs.isOutermostConfigSet), a.setContextTarget(e, r), (a = r)) : (a = r); | |
} | |
return ( | |
e.debug && console.log("EDGE " + a + " -> " + l + " upon " + this.getTokenName(n)), | |
this.setDFAEdge(a, n, l), | |
e.debug && console.log("DFA=\n" + t.toString(null != this._parser ? this._parser.vocabulary : F.VocabularyImpl.EMPTY_VOCABULARY, null != this._parser ? this._parser.ruleNames : void 0)), | |
l | |
); | |
} | |
setDFAEdge(e, t, r) { | |
null != e && e.setTarget(t, r); | |
} | |
addDFAContextState(e, t, r, n) { | |
if (r !== C.PredictionContext.EMPTY_FULL_STATE_KEY) { | |
let i = new h.ATNConfigSet(); | |
for (let e of t) i.add(e.appendContext(r, n)); | |
return this.addDFAState(e, i, n); | |
} | |
return M(!t.isOutermostConfigSet, "Shouldn't be adding a duplicate edge."), ((t = t.clone(!0)).isOutermostConfigSet = !0), this.addDFAState(e, t, n); | |
} | |
addDFAState(t, r, n) { | |
let i = this.enable_global_context_dfa || !r.isOutermostConfigSet; | |
if (i) { | |
r.isReadOnly || r.optimizeConfigs(this); | |
let e = this.createDFAState(t, r), | |
n = t.states.get(e); | |
if (null != n) return n; | |
} | |
r.isReadOnly || (null == r.conflictInfo && (r.conflictInfo = this.isConflicted(r, n))); | |
let o = this.createDFAState(t, r.clone(!0)), | |
a = this.atn.getDecisionState(t.decision), | |
l = this.getUniqueAlt(r); | |
if (l !== c.ATN.INVALID_ALT_NUMBER) o.acceptStateInfo = new s.AcceptStateInfo(l); | |
else if (null != r.conflictingAlts) { | |
let e = r.conflictingAlts; | |
e && (o.acceptStateInfo = new s.AcceptStateInfo(e.nextSetBit(0))); | |
} | |
if ((o.isAcceptState && r.hasSemanticContext && this.predicateDFAState(o, r, a.numberOfTransitions), !i)) return o; | |
let u = t.addState(o); | |
return e.debug && u === o && console.log("adding new DFA state: " + o), u; | |
} | |
createDFAState(e, t) { | |
return new _.DFAState(t); | |
} | |
reportAttemptingFullContext(t, r, n, i, s) { | |
if (e.debug || e.retry_debug) { | |
let e = x.Interval.of(i, s); | |
console.log("reportAttemptingFullContext decision=" + t.decision + ":" + n.s0.configs + ", input=" + this._parser.inputStream.getText(e)); | |
} | |
if (null != this._parser) { | |
let e = this._parser.getErrorListenerDispatch(); | |
e.reportAttemptingFullContext && e.reportAttemptingFullContext(this._parser, t, i, s, r, n); | |
} | |
} | |
reportContextSensitivity(t, r, n, i, s) { | |
if (e.debug || e.retry_debug) { | |
let e = x.Interval.of(i, s); | |
console.log("reportContextSensitivity decision=" + t.decision + ":" + n.s0.configs + ", input=" + this._parser.inputStream.getText(e)); | |
} | |
if (null != this._parser) { | |
let e = this._parser.getErrorListenerDispatch(); | |
e.reportContextSensitivity && e.reportContextSensitivity(this._parser, t, i, s, r, n); | |
} | |
} | |
reportAmbiguity(t, r, n, i, s, o, a) { | |
if (e.debug || e.retry_debug) { | |
let e = x.Interval.of(n, i); | |
console.log("reportAmbiguity " + o + ":" + a + ", input=" + this._parser.inputStream.getText(e)); | |
} | |
if (null != this._parser) { | |
let e = this._parser.getErrorListenerDispatch(); | |
e.reportAmbiguity && e.reportAmbiguity(this._parser, t, n, i, s, o, a); | |
} | |
} | |
getReturnState(e) { | |
return e.isEmpty ? C.PredictionContext.EMPTY_FULL_STATE_KEY : this.atn.states[e.invokingState].transition(0).followState.stateNumber; | |
} | |
skipTailCalls(e) { | |
if (!this.optimize_tail_calls) return e; | |
for (; !e.isEmpty; ) { | |
let t = this.atn.states[e.invokingState]; | |
if ((M(1 === t.numberOfTransitions && 3 === t.transition(0).serializationType), !t.transition(0).tailCall)) break; | |
e = e.parent; | |
} | |
return e; | |
} | |
get parser() { | |
return this._parser; | |
} | |
}; | |
(B.debug = !1), | |
(B.dfa_debug = !1), | |
(B.retry_debug = !1), | |
(B.STATE_ALT_SORT_COMPARATOR = (e, t) => { | |
let r = e.state.nonStopStateNumber - t.state.nonStopStateNumber; | |
return 0 !== r ? r : ((r = e.alt - t.alt), 0 !== r ? r : 0); | |
}), | |
n([S.NotNull], B.prototype, "predictionMode", void 0), | |
n([S.NotNull], B.prototype, "getPredictionMode", null), | |
n([i(0, S.NotNull)], B.prototype, "setPredictionMode", null), | |
n([S.Override], B.prototype, "reset", null), | |
n([i(0, S.NotNull)], B.prototype, "adaptivePredict", null), | |
n([i(0, S.NotNull), i(1, S.NotNull), i(2, S.NotNull)], B.prototype, "getStartState", null), | |
n([i(0, S.NotNull), i(1, S.NotNull), i(3, S.NotNull)], B.prototype, "execDFA", null), | |
n([i(0, S.NotNull), i(1, S.NotNull), i(3, S.NotNull)], B.prototype, "execATN", null), | |
n([i(0, S.NotNull), i(2, S.NotNull)], B.prototype, "handleNoViableAlt", null), | |
n([i(0, S.NotNull)], B.prototype, "getExistingTargetState", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "computeTargetState", null), | |
n([S.NotNull, i(0, S.NotNull)], B.prototype, "removeAllConfigsNotInRuleStopState", null), | |
n([S.NotNull], B.prototype, "computeStartState", null), | |
n([S.NotNull, i(0, S.NotNull)], B.prototype, "applyPrecedenceFilter", null), | |
n([i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "getReachableTarget", null), | |
n([i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "getPredsForAmbigAlts", null), | |
n([i(0, S.NotNull)], B.prototype, "evalSemanticContext", null), | |
n([i(0, S.NotNull)], B.prototype, "evalSemanticContextImpl", null), | |
n([i(1, S.NotNull), i(4, S.Nullable)], B.prototype, "closure", null), | |
n([i(0, S.NotNull), i(1, S.NotNull), i(2, S.Nullable), i(3, S.NotNull), i(6, S.NotNull)], B.prototype, "closureImpl", null), | |
n([S.NotNull], B.prototype, "getRuleName", null), | |
n([i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "getEpsilonTarget", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "actionTransition", null), | |
n([S.Nullable, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "precedenceTransition", null), | |
n([S.Nullable, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "predTransition", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull), i(2, S.Nullable)], B.prototype, "ruleTransition", null), | |
n([i(0, S.NotNull)], B.prototype, "isConflicted", null), | |
n([S.NotNull], B.prototype, "getTokenName", null), | |
n([i(0, S.NotNull)], B.prototype, "dumpDeadEndConfigs", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull), i(2, S.NotNull)], B.prototype, "noViableAlt", null), | |
n([i(0, S.NotNull)], B.prototype, "getUniqueAlt", null), | |
n([i(0, S.NotNull)], B.prototype, "configWithAltAtStopState", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull), i(4, S.NotNull)], B.prototype, "addDFAEdge", null), | |
n([i(0, S.Nullable), i(2, S.Nullable)], B.prototype, "setDFAEdge", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "addDFAContextState", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "addDFAState", null), | |
n([S.NotNull, i(0, S.NotNull), i(1, S.NotNull)], B.prototype, "createDFAState", null), | |
n([i(0, S.NotNull), i(2, S.NotNull)], B.prototype, "reportAttemptingFullContext", null), | |
n([i(0, S.NotNull), i(2, S.NotNull)], B.prototype, "reportContextSensitivity", null), | |
n([i(0, S.NotNull), i(5, S.NotNull), i(6, S.NotNull)], B.prototype, "reportAmbiguity", null), | |
(B = n([i(0, S.NotNull)], B)), | |
(t.ParserATNSimulator = B); | |
}, | |
4604: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlusBlockStartState = void 0); | |
const i = r(4700), | |
s = r(4136), | |
o = r(8042); | |
class a extends s.BlockStartState { | |
get stateType() { | |
return i.ATNStateType.PLUS_BLOCK_START; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.PlusBlockStartState = a); | |
}, | |
8080: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PlusLoopbackState = void 0); | |
const i = r(4700), | |
s = r(213), | |
o = r(8042); | |
class a extends s.DecisionState { | |
get stateType() { | |
return i.ATNStateType.PLUS_LOOP_BACK; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.PlusLoopbackState = a); | |
}, | |
4649: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PrecedencePredicateTransition = void 0); | |
const s = r(7520), | |
o = r(8042), | |
a = r(1888); | |
let l = class extends s.AbstractPredicateTransition { | |
constructor(e, t) { | |
super(e), (this.precedence = t); | |
} | |
get serializationType() { | |
return 10; | |
} | |
get isEpsilon() { | |
return !0; | |
} | |
matches(e, t, r) { | |
return !1; | |
} | |
get predicate() { | |
return new a.SemanticContext.PrecedencePredicate(this.precedence); | |
} | |
toString() { | |
return this.precedence + " >= _p"; | |
} | |
}; | |
n([o.Override], l.prototype, "serializationType", null), | |
n([o.Override], l.prototype, "isEpsilon", null), | |
n([o.Override], l.prototype, "matches", null), | |
n([o.Override], l.prototype, "toString", null), | |
(l = n([i(0, o.NotNull)], l)), | |
(t.PrecedencePredicateTransition = l); | |
}, | |
5814: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PredicateEvalInfo = void 0); | |
const s = r(794), | |
o = r(8042); | |
let a = class extends s.DecisionEventInfo { | |
constructor(e, t, r, n, i, s, o, a) { | |
super(t, e, r, n, i, e.useContext), (this.semctx = s), (this.evalResult = o), (this.predictedAlt = a); | |
} | |
}; | |
(a = n([i(0, o.NotNull), i(2, o.NotNull), i(5, o.NotNull)], a)), (t.PredicateEvalInfo = a); | |
}, | |
3233: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PredicateTransition = void 0); | |
const s = r(7520), | |
o = r(8042), | |
a = r(1888); | |
let l = class extends s.AbstractPredicateTransition { | |
constructor(e, t, r, n) { | |
super(e), (this.ruleIndex = t), (this.predIndex = r), (this.isCtxDependent = n); | |
} | |
get serializationType() { | |
return 4; | |
} | |
get isEpsilon() { | |
return !0; | |
} | |
matches(e, t, r) { | |
return !1; | |
} | |
get predicate() { | |
return new a.SemanticContext.Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent); | |
} | |
toString() { | |
return "pred_" + this.ruleIndex + ":" + this.predIndex; | |
} | |
}; | |
n([o.Override], l.prototype, "serializationType", null), | |
n([o.Override], l.prototype, "isEpsilon", null), | |
n([o.Override], l.prototype, "matches", null), | |
n([o.Override, o.NotNull], l.prototype, "toString", null), | |
(l = n([i(0, o.NotNull)], l)), | |
(t.PredicateTransition = l); | |
}, | |
9767: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.SingletonPredictionContext = t.PredictionContext = void 0); | |
const s = r(3874), | |
o = r(9026), | |
a = r(6005), | |
l = r(3943), | |
c = r(8042), | |
u = r(604), | |
h = r(9491); | |
class p { | |
constructor(e) { | |
this.cachedHashCode = e; | |
} | |
static calculateEmptyHashCode() { | |
let e = l.MurmurHash.initialize(1); | |
return (e = l.MurmurHash.finish(e, 0)), e; | |
} | |
static calculateSingleHashCode(e, t) { | |
let r = l.MurmurHash.initialize(1); | |
return (r = l.MurmurHash.update(r, e)), (r = l.MurmurHash.update(r, t)), (r = l.MurmurHash.finish(r, 2)), r; | |
} | |
static calculateHashCode(e, t) { | |
let r = l.MurmurHash.initialize(1); | |
for (let t of e) r = l.MurmurHash.update(r, t); | |
for (let e of t) r = l.MurmurHash.update(r, e); | |
return (r = l.MurmurHash.finish(r, 2 * e.length)), r; | |
} | |
static fromRuleContext(e, t, r = !0) { | |
if (t.isEmpty) return r ? p.EMPTY_FULL : p.EMPTY_LOCAL; | |
let n; | |
n = t._parent ? p.fromRuleContext(e, t._parent, r) : r ? p.EMPTY_FULL : p.EMPTY_LOCAL; | |
let i = e.states[t.invokingState].transition(0); | |
return n.getChild(i.followState.stateNumber); | |
} | |
static addEmptyContext(e) { | |
return e.addEmptyContext(); | |
} | |
static removeEmptyContext(e) { | |
return e.removeEmptyContext(); | |
} | |
static join(e, t, r = u.PredictionContextCache.UNCACHED) { | |
if (e === t) return e; | |
if (e.isEmpty) return p.isEmptyLocal(e) ? e : p.addEmptyContext(t); | |
if (t.isEmpty) return p.isEmptyLocal(t) ? t : p.addEmptyContext(e); | |
let n = e.size, | |
i = t.size; | |
if (1 === n && 1 === i && e.getReturnState(0) === t.getReturnState(0)) { | |
let n = r.join(e.getParent(0), t.getParent(0)); | |
return n === e.getParent(0) ? e : n === t.getParent(0) ? t : n.getChild(e.getReturnState(0)); | |
} | |
let s = 0, | |
o = new Array(n + i), | |
a = new Array(o.length), | |
l = 0, | |
c = 0, | |
d = !0, | |
y = !0; | |
for (; l < n && c < i; ) | |
e.getReturnState(l) === t.getReturnState(c) | |
? ((o[s] = r.join(e.getParent(l), t.getParent(c))), (a[s] = e.getReturnState(l)), (d = d && o[s] === e.getParent(l)), (y = y && o[s] === t.getParent(c)), l++, c++) | |
: e.getReturnState(l) < t.getReturnState(c) | |
? ((o[s] = e.getParent(l)), (a[s] = e.getReturnState(l)), (y = !1), l++) | |
: (h(t.getReturnState(c) < e.getReturnState(l)), (o[s] = t.getParent(c)), (a[s] = t.getReturnState(c)), (d = !1), c++), | |
s++; | |
for (; l < n; ) (o[s] = e.getParent(l)), (a[s] = e.getReturnState(l)), l++, (y = !1), s++; | |
for (; c < i; ) (o[s] = t.getParent(c)), (a[s] = t.getReturnState(c)), c++, (d = !1), s++; | |
return d ? e : y ? t : (s < o.length && ((o = o.slice(0, s)), (a = a.slice(0, s))), 0 === o.length ? p.EMPTY_FULL : 1 === o.length ? new f(o[0], a[0]) : new m(o, a)); | |
} | |
static isEmptyLocal(e) { | |
return e === p.EMPTY_LOCAL; | |
} | |
static getCachedContext(e, t, r) { | |
if (e.isEmpty) return e; | |
let n = r.get(e); | |
if (n) return n; | |
if (((n = t.get(e)), n)) return r.put(e, n), n; | |
let i, | |
s = !1, | |
o = new Array(e.size); | |
for (let n = 0; n < o.length; n++) { | |
let i = p.getCachedContext(e.getParent(n), t, r); | |
if (s || i !== e.getParent(n)) { | |
if (!s) { | |
o = new Array(e.size); | |
for (let t = 0; t < e.size; t++) o[t] = e.getParent(t); | |
s = !0; | |
} | |
o[n] = i; | |
} | |
} | |
if (!s) return (n = t.putIfAbsent(e, e)), r.put(e, null != n ? n : e), e; | |
if (1 === o.length) i = new f(o[0], e.getReturnState(0)); | |
else { | |
let t = new Array(e.size); | |
for (let r = 0; r < e.size; r++) t[r] = e.getReturnState(r); | |
i = new m(o, t, e.hashCode()); | |
} | |
return (n = t.putIfAbsent(i, i)), r.put(i, n || i), r.put(e, n || i), i; | |
} | |
appendSingleContext(e, t) { | |
return this.appendContext(p.EMPTY_FULL.getChild(e), t); | |
} | |
getChild(e) { | |
return new f(this, e); | |
} | |
hashCode() { | |
return this.cachedHashCode; | |
} | |
toStrings(e, t, r = p.EMPTY_FULL) { | |
let n = []; | |
e: for (let i = 0; ; i++) { | |
let s = 0, | |
o = !0, | |
a = this, | |
l = t, | |
c = ""; | |
for (c += "["; !a.isEmpty && a !== r; ) { | |
let t = 0; | |
if (a.size > 0) { | |
let e = 1; | |
for (; (1 << e) >>> 0 < a.size; ) e++; | |
if (((t = (i >> s) & (((1 << e) >>> 0) - 1)), (o = o && t >= a.size - 1), t >= a.size)) continue e; | |
s += e; | |
} | |
if (e) { | |
c.length > 1 && (c += " "); | |
let t = e.atn.states[l]; | |
c += e.ruleNames[t.ruleIndex]; | |
} else a.getReturnState(t) !== p.EMPTY_FULL_STATE_KEY && (a.isEmpty || (c.length > 1 && (c += " "), (c += a.getReturnState(t)))); | |
(l = a.getReturnState(t)), (a = a.getParent(t)); | |
} | |
if (((c += "]"), n.push(c), o)) break; | |
} | |
return n; | |
} | |
} | |
n([c.Override], p.prototype, "hashCode", null), n([i(0, c.NotNull), i(1, c.NotNull), i(2, c.NotNull)], p, "join", null), n([i(0, c.NotNull), i(1, c.NotNull), i(2, c.NotNull)], p, "getCachedContext", null), (t.PredictionContext = p); | |
class d extends p { | |
constructor(e) { | |
super(p.calculateEmptyHashCode()), (this.fullContext = e); | |
} | |
get isFullContext() { | |
return this.fullContext; | |
} | |
addEmptyContext() { | |
return this; | |
} | |
removeEmptyContext() { | |
throw new Error("Cannot remove the empty context from itself."); | |
} | |
getParent(e) { | |
throw new Error("index out of bounds"); | |
} | |
getReturnState(e) { | |
throw new Error("index out of bounds"); | |
} | |
findReturnState(e) { | |
return -1; | |
} | |
get size() { | |
return 0; | |
} | |
appendSingleContext(e, t) { | |
return t.getChild(this, e); | |
} | |
appendContext(e, t) { | |
return e; | |
} | |
get isEmpty() { | |
return !0; | |
} | |
get hasEmpty() { | |
return !0; | |
} | |
equals(e) { | |
return this === e; | |
} | |
toStrings(e, t, r) { | |
return ["[]"]; | |
} | |
} | |
n([c.Override], d.prototype, "addEmptyContext", null), | |
n([c.Override], d.prototype, "removeEmptyContext", null), | |
n([c.Override], d.prototype, "getParent", null), | |
n([c.Override], d.prototype, "getReturnState", null), | |
n([c.Override], d.prototype, "findReturnState", null), | |
n([c.Override], d.prototype, "size", null), | |
n([c.Override], d.prototype, "appendSingleContext", null), | |
n([c.Override], d.prototype, "appendContext", null), | |
n([c.Override], d.prototype, "isEmpty", null), | |
n([c.Override], d.prototype, "hasEmpty", null), | |
n([c.Override], d.prototype, "equals", null), | |
n([c.Override], d.prototype, "toStrings", null); | |
let m = class e extends p { | |
constructor(e, t, r) { | |
super(r || p.calculateHashCode(e, t)), h(e.length === t.length), h(t.length > 1 || t[0] !== p.EMPTY_FULL_STATE_KEY, "Should be using PredictionContext.EMPTY instead."), (this.parents = e), (this.returnStates = t); | |
} | |
getParent(e) { | |
return this.parents[e]; | |
} | |
getReturnState(e) { | |
return this.returnStates[e]; | |
} | |
findReturnState(e) { | |
return a.Arrays.binarySearch(this.returnStates, e); | |
} | |
get size() { | |
return this.returnStates.length; | |
} | |
get isEmpty() { | |
return !1; | |
} | |
get hasEmpty() { | |
return this.returnStates[this.returnStates.length - 1] === p.EMPTY_FULL_STATE_KEY; | |
} | |
addEmptyContext() { | |
if (this.hasEmpty) return this; | |
let t = this.parents.slice(0), | |
r = this.returnStates.slice(0); | |
return t.push(p.EMPTY_FULL), r.push(p.EMPTY_FULL_STATE_KEY), new e(t, r); | |
} | |
removeEmptyContext() { | |
if (!this.hasEmpty) return this; | |
if (2 === this.returnStates.length) return new f(this.parents[0], this.returnStates[0]); | |
{ | |
let t = this.parents.slice(0, this.parents.length - 1), | |
r = this.returnStates.slice(0, this.returnStates.length - 1); | |
return new e(t, r); | |
} | |
} | |
appendContext(t, r) { | |
return e.appendContextImpl(this, t, new p.IdentityHashMap()); | |
} | |
static appendContextImpl(t, r, n) { | |
if (r.isEmpty) { | |
if (p.isEmptyLocal(r)) { | |
if (t.hasEmpty) return p.EMPTY_LOCAL; | |
throw new Error("what to do here?"); | |
} | |
return t; | |
} | |
if (1 !== r.size) throw new Error("Appending a tree suffix is not yet supported."); | |
let i = n.get(t); | |
if (!i) { | |
if (t.isEmpty) i = r; | |
else { | |
let s = t.size; | |
t.hasEmpty && s--; | |
let o = new Array(s), | |
a = new Array(s); | |
for (let e = 0; e < s; e++) a[e] = t.getReturnState(e); | |
for (let i = 0; i < s; i++) o[i] = e.appendContextImpl(t.getParent(i), r, n); | |
1 === o.length ? (i = new f(o[0], a[0])) : (h(o.length > 1), (i = new e(o, a))), t.hasEmpty && (i = p.join(i, r)); | |
} | |
n.put(t, i); | |
} | |
return i; | |
} | |
equals(t) { | |
if (this === t) return !0; | |
if (!(t instanceof e)) return !1; | |
if (this.hashCode() !== t.hashCode()) return !1; | |
let r = t; | |
return this.equalsImpl(r, new o.Array2DHashSet()); | |
} | |
equalsImpl(e, t) { | |
let r = [], | |
n = []; | |
for (r.push(this), n.push(e); ; ) { | |
let e = r.pop(), | |
i = n.pop(); | |
if (!e || !i) break; | |
let s = new u.PredictionContextCache.IdentityCommutativePredictionContextOperands(e, i); | |
if (!t.add(s)) continue; | |
let o = s.x.size; | |
if (0 !== o) { | |
if (o !== s.y.size) return !1; | |
for (let e = 0; e < o; e++) { | |
if (s.x.getReturnState(e) !== s.y.getReturnState(e)) return !1; | |
let t = s.x.getParent(e), | |
i = s.y.getParent(e); | |
if (t.hashCode() !== i.hashCode()) return !1; | |
t !== i && (r.push(t), n.push(i)); | |
} | |
} else if (!s.x.equals(s.y)) return !1; | |
} | |
return !0; | |
} | |
}; | |
n([c.NotNull], m.prototype, "parents", void 0), | |
n([c.NotNull], m.prototype, "returnStates", void 0), | |
n([c.Override], m.prototype, "getParent", null), | |
n([c.Override], m.prototype, "getReturnState", null), | |
n([c.Override], m.prototype, "findReturnState", null), | |
n([c.Override], m.prototype, "size", null), | |
n([c.Override], m.prototype, "isEmpty", null), | |
n([c.Override], m.prototype, "hasEmpty", null), | |
n([c.Override], m.prototype, "addEmptyContext", null), | |
n([c.Override], m.prototype, "removeEmptyContext", null), | |
n([c.Override], m.prototype, "appendContext", null), | |
n([c.Override], m.prototype, "equals", null), | |
(m = n([i(0, c.NotNull)], m)); | |
let f = class e extends p { | |
constructor(e, t) { | |
super(p.calculateSingleHashCode(e, t)), (this.parent = e), (this.returnState = t); | |
} | |
getParent(e) { | |
return this.parent; | |
} | |
getReturnState(e) { | |
return this.returnState; | |
} | |
findReturnState(e) { | |
return this.returnState === e ? 0 : -1; | |
} | |
get size() { | |
return 1; | |
} | |
get isEmpty() { | |
return !1; | |
} | |
get hasEmpty() { | |
return !1; | |
} | |
appendContext(e, t) { | |
return t.getChild(this.parent.appendContext(e, t), this.returnState); | |
} | |
addEmptyContext() { | |
let e = [this.parent, p.EMPTY_FULL], | |
t = [this.returnState, p.EMPTY_FULL_STATE_KEY]; | |
return new m(e, t); | |
} | |
removeEmptyContext() { | |
return this; | |
} | |
equals(t) { | |
if (t === this) return !0; | |
if (!(t instanceof e)) return !1; | |
let r = t; | |
return this.hashCode() === r.hashCode() && this.returnState === r.returnState && this.parent.equals(r.parent); | |
} | |
}; | |
n([c.NotNull], f.prototype, "parent", void 0), | |
n([c.Override], f.prototype, "getParent", null), | |
n([c.Override], f.prototype, "getReturnState", null), | |
n([c.Override], f.prototype, "findReturnState", null), | |
n([c.Override], f.prototype, "size", null), | |
n([c.Override], f.prototype, "isEmpty", null), | |
n([c.Override], f.prototype, "hasEmpty", null), | |
n([c.Override], f.prototype, "appendContext", null), | |
n([c.Override], f.prototype, "addEmptyContext", null), | |
n([c.Override], f.prototype, "removeEmptyContext", null), | |
n([c.Override], f.prototype, "equals", null), | |
(f = n([i(0, c.NotNull)], f)), | |
(t.SingletonPredictionContext = f), | |
(function (e) { | |
(e.EMPTY_LOCAL = new d(!1)), (e.EMPTY_FULL = new d(!0)), (e.EMPTY_LOCAL_STATE_KEY = -2147483648), (e.EMPTY_FULL_STATE_KEY = 2147483647); | |
class t extends s.Array2DHashMap { | |
constructor() { | |
super(r.INSTANCE); | |
} | |
} | |
e.IdentityHashMap = t; | |
class r { | |
IdentityEqualityComparator() {} | |
hashCode(e) { | |
return e.hashCode(); | |
} | |
equals(e, t) { | |
return e === t; | |
} | |
} | |
(r.INSTANCE = new r()), n([c.Override], r.prototype, "hashCode", null), n([c.Override], r.prototype, "equals", null), (e.IdentityEqualityComparator = r); | |
})((p = t.PredictionContext || (t.PredictionContext = {}))); | |
}, | |
604: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PredictionContextCache = void 0); | |
const i = r(3874), | |
s = r(8042), | |
o = r(8842), | |
a = r(9767), | |
l = r(9491); | |
class c { | |
constructor(e = !0) { | |
(this.contexts = new i.Array2DHashMap(o.ObjectEqualityComparator.INSTANCE)), | |
(this.childContexts = new i.Array2DHashMap(o.ObjectEqualityComparator.INSTANCE)), | |
(this.joinContexts = new i.Array2DHashMap(o.ObjectEqualityComparator.INSTANCE)), | |
(this.enableCache = e); | |
} | |
getAsCached(e) { | |
if (!this.enableCache) return e; | |
let t = this.contexts.get(e); | |
return t || ((t = e), this.contexts.put(e, e)), t; | |
} | |
getChild(e, t) { | |
if (!this.enableCache) return e.getChild(t); | |
let r = new c.PredictionContextAndInt(e, t), | |
n = this.childContexts.get(r); | |
return n || ((n = e.getChild(t)), (n = this.getAsCached(n)), this.childContexts.put(r, n)), n; | |
} | |
join(e, t) { | |
if (!this.enableCache) return a.PredictionContext.join(e, t, this); | |
let r = new c.IdentityCommutativePredictionContextOperands(e, t), | |
n = this.joinContexts.get(r); | |
return n || ((n = a.PredictionContext.join(e, t, this)), (n = this.getAsCached(n)), this.joinContexts.put(r, n), n); | |
} | |
} | |
(t.PredictionContextCache = c), | |
(c.UNCACHED = new c(!1)), | |
(function (e) { | |
class t { | |
constructor(e, t) { | |
(this.obj = e), (this.value = t); | |
} | |
equals(e) { | |
if (!(e instanceof t)) return !1; | |
if (e === this) return !0; | |
let r = e; | |
return this.value === r.value && (this.obj === r.obj || (null != this.obj && this.obj.equals(r.obj))); | |
} | |
hashCode() { | |
let e = 5; | |
return (e = 7 * e + (null != this.obj ? this.obj.hashCode() : 0)), (e = 7 * e + this.value), e; | |
} | |
} | |
n([s.Override], t.prototype, "equals", null), n([s.Override], t.prototype, "hashCode", null), (e.PredictionContextAndInt = t); | |
class r { | |
constructor(e, t) { | |
l(null != e), l(null != t), (this._x = e), (this._y = t); | |
} | |
get x() { | |
return this._x; | |
} | |
get y() { | |
return this._y; | |
} | |
equals(e) { | |
if (!(e instanceof r)) return !1; | |
if (this === e) return !0; | |
let t = e; | |
return (this._x === t._x && this._y === t._y) || (this._x === t._y && this._y === t._x); | |
} | |
hashCode() { | |
return this._x.hashCode() ^ this._y.hashCode(); | |
} | |
} | |
n([s.Override], r.prototype, "equals", null), n([s.Override], r.prototype, "hashCode", null), (e.IdentityCommutativePredictionContextOperands = r); | |
})((c = t.PredictionContextCache || (t.PredictionContextCache = {}))); | |
}, | |
6247: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.PredictionMode = void 0); | |
const i = r(3874), | |
s = r(3943), | |
o = r(8042), | |
a = r(5337); | |
var l; | |
((l = t.PredictionMode || (t.PredictionMode = {}))[(l.SLL = 0)] = "SLL"), | |
(l[(l.LL = 1)] = "LL"), | |
(l[(l.LL_EXACT_AMBIG_DETECTION = 2)] = "LL_EXACT_AMBIG_DETECTION"), | |
(function (e) { | |
class t extends i.Array2DHashMap { | |
constructor() { | |
super(r.INSTANCE); | |
} | |
} | |
class r { | |
AltAndContextConfigEqualityComparator() {} | |
hashCode(e) { | |
let t = s.MurmurHash.initialize(7); | |
return (t = s.MurmurHash.update(t, e.state.stateNumber)), (t = s.MurmurHash.update(t, e.context)), (t = s.MurmurHash.finish(t, 2)), t; | |
} | |
equals(e, t) { | |
return e === t || (null != e && null != t && e.state.stateNumber === t.state.stateNumber && e.context.equals(t.context)); | |
} | |
} | |
(r.INSTANCE = new r()), | |
n([o.Override], r.prototype, "hashCode", null), | |
n([o.Override], r.prototype, "equals", null), | |
(e.hasConfigInRuleStopState = function (e) { | |
for (let t of e) if (t.state instanceof a.RuleStopState) return !0; | |
return !1; | |
}), | |
(e.allConfigsInRuleStopStates = function (e) { | |
for (let t of e) if (!(t.state instanceof a.RuleStopState)) return !1; | |
return !0; | |
}); | |
})(t.PredictionMode || (t.PredictionMode = {})); | |
}, | |
2527: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ProfilingATNSimulator = void 0); | |
const s = r(1305), | |
o = r(7949), | |
a = r(7643), | |
l = r(8862), | |
c = r(8966), | |
u = r(291), | |
h = r(8042), | |
p = r(5164), | |
d = r(4584), | |
m = r(5814), | |
f = r(1888), | |
y = r(1071); | |
class g extends d.ParserATNSimulator { | |
constructor(e) { | |
super(e.interpreter.atn, e), | |
(this._startIndex = 0), | |
(this._sllStopIndex = 0), | |
(this._llStopIndex = 0), | |
(this.currentDecision = 0), | |
(this.conflictingAltResolvedBySLL = 0), | |
(this.optimize_ll1 = !1), | |
(this.reportAmbiguities = !0), | |
(this.numDecisions = this.atn.decisionToState.length), | |
(this.decisions = []); | |
for (let e = 0; e < this.numDecisions; e++) this.decisions.push(new c.DecisionInfo(e)); | |
} | |
adaptivePredict(e, t, r, n) { | |
if (void 0 !== n) return super.adaptivePredict(e, t, r, n); | |
try { | |
(this._input = e), | |
(this._startIndex = e.index), | |
(this._sllStopIndex = this._startIndex - 1), | |
(this._llStopIndex = -1), | |
(this.currentDecision = t), | |
(this.currentState = void 0), | |
(this.conflictingAltResolvedBySLL = o.ATN.INVALID_ALT_NUMBER); | |
let n = process.hrtime(), | |
i = super.adaptivePredict(e, t, r), | |
s = process.hrtime(), | |
a = 1e9 * (s[0] - n[0]); | |
0 === a ? (a = s[1] - n[1]) : (a += 1e9 - n[1] + s[1]), (this.decisions[t].timeInPrediction += a), this.decisions[t].invocations++; | |
let l = this._sllStopIndex - this._startIndex + 1; | |
if ( | |
((this.decisions[t].SLL_TotalLook += l), | |
(this.decisions[t].SLL_MinLook = 0 === this.decisions[t].SLL_MinLook ? l : Math.min(this.decisions[t].SLL_MinLook, l)), | |
l > this.decisions[t].SLL_MaxLook && ((this.decisions[t].SLL_MaxLook = l), (this.decisions[t].SLL_MaxLookEvent = new p.LookaheadEventInfo(t, void 0, i, e, this._startIndex, this._sllStopIndex, !1))), | |
this._llStopIndex >= 0) | |
) { | |
let r = this._llStopIndex - this._startIndex + 1; | |
(this.decisions[t].LL_TotalLook += r), | |
(this.decisions[t].LL_MinLook = 0 === this.decisions[t].LL_MinLook ? r : Math.min(this.decisions[t].LL_MinLook, r)), | |
r > this.decisions[t].LL_MaxLook && ((this.decisions[t].LL_MaxLook = r), (this.decisions[t].LL_MaxLookEvent = new p.LookaheadEventInfo(t, void 0, i, e, this._startIndex, this._llStopIndex, !0))); | |
} | |
return i; | |
} finally { | |
(this._input = void 0), (this.currentDecision = -1); | |
} | |
} | |
getStartState(e, t, r, n) { | |
let i = super.getStartState(e, t, r, n); | |
return (this.currentState = i), i; | |
} | |
computeStartState(e, t, r) { | |
let n = super.computeStartState(e, t, r); | |
return (this.currentState = n), n; | |
} | |
computeReachSet(e, t, r, n) { | |
if (void 0 === this._input) throw new Error("Invalid state"); | |
let i = super.computeReachSet(e, t, r, n); | |
return null == i && this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision, t, this._input, this._startIndex, this._input.index)), (this.currentState = i), i; | |
} | |
getExistingTargetState(e, t) { | |
if (void 0 === this.currentState || void 0 === this._input) throw new Error("Invalid state"); | |
this.currentState.useContext ? (this._llStopIndex = this._input.index) : (this._sllStopIndex = this._input.index); | |
let r = super.getExistingTargetState(e, t); | |
if ( | |
null != r && | |
((this.currentState = new y.SimulatorState(this.currentState.outerContext, r, this.currentState.useContext, this.currentState.remainingOuterContext)), | |
this.currentState.useContext ? this.decisions[this.currentDecision].LL_DFATransitions++ : this.decisions[this.currentDecision].SLL_DFATransitions++, | |
r === a.ATNSimulator.ERROR) | |
) { | |
let t = new y.SimulatorState(this.currentState.outerContext, e, this.currentState.useContext, this.currentState.remainingOuterContext); | |
this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision, t, this._input, this._startIndex, this._input.index)); | |
} | |
return r; | |
} | |
computeTargetState(e, t, r, n, i, s) { | |
let o = super.computeTargetState(e, t, r, n, i, s); | |
return i ? this.decisions[this.currentDecision].LL_ATNTransitions++ : this.decisions[this.currentDecision].SLL_ATNTransitions++, o; | |
} | |
evalSemanticContextImpl(e, t, r) { | |
if (void 0 === this.currentState || void 0 === this._input) throw new Error("Invalid state"); | |
let n = super.evalSemanticContextImpl(e, t, r); | |
if (!(e instanceof f.SemanticContext.PrecedencePredicate)) { | |
let t = this._llStopIndex >= 0 ? this._llStopIndex : this._sllStopIndex; | |
this.decisions[this.currentDecision].predicateEvals.push(new m.PredicateEvalInfo(this.currentState, this.currentDecision, this._input, this._startIndex, t, e, n, r)); | |
} | |
return n; | |
} | |
reportContextSensitivity(e, t, r, n, i) { | |
if (void 0 === this._input) throw new Error("Invalid state"); | |
t !== this.conflictingAltResolvedBySLL && this.decisions[this.currentDecision].contextSensitivities.push(new l.ContextSensitivityInfo(this.currentDecision, r, this._input, n, i)), super.reportContextSensitivity(e, t, r, n, i); | |
} | |
reportAttemptingFullContext(e, t, r, n, i) { | |
(this.conflictingAltResolvedBySLL = null != t ? t.nextSetBit(0) : r.s0.configs.getRepresentedAlternatives().nextSetBit(0)), this.decisions[this.currentDecision].LL_Fallback++, super.reportAttemptingFullContext(e, t, r, n, i); | |
} | |
reportAmbiguity(e, t, r, n, i, a, c) { | |
if (void 0 === this.currentState || void 0 === this._input) throw new Error("Invalid state"); | |
let u; | |
(u = null != a ? a.nextSetBit(0) : c.getRepresentedAlternatives().nextSetBit(0)), | |
this.conflictingAltResolvedBySLL !== o.ATN.INVALID_ALT_NUMBER && | |
u !== this.conflictingAltResolvedBySLL && | |
this.decisions[this.currentDecision].contextSensitivities.push(new l.ContextSensitivityInfo(this.currentDecision, this.currentState, this._input, r, n)), | |
this.decisions[this.currentDecision].ambiguities.push(new s.AmbiguityInfo(this.currentDecision, this.currentState, a, this._input, r, n)), | |
super.reportAmbiguity(e, t, r, n, i, a, c); | |
} | |
getDecisionInfo() { | |
return this.decisions; | |
} | |
getCurrentState() { | |
return this.currentState; | |
} | |
} | |
n([h.Override, i(0, h.NotNull)], g.prototype, "adaptivePredict", null), | |
n([h.Override], g.prototype, "getStartState", null), | |
n([h.Override], g.prototype, "computeStartState", null), | |
n([h.Override], g.prototype, "computeReachSet", null), | |
n([h.Override], g.prototype, "getExistingTargetState", null), | |
n([h.Override], g.prototype, "computeTargetState", null), | |
n([h.Override], g.prototype, "evalSemanticContextImpl", null), | |
n([h.Override], g.prototype, "reportContextSensitivity", null), | |
n([h.Override], g.prototype, "reportAttemptingFullContext", null), | |
n([h.Override, i(0, h.NotNull), i(5, h.NotNull), i(6, h.NotNull)], g.prototype, "reportAmbiguity", null), | |
(t.ProfilingATNSimulator = g); | |
}, | |
2751: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RangeTransition = void 0); | |
const s = r(4405), | |
o = r(8042), | |
a = r(312); | |
let l = class extends a.Transition { | |
constructor(e, t, r) { | |
super(e), (this.from = t), (this.to = r); | |
} | |
get serializationType() { | |
return 2; | |
} | |
get label() { | |
return s.IntervalSet.of(this.from, this.to); | |
} | |
matches(e, t, r) { | |
return e >= this.from && e <= this.to; | |
} | |
toString() { | |
return "'" + String.fromCodePoint(this.from) + "'..'" + String.fromCodePoint(this.to) + "'"; | |
} | |
}; | |
n([o.Override], l.prototype, "serializationType", null), | |
n([o.Override, o.NotNull], l.prototype, "label", null), | |
n([o.Override], l.prototype, "matches", null), | |
n([o.Override, o.NotNull], l.prototype, "toString", null), | |
(l = n([i(0, o.NotNull)], l)), | |
(t.RangeTransition = l); | |
}, | |
6557: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleStartState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
constructor() { | |
super(...arguments), (this.isPrecedenceRule = !1), (this.leftFactored = !1); | |
} | |
get stateType() { | |
return s.ATNStateType.RULE_START; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.RuleStartState = a); | |
}, | |
5337: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleStopState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
get nonStopStateNumber() { | |
return -1; | |
} | |
get stateType() { | |
return s.ATNStateType.RULE_STOP; | |
} | |
} | |
n([o.Override], a.prototype, "nonStopStateNumber", null), n([o.Override], a.prototype, "stateType", null), (t.RuleStopState = a); | |
}, | |
4704: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleTransition = void 0); | |
const s = r(8042), | |
o = r(312); | |
let a = class extends o.Transition { | |
constructor(e, t, r, n) { | |
super(e), (this.tailCall = !1), (this.optimizedTailCall = !1), (this.ruleIndex = t), (this.precedence = r), (this.followState = n); | |
} | |
get serializationType() { | |
return 3; | |
} | |
get isEpsilon() { | |
return !0; | |
} | |
matches(e, t, r) { | |
return !1; | |
} | |
}; | |
n([s.NotNull], a.prototype, "followState", void 0), | |
n([s.Override], a.prototype, "serializationType", null), | |
n([s.Override], a.prototype, "isEpsilon", null), | |
n([s.Override], a.prototype, "matches", null), | |
(a = n([i(0, s.NotNull), i(3, s.NotNull)], a)), | |
(t.RuleTransition = a); | |
}, | |
1888: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.SemanticContext = void 0); | |
const s = r(9026), | |
o = r(5192), | |
a = r(3943), | |
l = r(8042), | |
c = r(8842), | |
u = r(5103); | |
class h { | |
static get NONE() { | |
return void 0 === h._NONE && (h._NONE = new h.Predicate()), h._NONE; | |
} | |
evalPrecedence(e, t) { | |
return this; | |
} | |
static and(e, t) { | |
if (!e || e === h.NONE) return t; | |
if (t === h.NONE) return e; | |
let r = new h.AND(e, t); | |
return 1 === r.opnds.length ? r.opnds[0] : r; | |
} | |
static or(e, t) { | |
if (!e) return t; | |
if (e === h.NONE || t === h.NONE) return h.NONE; | |
let r = new h.OR(e, t); | |
return 1 === r.opnds.length ? r.opnds[0] : r; | |
} | |
} | |
(t.SemanticContext = h), | |
(function (e) { | |
function t(t) { | |
let r = []; | |
for (let n = 0; n < t.length; n++) { | |
let i = t[n]; | |
i instanceof e.PrecedencePredicate && (r.push(i), t.splice(n, 1), n--); | |
} | |
return r; | |
} | |
class r extends e { | |
constructor(e = -1, t = -1, r = !1) { | |
super(), (this.ruleIndex = e), (this.predIndex = t), (this.isCtxDependent = r); | |
} | |
eval(e, t) { | |
let r = this.isCtxDependent ? t : void 0; | |
return e.sempred(r, this.ruleIndex, this.predIndex); | |
} | |
hashCode() { | |
let e = a.MurmurHash.initialize(); | |
return (e = a.MurmurHash.update(e, this.ruleIndex)), (e = a.MurmurHash.update(e, this.predIndex)), (e = a.MurmurHash.update(e, this.isCtxDependent ? 1 : 0)), (e = a.MurmurHash.finish(e, 3)), e; | |
} | |
equals(e) { | |
return e instanceof r && (this === e || (this.ruleIndex === e.ruleIndex && this.predIndex === e.predIndex && this.isCtxDependent === e.isCtxDependent)); | |
} | |
toString() { | |
return "{" + this.ruleIndex + ":" + this.predIndex + "}?"; | |
} | |
} | |
n([l.Override], r.prototype, "eval", null), n([l.Override], r.prototype, "hashCode", null), n([l.Override], r.prototype, "equals", null), n([l.Override], r.prototype, "toString", null), (e.Predicate = r); | |
class h extends e { | |
constructor(e) { | |
super(), (this.precedence = e); | |
} | |
eval(e, t) { | |
return e.precpred(t, this.precedence); | |
} | |
evalPrecedence(t, r) { | |
return t.precpred(r, this.precedence) ? e.NONE : void 0; | |
} | |
compareTo(e) { | |
return this.precedence - e.precedence; | |
} | |
hashCode() { | |
let e = 1; | |
return (e = 31 * e + this.precedence), e; | |
} | |
equals(e) { | |
return e instanceof h && (this === e || this.precedence === e.precedence); | |
} | |
toString() { | |
return "{" + this.precedence + ">=prec}?"; | |
} | |
} | |
n([l.Override], h.prototype, "eval", null), | |
n([l.Override], h.prototype, "evalPrecedence", null), | |
n([l.Override], h.prototype, "compareTo", null), | |
n([l.Override], h.prototype, "hashCode", null), | |
n([l.Override], h.prototype, "equals", null), | |
n([l.Override], h.prototype, "toString", null), | |
(e.PrecedencePredicate = h); | |
class p extends e {} | |
e.Operator = p; | |
let d = class r extends p { | |
constructor(e, n) { | |
super(); | |
let i = new s.Array2DHashSet(c.ObjectEqualityComparator.INSTANCE); | |
e instanceof r ? i.addAll(e.opnds) : i.add(e), n instanceof r ? i.addAll(n.opnds) : i.add(n), (this.opnds = i.toArray()); | |
let o = (function (e) { | |
let t; | |
for (let r of e) void 0 !== t ? t.compareTo(r) > 0 && (t = r) : (t = r); | |
return t; | |
})(t(this.opnds)); | |
o && this.opnds.push(o); | |
} | |
get operands() { | |
return this.opnds; | |
} | |
equals(e) { | |
return this === e || (e instanceof r && o.ArrayEqualityComparator.INSTANCE.equals(this.opnds, e.opnds)); | |
} | |
hashCode() { | |
return a.MurmurHash.hashCode(this.opnds, 40363613); | |
} | |
eval(e, t) { | |
for (let r of this.opnds) if (!r.eval(e, t)) return !1; | |
return !0; | |
} | |
evalPrecedence(t, r) { | |
let n = !1, | |
i = []; | |
for (let s of this.opnds) { | |
let o = s.evalPrecedence(t, r); | |
if (((n = n || o !== s), null == o)) return; | |
o !== e.NONE && i.push(o); | |
} | |
if (!n) return this; | |
if (0 === i.length) return e.NONE; | |
let s = i[0]; | |
for (let t = 1; t < i.length; t++) s = e.and(s, i[t]); | |
return s; | |
} | |
toString() { | |
return u.join(this.opnds, "&&"); | |
} | |
}; | |
n([l.Override], d.prototype, "operands", null), | |
n([l.Override], d.prototype, "equals", null), | |
n([l.Override], d.prototype, "hashCode", null), | |
n([l.Override], d.prototype, "eval", null), | |
n([l.Override], d.prototype, "evalPrecedence", null), | |
n([l.Override], d.prototype, "toString", null), | |
(d = n([i(0, l.NotNull), i(1, l.NotNull)], d)), | |
(e.AND = d); | |
let m = class r extends p { | |
constructor(e, n) { | |
super(); | |
let i = new s.Array2DHashSet(c.ObjectEqualityComparator.INSTANCE); | |
e instanceof r ? i.addAll(e.opnds) : i.add(e), n instanceof r ? i.addAll(n.opnds) : i.add(n), (this.opnds = i.toArray()); | |
let o = (function (e) { | |
let t; | |
for (let r of e) void 0 !== t ? t.compareTo(r) < 0 && (t = r) : (t = r); | |
return t; | |
})(t(this.opnds)); | |
o && this.opnds.push(o); | |
} | |
get operands() { | |
return this.opnds; | |
} | |
equals(e) { | |
return this === e || (e instanceof r && o.ArrayEqualityComparator.INSTANCE.equals(this.opnds, e.opnds)); | |
} | |
hashCode() { | |
return a.MurmurHash.hashCode(this.opnds, 486279973); | |
} | |
eval(e, t) { | |
for (let r of this.opnds) if (r.eval(e, t)) return !0; | |
return !1; | |
} | |
evalPrecedence(t, r) { | |
let n = !1, | |
i = []; | |
for (let s of this.opnds) { | |
let o = s.evalPrecedence(t, r); | |
if (((n = n || o !== s), o === e.NONE)) return e.NONE; | |
o && i.push(o); | |
} | |
if (!n) return this; | |
if (0 === i.length) return; | |
let s = i[0]; | |
for (let t = 1; t < i.length; t++) s = e.or(s, i[t]); | |
return s; | |
} | |
toString() { | |
return u.join(this.opnds, "||"); | |
} | |
}; | |
n([l.Override], m.prototype, "operands", null), | |
n([l.Override], m.prototype, "equals", null), | |
n([l.Override], m.prototype, "hashCode", null), | |
n([l.Override], m.prototype, "eval", null), | |
n([l.Override], m.prototype, "evalPrecedence", null), | |
n([l.Override], m.prototype, "toString", null), | |
(m = n([i(0, l.NotNull), i(1, l.NotNull)], m)), | |
(e.OR = m); | |
})((h = t.SemanticContext || (t.SemanticContext = {}))); | |
}, | |
6765: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.SetTransition = void 0); | |
const s = r(4405), | |
o = r(8042), | |
a = r(4966), | |
l = r(312); | |
let c = class extends l.Transition { | |
constructor(e, t) { | |
super(e), null == t && (t = s.IntervalSet.of(a.Token.INVALID_TYPE)), (this.set = t); | |
} | |
get serializationType() { | |
return 7; | |
} | |
get label() { | |
return this.set; | |
} | |
matches(e, t, r) { | |
return this.set.contains(e); | |
} | |
toString() { | |
return this.set.toString(); | |
} | |
}; | |
n([o.NotNull], c.prototype, "set", void 0), | |
n([o.Override], c.prototype, "serializationType", null), | |
n([o.Override, o.NotNull], c.prototype, "label", null), | |
n([o.Override], c.prototype, "matches", null), | |
n([o.Override, o.NotNull], c.prototype, "toString", null), | |
(c = n([i(0, o.NotNull), i(1, o.Nullable)], c)), | |
(t.SetTransition = c); | |
}, | |
1071: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.SimulatorState = void 0); | |
const s = r(8042), | |
o = r(3208); | |
let a = class { | |
constructor(e, t, r, n) { | |
(this.outerContext = null != e ? e : o.ParserRuleContext.emptyContext()), (this.s0 = t), (this.useContext = r), (this.remainingOuterContext = n); | |
} | |
}; | |
(a = n([i(1, s.NotNull)], a)), (t.SimulatorState = a); | |
}, | |
1069: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.StarBlockStartState = void 0); | |
const i = r(4700), | |
s = r(4136), | |
o = r(8042); | |
class a extends s.BlockStartState { | |
get stateType() { | |
return i.ATNStateType.STAR_BLOCK_START; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.StarBlockStartState = a); | |
}, | |
7165: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.StarLoopEntryState = void 0); | |
const i = r(4700), | |
s = r(5280), | |
o = r(213), | |
a = r(8042); | |
class l extends o.DecisionState { | |
constructor() { | |
super(...arguments), (this.precedenceRuleDecision = !1), (this.precedenceLoopbackStates = new s.BitSet()); | |
} | |
get stateType() { | |
return i.ATNStateType.STAR_LOOP_ENTRY; | |
} | |
} | |
n([a.Override], l.prototype, "stateType", null), (t.StarLoopEntryState = l); | |
}, | |
8303: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.StarLoopbackState = void 0); | |
const i = r(3269), | |
s = r(4700), | |
o = r(8042); | |
class a extends i.ATNState { | |
get loopEntryState() { | |
return this.transition(0).target; | |
} | |
get stateType() { | |
return s.ATNStateType.STAR_LOOP_BACK; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.StarLoopbackState = a); | |
}, | |
5223: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TokensStartState = void 0); | |
const i = r(4700), | |
s = r(213), | |
o = r(8042); | |
class a extends s.DecisionState { | |
get stateType() { | |
return i.ATNStateType.TOKEN_START; | |
} | |
} | |
n([o.Override], a.prototype, "stateType", null), (t.TokensStartState = a); | |
}, | |
312: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Transition = void 0); | |
const s = r(8042); | |
let o = class { | |
constructor(e) { | |
if (null == e) throw new Error("target cannot be null."); | |
this.target = e; | |
} | |
get isEpsilon() { | |
return !1; | |
} | |
get label() {} | |
}; | |
(o.serializationNames = ["INVALID", "EPSILON", "RANGE", "RULE", "PREDICATE", "ATOM", "ACTION", "SET", "NOT_SET", "WILDCARD", "PRECEDENCE"]), | |
n([s.NotNull], o.prototype, "target", void 0), | |
(o = n([i(0, s.NotNull)], o)), | |
(t.Transition = o); | |
}, | |
8844: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.WildcardTransition = void 0); | |
const s = r(8042), | |
o = r(312); | |
let a = class extends o.Transition { | |
constructor(e) { | |
super(e); | |
} | |
get serializationType() { | |
return 9; | |
} | |
matches(e, t, r) { | |
return e >= t && e <= r; | |
} | |
toString() { | |
return "."; | |
} | |
}; | |
n([s.Override], a.prototype, "serializationType", null), n([s.Override], a.prototype, "matches", null), n([s.Override, s.NotNull], a.prototype, "toString", null), (a = n([i(0, s.NotNull)], a)), (t.WildcardTransition = a); | |
}, | |
1060: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.AcceptStateInfo = void 0), | |
(t.AcceptStateInfo = class { | |
constructor(e, t) { | |
(this._prediction = e), (this._lexerActionExecutor = t); | |
} | |
get prediction() { | |
return this._prediction; | |
} | |
get lexerActionExecutor() { | |
return this._lexerActionExecutor; | |
} | |
}); | |
}, | |
7055: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DFA = void 0); | |
const s = r(9026), | |
o = r(7176), | |
a = r(3917), | |
l = r(1186), | |
c = r(3694), | |
u = r(8042), | |
h = r(8842), | |
p = r(7165), | |
d = r(6763); | |
let m = class { | |
constructor(e, t = 0) { | |
if (((this.states = new s.Array2DHashSet(h.ObjectEqualityComparator.INSTANCE)), (this.nextStateNumber = 0), !e.atn)) throw new Error("The ATNState must be associated with an ATN"); | |
(this.atnStartState = e), (this.atn = e.atn), (this.decision = t); | |
let r = !1; | |
e instanceof p.StarLoopEntryState && e.precedenceRuleDecision && ((r = !0), (this.s0 = new l.DFAState(new o.ATNConfigSet())), (this.s0full = new l.DFAState(new o.ATNConfigSet()))), (this.precedenceDfa = r); | |
} | |
get isPrecedenceDfa() { | |
return this.precedenceDfa; | |
} | |
getPrecedenceStartState(e, t) { | |
if (!this.isPrecedenceDfa) throw new Error("Only precedence DFAs may contain a precedence start state."); | |
return t ? this.s0full.getTarget(e) : this.s0.getTarget(e); | |
} | |
setPrecedenceStartState(e, t, r) { | |
if (!this.isPrecedenceDfa) throw new Error("Only precedence DFAs may contain a precedence start state."); | |
e < 0 || (t ? this.s0full.setTarget(e, r) : this.s0.setTarget(e, r)); | |
} | |
get isEmpty() { | |
return this.isPrecedenceDfa ? 0 === this.s0.getEdgeMap().size && 0 === this.s0full.getEdgeMap().size : null == this.s0 && null == this.s0full; | |
} | |
get isContextSensitive() { | |
return this.isPrecedenceDfa ? this.s0full.getEdgeMap().size > 0 : null != this.s0full; | |
} | |
addState(e) { | |
return (e.stateNumber = this.nextStateNumber++), this.states.getOrAdd(e); | |
} | |
toString(e, t) { | |
if ((e || (e = d.VocabularyImpl.EMPTY_VOCABULARY), !this.s0)) return ""; | |
let r; | |
return (r = t ? new a.DFASerializer(this, e, t, this.atnStartState.atn) : new a.DFASerializer(this, e)), r.toString(); | |
} | |
toLexerString() { | |
return this.s0 ? new c.LexerDFASerializer(this).toString() : ""; | |
} | |
}; | |
n([u.NotNull], m.prototype, "states", void 0), n([u.NotNull], m.prototype, "atnStartState", void 0), n([u.NotNull], m.prototype, "atn", void 0), (m = n([i(0, u.NotNull)], m)), (t.DFA = m); | |
}, | |
3917: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DFASerializer = void 0); | |
const i = r(7643), | |
s = r(8042), | |
o = r(9767), | |
a = r(8610), | |
l = r(6763); | |
class c { | |
constructor(e, t, r, n) { | |
t instanceof a.Recognizer ? ((r = t.ruleNames), (n = t.atn), (t = t.vocabulary)) : t || (t = l.VocabularyImpl.EMPTY_VOCABULARY), (this.dfa = e), (this.vocabulary = t), (this.ruleNames = r), (this.atn = n); | |
} | |
toString() { | |
if (!this.dfa.s0) return ""; | |
let e = ""; | |
if (this.dfa.states) { | |
let t = new Array(...this.dfa.states.toArray()); | |
t.sort((e, t) => e.stateNumber - t.stateNumber); | |
for (let r of t) { | |
let t = r.getEdgeMap(), | |
n = [...t.keys()].sort((e, t) => e - t), | |
s = r.getContextEdgeMap(), | |
o = [...s.keys()].sort((e, t) => e - t); | |
for (let s of n) { | |
let n = t.get(s); | |
if ((null == n || n === i.ATNSimulator.ERROR) && !r.isContextSymbol(s)) continue; | |
let o = !1; | |
(e += this.getStateString(r) + "-" + this.getEdgeLabel(s) + "->"), r.isContextSymbol(s) && ((e += "!"), (o = !0)); | |
let a = n; | |
a && a.stateNumber !== i.ATNSimulator.ERROR.stateNumber ? (e += this.getStateString(a) + "\n") : o && (e += "ctx\n"); | |
} | |
if (r.isContextSensitive) for (let t of o) e += this.getStateString(r) + "-" + this.getContextLabel(t) + "->" + this.getStateString(s.get(t)) + "\n"; | |
} | |
} | |
let t = e; | |
return 0 === t.length ? "" : t; | |
} | |
getContextLabel(e) { | |
if (e === o.PredictionContext.EMPTY_FULL_STATE_KEY) return "ctx:EMPTY_FULL"; | |
if (e === o.PredictionContext.EMPTY_LOCAL_STATE_KEY) return "ctx:EMPTY_LOCAL"; | |
if (this.atn && e > 0 && e <= this.atn.states.length) { | |
let t = this.atn.states[e].ruleIndex; | |
if (this.ruleNames && t >= 0 && t < this.ruleNames.length) return "ctx:" + String(e) + "(" + this.ruleNames[t] + ")"; | |
} | |
return "ctx:" + String(e); | |
} | |
getEdgeLabel(e) { | |
return this.vocabulary.getDisplayName(e); | |
} | |
getStateString(e) { | |
if (e === i.ATNSimulator.ERROR) return "ERROR"; | |
let t = e.stateNumber, | |
r = "s" + t; | |
if ((e.isAcceptState && (r = e.predicates ? ":s" + t + "=>" + e.predicates : ":s" + t + "=>" + e.prediction), e.isContextSensitive)) { | |
r += "*"; | |
for (let t of e.configs) | |
if (t.reachesIntoOuterContext) { | |
r += "*"; | |
break; | |
} | |
} | |
return r; | |
} | |
} | |
n([s.NotNull], c.prototype, "dfa", void 0), n([s.NotNull], c.prototype, "vocabulary", void 0), n([s.Override], c.prototype, "toString", null), (t.DFASerializer = c); | |
}, | |
1186: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DFAState = void 0); | |
const s = r(7949), | |
o = r(5280), | |
a = r(3943), | |
l = r(8042), | |
c = r(9767), | |
u = r(9491); | |
class h { | |
constructor(e) { | |
(this.stateNumber = -1), (this.configs = e), (this.edges = new Map()), (this.contextEdges = new Map()); | |
} | |
get isContextSensitive() { | |
return !!this.contextSymbols; | |
} | |
isContextSymbol(e) { | |
return !!this.isContextSensitive && this.contextSymbols.get(e); | |
} | |
setContextSymbol(e) { | |
u(this.isContextSensitive), this.contextSymbols.set(e); | |
} | |
setContextSensitive(e) { | |
u(!this.configs.isOutermostConfigSet), this.isContextSensitive || this.contextSymbols || (this.contextSymbols = new o.BitSet()); | |
} | |
get acceptStateInfo() { | |
return this._acceptStateInfo; | |
} | |
set acceptStateInfo(e) { | |
this._acceptStateInfo = e; | |
} | |
get isAcceptState() { | |
return !!this._acceptStateInfo; | |
} | |
get prediction() { | |
return this._acceptStateInfo ? this._acceptStateInfo.prediction : s.ATN.INVALID_ALT_NUMBER; | |
} | |
get lexerActionExecutor() { | |
if (this._acceptStateInfo) return this._acceptStateInfo.lexerActionExecutor; | |
} | |
getTarget(e) { | |
return this.edges.get(e); | |
} | |
setTarget(e, t) { | |
this.edges.set(e, t); | |
} | |
getEdgeMap() { | |
return this.edges; | |
} | |
getContextTarget(e) { | |
return e === c.PredictionContext.EMPTY_FULL_STATE_KEY && (e = -1), this.contextEdges.get(e); | |
} | |
setContextTarget(e, t) { | |
if (!this.isContextSensitive) throw new Error("The state is not context sensitive."); | |
e === c.PredictionContext.EMPTY_FULL_STATE_KEY && (e = -1), this.contextEdges.set(e, t); | |
} | |
getContextEdgeMap() { | |
let e = new Map(this.contextEdges), | |
t = e.get(-1); | |
if (void 0 !== t) { | |
if (1 === e.size) { | |
let e = new Map(); | |
return e.set(c.PredictionContext.EMPTY_FULL_STATE_KEY, t), e; | |
} | |
e.delete(-1), e.set(c.PredictionContext.EMPTY_FULL_STATE_KEY, t); | |
} | |
return e; | |
} | |
hashCode() { | |
let e = a.MurmurHash.initialize(7); | |
return (e = a.MurmurHash.update(e, this.configs.hashCode())), (e = a.MurmurHash.finish(e, 1)), e; | |
} | |
equals(e) { | |
if (this === e) return !0; | |
if (!(e instanceof h)) return !1; | |
let t = e; | |
return this.configs.equals(t.configs); | |
} | |
toString() { | |
let e = ""; | |
return (e += this.stateNumber + ":" + this.configs), this.isAcceptState && ((e += "=>"), this.predicates ? (e += this.predicates) : (e += this.prediction)), e.toString(); | |
} | |
} | |
n([l.NotNull], h.prototype, "configs", void 0), | |
n([l.NotNull], h.prototype, "edges", void 0), | |
n([l.NotNull], h.prototype, "contextEdges", void 0), | |
n([l.Override], h.prototype, "hashCode", null), | |
n([l.Override], h.prototype, "equals", null), | |
n([l.Override], h.prototype, "toString", null), | |
(t.DFAState = h), | |
(function (e) { | |
let t = class { | |
constructor(e, t) { | |
(this.alt = t), (this.pred = e); | |
} | |
toString() { | |
return "(" + this.pred + ", " + this.alt + ")"; | |
} | |
}; | |
n([l.NotNull], t.prototype, "pred", void 0), n([l.Override], t.prototype, "toString", null), (t = n([i(0, l.NotNull)], t)), (e.PredPrediction = t); | |
})((h = t.DFAState || (t.DFAState = {}))); | |
}, | |
3694: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.LexerDFASerializer = void 0); | |
const s = r(3917), | |
o = r(8042), | |
a = r(6763); | |
let l = class extends s.DFASerializer { | |
constructor(e) { | |
super(e, a.VocabularyImpl.EMPTY_VOCABULARY); | |
} | |
getEdgeLabel(e) { | |
return "'" + String.fromCodePoint(e) + "'"; | |
} | |
}; | |
n([o.Override, o.NotNull], l.prototype, "getEdgeLabel", null), (l = n([i(0, o.NotNull)], l)), (t.LexerDFASerializer = l); | |
}, | |
352: function (e, t, r) { | |
var n = | |
(this && this.__createBinding) || | |
(Object.create | |
? function (e, t, r, n) { | |
void 0 === n && (n = r), | |
Object.defineProperty(e, n, { | |
enumerable: !0, | |
get: function () { | |
return t[r]; | |
}, | |
}); | |
} | |
: function (e, t, r, n) { | |
void 0 === n && (n = r), (e[n] = t[r]); | |
}), | |
i = | |
(this && this.__exportStar) || | |
function (e, t) { | |
for (var r in e) "default" === r || Object.prototype.hasOwnProperty.call(t, r) || n(t, e, r); | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
i(r(1466), t), | |
i(r(1597), t), | |
i(r(8623), t), | |
i(r(9701), t), | |
i(r(8218), t), | |
i(r(5699), t), | |
i(r(3675), t), | |
i(r(5444), t), | |
i(r(1540), t), | |
i(r(824), t), | |
i(r(8735), t), | |
i(r(4321), t), | |
i(r(4525), t), | |
i(r(3992), t), | |
i(r(4361), t), | |
i(r(7574), t), | |
i(r(2915), t), | |
i(r(4837), t), | |
i(r(4126), t), | |
i(r(3227), t), | |
i(r(9557), t), | |
i(r(7301), t), | |
i(r(5324), t), | |
i(r(7683), t), | |
i(r(4609), t), | |
i(r(2824), t), | |
i(r(1603), t), | |
i(r(627), t), | |
i(r(3208), t), | |
i(r(9583), t), | |
i(r(6454), t), | |
i(r(3998), t), | |
i(r(8610), t), | |
i(r(7423), t), | |
i(r(6599), t), | |
i(r(3252), t), | |
i(r(345), t), | |
i(r(4966), t), | |
i(r(2362), t), | |
i(r(9089), t), | |
i(r(9293), t), | |
i(r(8091), t), | |
i(r(2499), t), | |
i(r(6763), t), | |
i(r(4955), t); | |
}, | |
3874: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Array2DHashMap = void 0); | |
const n = r(9026); | |
class i { | |
constructor(e) { | |
this.keyComparator = e; | |
} | |
hashCode(e) { | |
return this.keyComparator.hashCode(e.key); | |
} | |
equals(e, t) { | |
return this.keyComparator.equals(e.key, t.key); | |
} | |
} | |
class s { | |
constructor(e) { | |
this.backingStore = e instanceof s ? new n.Array2DHashSet(e.backingStore) : new n.Array2DHashSet(new i(e)); | |
} | |
clear() { | |
this.backingStore.clear(); | |
} | |
containsKey(e) { | |
return this.backingStore.contains({ key: e }); | |
} | |
get(e) { | |
let t = this.backingStore.get({ key: e }); | |
if (t) return t.value; | |
} | |
get isEmpty() { | |
return this.backingStore.isEmpty; | |
} | |
put(e, t) { | |
let r, | |
n = this.backingStore.get({ key: e, value: t }); | |
return n ? ((r = n.value), (n.value = t)) : this.backingStore.add({ key: e, value: t }), r; | |
} | |
putIfAbsent(e, t) { | |
let r, | |
n = this.backingStore.get({ key: e, value: t }); | |
return n ? (r = n.value) : this.backingStore.add({ key: e, value: t }), r; | |
} | |
get size() { | |
return this.backingStore.size; | |
} | |
hashCode() { | |
return this.backingStore.hashCode(); | |
} | |
equals(e) { | |
return e instanceof s && this.backingStore.equals(e.backingStore); | |
} | |
} | |
t.Array2DHashMap = s; | |
}, | |
9026: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Array2DHashSet = void 0); | |
const s = r(9491), | |
o = r(3197), | |
a = r(8042), | |
l = r(3943); | |
class c { | |
constructor(e, t = 16) { | |
if (((this.n = 0), (this.threshold = Math.floor(12)), e instanceof c)) { | |
(this.comparator = e.comparator), (this.buckets = e.buckets.slice(0)); | |
for (let e = 0; e < this.buckets.length; e++) { | |
let t = this.buckets[e]; | |
t && (this.buckets[e] = t.slice(0)); | |
} | |
(this.n = e.n), (this.threshold = e.threshold); | |
} else (this.comparator = e || o.DefaultEqualityComparator.INSTANCE), (this.buckets = this.createBuckets(t)); | |
} | |
getOrAdd(e) { | |
return this.n > this.threshold && this.expand(), this.getOrAddImpl(e); | |
} | |
getOrAddImpl(e) { | |
let t = this.getBucket(e), | |
r = this.buckets[t]; | |
if (!r) return (r = [e]), (this.buckets[t] = r), this.n++, e; | |
for (let t of r) if (this.comparator.equals(t, e)) return t; | |
return r.push(e), this.n++, e; | |
} | |
get(e) { | |
if (null == e) return e; | |
let t = this.getBucket(e), | |
r = this.buckets[t]; | |
if (r) for (let t of r) if (this.comparator.equals(t, e)) return t; | |
} | |
getBucket(e) { | |
return this.comparator.hashCode(e) & (this.buckets.length - 1); | |
} | |
hashCode() { | |
let e = l.MurmurHash.initialize(); | |
for (let t of this.buckets) | |
if (null != t) | |
for (let r of t) { | |
if (null == r) break; | |
e = l.MurmurHash.update(e, this.comparator.hashCode(r)); | |
} | |
return (e = l.MurmurHash.finish(e, this.size)), e; | |
} | |
equals(e) { | |
return e === this || (e instanceof c && e.size === this.size && this.containsAll(e)); | |
} | |
expand() { | |
let e = this.buckets, | |
t = 2 * this.buckets.length, | |
r = this.createBuckets(t); | |
(this.buckets = r), (this.threshold = Math.floor(0.75 * t)); | |
let n = this.size; | |
for (let t of e) | |
if (t) | |
for (let e of t) { | |
let t = this.getBucket(e), | |
r = this.buckets[t]; | |
r || ((r = []), (this.buckets[t] = r)), r.push(e); | |
} | |
s(this.n === n); | |
} | |
add(e) { | |
return this.getOrAdd(e) === e; | |
} | |
get size() { | |
return this.n; | |
} | |
get isEmpty() { | |
return 0 === this.n; | |
} | |
contains(e) { | |
return this.containsFast(this.asElementType(e)); | |
} | |
containsFast(e) { | |
return null != e && null != this.get(e); | |
} | |
*[Symbol.iterator]() { | |
yield* this.toArray(); | |
} | |
toArray() { | |
const e = new Array(this.size); | |
let t = 0; | |
for (let r of this.buckets) | |
if (null != r) | |
for (let n of r) { | |
if (null == n) break; | |
e[t++] = n; | |
} | |
return e; | |
} | |
containsAll(e) { | |
if (e instanceof c) { | |
let t = e; | |
for (let e of t.buckets) | |
if (null != e) | |
for (let t of e) { | |
if (null == t) break; | |
if (!this.containsFast(this.asElementType(t))) return !1; | |
} | |
} else for (let t of e) if (!this.containsFast(this.asElementType(t))) return !1; | |
return !0; | |
} | |
addAll(e) { | |
let t = !1; | |
for (let r of e) this.getOrAdd(r) !== r && (t = !0); | |
return t; | |
} | |
clear() { | |
(this.buckets = this.createBuckets(16)), (this.n = 0), (this.threshold = Math.floor(12)); | |
} | |
toString() { | |
if (0 === this.size) return "{}"; | |
let e = "{", | |
t = !0; | |
for (let r of this.buckets) | |
if (null != r) | |
for (let n of r) { | |
if (null == n) break; | |
t ? (t = !1) : (e += ", "), (e += n.toString()); | |
} | |
return (e += "}"), e; | |
} | |
toTableString() { | |
let e = ""; | |
for (let t of this.buckets) { | |
if (null == t) { | |
e += "null\n"; | |
continue; | |
} | |
e += "["; | |
let r = !0; | |
for (let n of t) r ? (r = !1) : (e += " "), (e += null == n ? "_" : n.toString()); | |
e += "]\n"; | |
} | |
return e; | |
} | |
asElementType(e) { | |
return e; | |
} | |
createBuckets(e) { | |
return new Array(e); | |
} | |
} | |
n([a.NotNull], c.prototype, "comparator", void 0), | |
n([a.Override], c.prototype, "hashCode", null), | |
n([a.Override], c.prototype, "equals", null), | |
n([a.Override], c.prototype, "add", null), | |
n([a.Override], c.prototype, "size", null), | |
n([a.Override], c.prototype, "isEmpty", null), | |
n([a.Override], c.prototype, "contains", null), | |
n([i(0, a.Nullable)], c.prototype, "containsFast", null), | |
n([a.Override], c.prototype, Symbol.iterator, null), | |
n([a.Override], c.prototype, "toArray", null), | |
n([a.Override], c.prototype, "containsAll", null), | |
n([a.Override], c.prototype, "addAll", null), | |
n([a.Override], c.prototype, "clear", null), | |
n([a.Override], c.prototype, "toString", null), | |
n([a.SuppressWarnings("unchecked")], c.prototype, "asElementType", null), | |
n([a.SuppressWarnings("unchecked")], c.prototype, "createBuckets", null), | |
(t.Array2DHashSet = c); | |
}, | |
5192: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ArrayEqualityComparator = void 0); | |
const i = r(8042), | |
s = r(3943), | |
o = r(8842); | |
class a { | |
hashCode(e) { | |
return null == e ? 0 : s.MurmurHash.hashCode(e, 0); | |
} | |
equals(e, t) { | |
if (null == e) return null == t; | |
if (null == t) return !1; | |
if (e.length !== t.length) return !1; | |
for (let r = 0; r < e.length; r++) if (!o.ObjectEqualityComparator.INSTANCE.equals(e[r], t[r])) return !1; | |
return !0; | |
} | |
} | |
(a.INSTANCE = new a()), n([i.Override], a.prototype, "hashCode", null), n([i.Override], a.prototype, "equals", null), (t.ArrayEqualityComparator = a); | |
}, | |
6005: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.Arrays = void 0), | |
((r = t.Arrays || (t.Arrays = {})).binarySearch = function (e, t, r, n) { | |
return (function (e, t, r, n) { | |
let i = t, | |
s = r - 1; | |
for (; i <= s; ) { | |
let t = (i + s) >>> 1, | |
r = e[t]; | |
if (r < n) i = t + 1; | |
else { | |
if (!(r > n)) return t; | |
s = t - 1; | |
} | |
} | |
return -(i + 1); | |
})(e, void 0 !== r ? r : 0, void 0 !== n ? n : e.length, t); | |
}), | |
(r.toString = function (e) { | |
let t = "[", | |
r = !0; | |
for (let n of e) r ? (r = !1) : (t += ", "), (t += null === n ? "null" : void 0 === n ? "undefined" : n); | |
return (t += "]"), t; | |
}); | |
}, | |
5280: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.BitSet = void 0); | |
const n = r(3837), | |
i = r(3943), | |
s = new Uint16Array(0); | |
function o(e) { | |
return e >>> 4; | |
} | |
function a(e) { | |
return 16 * e; | |
} | |
function l(e) { | |
let t = 1; | |
for (let r = 0; r < 16; r++) { | |
if (0 != (e & t)) return r; | |
t = (t << 1) >>> 0; | |
} | |
throw new RangeError("No specified bit found"); | |
} | |
function c(e) { | |
let t = 32768; | |
for (let r = 15; r >= 0; r--) { | |
if (0 != (e & t)) return r; | |
t >>>= 1; | |
} | |
throw new RangeError("No specified bit found"); | |
} | |
function u(e, t) { | |
return (e &= 15) == (t &= 15) ? (1 << e) >>> 0 : (65535 >>> (15 - t)) ^ (65535 >>> (16 - e)); | |
} | |
const h = new Uint8Array(65536); | |
for (let e = 0; e < 16; e++) { | |
const t = (1 << e) >>> 0; | |
let r = 0; | |
for (; r < h.length; ) { | |
r += t; | |
for (let e = 0; e < t; e++) h[r]++, r++; | |
} | |
} | |
class p { | |
constructor(e) { | |
if (e) | |
if ("number" == typeof e) { | |
if (e < 0) throw new RangeError("nbits cannot be negative"); | |
this.data = new Uint16Array(o(e - 1) + 1); | |
} else if (e instanceof p) this.data = e.data.slice(0); | |
else { | |
let t = -1; | |
for (let r of e) t < r && (t = r); | |
this.data = new Uint16Array(o(t - 1) + 1); | |
for (let t of e) this.set(t); | |
} | |
else this.data = s; | |
} | |
and(e) { | |
const t = this.data, | |
r = e.data, | |
n = Math.min(t.length, r.length); | |
let i = -1; | |
for (let e = 0; e < n; e++) 0 != (t[e] &= r[e]) && (i = e); | |
-1 === i && (this.data = s), i < t.length - 1 && (this.data = t.slice(0, i + 1)); | |
} | |
andNot(e) { | |
const t = this.data, | |
r = e.data, | |
n = Math.min(t.length, r.length); | |
let i = -1; | |
for (let e = 0; e < n; e++) 0 != (t[e] &= 65535 ^ r[e]) && (i = e); | |
-1 === i && (this.data = s), i < t.length - 1 && (this.data = t.slice(0, i + 1)); | |
} | |
cardinality() { | |
if (this.isEmpty) return 0; | |
const e = this.data, | |
t = e.length; | |
let r = 0; | |
for (let n = 0; n < t; n++) r += h[e[n]]; | |
return r; | |
} | |
clear(e, t) { | |
null == e ? this.data.fill(0) : null == t ? this.set(e, !1) : this.set(e, t, !1); | |
} | |
flip(e, t) { | |
if ((null == t && (t = e), e < 0 || t < e)) throw new RangeError(); | |
let r = o(e); | |
const n = o(t); | |
if (r === n) this.data[r] ^= u(e, t); | |
else { | |
for (this.data[r++] ^= u(e, 15); r < n; ) this.data[r++] ^= 65535; | |
this.data[r++] ^= u(0, t); | |
} | |
} | |
get(e, t) { | |
if (void 0 === t) return !!(this.data[o(e)] & u(e, e)); | |
{ | |
let r = new p(t + 1); | |
for (let n = e; n <= t; n++) r.set(n, this.get(n)); | |
return r; | |
} | |
} | |
intersects(e) { | |
let t = Math.min(this.length(), e.length()); | |
if (0 === t) return !1; | |
let r = o(t - 1); | |
for (let t = 0; t <= r; t++) if (0 != (this.data[t] & e.data[t])) return !0; | |
return !1; | |
} | |
get isEmpty() { | |
return 0 === this.length(); | |
} | |
length() { | |
return this.data.length ? this.previousSetBit(a(this.data.length) - 1) + 1 : 0; | |
} | |
nextClearBit(e) { | |
if (e < 0) throw new RangeError("fromIndex cannot be negative"); | |
const t = this.data, | |
r = t.length; | |
let n = o(e); | |
if (n > r) return -1; | |
let i = 65535 ^ u(e, 15); | |
if (65535 == (t[n] | i)) { | |
for (n++, i = 0; n < r && 65535 === t[n]; n++); | |
if (n === r) return -1; | |
} | |
return a(n) + l(65535 ^ (t[n] | i)); | |
} | |
nextSetBit(e) { | |
if (e < 0) throw new RangeError("fromIndex cannot be negative"); | |
const t = this.data, | |
r = t.length; | |
let n = o(e); | |
if (n > r) return -1; | |
let i = u(e, 15); | |
if (0 == (t[n] & i)) { | |
for (n++, i = 65535; n < r && 0 === t[n]; n++); | |
if (n >= r) return -1; | |
} | |
return a(n) + l(t[n] & i); | |
} | |
or(e) { | |
const t = this.data, | |
r = e.data, | |
n = Math.min(t.length, r.length), | |
i = Math.max(t.length, r.length), | |
o = t.length === i ? t : new Uint16Array(i); | |
let a = -1; | |
for (let e = 0; e < n; e++) 0 != (o[e] = t[e] | r[e]) && (a = e); | |
const l = t.length > r.length ? t : r; | |
for (let e = n; e < i; e++) 0 !== (o[e] = l[e]) && (a = e); | |
-1 === a ? (this.data = s) : o.length === a + 1 ? (this.data = o) : (this.data = o.slice(0, a)); | |
} | |
previousClearBit(e) { | |
if (e < 0) throw new RangeError("fromIndex cannot be negative"); | |
const t = this.data, | |
r = t.length; | |
let n = o(e); | |
n >= r && (n = r - 1); | |
let i = 65535 ^ u(0, e); | |
if (65535 == (t[n] | i)) { | |
for (i = 0, n--; n >= 0 && 65535 === t[n]; n--); | |
if (n < 0) return -1; | |
} | |
return a(n) + c(65535 ^ (t[n] | i)); | |
} | |
previousSetBit(e) { | |
if (e < 0) throw new RangeError("fromIndex cannot be negative"); | |
const t = this.data, | |
r = t.length; | |
let n = o(e); | |
n >= r && (n = r - 1); | |
let i = u(0, e); | |
if (0 == (t[n] & i)) { | |
for (n--, i = 65535; n >= 0 && 0 === t[n]; n--); | |
if (n < 0) return -1; | |
} | |
return a(n) + c(t[n] & i); | |
} | |
set(e, t, r) { | |
if ((void 0 === t ? ((t = e), (r = !0)) : "boolean" == typeof t && ((r = t), (t = e)), void 0 === r && (r = !0), e < 0 || e > t)) throw new RangeError(); | |
let n = o(e), | |
i = o(t); | |
if (r && i >= this.data.length) { | |
let e = new Uint16Array(i + 1); | |
this.data.forEach((t, r) => (e[r] = t)), (this.data = e); | |
} else if (!r) { | |
if (n >= this.data.length) return; | |
i >= this.data.length && ((i = this.data.length - 1), (t = 16 * this.data.length - 1)); | |
} | |
if (n === i) this._setBits(n, r, u(e, t)); | |
else { | |
for (this._setBits(n++, r, u(e, 15)); n < i; ) this.data[n++] = r ? 65535 : 0; | |
this._setBits(n, r, u(0, t)); | |
} | |
} | |
_setBits(e, t, r) { | |
t ? (this.data[e] |= r) : (this.data[e] &= 65535 ^ r); | |
} | |
get size() { | |
return 8 * this.data.byteLength; | |
} | |
hashCode() { | |
return i.MurmurHash.hashCode(this.data, 22); | |
} | |
equals(e) { | |
if (e === this) return !0; | |
if (!(e instanceof p)) return !1; | |
const t = this.length(); | |
if (t !== e.length()) return !1; | |
if (0 === t) return !0; | |
let r = o(t - 1); | |
for (let t = 0; t <= r; t++) if (this.data[t] !== e.data[t]) return !1; | |
return !0; | |
} | |
toString() { | |
let e = "{", | |
t = !0; | |
for (let r = this.nextSetBit(0); r >= 0; r = this.nextSetBit(r + 1)) t ? (t = !1) : (e += ", "), (e += r); | |
return (e += "}"), e; | |
} | |
xor(e) { | |
const t = this.data, | |
r = e.data, | |
n = Math.min(t.length, r.length), | |
i = Math.max(t.length, r.length), | |
o = t.length === i ? t : new Uint16Array(i); | |
let a = -1; | |
for (let e = 0; e < n; e++) 0 != (o[e] = t[e] ^ r[e]) && (a = e); | |
const l = t.length > r.length ? t : r; | |
for (let e = n; e < i; e++) 0 !== (o[e] = l[e]) && (a = e); | |
-1 === a ? (this.data = s) : o.length === a + 1 ? (this.data = o) : (this.data = o.slice(0, a + 1)); | |
} | |
clone() { | |
return new p(this); | |
} | |
[Symbol.iterator]() { | |
return new d(this.data); | |
} | |
[n.inspect.custom]() { | |
return "BitSet " + this.toString(); | |
} | |
} | |
t.BitSet = p; | |
class d { | |
constructor(e) { | |
(this.data = e), (this.index = 0), (this.mask = 65535); | |
} | |
next() { | |
for (; this.index < this.data.length; ) { | |
const e = this.data[this.index] & this.mask; | |
if (0 !== e) { | |
const t = a(this.index) + l(e); | |
return (this.mask = u(t + 1, 15)), { done: !1, value: t }; | |
} | |
this.index++, (this.mask = 65535); | |
} | |
return { done: !0, value: -1 }; | |
} | |
[Symbol.iterator]() { | |
return this; | |
} | |
} | |
}, | |
9363: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.isSupplementaryCodePoint = t.isLowSurrogate = t.isHighSurrogate = void 0), | |
(t.isHighSurrogate = function (e) { | |
return e >= 55296 && e <= 56319; | |
}), | |
(t.isLowSurrogate = function (e) { | |
return e >= 56320 && e <= 57343; | |
}), | |
(t.isSupplementaryCodePoint = function (e) { | |
return e >= 65536; | |
}); | |
}, | |
3197: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DefaultEqualityComparator = void 0); | |
const i = r(8042), | |
s = r(3943), | |
o = r(8842); | |
class a { | |
hashCode(e) { | |
return null == e ? 0 : "string" == typeof e || "number" == typeof e ? s.MurmurHash.hashCode([e]) : o.ObjectEqualityComparator.INSTANCE.hashCode(e); | |
} | |
equals(e, t) { | |
return null == e ? null == t : "string" == typeof e || "number" == typeof e ? e === t : o.ObjectEqualityComparator.INSTANCE.equals(e, t); | |
} | |
} | |
(a.INSTANCE = new a()), n([i.Override], a.prototype, "hashCode", null), n([i.Override], a.prototype, "equals", null), (t.DefaultEqualityComparator = a); | |
}, | |
6766: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.IntegerList = void 0); | |
const i = r(6005), | |
s = r(8042), | |
o = new Int32Array(0), | |
a = 2147483639; | |
class l { | |
constructor(e) { | |
if (e) | |
if (e instanceof l) (this._data = e._data.slice(0)), (this._size = e._size); | |
else if ("number" == typeof e) 0 === e ? ((this._data = o), (this._size = 0)) : ((this._data = new Int32Array(e)), (this._size = 0)); | |
else { | |
(this._data = o), (this._size = 0); | |
for (let t of e) this.add(t); | |
} | |
else (this._data = o), (this._size = 0); | |
} | |
add(e) { | |
this._data.length === this._size && this.ensureCapacity(this._size + 1), (this._data[this._size] = e), this._size++; | |
} | |
addAll(e) { | |
if (Array.isArray(e)) this.ensureCapacity(this._size + e.length), this._data.subarray(this._size, this._size + e.length).set(e), (this._size += e.length); | |
else if (e instanceof l) this.ensureCapacity(this._size + e._size), this._data.subarray(this._size, this._size + e.size).set(e._data), (this._size += e._size); | |
else { | |
this.ensureCapacity(this._size + e.size); | |
let t = 0; | |
for (let r of e) (this._data[this._size + t] = r), t++; | |
this._size += e.size; | |
} | |
} | |
get(e) { | |
if (e < 0 || e >= this._size) throw RangeError(); | |
return this._data[e]; | |
} | |
contains(e) { | |
for (let t = 0; t < this._size; t++) if (this._data[t] === e) return !0; | |
return !1; | |
} | |
set(e, t) { | |
if (e < 0 || e >= this._size) throw RangeError(); | |
let r = this._data[e]; | |
return (this._data[e] = t), r; | |
} | |
removeAt(e) { | |
let t = this.get(e); | |
return this._data.copyWithin(e, e + 1, this._size), (this._data[this._size - 1] = 0), this._size--, t; | |
} | |
removeRange(e, t) { | |
if (e < 0 || t < 0 || e > this._size || t > this._size) throw RangeError(); | |
if (e > t) throw RangeError(); | |
this._data.copyWithin(t, e, this._size), this._data.fill(0, this._size - (t - e), this._size), (this._size -= t - e); | |
} | |
get isEmpty() { | |
return 0 === this._size; | |
} | |
get size() { | |
return this._size; | |
} | |
trimToSize() { | |
this._data.length !== this._size && (this._data = this._data.slice(0, this._size)); | |
} | |
clear() { | |
this._data.fill(0, 0, this._size), (this._size = 0); | |
} | |
toArray() { | |
return 0 === this._size ? [] : Array.from(this._data.subarray(0, this._size)); | |
} | |
sort() { | |
this._data.subarray(0, this._size).sort(); | |
} | |
equals(e) { | |
if (e === this) return !0; | |
if (!(e instanceof l)) return !1; | |
if (this._size !== e._size) return !1; | |
for (let t = 0; t < this._size; t++) if (this._data[t] !== e._data[t]) return !1; | |
return !0; | |
} | |
hashCode() { | |
let e = 1; | |
for (let t = 0; t < this._size; t++) e = 31 * e + this._data[t]; | |
return e; | |
} | |
toString() { | |
return this._data.toString(); | |
} | |
binarySearch(e, t, r) { | |
if ((void 0 === t && (t = 0), void 0 === r && (r = this._size), t < 0 || r < 0 || t > this._size || r > this._size)) throw new RangeError(); | |
if (t > r) throw new RangeError(); | |
return i.Arrays.binarySearch(this._data, e, t, r); | |
} | |
ensureCapacity(e) { | |
if (e < 0 || e > a) throw new RangeError(); | |
let t; | |
for (t = 0 === this._data.length ? 4 : this._data.length; t < e; ) (t *= 2), (t < 0 || t > a) && (t = a); | |
let r = new Int32Array(t); | |
r.set(this._data), (this._data = r); | |
} | |
toCharArray() { | |
let e = new Uint16Array(this._size), | |
t = 0, | |
r = !1; | |
for (let n = 0; n < this._size; n++) { | |
let i = this._data[n]; | |
if (i >= 0 && i < 65536) { | |
(e[t] = i), t++; | |
continue; | |
} | |
if (!r) { | |
let t = new Uint16Array(this.charArraySize()); | |
t.set(e, 0), (e = t), (r = !0); | |
} | |
let s = String.fromCodePoint(i); | |
(e[t] = s.charCodeAt(0)), (e[t + 1] = s.charCodeAt(1)), (t += 2); | |
} | |
return e; | |
} | |
charArraySize() { | |
let e = 0; | |
for (let t = 0; t < this._size; t++) e += this._data[t] >= 65536 ? 2 : 1; | |
return e; | |
} | |
} | |
n([s.NotNull], l.prototype, "_data", void 0), n([s.Override], l.prototype, "equals", null), n([s.Override], l.prototype, "hashCode", null), n([s.Override], l.prototype, "toString", null), (t.IntegerList = l); | |
}, | |
1350: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.IntegerStack = void 0); | |
const n = r(6766); | |
class i extends n.IntegerList { | |
constructor(e) { | |
super(e); | |
} | |
push(e) { | |
this.add(e); | |
} | |
pop() { | |
return this.removeAt(this.size - 1); | |
} | |
peek() { | |
return this.get(this.size - 1); | |
} | |
} | |
t.IntegerStack = i; | |
}, | |
8813: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Interval = void 0); | |
const i = r(8042); | |
class s { | |
constructor(e, t) { | |
(this.a = e), (this.b = t); | |
} | |
static get INVALID() { | |
return s._INVALID; | |
} | |
static of(e, t) { | |
return e !== t || e < 0 || e > 1e3 ? new s(e, t) : (null == s.cache[e] && (s.cache[e] = new s(e, e)), s.cache[e]); | |
} | |
get length() { | |
return this.b < this.a ? 0 : this.b - this.a + 1; | |
} | |
equals(e) { | |
return e === this || (e instanceof s && this.a === e.a && this.b === e.b); | |
} | |
hashCode() { | |
let e = 23; | |
return (e = 31 * e + this.a), (e = 31 * e + this.b), e; | |
} | |
startsBeforeDisjoint(e) { | |
return this.a < e.a && this.b < e.a; | |
} | |
startsBeforeNonDisjoint(e) { | |
return this.a <= e.a && this.b >= e.a; | |
} | |
startsAfter(e) { | |
return this.a > e.a; | |
} | |
startsAfterDisjoint(e) { | |
return this.a > e.b; | |
} | |
startsAfterNonDisjoint(e) { | |
return this.a > e.a && this.a <= e.b; | |
} | |
disjoint(e) { | |
return this.startsBeforeDisjoint(e) || this.startsAfterDisjoint(e); | |
} | |
adjacent(e) { | |
return this.a === e.b + 1 || this.b === e.a - 1; | |
} | |
properlyContains(e) { | |
return e.a >= this.a && e.b <= this.b; | |
} | |
union(e) { | |
return s.of(Math.min(this.a, e.a), Math.max(this.b, e.b)); | |
} | |
intersection(e) { | |
return s.of(Math.max(this.a, e.a), Math.min(this.b, e.b)); | |
} | |
differenceNotProperlyContained(e) { | |
let t; | |
return e.startsBeforeNonDisjoint(this) ? (t = s.of(Math.max(this.a, e.b + 1), this.b)) : e.startsAfterNonDisjoint(this) && (t = s.of(this.a, e.a - 1)), t; | |
} | |
toString() { | |
return this.a + ".." + this.b; | |
} | |
} | |
(s._INVALID = new s(-1, -2)), (s.cache = new Array(1001)), n([i.Override], s.prototype, "equals", null), n([i.Override], s.prototype, "hashCode", null), n([i.Override], s.prototype, "toString", null), (t.Interval = s); | |
}, | |
4405: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.IntervalSet = void 0); | |
const s = r(5192), | |
o = r(6766), | |
a = r(8813), | |
l = r(9557), | |
c = r(3943), | |
u = r(8042), | |
h = r(4966); | |
class p { | |
constructor(e) { | |
(this.readonly = !1), (this._intervals = null != e ? e.slice(0) : []); | |
} | |
static get COMPLETE_CHAR_SET() { | |
return void 0 === p._COMPLETE_CHAR_SET && ((p._COMPLETE_CHAR_SET = p.of(l.Lexer.MIN_CHAR_VALUE, l.Lexer.MAX_CHAR_VALUE)), p._COMPLETE_CHAR_SET.setReadonly(!0)), p._COMPLETE_CHAR_SET; | |
} | |
static get EMPTY_SET() { | |
return null == p._EMPTY_SET && ((p._EMPTY_SET = new p()), p._EMPTY_SET.setReadonly(!0)), p._EMPTY_SET; | |
} | |
static of(e, t = e) { | |
let r = new p(); | |
return r.add(e, t), r; | |
} | |
clear() { | |
if (this.readonly) throw new Error("can't alter readonly IntervalSet"); | |
this._intervals.length = 0; | |
} | |
add(e, t = e) { | |
this.addRange(a.Interval.of(e, t)); | |
} | |
addRange(e) { | |
if (this.readonly) throw new Error("can't alter readonly IntervalSet"); | |
if (!(e.b < e.a)) { | |
for (let t = 0; t < this._intervals.length; t++) { | |
let r = this._intervals[t]; | |
if (e.equals(r)) return; | |
if (e.adjacent(r) || !e.disjoint(r)) { | |
let n = e.union(r); | |
for (this._intervals[t] = n; t < this._intervals.length - 1; ) { | |
t++; | |
let e = this._intervals[t]; | |
if (!n.adjacent(e) && n.disjoint(e)) break; | |
this._intervals.splice(t, 1), t--, (this._intervals[t] = n.union(e)); | |
} | |
return; | |
} | |
if (e.startsBeforeDisjoint(r)) return void this._intervals.splice(t, 0, e); | |
} | |
this._intervals.push(e); | |
} | |
} | |
static or(e) { | |
let t = new p(); | |
for (let r of e) t.addAll(r); | |
return t; | |
} | |
addAll(e) { | |
if (null == e) return this; | |
if (e instanceof p) { | |
let t = e, | |
r = t._intervals.length; | |
for (let e = 0; e < r; e++) { | |
let r = t._intervals[e]; | |
this.add(r.a, r.b); | |
} | |
} else for (let t of e.toArray()) this.add(t); | |
return this; | |
} | |
complementRange(e, t) { | |
return this.complement(p.of(e, t)); | |
} | |
complement(e) { | |
if (e.isNil) return p.EMPTY_SET; | |
let t; | |
return e instanceof p ? (t = e) : ((t = new p()), t.addAll(e)), t.subtract(this); | |
} | |
subtract(e) { | |
if (null == e || e.isNil) return new p(this._intervals); | |
if (e instanceof p) return p.subtract(this, e); | |
let t = new p(); | |
return t.addAll(e), p.subtract(this, t); | |
} | |
static subtract(e, t) { | |
if (e.isNil) return new p(); | |
let r = new p(e._intervals); | |
if (t.isNil) return r; | |
let n = 0, | |
i = 0; | |
for (; n < r._intervals.length && i < t._intervals.length; ) { | |
let e, | |
s, | |
o = r._intervals[n], | |
l = t._intervals[i]; | |
if (l.b < o.a) i++; | |
else if (l.a > o.b) n++; | |
else if ((l.a > o.a && (e = new a.Interval(o.a, l.a - 1)), l.b < o.b && (s = new a.Interval(l.b + 1, o.b)), e)) { | |
if (s) { | |
(r._intervals[n] = e), r._intervals.splice(n + 1, 0, s), n++, i++; | |
continue; | |
} | |
(r._intervals[n] = e), n++; | |
} else s ? ((r._intervals[n] = s), i++) : r._intervals.splice(n, 1); | |
} | |
return r; | |
} | |
or(e) { | |
let t = new p(); | |
return t.addAll(this), t.addAll(e), t; | |
} | |
and(e) { | |
if (e.isNil) return new p(); | |
let t, | |
r = this._intervals, | |
n = e._intervals, | |
i = r.length, | |
s = n.length, | |
o = 0, | |
a = 0; | |
for (; o < i && a < s; ) { | |
let e = r[o], | |
i = n[a]; | |
e.startsBeforeDisjoint(i) | |
? o++ | |
: i.startsBeforeDisjoint(e) | |
? a++ | |
: e.properlyContains(i) | |
? (t || (t = new p()), t.addRange(e.intersection(i)), a++) | |
: i.properlyContains(e) | |
? (t || (t = new p()), t.addRange(e.intersection(i)), o++) | |
: e.disjoint(i) || (t || (t = new p()), t.addRange(e.intersection(i)), e.startsAfterNonDisjoint(i) ? a++ : i.startsAfterNonDisjoint(e) && o++); | |
} | |
return t || new p(); | |
} | |
contains(e) { | |
let t = 0, | |
r = this._intervals.length - 1; | |
for (; t <= r; ) { | |
let n = (t + r) >> 1, | |
i = this._intervals[n], | |
s = i.a; | |
if (i.b < e) t = n + 1; | |
else { | |
if (!(s > e)) return !0; | |
r = n - 1; | |
} | |
} | |
return !1; | |
} | |
get isNil() { | |
return null == this._intervals || 0 === this._intervals.length; | |
} | |
get maxElement() { | |
if (this.isNil) throw new RangeError("set is empty"); | |
return this._intervals[this._intervals.length - 1].b; | |
} | |
get minElement() { | |
if (this.isNil) throw new RangeError("set is empty"); | |
return this._intervals[0].a; | |
} | |
get intervals() { | |
return this._intervals; | |
} | |
hashCode() { | |
let e = c.MurmurHash.initialize(); | |
for (let t of this._intervals) (e = c.MurmurHash.update(e, t.a)), (e = c.MurmurHash.update(e, t.b)); | |
return (e = c.MurmurHash.finish(e, 2 * this._intervals.length)), e; | |
} | |
equals(e) { | |
return null != e && e instanceof p && s.ArrayEqualityComparator.INSTANCE.equals(this._intervals, e._intervals); | |
} | |
toString(e = !1) { | |
let t = ""; | |
if (null == this._intervals || 0 === this._intervals.length) return "{}"; | |
this.size > 1 && (t += "{"); | |
let r = !0; | |
for (let n of this._intervals) { | |
r ? (r = !1) : (t += ", "); | |
let i = n.a, | |
s = n.b; | |
i === s ? (i === h.Token.EOF ? (t += "<EOF>") : (t += e ? "'" + String.fromCodePoint(i) + "'" : i)) : (t += e ? "'" + String.fromCodePoint(i) + "'..'" + String.fromCodePoint(s) + "'" : i + ".." + s); | |
} | |
return this.size > 1 && (t += "}"), t; | |
} | |
toStringVocabulary(e) { | |
if (null == this._intervals || 0 === this._intervals.length) return "{}"; | |
let t = ""; | |
this.size > 1 && (t += "{"); | |
let r = !0; | |
for (let n of this._intervals) { | |
r ? (r = !1) : (t += ", "); | |
let i = n.a, | |
s = n.b; | |
if (i === s) t += this.elementName(e, i); | |
else for (let r = i; r <= s; r++) r > i && (t += ", "), (t += this.elementName(e, r)); | |
} | |
return this.size > 1 && (t += "}"), t; | |
} | |
elementName(e, t) { | |
return t === h.Token.EOF ? "<EOF>" : t === h.Token.EPSILON ? "<EPSILON>" : e.getDisplayName(t); | |
} | |
get size() { | |
let e = 0, | |
t = this._intervals.length; | |
if (1 === t) { | |
let e = this._intervals[0]; | |
return e.b - e.a + 1; | |
} | |
for (let r = 0; r < t; r++) { | |
let t = this._intervals[r]; | |
e += t.b - t.a + 1; | |
} | |
return e; | |
} | |
toIntegerList() { | |
let e = new o.IntegerList(this.size), | |
t = this._intervals.length; | |
for (let r = 0; r < t; r++) { | |
let t = this._intervals[r], | |
n = t.a, | |
i = t.b; | |
for (let t = n; t <= i; t++) e.add(t); | |
} | |
return e; | |
} | |
toSet() { | |
let e = new Set(); | |
for (let t of this._intervals) { | |
let r = t.a, | |
n = t.b; | |
for (let t = r; t <= n; t++) e.add(t); | |
} | |
return e; | |
} | |
toArray() { | |
let e = new Array(), | |
t = this._intervals.length; | |
for (let r = 0; r < t; r++) { | |
let t = this._intervals[r], | |
n = t.a, | |
i = t.b; | |
for (let t = n; t <= i; t++) e.push(t); | |
} | |
return e; | |
} | |
remove(e) { | |
if (this.readonly) throw new Error("can't alter readonly IntervalSet"); | |
let t = this._intervals.length; | |
for (let r = 0; r < t; r++) { | |
let t = this._intervals[r], | |
n = t.a, | |
i = t.b; | |
if (e < n) break; | |
if (e === n && e === i) { | |
this._intervals.splice(r, 1); | |
break; | |
} | |
if (e === n) { | |
this._intervals[r] = a.Interval.of(t.a + 1, t.b); | |
break; | |
} | |
if (e === i) { | |
this._intervals[r] = a.Interval.of(t.a, t.b - 1); | |
break; | |
} | |
if (e > n && e < i) { | |
let n = t.b; | |
(this._intervals[r] = a.Interval.of(t.a, e - 1)), this.add(e + 1, n); | |
} | |
} | |
} | |
get isReadonly() { | |
return this.readonly; | |
} | |
setReadonly(e) { | |
if (this.readonly && !e) throw new Error("can't alter readonly IntervalSet"); | |
this.readonly = e; | |
} | |
} | |
n([u.Override], p.prototype, "addAll", null), | |
n([u.Override], p.prototype, "complement", null), | |
n([u.Override], p.prototype, "subtract", null), | |
n([u.Override], p.prototype, "or", null), | |
n([u.Override], p.prototype, "and", null), | |
n([u.Override], p.prototype, "contains", null), | |
n([u.Override], p.prototype, "isNil", null), | |
n([u.Override], p.prototype, "hashCode", null), | |
n([u.Override], p.prototype, "equals", null), | |
n([i(0, u.NotNull)], p.prototype, "toStringVocabulary", null), | |
n([u.NotNull, i(0, u.NotNull)], p.prototype, "elementName", null), | |
n([u.Override], p.prototype, "size", null), | |
n([u.Override], p.prototype, "remove", null), | |
n([u.NotNull], p, "of", null), | |
n([u.NotNull], p, "subtract", null), | |
(t.IntervalSet = p); | |
}, | |
355: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.MultiMap = void 0); | |
class r extends Map { | |
constructor() { | |
super(); | |
} | |
map(e, t) { | |
let r = super.get(e); | |
r || ((r = []), super.set(e, r)), r.push(t); | |
} | |
getPairs() { | |
let e = []; | |
return ( | |
this.forEach((t, r) => { | |
t.forEach((t) => { | |
e.push([r, t]); | |
}); | |
}), | |
e | |
); | |
} | |
} | |
t.MultiMap = r; | |
}, | |
3943: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.MurmurHash = void 0), | |
(function (e) { | |
function t(e = 0) { | |
return e; | |
} | |
function r(e, t) { | |
null == t | |
? (t = 0) | |
: "string" == typeof t | |
? (t = (function (e) { | |
let t = e.length; | |
if (0 === t) return 0; | |
let r = 0; | |
for (let n = 0; n < t; n++) (r = ((r << 5) >>> 0) - r + e.charCodeAt(n)), (r |= 0); | |
return r; | |
})(t)) | |
: "object" == typeof t && (t = t.hashCode()); | |
let r = t; | |
return (r = Math.imul(r, 3432918353)), (r = (r << 15) | (r >>> 17)), (r = Math.imul(r, 461845907)), (e = ((e ^= r) << 13) | (e >>> 19)), 4294967295 & (Math.imul(e, 5) + 3864292196); | |
} | |
function n(e, t) { | |
return (e ^= 4 * t), (e ^= e >>> 16), (e = Math.imul(e, 2246822507)), (e ^= e >>> 13), (e = Math.imul(e, 3266489909)) ^ (e >>> 16); | |
} | |
(e.initialize = t), | |
(e.update = r), | |
(e.finish = n), | |
(e.hashCode = function (e, i = 0) { | |
let s = t(i), | |
o = 0; | |
for (let t of e) (s = r(s, t)), o++; | |
return (s = n(s, o)), s; | |
}); | |
})(t.MurmurHash || (t.MurmurHash = {})); | |
}, | |
8842: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ObjectEqualityComparator = void 0); | |
const i = r(8042); | |
class s { | |
hashCode(e) { | |
return null == e ? 0 : e.hashCode(); | |
} | |
equals(e, t) { | |
return null == e ? null == t : e.equals(t); | |
} | |
} | |
(s.INSTANCE = new s()), n([i.Override], s.prototype, "hashCode", null), n([i.Override], s.prototype, "equals", null), (t.ObjectEqualityComparator = s); | |
}, | |
156: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParseCancellationException = void 0); | |
class r extends Error { | |
constructor(e) { | |
super(e.message), (this.cause = e), (this.stack = e.stack); | |
} | |
getCause() { | |
return this.cause; | |
} | |
} | |
t.ParseCancellationException = r; | |
}, | |
4117: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.UUID = void 0); | |
const n = r(3943); | |
class i { | |
constructor(e, t, r, n) { | |
(this.data = new Uint32Array(4)), (this.data[0] = e), (this.data[1] = t), (this.data[2] = r), (this.data[3] = n); | |
} | |
static fromString(e) { | |
if (!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(e)) throw new Error("Incorrectly formatted UUID"); | |
let t = e.split("-"), | |
r = parseInt(t[0], 16), | |
n = ((parseInt(t[1], 16) << 16) >>> 0) + parseInt(t[2], 16), | |
s = ((parseInt(t[3], 16) << 16) >>> 0) + parseInt(t[4].substr(0, 4), 16), | |
o = parseInt(t[4].substr(-8), 16); | |
return new i(r, n, s, o); | |
} | |
hashCode() { | |
return n.MurmurHash.hashCode([this.data[0], this.data[1], this.data[2], this.data[3]]); | |
} | |
equals(e) { | |
return e === this || (e instanceof i && this.data[0] === e.data[0] && this.data[1] === e.data[1] && this.data[2] === e.data[2] && this.data[3] === e.data[3]); | |
} | |
toString() { | |
return ( | |
("00000000" + this.data[0].toString(16)).substr(-8) + | |
"-" + | |
("0000" + (this.data[1] >>> 16).toString(16)).substr(-4) + | |
"-" + | |
("0000" + this.data[1].toString(16)).substr(-4) + | |
"-" + | |
("0000" + (this.data[2] >>> 16).toString(16)).substr(-4) + | |
"-" + | |
("0000" + this.data[2].toString(16)).substr(-4) + | |
("00000000" + this.data[3].toString(16)).substr(-8) | |
); | |
} | |
} | |
t.UUID = i; | |
}, | |
5103: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.toCharArray = t.toMap = t.equals = t.join = t.escapeWhitespace = void 0), | |
(t.escapeWhitespace = function (e, t) { | |
return t ? e.replace(/ /, "·") : e.replace(/\t/, "\\t").replace(/\n/, "\\n").replace(/\r/, "\\r"); | |
}), | |
(t.join = function (e, t) { | |
let r = "", | |
n = !0; | |
for (let i of e) n ? (n = !1) : (r += t), (r += i); | |
return r; | |
}), | |
(t.equals = function (e, t) { | |
return e === t || (void 0 !== e && void 0 !== t && e.equals(t)); | |
}), | |
(t.toMap = function (e) { | |
let t = new Map(); | |
for (let r = 0; r < e.length; r++) t.set(e[r], r); | |
return t; | |
}), | |
(t.toCharArray = function (e) { | |
if ("string" == typeof e) { | |
let t = new Uint16Array(e.length); | |
for (let r = 0; r < e.length; r++) t[r] = e.charCodeAt(r); | |
return t; | |
} | |
return e.toCharArray(); | |
}); | |
}, | |
3530: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.AbstractParseTreeVisitor = void 0); | |
const s = r(8042); | |
class o { | |
visit(e) { | |
return e.accept(this); | |
} | |
visitChildren(e) { | |
let t = this.defaultResult(), | |
r = e.childCount; | |
for (let n = 0; n < r && this.shouldVisitNextChild(e, t); n++) { | |
let r = e.getChild(n).accept(this); | |
t = this.aggregateResult(t, r); | |
} | |
return t; | |
} | |
visitTerminal(e) { | |
return this.defaultResult(); | |
} | |
visitErrorNode(e) { | |
return this.defaultResult(); | |
} | |
aggregateResult(e, t) { | |
return t; | |
} | |
shouldVisitNextChild(e, t) { | |
return !0; | |
} | |
} | |
n([s.Override, i(0, s.NotNull)], o.prototype, "visit", null), | |
n([s.Override, i(0, s.NotNull)], o.prototype, "visitChildren", null), | |
n([s.Override, i(0, s.NotNull)], o.prototype, "visitTerminal", null), | |
n([s.Override, i(0, s.NotNull)], o.prototype, "visitErrorNode", null), | |
n([i(0, s.NotNull)], o.prototype, "shouldVisitNextChild", null), | |
(t.AbstractParseTreeVisitor = o); | |
}, | |
6912: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ErrorNode = void 0); | |
const i = r(8042), | |
s = r(8011); | |
class o extends s.TerminalNode { | |
constructor(e) { | |
super(e); | |
} | |
accept(e) { | |
return e.visitErrorNode(this); | |
} | |
} | |
n([i.Override], o.prototype, "accept", null), (t.ErrorNode = o); | |
}, | |
3627: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleNode = void 0), (t.RuleNode = class {}); | |
}, | |
8011: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TerminalNode = void 0); | |
const i = r(8813), | |
s = r(8042), | |
o = r(4966); | |
class a { | |
constructor(e) { | |
this._symbol = e; | |
} | |
getChild(e) { | |
throw new RangeError("Terminal Node has no children."); | |
} | |
get symbol() { | |
return this._symbol; | |
} | |
get parent() { | |
return this._parent; | |
} | |
setParent(e) { | |
this._parent = e; | |
} | |
get payload() { | |
return this._symbol; | |
} | |
get sourceInterval() { | |
let e = this._symbol.tokenIndex; | |
return new i.Interval(e, e); | |
} | |
get childCount() { | |
return 0; | |
} | |
accept(e) { | |
return e.visitTerminal(this); | |
} | |
get text() { | |
return this._symbol.text || ""; | |
} | |
toStringTree(e) { | |
return this.toString(); | |
} | |
toString() { | |
return this._symbol.type === o.Token.EOF ? "<EOF>" : this._symbol.text || ""; | |
} | |
} | |
n([s.Override], a.prototype, "getChild", null), | |
n([s.Override], a.prototype, "parent", null), | |
n([s.Override], a.prototype, "setParent", null), | |
n([s.Override], a.prototype, "payload", null), | |
n([s.Override], a.prototype, "sourceInterval", null), | |
n([s.Override], a.prototype, "childCount", null), | |
n([s.Override], a.prototype, "accept", null), | |
n([s.Override], a.prototype, "text", null), | |
n([s.Override], a.prototype, "toStringTree", null), | |
n([s.Override], a.prototype, "toString", null), | |
(t.TerminalNode = a); | |
}, | |
5194: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Trees = void 0); | |
const s = r(7949), | |
o = r(824), | |
a = r(6912), | |
l = r(8042), | |
c = r(2824), | |
u = r(3208), | |
h = r(3627), | |
p = r(8011), | |
d = r(4966), | |
m = r(5103); | |
class f { | |
static toStringTree(e, t) { | |
let r; | |
r = t instanceof c.Parser ? t.ruleNames : t; | |
let n = m.escapeWhitespace(this.getNodeText(e, r), !1); | |
if (0 === e.childCount) return n; | |
let i = ""; | |
(i += "("), (n = m.escapeWhitespace(this.getNodeText(e, r), !1)), (i += n), (i += " "); | |
for (let t = 0; t < e.childCount; t++) t > 0 && (i += " "), (i += this.toStringTree(e.getChild(t), r)); | |
return (i += ")"), i; | |
} | |
static getNodeText(e, t) { | |
let r; | |
if (t instanceof c.Parser) r = t.ruleNames; | |
else { | |
if (!t) { | |
let t = e.payload; | |
return "string" == typeof t.text ? t.text : e.payload.toString(); | |
} | |
r = t; | |
} | |
if (e instanceof h.RuleNode) { | |
let t = e.ruleContext, | |
n = r[t.ruleIndex], | |
i = t.altNumber; | |
return i !== s.ATN.INVALID_ALT_NUMBER ? n + ":" + i : n; | |
} | |
if (e instanceof a.ErrorNode) return e.toString(); | |
if (e instanceof p.TerminalNode) return e.symbol.text || ""; | |
throw new TypeError("Unexpected node type"); | |
} | |
static getChildren(e) { | |
let t = []; | |
for (let r = 0; r < e.childCount; r++) t.push(e.getChild(r)); | |
return t; | |
} | |
static getAncestors(e) { | |
let t = [], | |
r = e.parent; | |
for (; r; ) t.unshift(r), (r = r.parent); | |
return t; | |
} | |
static isAncestorOf(e, t) { | |
if (!e || !t || !e.parent) return !1; | |
let r = t.parent; | |
for (; r; ) { | |
if (e === r) return !0; | |
r = r.parent; | |
} | |
return !1; | |
} | |
static findAllTokenNodes(e, t) { | |
return f.findAllNodes(e, t, !0); | |
} | |
static findAllRuleNodes(e, t) { | |
return f.findAllNodes(e, t, !1); | |
} | |
static findAllNodes(e, t, r) { | |
let n = []; | |
return f._findAllNodes(e, t, r, n), n; | |
} | |
static _findAllNodes(e, t, r, n) { | |
r && e instanceof p.TerminalNode ? e.symbol.type === t && n.push(e) : !r && e instanceof u.ParserRuleContext && e.ruleIndex === t && n.push(e); | |
for (let i = 0; i < e.childCount; i++) f._findAllNodes(e.getChild(i), t, r, n); | |
} | |
static getDescendants(e) { | |
let t = []; | |
return ( | |
(function e(r) { | |
t.push(r); | |
const n = r.childCount; | |
for (let t = 0; t < n; t++) e(r.getChild(t)); | |
})(e), | |
t | |
); | |
} | |
static getRootOfSubtreeEnclosingRegion(e, t, r) { | |
let n = e.childCount; | |
for (let i = 0; i < n; i++) { | |
let n = e.getChild(i), | |
s = f.getRootOfSubtreeEnclosingRegion(n, t, r); | |
if (s) return s; | |
} | |
if (e instanceof u.ParserRuleContext) { | |
let n = e.stop; | |
if (t >= e.start.tokenIndex && (null == n || r <= n.tokenIndex)) return e; | |
} | |
} | |
static stripChildrenOutOfRange(e, t, r, n) { | |
if (!e) return; | |
let i = e.childCount; | |
for (let s = 0; s < i; s++) { | |
let i = e.getChild(s), | |
a = i.sourceInterval; | |
if (i instanceof u.ParserRuleContext && (a.b < r || a.a > n) && f.isAncestorOf(i, t)) { | |
let t = new o.CommonToken(d.Token.INVALID_TYPE, "..."); | |
e.children[s] = new p.TerminalNode(t); | |
} | |
} | |
} | |
static findNodeSuchThat(e, t) { | |
if (t(e)) return e; | |
let r = e.childCount; | |
for (let n = 0; n < r; n++) { | |
let r = f.findNodeSuchThat(e.getChild(n), t); | |
if (void 0 !== r) return r; | |
} | |
} | |
} | |
n([i(0, l.NotNull)], f, "toStringTree", null), n([l.NotNull, i(0, l.NotNull)], f, "getAncestors", null), n([i(0, l.NotNull)], f, "getRootOfSubtreeEnclosingRegion", null), (t.Trees = f); | |
}, | |
6581: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Chunk = void 0), (t.Chunk = class {}); | |
}, | |
2719: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParseTreeMatch = void 0); | |
const s = r(8042); | |
let o = class { | |
constructor(e, t, r, n) { | |
if (!e) throw new Error("tree cannot be null"); | |
if (!t) throw new Error("pattern cannot be null"); | |
if (!r) throw new Error("labels cannot be null"); | |
(this._tree = e), (this._pattern = t), (this._labels = r), (this._mismatchedNode = n); | |
} | |
get(e) { | |
let t = this._labels.get(e); | |
if (t && 0 !== t.length) return t[t.length - 1]; | |
} | |
getAll(e) { | |
return this._labels.get(e) || []; | |
} | |
get labels() { | |
return this._labels; | |
} | |
get mismatchedNode() { | |
return this._mismatchedNode; | |
} | |
get succeeded() { | |
return !this._mismatchedNode; | |
} | |
get pattern() { | |
return this._pattern; | |
} | |
get tree() { | |
return this._tree; | |
} | |
toString() { | |
return `Match ${this.succeeded ? "succeeded" : "failed"}; found ${this.labels.size} labels`; | |
} | |
}; | |
n([s.NotNull, i(0, s.NotNull)], o.prototype, "getAll", null), | |
n([s.NotNull], o.prototype, "labels", null), | |
n([s.NotNull], o.prototype, "pattern", null), | |
n([s.NotNull], o.prototype, "tree", null), | |
n([s.Override], o.prototype, "toString", null), | |
(o = n([i(0, s.NotNull), i(1, s.NotNull), i(2, s.NotNull)], o)), | |
(t.ParseTreeMatch = o); | |
}, | |
2237: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParseTreePattern = void 0); | |
const s = r(8042), | |
o = r(1310); | |
let a = class { | |
constructor(e, t, r, n) { | |
(this._matcher = e), (this._patternRuleIndex = r), (this._pattern = t), (this._patternTree = n); | |
} | |
match(e) { | |
return this._matcher.match(e, this); | |
} | |
matches(e) { | |
return this._matcher.match(e, this).succeeded; | |
} | |
findAll(e, t) { | |
let r = o.XPath.findAll(e, t, this._matcher.parser), | |
n = []; | |
for (let e of r) { | |
let t = this.match(e); | |
t.succeeded && n.push(t); | |
} | |
return n; | |
} | |
get matcher() { | |
return this._matcher; | |
} | |
get pattern() { | |
return this._pattern; | |
} | |
get patternRuleIndex() { | |
return this._patternRuleIndex; | |
} | |
get patternTree() { | |
return this._patternTree; | |
} | |
}; | |
n([s.NotNull], a.prototype, "_pattern", void 0), | |
n([s.NotNull], a.prototype, "_patternTree", void 0), | |
n([s.NotNull], a.prototype, "_matcher", void 0), | |
n([s.NotNull, i(0, s.NotNull)], a.prototype, "match", null), | |
n([i(0, s.NotNull)], a.prototype, "matches", null), | |
n([s.NotNull, i(0, s.NotNull), i(1, s.NotNull)], a.prototype, "findAll", null), | |
n([s.NotNull], a.prototype, "matcher", null), | |
n([s.NotNull], a.prototype, "pattern", null), | |
n([s.NotNull], a.prototype, "patternTree", null), | |
(a = n([i(0, s.NotNull), i(1, s.NotNull), i(3, s.NotNull)], a)), | |
(t.ParseTreePattern = a); | |
}, | |
1293: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ParseTreePatternMatcher = void 0); | |
const s = r(9701), | |
o = r(3675), | |
a = r(4321), | |
l = r(7683), | |
c = r(355), | |
u = r(8042), | |
h = r(156), | |
p = r(627), | |
d = r(3208), | |
m = r(2719), | |
f = r(2237), | |
y = r(3998), | |
g = r(3627), | |
_ = r(5144), | |
T = r(5760), | |
x = r(8011), | |
v = r(8965), | |
S = r(4966), | |
E = r(6290); | |
class O { | |
constructor(e, t) { | |
(this.start = "<"), (this.stop = ">"), (this.escape = "\\"), (this.escapeRE = /\\/g), (this._lexer = e), (this._parser = t); | |
} | |
setDelimiters(e, t, r) { | |
if (!e) throw new Error("start cannot be null or empty"); | |
if (!t) throw new Error("stop cannot be null or empty"); | |
(this.start = e), (this.stop = t), (this.escape = r), (this.escapeRE = new RegExp(r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g")); | |
} | |
matches(e, t, r = 0) { | |
if ("string" == typeof t) { | |
let n = this.compile(t, r); | |
return this.matches(e, n); | |
} | |
{ | |
let r = new c.MultiMap(); | |
return !this.matchImpl(e, t.patternTree, r); | |
} | |
} | |
match(e, t, r = 0) { | |
if ("string" == typeof t) { | |
let n = this.compile(t, r); | |
return this.match(e, n); | |
} | |
{ | |
let r = new c.MultiMap(), | |
n = this.matchImpl(e, t.patternTree, r); | |
return new m.ParseTreeMatch(e, t, r, n); | |
} | |
} | |
compile(e, t) { | |
let r = this.tokenize(e), | |
n = new l.ListTokenSource(r), | |
i = new a.CommonTokenStream(n); | |
const o = this._parser; | |
let c, | |
u = new p.ParserInterpreter(o.grammarFileName, o.vocabulary, o.ruleNames, o.getATNWithBypassAlts(), i); | |
try { | |
(u.errorHandler = new s.BailErrorStrategy()), (c = u.parse(t)); | |
} catch (e) { | |
throw e instanceof h.ParseCancellationException ? e.getCause() : e instanceof y.RecognitionException ? e : e instanceof Error ? new O.CannotInvokeStartRule(e) : e; | |
} | |
if (i.LA(1) !== S.Token.EOF) throw new O.StartRuleDoesNotConsumeFullPattern(); | |
return new f.ParseTreePattern(this, e, t, c); | |
} | |
get lexer() { | |
return this._lexer; | |
} | |
get parser() { | |
return this._parser; | |
} | |
matchImpl(e, t, r) { | |
if (!e) throw new TypeError("tree cannot be null"); | |
if (!t) throw new TypeError("patternTree cannot be null"); | |
if (e instanceof x.TerminalNode && t instanceof x.TerminalNode) { | |
let n; | |
if (e.symbol.type === t.symbol.type) | |
if (t.symbol instanceof E.TokenTagToken) { | |
let n = t.symbol; | |
r.map(n.tokenName, e); | |
const i = n.label; | |
i && r.map(i, e); | |
} else e.text === t.text || n || (n = e); | |
else n || (n = e); | |
return n; | |
} | |
if (e instanceof d.ParserRuleContext && t instanceof d.ParserRuleContext) { | |
let n, | |
i = this.getRuleTagToken(t); | |
if (i) { | |
if (e.ruleContext.ruleIndex === t.ruleContext.ruleIndex) { | |
r.map(i.ruleName, e); | |
const t = i.label; | |
t && r.map(t, e); | |
} else n || (n = e); | |
return n; | |
} | |
if (e.childCount !== t.childCount) return n || (n = e), n; | |
let s = e.childCount; | |
for (let n = 0; n < s; n++) { | |
let i = this.matchImpl(e.getChild(n), t.getChild(n), r); | |
if (i) return i; | |
} | |
return n; | |
} | |
return e; | |
} | |
getRuleTagToken(e) { | |
if (e instanceof g.RuleNode && 1 === e.childCount && e.getChild(0) instanceof x.TerminalNode) { | |
let t = e.getChild(0); | |
if (t.symbol instanceof _.RuleTagToken) return t.symbol; | |
} | |
} | |
tokenize(e) { | |
let t = this.split(e), | |
r = []; | |
for (let n of t) | |
if (n instanceof T.TagChunk) { | |
let t = n; | |
const i = t.tag.substr(0, 1); | |
if (i === i.toUpperCase()) { | |
let n = this._parser.getTokenType(t.tag); | |
if (n === S.Token.INVALID_TYPE) throw new Error("Unknown token " + t.tag + " in pattern: " + e); | |
let i = new E.TokenTagToken(t.tag, n, t.label); | |
r.push(i); | |
} else { | |
if (i !== i.toLowerCase()) throw new Error("invalid tag: " + t.tag + " in pattern: " + e); | |
{ | |
let n = this._parser.getRuleIndex(t.tag); | |
if (-1 === n) throw new Error("Unknown rule " + t.tag + " in pattern: " + e); | |
let i = this._parser.getATNWithBypassAlts().ruleToTokenType[n]; | |
r.push(new _.RuleTagToken(t.tag, i, t.label)); | |
} | |
} | |
} else { | |
let e = n; | |
this._lexer.inputStream = o.CharStreams.fromString(e.text); | |
let t = this._lexer.nextToken(); | |
for (; t.type !== S.Token.EOF; ) r.push(t), (t = this._lexer.nextToken()); | |
} | |
return r; | |
} | |
split(e) { | |
let t = 0, | |
r = e.length, | |
n = [], | |
i = [], | |
s = []; | |
for (; t < r; ) | |
t === e.indexOf(this.escape + this.start, t) | |
? (t += this.escape.length + this.start.length) | |
: t === e.indexOf(this.escape + this.stop, t) | |
? (t += this.escape.length + this.stop.length) | |
: t === e.indexOf(this.start, t) | |
? (i.push(t), (t += this.start.length)) | |
: t === e.indexOf(this.stop, t) | |
? (s.push(t), (t += this.stop.length)) | |
: t++; | |
if (i.length > s.length) throw new Error("unterminated tag in pattern: " + e); | |
if (i.length < s.length) throw new Error("missing start tag in pattern: " + e); | |
let o = i.length; | |
for (let t = 0; t < o; t++) if (i[t] >= s[t]) throw new Error("tag delimiters out of order in pattern: " + e); | |
if (0 === o) { | |
let t = e.substring(0, r); | |
n.push(new v.TextChunk(t)); | |
} | |
if (o > 0 && i[0] > 0) { | |
let t = e.substring(0, i[0]); | |
n.push(new v.TextChunk(t)); | |
} | |
for (let t = 0; t < o; t++) { | |
let r, | |
a = e.substring(i[t] + this.start.length, s[t]), | |
l = a, | |
c = a.indexOf(":"); | |
if ((c >= 0 && ((r = a.substring(0, c)), (l = a.substring(c + 1, a.length))), n.push(new T.TagChunk(l, r)), t + 1 < o)) { | |
let r = e.substring(s[t] + this.stop.length, i[t + 1]); | |
n.push(new v.TextChunk(r)); | |
} | |
} | |
if (o > 0) { | |
let t = s[o - 1] + this.stop.length; | |
if (t < r) { | |
let i = e.substring(t, r); | |
n.push(new v.TextChunk(i)); | |
} | |
} | |
for (let e = 0; e < n.length; e++) { | |
let t = n[e]; | |
if (t instanceof v.TextChunk) { | |
let r = t.text.replace(this.escapeRE, ""); | |
r.length < t.text.length && (n[e] = new v.TextChunk(r)); | |
} | |
} | |
return n; | |
} | |
} | |
n([u.NotNull, i(1, u.NotNull)], O.prototype, "match", null), | |
n([u.NotNull], O.prototype, "lexer", null), | |
n([u.NotNull], O.prototype, "parser", null), | |
n([i(0, u.NotNull), i(1, u.NotNull), i(2, u.NotNull)], O.prototype, "matchImpl", null), | |
(t.ParseTreePatternMatcher = O), | |
(function (e) { | |
class t extends Error { | |
constructor(e) { | |
super(`CannotInvokeStartRule: ${e}`), (this.error = e); | |
} | |
} | |
e.CannotInvokeStartRule = t; | |
class r extends Error { | |
constructor() { | |
super("StartRuleDoesNotConsumeFullPattern"); | |
} | |
} | |
e.StartRuleDoesNotConsumeFullPattern = r; | |
})((O = t.ParseTreePatternMatcher || (t.ParseTreePatternMatcher = {}))); | |
}, | |
5144: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.RuleTagToken = void 0); | |
const s = r(8042), | |
o = r(4966); | |
let a = class { | |
constructor(e, t, r) { | |
if (null == e || 0 === e.length) throw new Error("ruleName cannot be null or empty."); | |
(this._ruleName = e), (this.bypassTokenType = t), (this._label = r); | |
} | |
get ruleName() { | |
return this._ruleName; | |
} | |
get label() { | |
return this._label; | |
} | |
get channel() { | |
return o.Token.DEFAULT_CHANNEL; | |
} | |
get text() { | |
return null != this._label ? "<" + this._label + ":" + this._ruleName + ">" : "<" + this._ruleName + ">"; | |
} | |
get type() { | |
return this.bypassTokenType; | |
} | |
get line() { | |
return 0; | |
} | |
get charPositionInLine() { | |
return -1; | |
} | |
get tokenIndex() { | |
return -1; | |
} | |
get startIndex() { | |
return -1; | |
} | |
get stopIndex() { | |
return -1; | |
} | |
get tokenSource() {} | |
get inputStream() {} | |
toString() { | |
return this._ruleName + ":" + this.bypassTokenType; | |
} | |
}; | |
n([s.NotNull], a.prototype, "ruleName", null), | |
n([s.Override], a.prototype, "channel", null), | |
n([s.Override], a.prototype, "text", null), | |
n([s.Override], a.prototype, "type", null), | |
n([s.Override], a.prototype, "line", null), | |
n([s.Override], a.prototype, "charPositionInLine", null), | |
n([s.Override], a.prototype, "tokenIndex", null), | |
n([s.Override], a.prototype, "startIndex", null), | |
n([s.Override], a.prototype, "stopIndex", null), | |
n([s.Override], a.prototype, "tokenSource", null), | |
n([s.Override], a.prototype, "inputStream", null), | |
n([s.Override], a.prototype, "toString", null), | |
(a = n([i(0, s.NotNull)], a)), | |
(t.RuleTagToken = a); | |
}, | |
5760: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TagChunk = void 0); | |
const i = r(6581), | |
s = r(8042); | |
class o extends i.Chunk { | |
constructor(e, t) { | |
if ((super(), null == e || 0 === e.length)) throw new Error("tag cannot be null or empty"); | |
(this._tag = e), (this._label = t); | |
} | |
get tag() { | |
return this._tag; | |
} | |
get label() { | |
return this._label; | |
} | |
toString() { | |
return null != this._label ? this._label + ":" + this._tag : this._tag; | |
} | |
} | |
n([s.NotNull], o.prototype, "tag", null), n([s.Override], o.prototype, "toString", null), (t.TagChunk = o); | |
}, | |
8965: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TextChunk = void 0); | |
const s = r(6581), | |
o = r(8042); | |
let a = class extends s.Chunk { | |
constructor(e) { | |
if ((super(), null == e)) throw new Error("text cannot be null"); | |
this._text = e; | |
} | |
get text() { | |
return this._text; | |
} | |
toString() { | |
return "'" + this._text + "'"; | |
} | |
}; | |
n([o.NotNull], a.prototype, "_text", void 0), n([o.NotNull], a.prototype, "text", null), n([o.Override], a.prototype, "toString", null), (a = n([i(0, o.NotNull)], a)), (t.TextChunk = a); | |
}, | |
6290: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}, | |
i = | |
(this && this.__param) || | |
function (e, t) { | |
return function (r, n) { | |
t(r, n, e); | |
}; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TokenTagToken = void 0); | |
const s = r(824), | |
o = r(8042); | |
let a = class extends s.CommonToken { | |
constructor(e, t, r) { | |
super(t), (this._tokenName = e), (this._label = r); | |
} | |
get tokenName() { | |
return this._tokenName; | |
} | |
get label() { | |
return this._label; | |
} | |
get text() { | |
return null != this._label ? "<" + this._label + ":" + this._tokenName + ">" : "<" + this._tokenName + ">"; | |
} | |
toString() { | |
return this._tokenName + ":" + this.type; | |
} | |
}; | |
n([o.NotNull], a.prototype, "_tokenName", void 0), | |
n([o.NotNull], a.prototype, "tokenName", null), | |
n([o.Override], a.prototype, "text", null), | |
n([o.Override], a.prototype, "toString", null), | |
(a = n([i(0, o.NotNull)], a)), | |
(t.TokenTagToken = a); | |
}, | |
1310: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPath = void 0); | |
const n = r(3675), | |
i = r(4321), | |
s = r(5324), | |
o = r(3208), | |
a = r(4966), | |
l = r(1257), | |
c = r(393), | |
u = r(8386), | |
h = r(4703), | |
p = r(8576), | |
d = r(4559), | |
m = r(7636), | |
f = r(881); | |
class y { | |
constructor(e, t) { | |
(this.parser = e), (this.path = t), (this.elements = this.split(t)); | |
} | |
split(e) { | |
let t = new l.XPathLexer(n.CharStreams.fromString(e)); | |
(t.recover = (e) => { | |
throw e; | |
}), | |
t.removeErrorListeners(), | |
t.addErrorListener(new c.XPathLexerErrorListener()); | |
let r = new i.CommonTokenStream(t); | |
try { | |
r.fill(); | |
} catch (r) { | |
if (r instanceof s.LexerNoViableAltException) { | |
let n = "Invalid tokens or characters at index " + t.charPositionInLine + " in path '" + e + "' -- " + r.message; | |
throw new RangeError(n); | |
} | |
throw r; | |
} | |
let o = r.getTokens(), | |
u = [], | |
h = o.length, | |
p = 0; | |
e: for (; p < h; ) { | |
let e, | |
t = o[p]; | |
switch (t.type) { | |
case l.XPathLexer.ROOT: | |
case l.XPathLexer.ANYWHERE: | |
let r = t.type === l.XPathLexer.ANYWHERE; | |
p++, (e = o[p]); | |
let n = e.type === l.XPathLexer.BANG; | |
n && (p++, (e = o[p])); | |
let i = this.getXPathElement(e, r); | |
(i.invert = n), u.push(i), p++; | |
break; | |
case l.XPathLexer.TOKEN_REF: | |
case l.XPathLexer.RULE_REF: | |
case l.XPathLexer.WILDCARD: | |
u.push(this.getXPathElement(t, !1)), p++; | |
break; | |
case a.Token.EOF: | |
break e; | |
default: | |
throw new Error("Unknowth path element " + t); | |
} | |
} | |
return u; | |
} | |
getXPathElement(e, t) { | |
if (e.type === a.Token.EOF) throw new Error("Missing path element at end of path"); | |
let r = e.text; | |
if (null == r) throw new Error("Expected wordToken to have text content."); | |
let n = this.parser.getTokenType(r), | |
i = this.parser.getRuleIndex(r); | |
switch (e.type) { | |
case l.XPathLexer.WILDCARD: | |
return t ? new m.XPathWildcardAnywhereElement() : new f.XPathWildcardElement(); | |
case l.XPathLexer.TOKEN_REF: | |
case l.XPathLexer.STRING: | |
if (n === a.Token.INVALID_TYPE) throw new Error(r + " at index " + e.startIndex + " isn't a valid token name"); | |
return t ? new p.XPathTokenAnywhereElement(r, n) : new d.XPathTokenElement(r, n); | |
default: | |
if (-1 === i) throw new Error(r + " at index " + e.startIndex + " isn't a valid rule name"); | |
return t ? new u.XPathRuleAnywhereElement(r, i) : new h.XPathRuleElement(r, i); | |
} | |
} | |
static findAll(e, t, r) { | |
return new y(r, t).evaluate(e); | |
} | |
evaluate(e) { | |
let t = new o.ParserRuleContext(); | |
t.addChild(e); | |
let r = new Set([t]), | |
n = 0; | |
for (; n < this.elements.length; ) { | |
let e = new Set(); | |
for (let t of r) t.childCount > 0 && this.elements[n].evaluate(t).forEach(e.add, e); | |
n++, (r = e); | |
} | |
return r; | |
} | |
} | |
(t.XPath = y), (y.WILDCARD = "*"), (y.NOT = "!"); | |
}, | |
1298: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathElement = void 0); | |
const i = r(8042); | |
class s { | |
constructor(e) { | |
(this.nodeName = e), (this.invert = !1); | |
} | |
toString() { | |
let e = this.invert ? "!" : ""; | |
return Object.constructor.name + "[" + e + this.nodeName + "]"; | |
} | |
} | |
n([i.Override], s.prototype, "toString", null), (t.XPathElement = s); | |
}, | |
1257: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathLexer = void 0); | |
const n = r(9963), | |
i = r(9557), | |
s = r(2178), | |
o = r(6763), | |
a = r(5103); | |
class l extends i.Lexer { | |
constructor(e) { | |
super(e), (this._interp = new s.LexerATNSimulator(l._ATN, this)); | |
} | |
get vocabulary() { | |
return l.VOCABULARY; | |
} | |
get grammarFileName() { | |
return "XPathLexer.g4"; | |
} | |
get ruleNames() { | |
return l.ruleNames; | |
} | |
get serializedATN() { | |
return l._serializedATN; | |
} | |
get channelNames() { | |
return l.channelNames; | |
} | |
get modeNames() { | |
return l.modeNames; | |
} | |
action(e, t, r) { | |
4 === t && this.ID_action(e, r); | |
} | |
ID_action(e, t) { | |
if (0 === t) { | |
let e = this.text; | |
e.charAt(0) === e.charAt(0).toUpperCase() ? (this.type = l.TOKEN_REF) : (this.type = l.RULE_REF); | |
} | |
} | |
static get _ATN() { | |
return l.__ATN || (l.__ATN = new n.ATNDeserializer().deserialize(a.toCharArray(l._serializedATN))), l.__ATN; | |
} | |
} | |
(t.XPathLexer = l), | |
(l.TOKEN_REF = 1), | |
(l.RULE_REF = 2), | |
(l.ANYWHERE = 3), | |
(l.ROOT = 4), | |
(l.WILDCARD = 5), | |
(l.BANG = 6), | |
(l.ID = 7), | |
(l.STRING = 8), | |
(l.channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"]), | |
(l.modeNames = ["DEFAULT_MODE"]), | |
(l.ruleNames = ["ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "NameChar", "NameStartChar", "STRING"]), | |
(l._LITERAL_NAMES = [void 0, void 0, void 0, "'//'", "'/'", "'*'", "'!'"]), | |
(l._SYMBOLIC_NAMES = [void 0, "TOKEN_REF", "RULE_REF", "ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "STRING"]), | |
(l.VOCABULARY = new o.VocabularyImpl(l._LITERAL_NAMES, l._SYMBOLIC_NAMES, [])), | |
(l._serializedATNSegments = 2), | |
(l._serializedATNSegment0 = | |
'줝쪺֍꾺体؇쉁\n2\b\t\t\t\t\t\t\b\t\b\t\t\t\n\f"\v\b\b\t\t\t,\n\t\f\t\t/\v\t\t\t-\n\t\b\v\t\r\nʶ\n2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂ͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՛՛գ։ֿׁׁ֓׃ׄ׆ׇגײ״؇ؒ؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑݏ߂߷ࠂࡂࢢࢶࢸࢿࣖ॥२ॱॳঅইকপবলসা্য়ৡ২৳ਃਅਇਕਪਬਲਵਸਾਾੀ੍ਜ਼ਫ਼੨ઃઅઇએઑઓકપબલવષાેૉો્ૢ૨૱ૻૻଃଅଇକପବଲଵଷା୍ୟୡ୨ୱ୳୳அஇஐஒஔஜஞஞபரீைொௌ௨௱ంఅఇఎఐఒఔపబిెైొౌౘౚౢ౨ಂಅಇಎಐಒಔಪಬವಷಾೆೈೊೌೠೠೢ೨ೱೳഃഅഇഎഐഒഔ഼ിെൈൊൌൖ൙ൡ൨൱ർඁඅඇගඳඵලෂෑූෘෘේ෨෴ฃโ๐๒๛ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່໊໒ໞ༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፟፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜢ᜶ᝂᝢᝮᝰᝲគ៕៙៙២᠍᠐᠒ᠢᢂᢲᤂᤠᤢᤲ᥈ᥲᦂᦲ᧒ᨂᨢ᩠ᩢ᪁᪒᪩᪩ᪿ᪲ᬂ᭒᭛᭭᭵ᮂᰂ᱂ᱏ᱿ᲂ᳔᳖᳒᳸ᳺᴂ᷽᷷ἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾‑‰⁁⁂⁖⁖ⁱ₁₁ₒ⃒⃞⃣⃣⃧℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮⴂⴧⴲⶁⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゛゜ゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒꙂ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣒꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲꥢꦂ꧂꧑ꧢꨀꨂꩂ꩒ꩢ꩸ꩼꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯲갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ!!2;C\aac|ィᅣᅩᅯᅵ�\r(*<>?AOR_üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼΟυϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵ਼ੁੁંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂೂဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌኑኟኡኪኲዬዲዻጂጅጇጎጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂᜟᜭᜲᢢᣫᤁᤁ᫂ᰂᰊᰌ᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍퟐ\ud801\uda02\uda38\uda3d\uda6e\uda77\uda77\uda86\uda86\uda9d\udaa1\udaa3\udab1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։גײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާߌ߬߶߷ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংইকপবলসিিয়ৡৣ৲৳ਇਕਪਬਲਵਸਜ਼ਫ਼ੴ੶ઇએઑઓકપબલવષિિૢૣૻૻଇକପବଲଵଷିିୟୡୣ୳୳அஅஇஐஒஔஜஞஞபரఇఎఐఒఔపబిిౚౢౣಂಂಇಎಐಒಔಪಬವಷಿಿೠೠೢೣೳഇഎഐഒഔ഼ിിൖ൘ൡൣർඁඇගඳඵලෂฃาิีโ่ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີໂໆ່່ໞ༂༂གཉཋྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙ᠢᢂᢆᢉᢪᢲᤂᤠᥒᥲᦂᦲᨂᨘᨢᩖ᪩᪩ᬈᭇᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳳ᳷᳸ᴂ᷁ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂꫝ꫟ꫢꫬꫴ꫶ꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂ힲퟍ車全flﬕײַײַﬡשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͷΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਂਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂစ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌኑኟኡኪኲዠጇጎጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂᢢᣡᤁᤁ᫂ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈'), | |
(l._serializedATNSegment1 = | |
"핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\t\v\t\v\r%')111,\b#\n \b\r\" !!#\" #$\b$\f%&\t&'(\t()-)*,\v+*,/-.-+.0/-01)1 -"), | |
(l._serializedATN = a.join([l._serializedATNSegment0, l._serializedATNSegment1], "")); | |
}, | |
393: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathLexerErrorListener = void 0); | |
const i = r(8042); | |
class s { | |
syntaxError(e, t, r, n, i, s) {} | |
} | |
n([i.Override], s.prototype, "syntaxError", null), (t.XPathLexerErrorListener = s); | |
}, | |
8386: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathRuleAnywhereElement = void 0); | |
const i = r(8042), | |
s = r(5194), | |
o = r(1298); | |
class a extends o.XPathElement { | |
constructor(e, t) { | |
super(e), (this.ruleIndex = t); | |
} | |
evaluate(e) { | |
return s.Trees.findAllRuleNodes(e, this.ruleIndex); | |
} | |
} | |
n([i.Override], a.prototype, "evaluate", null), (t.XPathRuleAnywhereElement = a); | |
}, | |
4703: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathRuleElement = void 0); | |
const i = r(3208), | |
s = r(8042), | |
o = r(5194), | |
a = r(1298); | |
class l extends a.XPathElement { | |
constructor(e, t) { | |
super(e), (this.ruleIndex = t); | |
} | |
evaluate(e) { | |
let t = []; | |
for (let r of o.Trees.getChildren(e)) r instanceof i.ParserRuleContext && ((r.ruleIndex === this.ruleIndex && !this.invert) || (r.ruleIndex !== this.ruleIndex && this.invert)) && t.push(r); | |
return t; | |
} | |
} | |
n([s.Override], l.prototype, "evaluate", null), (t.XPathRuleElement = l); | |
}, | |
8576: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathTokenAnywhereElement = void 0); | |
const i = r(8042), | |
s = r(5194), | |
o = r(1298); | |
class a extends o.XPathElement { | |
constructor(e, t) { | |
super(e), (this.tokenType = t); | |
} | |
evaluate(e) { | |
return s.Trees.findAllTokenNodes(e, this.tokenType); | |
} | |
} | |
n([i.Override], a.prototype, "evaluate", null), (t.XPathTokenAnywhereElement = a); | |
}, | |
4559: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathTokenElement = void 0); | |
const i = r(8042), | |
s = r(8011), | |
o = r(5194), | |
a = r(1298); | |
class l extends a.XPathElement { | |
constructor(e, t) { | |
super(e), (this.tokenType = t); | |
} | |
evaluate(e) { | |
let t = []; | |
for (let r of o.Trees.getChildren(e)) r instanceof s.TerminalNode && ((r.symbol.type === this.tokenType && !this.invert) || (r.symbol.type !== this.tokenType && this.invert)) && t.push(r); | |
return t; | |
} | |
} | |
n([i.Override], l.prototype, "evaluate", null), (t.XPathTokenElement = l); | |
}, | |
7636: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathWildcardAnywhereElement = void 0); | |
const i = r(8042), | |
s = r(5194), | |
o = r(1310), | |
a = r(1298); | |
class l extends a.XPathElement { | |
constructor() { | |
super(o.XPath.WILDCARD); | |
} | |
evaluate(e) { | |
return this.invert ? [] : s.Trees.getDescendants(e); | |
} | |
} | |
n([i.Override], l.prototype, "evaluate", null), (t.XPathWildcardAnywhereElement = l); | |
}, | |
881: function (e, t, r) { | |
var n = | |
(this && this.__decorate) || | |
function (e, t, r, n) { | |
var i, | |
s = arguments.length, | |
o = s < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, r)) : n; | |
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) o = Reflect.decorate(e, t, r, n); | |
else for (var a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (s < 3 ? i(o) : s > 3 ? i(t, r, o) : i(t, r)) || o); | |
return s > 3 && o && Object.defineProperty(t, r, o), o; | |
}; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.XPathWildcardElement = void 0); | |
const i = r(8042), | |
s = r(5194), | |
o = r(1310), | |
a = r(1298); | |
class l extends a.XPathElement { | |
constructor() { | |
super(o.XPath.WILDCARD); | |
} | |
evaluate(e) { | |
let t = []; | |
if (this.invert) return t; | |
for (let r of s.Trees.getChildren(e)) t.push(r); | |
return t; | |
} | |
} | |
n([i.Override], l.prototype, "evaluate", null), (t.XPathWildcardElement = l); | |
}, | |
2993: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.AntlrGlslLexer = void 0); | |
const n = r(9963), | |
i = r(9557), | |
s = r(2178), | |
o = r(6763), | |
a = r(5103); | |
class l extends i.Lexer { | |
constructor(e) { | |
super(e), (this._interp = new s.LexerATNSimulator(l._ATN, this)); | |
} | |
get vocabulary() { | |
return l.VOCABULARY; | |
} | |
get grammarFileName() { | |
return "AntlrGlslLexer.g4"; | |
} | |
get ruleNames() { | |
return l.ruleNames; | |
} | |
get serializedATN() { | |
return l._serializedATN; | |
} | |
get channelNames() { | |
return l.channelNames; | |
} | |
get modeNames() { | |
return l.modeNames; | |
} | |
static get _ATN() { | |
return l.__ATN || (l.__ATN = new n.ATNDeserializer().deserialize(a.toCharArray(l._serializedATN))), l.__ATN; | |
} | |
} | |
(t.AntlrGlslLexer = l), | |
(l.KW_BREAK = 1), | |
(l.KW_CONTINUE = 2), | |
(l.KW_DO = 3), | |
(l.KW_FOR = 4), | |
(l.KW_WHILE = 5), | |
(l.KW_SWITCH = 6), | |
(l.KW_CASE = 7), | |
(l.KW_DEFAULT = 8), | |
(l.KW_IF = 9), | |
(l.KW_ELSE = 10), | |
(l.KW_DISCARD = 11), | |
(l.KW_RETURN = 12), | |
(l.KW_STRUCT = 13), | |
(l.KW_VOID = 14), | |
(l.Q_PRECISION = 15), | |
(l.Q_LAYOUT = 16), | |
(l.Q_INVARIANT = 17), | |
(l.Q_SMOOTH = 18), | |
(l.Q_FLAT = 19), | |
(l.Q_CONST = 20), | |
(l.Q_INOUT = 21), | |
(l.Q_IN = 22), | |
(l.Q_OUT = 23), | |
(l.Q_CENTROID = 24), | |
(l.Q_UNIFORM = 25), | |
(l.Q_VARYING = 26), | |
(l.Q_ATTRIBUTE = 27), | |
(l.Q_HIGHP = 28), | |
(l.Q_MEDIUMP = 29), | |
(l.Q_LOWP = 30), | |
(l.TYPE = 31), | |
(l.BOOL_LITERAL = 32), | |
(l.INT_LITERAL = 33), | |
(l.FLOAT_LITERAL = 34), | |
(l.OP_MUL = 35), | |
(l.OP_ADD = 36), | |
(l.OP_SUB = 37), | |
(l.OP_DIV = 38), | |
(l.OP_MOD = 39), | |
(l.OP_INC = 40), | |
(l.OP_DEC = 41), | |
(l.OP_SHIFT = 42), | |
(l.OP_RELATIONAL = 43), | |
(l.OP_EQUALITY = 44), | |
(l.OP_BIT_AND = 45), | |
(l.OP_BIT_XOR = 46), | |
(l.OP_BIT_OR = 47), | |
(l.OP_BIT_UNARY = 48), | |
(l.OP_LOGICAL_AND = 49), | |
(l.OP_LOGICAL_OR = 50), | |
(l.OP_LOGICAL_XOR = 51), | |
(l.OP_LOGICAL_UNARY = 52), | |
(l.OP_MODIFY = 53), | |
(l.OP_ASSIGN = 54), | |
(l.PREPROCESSOR = 55), | |
(l.NEW_LINE = 56), | |
(l.SPACE = 57), | |
(l.TAB = 58), | |
(l.MULTI_LINE_COMMENT = 59), | |
(l.SINGLE_LINE_COMMENT = 60), | |
(l.IDENTIFIER = 61), | |
(l.DOT = 62), | |
(l.COMMA = 63), | |
(l.COLON = 64), | |
(l.SEMICOLON = 65), | |
(l.QUESTION = 66), | |
(l.LRB = 67), | |
(l.RRB = 68), | |
(l.LCB = 69), | |
(l.RCB = 70), | |
(l.LSB = 71), | |
(l.RSB = 72), | |
(l.channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"]), | |
(l.modeNames = ["DEFAULT_MODE"]), | |
(l.ruleNames = [ | |
"KW_BREAK", | |
"KW_CONTINUE", | |
"KW_DO", | |
"KW_FOR", | |
"KW_WHILE", | |
"KW_SWITCH", | |
"KW_CASE", | |
"KW_DEFAULT", | |
"KW_IF", | |
"KW_ELSE", | |
"KW_DISCARD", | |
"KW_RETURN", | |
"KW_STRUCT", | |
"KW_VOID", | |
"Q_PRECISION", | |
"Q_LAYOUT", | |
"Q_INVARIANT", | |
"Q_SMOOTH", | |
"Q_FLAT", | |
"Q_CONST", | |
"Q_INOUT", | |
"Q_IN", | |
"Q_OUT", | |
"Q_CENTROID", | |
"Q_UNIFORM", | |
"Q_VARYING", | |
"Q_ATTRIBUTE", | |
"Q_HIGHP", | |
"Q_MEDIUMP", | |
"Q_LOWP", | |
"TYPE", | |
"TRANSPARENT_TYPE", | |
"VECTOR_TYPE", | |
"MATRIX_TYPE", | |
"FLOAT_OPAQUE_TYPE", | |
"FLOAT_OPAQUE_TYPE_SAMPLER_ONLY_ENDING", | |
"SIGNED_INT_OPAQUE_TYPE", | |
"UNSIGNED_INT_OPAQUE_TYPE", | |
"OPAQUE_TYPE_ENDING", | |
"SAMPLER_TYPE", | |
"BOOL_LITERAL", | |
"INT_LITERAL", | |
"DECIMAL_INT_LITERAL", | |
"OCTAL_INT_LITERAL", | |
"HEXADECIMAL_INT_LITERAL", | |
"FLOAT_LITERAL", | |
"FRACTIONAL_PART", | |
"EXPONENT_PART", | |
"FLOATING_SUFFIX", | |
"OP_MUL", | |
"OP_ADD", | |
"OP_SUB", | |
"OP_DIV", | |
"OP_MOD", | |
"OP_INC", | |
"OP_DEC", | |
"OP_SHIFT", | |
"OP_RELATIONAL", | |
"OP_EQUALITY", | |
"OP_BIT_AND", | |
"OP_BIT_XOR", | |
"OP_BIT_OR", | |
"OP_BIT_UNARY", | |
"OP_LOGICAL_AND", | |
"OP_LOGICAL_OR", | |
"OP_LOGICAL_XOR", | |
"OP_LOGICAL_UNARY", | |
"OP_MODIFY", | |
"OP_ASSIGN", | |
"PREPROCESSOR", | |
"NEW_LINE", | |
"SPACE", | |
"TAB", | |
"MULTI_LINE_COMMENT", | |
"SINGLE_LINE_COMMENT", | |
"IDENTIFIER", | |
"LETTER", | |
"DIGIT", | |
"NONZERO_DIGIT", | |
"OCTAL_DIGIT", | |
"HEXADECIMAL_DIGIT", | |
"DOT", | |
"COMMA", | |
"COLON", | |
"SEMICOLON", | |
"QUESTION", | |
"LRB", | |
"RRB", | |
"LCB", | |
"RCB", | |
"LSB", | |
"RSB", | |
]), | |
(l._LITERAL_NAMES = [ | |
void 0, | |
"'break'", | |
"'continue'", | |
"'do'", | |
"'for'", | |
"'while'", | |
"'switch'", | |
"'case'", | |
"'default'", | |
"'if'", | |
"'else'", | |
"'discard'", | |
"'return'", | |
"'struct'", | |
"'void'", | |
"'precision'", | |
"'layout'", | |
"'invariant'", | |
"'smooth'", | |
"'flat'", | |
"'const'", | |
"'inout'", | |
"'in'", | |
"'out'", | |
"'centroid'", | |
"'uniform'", | |
"'varying'", | |
"'attribute'", | |
"'highp'", | |
"'mediump'", | |
"'lowp'", | |
void 0, | |
void 0, | |
void 0, | |
void 0, | |
"'*'", | |
"'+'", | |
"'-'", | |
"'/'", | |
"'%'", | |
"'++'", | |
"'--'", | |
void 0, | |
void 0, | |
void 0, | |
"'&'", | |
"'^'", | |
"'|'", | |
"'~'", | |
"'&&'", | |
"'||'", | |
"'^^'", | |
"'!'", | |
void 0, | |
"'='", | |
void 0, | |
void 0, | |
"' '", | |
"'\t'", | |
void 0, | |
void 0, | |
void 0, | |
"'.'", | |
"','", | |
"':'", | |
"';'", | |
"'?'", | |
"'('", | |
"')'", | |
"'{'", | |
"'}'", | |
"'['", | |
"']'", | |
]), | |
(l._SYMBOLIC_NAMES = [ | |
void 0, | |
"KW_BREAK", | |
"KW_CONTINUE", | |
"KW_DO", | |
"KW_FOR", | |
"KW_WHILE", | |
"KW_SWITCH", | |
"KW_CASE", | |
"KW_DEFAULT", | |
"KW_IF", | |
"KW_ELSE", | |
"KW_DISCARD", | |
"KW_RETURN", | |
"KW_STRUCT", | |
"KW_VOID", | |
"Q_PRECISION", | |
"Q_LAYOUT", | |
"Q_INVARIANT", | |
"Q_SMOOTH", | |
"Q_FLAT", | |
"Q_CONST", | |
"Q_INOUT", | |
"Q_IN", | |
"Q_OUT", | |
"Q_CENTROID", | |
"Q_UNIFORM", | |
"Q_VARYING", | |
"Q_ATTRIBUTE", | |
"Q_HIGHP", | |
"Q_MEDIUMP", | |
"Q_LOWP", | |
"TYPE", | |
"BOOL_LITERAL", | |
"INT_LITERAL", | |
"FLOAT_LITERAL", | |
"OP_MUL", | |
"OP_ADD", | |
"OP_SUB", | |
"OP_DIV", | |
"OP_MOD", | |
"OP_INC", | |
"OP_DEC", | |
"OP_SHIFT", | |
"OP_RELATIONAL", | |
"OP_EQUALITY", | |
"OP_BIT_AND", | |
"OP_BIT_XOR", | |
"OP_BIT_OR", | |
"OP_BIT_UNARY", | |
"OP_LOGICAL_AND", | |
"OP_LOGICAL_OR", | |
"OP_LOGICAL_XOR", | |
"OP_LOGICAL_UNARY", | |
"OP_MODIFY", | |
"OP_ASSIGN", | |
"PREPROCESSOR", | |
"NEW_LINE", | |
"SPACE", | |
"TAB", | |
"MULTI_LINE_COMMENT", | |
"SINGLE_LINE_COMMENT", | |
"IDENTIFIER", | |
"DOT", | |
"COMMA", | |
"COLON", | |
"SEMICOLON", | |
"QUESTION", | |
"LRB", | |
"RRB", | |
"LCB", | |
"RCB", | |
"LSB", | |
"RSB", | |
]), | |
(l.VOCABULARY = new o.VocabularyImpl(l._LITERAL_NAMES, l._SYMBOLIC_NAMES, [])), | |
(l._serializedATNSegments = 2), | |
(l._serializedATNSegment0 = | |
'줝쪺֍꾺体؇쉁J˻\b\t\t\t\t\t\t\b\t\b\t\t\t\n\t\n\v\t\v\f\t\f\r\t\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t !\t!"\t"#\t#$\t$%\t%&\t&\'\t\'(\t()\t)*\t*+\t+,\t,-\t-.\t./\t/0\t01\t12\t23\t34\t45\t56\t67\t78\t89\t9:\t:;\t;<\t<=\t=>\t>?\t?@\t@A\tAB\tBC\tCD\tDE\tEF\tFG\tGH\tHI\tIJ\tJK\tKL\tLM\tMN\tNO\tOP\tPQ\tQR\tRS\tST\tTU\tUV\tVW\tWX\tXY\tYZ\tZ[\t[\\\t\\]\t]\b\b\b\b\b\t\t\t\t\t\t\t\t\n\n\n\v\v\v\v\v\f\f\f\f\f\f\f\f\r\r\r\r\r\r\r ƃ\n !!!!!!!!!!!!!!!!!!!Ɨ\n!""ƚ\n"""""""########Ʃ\n#$$$$Ʈ\n$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Ǐ\n%&&&&\'\'\'\'((((((((((((((((Ǩ\n())))))))**********ǻ\n*++++Ȁ\n+++ȃ\n+,,,ȇ\n,\f,,Ȋ\v,---Ȏ\n-\f--ȑ\v-....Ȗ\n.\r..ȗ///Ȝ\n///ȟ\n///Ȣ\n/\r//ȣ///Ȩ\n//Ȫ\n/00ȭ\n0\r00Ȯ000ȳ\n0\r00ȴ000ȹ\n0\r00Ⱥ00Ⱦ\n0\r00ȿ000Ʉ\n0111Ɉ\n111ɋ\n1\r11Ɍ223344556677888999:::::ɥ\n:;;;;;;ɬ\n;<<<<<ɲ\n<==>>??@@AAABBBCCCDDEEEEEEEʍ\nEEEFFGGGʕ\nGGGGʙ\nG\fGGʜ\vGGGGʠ\nGGGHHHHʧ\nHHHIIIIJJJJKKKKKʷ\nK\fKKʺ\vKKKKKKLLLLL˅\nL\fLLˈ\vLLLMMMˎ\nMMMMM˓\nM\fMM˖\vMNNOOO˜\nOPPQQRRRˤ\nRSSTTUUVVWWXXYYZZ[[\\\\]]ʸ^\t\v\r\b\t\n\v\f\r!#%\')+-/13579;= ?!ACEGIKMOQS"U#WY[]$_ace%g&i\'k(m)o*q+s,u-w.y/{0}1234 56789:;<=>?¡£¥@§A©B«CD¯E±F³GµH·I¹JddkkwwWWwwZZzzGGgg--//HHhh>>@@\'\',-//11((``~~\f\f,,11\f\fC\\c|3;29CHch̞\t\v\r!#%\')+-/13579;=?SU]egikmoqsuwy{} ¥§©«¯±³µ·¹»ÁÊ\tÍ\vÑ\r×ÞãëîóûĂĉĎ!Ę#ğ%ĩ\'İ)ĵ+Ļ-Ł/ń1ň3ő5ř7š9ū;ű=Ź?ƂAƖCƙEơGƪIǎKǐMǔOǧQǩSǺUǿWȄYȋ[Ȓ]ȩ_ɃaɅcɎeɐgɒiɔkɖmɘoɚqɝsɤuɫwɱyɳ{ɵ}ɷɹɻɾ ʁʄʌʐʒʦʪʮʲˀˍ˗˛˝¡˟£ˣ¥˥§˧©˩«˫˭¯˯±˱³˳µ˵·˷¹˹»¼d¼½t½¾g¾¿c¿ÀmÀÁÂeÂÃqÃÄpÄÅvÅÆkÆÇpÇÈwÈÉgÉÊËfËÌqÌ\bÍÎhÎÏqÏÐtÐ\nÑÒyÒÓjÓÔkÔÕnÕÖgÖ\fרuØÙyÙÚkÚÛvÛÜeÜÝjÝÞßeßàcàáuáâgâãäfäågåæhæçcçèwèénéêvêëìkìíhíîïgïðnðñuñògòóôfôõkõöuö÷e÷øcøùtùúfúûütüýgýþvþÿwÿĀtĀāpāĂăuăĄvĄątąĆwĆćećĈvĈĉĊxĊċqċČkČčfčĎďrďĐtĐđgđĒeĒēkēĔuĔĕkĕĖqĖėpė ĘęnęĚcĚě{ěĜqĜĝwĝĞvĞ"ğĠkĠġpġĢxĢģcģĤtĤĥkĥĦcĦħpħĨvĨ$ĩĪuĪīoīĬqĬĭqĭĮvĮįjį&İıhıIJnIJijcijĴvĴ(ĵĶeĶķqķĸpĸĹuĹĺvĺ*ĻļkļĽpĽľqľĿwĿŀvŀ,ŁłkłŃpŃ.ńŅqŅņwņŇvŇ0ňʼneʼnŊgŊŋpŋŌvŌōtōŎqŎŏkŏŐfŐ2őŒwŒœpœŔkŔŕhŕŖqŖŗtŗŘoŘ4řŚxŚścśŜtŜŝ{ŝŞkŞşpşŠiŠ6šŢcŢţvţŤvŤťtťŦkŦŧdŧŨwŨũvũŪgŪ8ūŬjŬŭkŭŮiŮůjůŰrŰ:űŲoŲųgųŴfŴŵkŵŶwŶŷoŷŸrŸ<ŹźnźŻqŻżyżŽrŽ>žƃA!ſƃG$ƀƃK&ƁƃM\'ƂžƂſƂƀƂƁƃ@ƄƅkƅƆpƆƗvƇƈwƈƉkƉƊpƊƗvƋƌhƌƍnƍƎqƎƏcƏƗvƐƑdƑƒqƒƓqƓƗnƔƗC"ƕƗE#ƖƄƖƇƖƋƖƐƖƔƖƕƗBƘƚ\tƙƘƙƚƚƛƛƜxƜƝgƝƞeƞƟƟƠ46ƠDơƢoƢƣcƣƤvƤƥƥƨ46ƦƧzƧƩ46ƨƦƨƩƩFƪƭQ)ƫƮO(ƬƮI%ƭƫƭƬƮHƯư4ưƱFƱƲUƲƳjƳƴcƴƵfƵƶqƶǏyƷƸ4ƸƹFƹƺCƺƻtƻƼtƼƽcƽƾ{ƾƿUƿǀjǀǁcǁǂfǂǃqǃǏyDŽDžEDždžwdžLJdLJLjgLjljUljNJjNJNjcNjnjfnjǍqǍǏyǎƯǎƷǎDŽǏJǐǑkǑǒQ)ǒǓO(ǓLǔǕwǕǖQ)ǖǗO(ǗNǘǙ4ǙǨFǚǛ5ǛǨFǜǝEǝǞwǞǟdǟǨgǠǡ4ǡǢFǢǣCǣǤtǤǥtǥǦcǦǨ{ǧǘǧǚǧǜǧǠǨPǩǪuǪǫcǫǬoǬǭrǭǮnǮǯgǯǰtǰRDZDzvDzdztdzǴwǴǻgǵǶhǶǷcǷǸnǸǹuǹǻgǺDZǺǵǻTǼȀW,ǽȀY-ǾȀ[.'), | |
(l._serializedATNSegment1 = | |
"ǿǼǿǽǿǾȀȂȁȃ\tȂȁȂȃȃVȄȈPȅȇOȆȅȇȊȈȆȈȉȉXȊȈȋȏ2ȌȎ¡QȍȌȎȑȏȍȏȐȐZȑȏȒȓ2ȓȕ\tȔȖ£RȕȔȖȗȗȕȗȘȘ\\șț_0ȚȜa1țȚțȜȜȞȝȟc2ȞȝȞȟȟȪȠȢOȡȠȢȣȣȡȣȤȤȥȥȧa1ȦȨc2ȧȦȧȨȨȪȩșȩȡȪ^ȫȭOȬȫȭȮȮȬȮȯȯȰȰȲ0ȱȳOȲȱȳȴȴȲȴȵȵɄȶȸ0ȷȹOȸȷȹȺȺȸȺȻȻɄȼȾOȽȼȾȿȿȽȿɀɀɁɁɂ0ɂɄɃȬɃȶɃȽɄ`Ʌɇ\tɆɈ\tɇɆɇɈɈɊɉɋOɊɉɋɌɌɊɌɍɍbɎɏ\tɏdɐɑ,ɑfɒɓ-ɓhɔɕ/ɕjɖɗ1ɗlɘə'ənɚɛ-ɛɜ-ɜpɝɞ/ɞɟ/ɟrɠɡ>ɡɥ>ɢɣ@ɣɥ@ɤɠɤɢɥtɦɧ>ɧɬ?ɨɬ\t\bɩɪ@ɪɬ?ɫɦɫɨɫɩɬvɭɮ?ɮɲ?ɯɰ#ɰɲ?ɱɭɱɯɲxɳɴ(ɴzɵɶ`ɶ|ɷɸ~ɸ~ɹɺɺɻɼ(ɼɽ(ɽɾɿ~ɿʀ~ʀʁʂ`ʂʃ`ʃʄʅ#ʅʆʍ\t\tʇʈ>ʈʍ>ʉʊ@ʊʍ@ʋʍ\t\nʌʆʌʇʌʉʌʋʍʎʎʏ?ʏʐʑ?ʑʒʚ%ʓʕ1ʔʓʔʕʕʖʖʙ\n\vʗʙ,ʘʔʘʗʙʜʚʘʚʛʛʟʜʚʝʞ1ʞʠ\n\vʟʝʟʠʠʡʡʢ\bGʢʣʤʤʧ\fʥʧ\t\fʦʣʦʥʧʨʨʩ\bHʩʪʫ\"ʫʬʬʭ\bIʭʮʯ\vʯʰʰʱ\bJʱʲʳ1ʳʴ,ʴʸʵʷ\vʶʵʷʺʸʹʸʶʹʻʺʸʻʼ,ʼʽ1ʽʾʾʿ\bKʿˀˁ1ˁ˂1˂ˆ˃˅\n\f˄˃˅ˈˆ˄ˆˇˇˉˈˆˉˊ\bLˊˋˎaˌˎNˍˋˍˌˎ˔ˏ˓aː˓Nˑ˓O˒ˏ˒ː˒ˑ˓˖˔˒˔˕˕˖˔˗˘\t\r˘˙˜2˚˜P˛˙˛˚˜˝˞\t˞ ˟ˠ\tˠ¢ˡˤOˢˤ\tˣˡˣˢˤ¤˥˦0˦¦˧˨.˨¨˩˪<˪ª˫ˬ=ˬ¬˭ˮAˮ®˯˰*˰°˱˲+˲²˳˴}˴´˵˶˶¶˷˸]˸¸˹˺_˺º,ƂƖƙƨƭǎǧǺǿȂȈȏȗțȞȣȧȩȮȴȺȿɃɇɌɤɫɱʌʔʘʚʟʦʸˆˍ˒˔˛ˣ"), | |
(l._serializedATN = a.join([l._serializedATNSegment0, l._serializedATNSegment1], "")); | |
}, | |
3595: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.Number_literalContext = t.LiteralContext = t.Layout_qualifier_idContext = t.Layout_qualifier_id_listContext = t.Layout_qualifierContext = t.QualifierContext = t.Array_subscriptContext = t.Type_usageContext = t.TypeContext = t.Expression_listContext = t.ExpressionContext = t.Identifier_optarray_optassignmentContext = t.Identifier_optarrayContext = t.Interface_block_declarationContext = t.Type_declarationContext = t.Single_variable_declarationContext = t.Variable_declarationContext = t.Invariant_declarationContext = t.Precision_declarationContext = t.Declaration_statementContext = t.Expression_statementContext = t.Jump_statementContext = t.Do_while_iterationContext = t.While_iterationContext = t.For_iterationContext = t.Iteration_statementContext = t.Case_labelContext = t.Case_groupContext = t.Switch_statementContext = t.Selection_statementContext = t.Simple_statementContext = t.Compound_statementContext = t.StatementContext = t.Function_call_parameter_listContext = t.Function_callContext = t.Function_parameter_listContext = t.Function_headerContext = t.Function_definitionContext = t.Function_prototypeContext = t.StartContext = t.AntlrGlslParser = void 0); | |
const n = r(7949), | |
i = r(9963), | |
s = r(2915), | |
o = r(4609), | |
a = r(2824), | |
l = r(3208), | |
c = r(4584), | |
u = r(3998), | |
h = r(4966), | |
p = r(6763), | |
d = r(5103); | |
class m extends a.Parser { | |
constructor(e) { | |
super(e), (this._interp = new c.ParserATNSimulator(m._ATN, this)); | |
} | |
get vocabulary() { | |
return m.VOCABULARY; | |
} | |
get grammarFileName() { | |
return "AntlrGlslParser.g4"; | |
} | |
get ruleNames() { | |
return m.ruleNames; | |
} | |
get serializedATN() { | |
return m._serializedATN; | |
} | |
createFailedPredicateException(e, t) { | |
return new s.FailedPredicateException(this, e, t); | |
} | |
start() { | |
let e, | |
t = new f(this._ctx, this.state); | |
this.enterRule(t, 0, m.RULE_start); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 86, this._errHandler.sync(this), e = this._input.LA(1); | |
(0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
(0 == ((e - 61) & -32) && 0 != ((1 << (e - 61)) & ((1 << (m.IDENTIFIER - 61)) | (1 << (m.SEMICOLON - 61)) | (1 << (m.LCB - 61))))); | |
) { | |
switch (((this.state = 84), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 0, this._ctx))) { | |
case 1: | |
(this.state = 80), this.function_prototype(); | |
break; | |
case 2: | |
(this.state = 81), this.function_definition(); | |
break; | |
case 3: | |
(this.state = 82), this.declaration_statement(); | |
break; | |
case 4: | |
(this.state = 83), this.match(m.SEMICOLON); | |
} | |
(this.state = 88), this._errHandler.sync(this), (e = this._input.LA(1)); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
function_prototype() { | |
let e = new y(this._ctx, this.state); | |
this.enterRule(e, 2, m.RULE_function_prototype); | |
try { | |
this.enterOuterAlt(e, 1), (this.state = 89), this.function_header(), (this.state = 90), this.match(m.SEMICOLON); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
function_definition() { | |
let e = new g(this._ctx, this.state); | |
this.enterRule(e, 4, m.RULE_function_definition); | |
try { | |
this.enterOuterAlt(e, 1), (this.state = 92), this.function_header(), (this.state = 93), this.compound_statement(); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
function_header() { | |
let e, | |
t = new _(this._ctx, this.state); | |
this.enterRule(t, 6, m.RULE_function_header); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 95), | |
this.type_usage(), | |
(this.state = 96), | |
this.match(m.IDENTIFIER), | |
(this.state = 97), | |
this.match(m.LRB), | |
(this.state = 99), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
((0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
e === m.IDENTIFIER) && | |
((this.state = 98), this.function_parameter_list()), | |
(this.state = 101), | |
this.match(m.RRB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
function_parameter_list() { | |
let e, | |
t = new T(this._ctx, this.state); | |
this.enterRule(t, 8, m.RULE_function_parameter_list); | |
try { | |
let r; | |
switch (((this.state = 115), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 5, this._ctx))) { | |
case 1: | |
this.enterOuterAlt(t, 1), (this.state = 103), this.match(m.KW_VOID); | |
break; | |
case 2: | |
for ( | |
this.enterOuterAlt(t, 2), this.state = 104, this.single_variable_declaration(), this.state = 109, this._errHandler.sync(this), r = this.interpreter.adaptivePredict(this._input, 3, this._ctx); | |
2 !== r && r !== n.ATN.INVALID_ALT_NUMBER; | |
) | |
1 === r && ((this.state = 105), this.match(m.COMMA), (this.state = 106), this.single_variable_declaration()), | |
(this.state = 111), | |
this._errHandler.sync(this), | |
(r = this.interpreter.adaptivePredict(this._input, 3, this._ctx)); | |
(this.state = 113), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.COMMA && ((this.state = 112), this.match(m.COMMA)); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
function_call() { | |
let e, | |
t = new x(this._ctx, this.state); | |
this.enterRule(t, 10, m.RULE_function_call); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), | |
this.state = 117, | |
e = this._input.LA(1), | |
e !== m.TYPE && e !== m.IDENTIFIER ? this._errHandler.recoverInline(this) : (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()), | |
this.state = 121, | |
this._errHandler.sync(this), | |
e = this._input.LA(1); | |
e === m.LSB; | |
) | |
(this.state = 118), this.array_subscript(), (this.state = 123), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 124), | |
this.match(m.LRB), | |
(this.state = 126), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
((0 == ((e - 14) & -32) && | |
0 != | |
((1 << (e - 14)) & | |
((1 << (m.KW_VOID - 14)) | | |
(1 << (m.TYPE - 14)) | | |
(1 << (m.BOOL_LITERAL - 14)) | | |
(1 << (m.INT_LITERAL - 14)) | | |
(1 << (m.FLOAT_LITERAL - 14)) | | |
(1 << (m.OP_ADD - 14)) | | |
(1 << (m.OP_SUB - 14)) | | |
(1 << (m.OP_INC - 14)) | | |
(1 << (m.OP_DEC - 14))))) || | |
(0 == ((e - 48) & -32) && 0 != ((1 << (e - 48)) & ((1 << (m.OP_BIT_UNARY - 48)) | (1 << (m.OP_LOGICAL_UNARY - 48)) | (1 << (m.IDENTIFIER - 48)) | (1 << (m.LRB - 48)))))) && | |
((this.state = 125), this.function_call_parameter_list()), | |
(this.state = 128), | |
this.match(m.RRB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
function_call_parameter_list() { | |
let e = new v(this._ctx, this.state); | |
this.enterRule(e, 12, m.RULE_function_call_parameter_list); | |
try { | |
switch (((this.state = 132), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.KW_VOID: | |
this.enterOuterAlt(e, 1), (this.state = 130), this.match(m.KW_VOID); | |
break; | |
case m.TYPE: | |
case m.BOOL_LITERAL: | |
case m.INT_LITERAL: | |
case m.FLOAT_LITERAL: | |
case m.OP_ADD: | |
case m.OP_SUB: | |
case m.OP_INC: | |
case m.OP_DEC: | |
case m.OP_BIT_UNARY: | |
case m.OP_LOGICAL_UNARY: | |
case m.IDENTIFIER: | |
case m.LRB: | |
this.enterOuterAlt(e, 2), (this.state = 131), this.expression_list(); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
statement() { | |
let e = new S(this._ctx, this.state); | |
this.enterRule(e, 14, m.RULE_statement); | |
try { | |
switch (((this.state = 136), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 9, this._ctx))) { | |
case 1: | |
this.enterOuterAlt(e, 1), (this.state = 134), this.compound_statement(); | |
break; | |
case 2: | |
this.enterOuterAlt(e, 2), (this.state = 135), this.simple_statement(); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
compound_statement() { | |
let e, | |
t = new E(this._ctx, this.state); | |
this.enterRule(t, 16, m.RULE_compound_statement); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 138, this.match(m.LCB), this.state = 142, this._errHandler.sync(this), e = this._input.LA(1); | |
(0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_BREAK) | | |
(1 << m.KW_CONTINUE) | | |
(1 << m.KW_DO) | | |
(1 << m.KW_FOR) | | |
(1 << m.KW_WHILE) | | |
(1 << m.KW_SWITCH) | | |
(1 << m.KW_IF) | | |
(1 << m.KW_DISCARD) | | |
(1 << m.KW_RETURN) | | |
(1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
(0 == ((e - 32) & -32) && | |
0 != | |
((1 << (e - 32)) & | |
((1 << (m.BOOL_LITERAL - 32)) | | |
(1 << (m.INT_LITERAL - 32)) | | |
(1 << (m.FLOAT_LITERAL - 32)) | | |
(1 << (m.OP_ADD - 32)) | | |
(1 << (m.OP_SUB - 32)) | | |
(1 << (m.OP_INC - 32)) | | |
(1 << (m.OP_DEC - 32)) | | |
(1 << (m.OP_BIT_UNARY - 32)) | | |
(1 << (m.OP_LOGICAL_UNARY - 32)) | | |
(1 << (m.IDENTIFIER - 32))))) || | |
(0 == ((e - 65) & -32) && 0 != ((1 << (e - 65)) & ((1 << (m.SEMICOLON - 65)) | (1 << (m.LRB - 65)) | (1 << (m.LCB - 65))))); | |
) | |
(this.state = 139), this.statement(), (this.state = 144), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 145), this.match(m.RCB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
simple_statement() { | |
let e = new O(this._ctx, this.state); | |
this.enterRule(e, 18, m.RULE_simple_statement); | |
try { | |
switch (((this.state = 154), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 11, this._ctx))) { | |
case 1: | |
this.enterOuterAlt(e, 1), (this.state = 147), this.declaration_statement(); | |
break; | |
case 2: | |
this.enterOuterAlt(e, 2), (this.state = 148), this.expression_statement(); | |
break; | |
case 3: | |
this.enterOuterAlt(e, 3), (this.state = 149), this.selection_statement(); | |
break; | |
case 4: | |
this.enterOuterAlt(e, 4), (this.state = 150), this.iteration_statement(); | |
break; | |
case 5: | |
this.enterOuterAlt(e, 5), (this.state = 151), this.jump_statement(); | |
break; | |
case 6: | |
this.enterOuterAlt(e, 6), (this.state = 152), this.switch_statement(); | |
break; | |
case 7: | |
this.enterOuterAlt(e, 7), (this.state = 153), this.match(m.SEMICOLON); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
selection_statement() { | |
let e = new I(this._ctx, this.state); | |
this.enterRule(e, 20, m.RULE_selection_statement); | |
try { | |
this.enterOuterAlt(e, 1), | |
(this.state = 156), | |
this.match(m.KW_IF), | |
(this.state = 157), | |
this.match(m.LRB), | |
(this.state = 158), | |
this.expression(0), | |
(this.state = 159), | |
this.match(m.RRB), | |
(this.state = 160), | |
this.statement(), | |
(this.state = 163), | |
this._errHandler.sync(this), | |
1 === this.interpreter.adaptivePredict(this._input, 12, this._ctx) && ((this.state = 161), this.match(m.KW_ELSE), (this.state = 162), this.statement()); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
switch_statement() { | |
let e, | |
t = new N(this._ctx, this.state); | |
this.enterRule(t, 22, m.RULE_switch_statement); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), | |
this.state = 165, | |
this.match(m.KW_SWITCH), | |
this.state = 166, | |
this.match(m.LRB), | |
this.state = 167, | |
this.expression(0), | |
this.state = 168, | |
this.match(m.RRB), | |
this.state = 169, | |
this.match(m.LCB), | |
this.state = 173, | |
this._errHandler.sync(this), | |
e = this._input.LA(1); | |
e === m.KW_CASE || e === m.KW_DEFAULT; | |
) | |
(this.state = 170), this.case_group(), (this.state = 175), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 176), this.match(m.RCB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
case_group() { | |
let e, | |
t = new C(this._ctx, this.state); | |
this.enterRule(t, 24, m.RULE_case_group); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 178, this.case_label(), this.state = 182, this._errHandler.sync(this), e = this._input.LA(1); | |
(0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_BREAK) | | |
(1 << m.KW_CONTINUE) | | |
(1 << m.KW_DO) | | |
(1 << m.KW_FOR) | | |
(1 << m.KW_WHILE) | | |
(1 << m.KW_SWITCH) | | |
(1 << m.KW_IF) | | |
(1 << m.KW_DISCARD) | | |
(1 << m.KW_RETURN) | | |
(1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
(0 == ((e - 32) & -32) && | |
0 != | |
((1 << (e - 32)) & | |
((1 << (m.BOOL_LITERAL - 32)) | | |
(1 << (m.INT_LITERAL - 32)) | | |
(1 << (m.FLOAT_LITERAL - 32)) | | |
(1 << (m.OP_ADD - 32)) | | |
(1 << (m.OP_SUB - 32)) | | |
(1 << (m.OP_INC - 32)) | | |
(1 << (m.OP_DEC - 32)) | | |
(1 << (m.OP_BIT_UNARY - 32)) | | |
(1 << (m.OP_LOGICAL_UNARY - 32)) | | |
(1 << (m.IDENTIFIER - 32))))) || | |
(0 == ((e - 65) & -32) && 0 != ((1 << (e - 65)) & ((1 << (m.SEMICOLON - 65)) | (1 << (m.LRB - 65)) | (1 << (m.LCB - 65))))); | |
) | |
(this.state = 179), this.statement(), (this.state = 184), this._errHandler.sync(this), (e = this._input.LA(1)); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
case_label() { | |
let e = new A(this._ctx, this.state); | |
this.enterRule(e, 26, m.RULE_case_label); | |
try { | |
switch ((this.enterOuterAlt(e, 1), (this.state = 188), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.KW_DEFAULT: | |
(this.state = 185), this.match(m.KW_DEFAULT); | |
break; | |
case m.KW_CASE: | |
(this.state = 186), this.match(m.KW_CASE), (this.state = 187), this.expression(0); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
(this.state = 190), this.match(m.COLON); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
iteration_statement() { | |
let e = new R(this._ctx, this.state); | |
this.enterRule(e, 28, m.RULE_iteration_statement); | |
try { | |
switch (((this.state = 195), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.KW_FOR: | |
this.enterOuterAlt(e, 1), (this.state = 192), this.for_iteration(); | |
break; | |
case m.KW_WHILE: | |
this.enterOuterAlt(e, 2), (this.state = 193), this.while_iteration(); | |
break; | |
case m.KW_DO: | |
this.enterOuterAlt(e, 3), (this.state = 194), this.do_while_iteration(); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
for_iteration() { | |
let e, | |
t = new P(this._ctx, this.state); | |
this.enterRule(t, 30, m.RULE_for_iteration); | |
try { | |
switch ( | |
(this.enterOuterAlt(t, 1), (this.state = 197), this.match(m.KW_FOR), (this.state = 198), this.match(m.LRB), (this.state = 201), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 17, this._ctx)) | |
) { | |
case 1: | |
(this.state = 199), this.variable_declaration(); | |
break; | |
case 2: | |
(this.state = 200), this.expression_list(); | |
} | |
(this.state = 204), | |
this._errHandler.sync(this), | |
1 === this.interpreter.adaptivePredict(this._input, 18, this._ctx) && ((this.state = 203), this.match(m.SEMICOLON)), | |
(this.state = 207), | |
this._errHandler.sync(this), | |
1 === this.interpreter.adaptivePredict(this._input, 19, this._ctx) && ((this.state = 206), this.expression(0)), | |
(this.state = 210), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
e === m.SEMICOLON && ((this.state = 209), this.match(m.SEMICOLON)), | |
(this.state = 213), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
((0 == ((e - 31) & -32) && | |
0 != | |
((1 << (e - 31)) & | |
((1 << (m.TYPE - 31)) | | |
(1 << (m.BOOL_LITERAL - 31)) | | |
(1 << (m.INT_LITERAL - 31)) | | |
(1 << (m.FLOAT_LITERAL - 31)) | | |
(1 << (m.OP_ADD - 31)) | | |
(1 << (m.OP_SUB - 31)) | | |
(1 << (m.OP_INC - 31)) | | |
(1 << (m.OP_DEC - 31)) | | |
(1 << (m.OP_BIT_UNARY - 31)) | | |
(1 << (m.OP_LOGICAL_UNARY - 31)) | | |
(1 << (m.IDENTIFIER - 31))))) || | |
e === m.LRB) && | |
((this.state = 212), this.expression_list()), | |
(this.state = 215), | |
this.match(m.RRB), | |
(this.state = 216), | |
this.statement(); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
while_iteration() { | |
let e = new b(this._ctx, this.state); | |
this.enterRule(e, 32, m.RULE_while_iteration); | |
try { | |
this.enterOuterAlt(e, 1), (this.state = 218), this.match(m.KW_WHILE), (this.state = 219), this.match(m.LRB), (this.state = 220), this.expression(0), (this.state = 221), this.match(m.RRB), (this.state = 222), this.statement(); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
do_while_iteration() { | |
let e = new L(this._ctx, this.state); | |
this.enterRule(e, 34, m.RULE_do_while_iteration); | |
try { | |
this.enterOuterAlt(e, 1), | |
(this.state = 224), | |
this.match(m.KW_DO), | |
(this.state = 225), | |
this.statement(), | |
(this.state = 226), | |
this.match(m.KW_WHILE), | |
(this.state = 227), | |
this.match(m.LRB), | |
(this.state = 228), | |
this.expression(0), | |
(this.state = 229), | |
this.match(m.RRB), | |
(this.state = 230), | |
this.match(m.SEMICOLON); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
jump_statement() { | |
let e, | |
t = new w(this._ctx, this.state); | |
this.enterRule(t, 36, m.RULE_jump_statement); | |
try { | |
switch ((this.enterOuterAlt(t, 1), (this.state = 239), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.KW_CONTINUE: | |
(this.state = 232), this.match(m.KW_CONTINUE); | |
break; | |
case m.KW_BREAK: | |
(this.state = 233), this.match(m.KW_BREAK); | |
break; | |
case m.KW_DISCARD: | |
(this.state = 234), this.match(m.KW_DISCARD); | |
break; | |
case m.KW_RETURN: | |
(this.state = 235), | |
this.match(m.KW_RETURN), | |
(this.state = 237), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
((0 == ((e - 31) & -32) && | |
0 != | |
((1 << (e - 31)) & | |
((1 << (m.TYPE - 31)) | | |
(1 << (m.BOOL_LITERAL - 31)) | | |
(1 << (m.INT_LITERAL - 31)) | | |
(1 << (m.FLOAT_LITERAL - 31)) | | |
(1 << (m.OP_ADD - 31)) | | |
(1 << (m.OP_SUB - 31)) | | |
(1 << (m.OP_INC - 31)) | | |
(1 << (m.OP_DEC - 31)) | | |
(1 << (m.OP_BIT_UNARY - 31)) | | |
(1 << (m.OP_LOGICAL_UNARY - 31)) | | |
(1 << (m.IDENTIFIER - 31))))) || | |
e === m.LRB) && | |
((this.state = 236), this.expression(0)); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
(this.state = 241), this.match(m.SEMICOLON); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
expression_statement() { | |
let e = new D(this._ctx, this.state); | |
this.enterRule(e, 38, m.RULE_expression_statement); | |
try { | |
this.enterOuterAlt(e, 1), | |
(this.state = 243), | |
this.expression_list(), | |
(this.state = 245), | |
this._errHandler.sync(this), | |
1 === this.interpreter.adaptivePredict(this._input, 24, this._ctx) && ((this.state = 244), this.match(m.SEMICOLON)); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
declaration_statement() { | |
let e, | |
t = new k(this._ctx, this.state); | |
this.enterRule(t, 40, m.RULE_declaration_statement); | |
try { | |
switch (((this.state = 269), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 26, this._ctx))) { | |
case 1: | |
this.enterOuterAlt(t, 1), (this.state = 247), this.precision_declaration(), (this.state = 248), this.match(m.SEMICOLON); | |
break; | |
case 2: | |
this.enterOuterAlt(t, 2), (this.state = 250), this.invariant_declaration(), (this.state = 251), this.match(m.SEMICOLON); | |
break; | |
case 3: | |
this.enterOuterAlt(t, 3), (this.state = 253), this.type_declaration(), (this.state = 254), this.match(m.SEMICOLON); | |
break; | |
case 4: | |
this.enterOuterAlt(t, 4), (this.state = 256), this.variable_declaration(), (this.state = 257), this.match(m.SEMICOLON); | |
break; | |
case 5: | |
this.enterOuterAlt(t, 5), (this.state = 259), this.interface_block_declaration(), (this.state = 260), this.match(m.SEMICOLON); | |
break; | |
case 6: | |
this.enterOuterAlt(t, 6), (this.state = 263), this._errHandler.sync(this), (e = this._input.LA(1)); | |
do { | |
(this.state = 262), this.qualifier(), (this.state = 265), this._errHandler.sync(this), (e = this._input.LA(1)); | |
} while ( | |
0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP))) | |
); | |
(this.state = 267), this.match(m.SEMICOLON); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
precision_declaration() { | |
let e, | |
t = new F(this._ctx, this.state); | |
this.enterRule(t, 42, m.RULE_precision_declaration); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 271, this.match(m.Q_PRECISION), this.state = 275, this._errHandler.sync(this), e = this._input.LA(1); | |
0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP))); | |
) | |
(this.state = 272), this.qualifier(), (this.state = 277), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 278), this.type(); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
invariant_declaration() { | |
let e = new M(this._ctx, this.state); | |
this.enterRule(e, 44, m.RULE_invariant_declaration); | |
try { | |
this.enterOuterAlt(e, 1), (this.state = 280), this.match(m.Q_INVARIANT), (this.state = 281), this.match(m.IDENTIFIER); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
variable_declaration() { | |
let e, | |
t = new U(this._ctx, this.state); | |
this.enterRule(t, 46, m.RULE_variable_declaration); | |
try { | |
let r; | |
if ((this.enterOuterAlt(t, 1), (this.state = 283), this.type_usage(), (this.state = 295), this._errHandler.sync(this), 1 === this.interpreter.adaptivePredict(this._input, 30, this._ctx))) { | |
for (this.state = 284, this.identifier_optarray_optassignment(), this.state = 289, this._errHandler.sync(this), r = this.interpreter.adaptivePredict(this._input, 28, this._ctx); 2 !== r && r !== n.ATN.INVALID_ALT_NUMBER; ) | |
1 === r && ((this.state = 285), this.match(m.COMMA), (this.state = 286), this.identifier_optarray_optassignment()), | |
(this.state = 291), | |
this._errHandler.sync(this), | |
(r = this.interpreter.adaptivePredict(this._input, 28, this._ctx)); | |
(this.state = 293), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.COMMA && ((this.state = 292), this.match(m.COMMA)); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
single_variable_declaration() { | |
let e, | |
t = new B(this._ctx, this.state); | |
this.enterRule(t, 48, m.RULE_single_variable_declaration); | |
try { | |
this.enterOuterAlt(t, 1), (this.state = 297), this.type_usage(), (this.state = 299), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.IDENTIFIER && ((this.state = 298), this.identifier_optarray_optassignment()); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
type_declaration() { | |
let e, | |
t = new j(this._ctx, this.state); | |
this.enterRule(t, 50, m.RULE_type_declaration); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), | |
this.state = 301, | |
this.match(m.KW_STRUCT), | |
this.state = 303, | |
this._errHandler.sync(this), | |
e = this._input.LA(1), | |
e === m.IDENTIFIER && ((this.state = 302), this.match(m.IDENTIFIER)), | |
this.state = 305, | |
this.match(m.LCB), | |
this.state = 311, | |
this._errHandler.sync(this), | |
e = this._input.LA(1); | |
(0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
e === m.IDENTIFIER; | |
) | |
(this.state = 306), this.variable_declaration(), (this.state = 307), this.match(m.SEMICOLON), (this.state = 313), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 314), this.match(m.RCB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
interface_block_declaration() { | |
let e, | |
t = new G(this._ctx, this.state); | |
this.enterRule(t, 52, m.RULE_interface_block_declaration); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 319, this._errHandler.sync(this), e = this._input.LA(1); | |
0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP))); | |
) | |
(this.state = 316), this.qualifier(), (this.state = 321), this._errHandler.sync(this), (e = this._input.LA(1)); | |
for ( | |
this.state = 323, | |
this._errHandler.sync(this), | |
e = this._input.LA(1), | |
e === m.IDENTIFIER && ((this.state = 322), this.match(m.IDENTIFIER)), | |
this.state = 325, | |
this.match(m.LCB), | |
this.state = 331, | |
this._errHandler.sync(this), | |
e = this._input.LA(1); | |
(0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.KW_STRUCT) | | |
(1 << m.KW_VOID) | | |
(1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP) | | |
(1 << m.TYPE)))) || | |
e === m.IDENTIFIER; | |
) | |
(this.state = 326), this.variable_declaration(), (this.state = 327), this.match(m.SEMICOLON), (this.state = 333), this._errHandler.sync(this), (e = this._input.LA(1)); | |
(this.state = 334), this.match(m.RCB), (this.state = 336), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.IDENTIFIER && ((this.state = 335), this.identifier_optarray()); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
identifier_optarray() { | |
let e, | |
t = new H(this._ctx, this.state); | |
this.enterRule(t, 54, m.RULE_identifier_optarray); | |
try { | |
for (this.enterOuterAlt(t, 1), this.state = 338, this.match(m.IDENTIFIER), this.state = 342, this._errHandler.sync(this), e = this._input.LA(1); e === m.LSB; ) | |
(this.state = 339), this.array_subscript(), (this.state = 344), this._errHandler.sync(this), (e = this._input.LA(1)); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
identifier_optarray_optassignment() { | |
let e, | |
t = new z(this._ctx, this.state); | |
this.enterRule(t, 56, m.RULE_identifier_optarray_optassignment); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 345), | |
this.identifier_optarray(), | |
(this.state = 348), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
e === m.OP_ASSIGN && ((this.state = 346), this.match(m.OP_ASSIGN), (this.state = 347), this.expression(0)); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
expression(e) { | |
void 0 === e && (e = 0); | |
let t, | |
r = this._ctx, | |
i = this.state, | |
s = new V(this._ctx, i), | |
o = s, | |
a = 58; | |
this.enterRecursionRule(s, 58, m.RULE_expression, e); | |
try { | |
let e; | |
switch ((this.enterOuterAlt(s, 1), (this.state = 360), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 40, this._ctx))) { | |
case 1: | |
(this.state = 351), this.literal(); | |
break; | |
case 2: | |
(this.state = 352), this.function_call(); | |
break; | |
case 3: | |
(this.state = 353), this.match(m.IDENTIFIER); | |
break; | |
case 4: | |
(this.state = 354), this.match(m.LRB), (this.state = 355), this.expression(0), (this.state = 356), this.match(m.RRB); | |
break; | |
case 5: | |
(this.state = 358), | |
(t = this._input.LA(1)), | |
0 != ((t - 36) & -32) || 0 == ((1 << (t - 36)) & ((1 << (m.OP_ADD - 36)) | (1 << (m.OP_SUB - 36)) | (1 << (m.OP_INC - 36)) | (1 << (m.OP_DEC - 36)) | (1 << (m.OP_BIT_UNARY - 36)) | (1 << (m.OP_LOGICAL_UNARY - 36)))) | |
? this._errHandler.recoverInline(this) | |
: (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()), | |
(this.state = 359), | |
this.expression(14); | |
} | |
for (this._ctx._stop = this._input.tryLT(-1), this.state = 417, this._errHandler.sync(this), e = this.interpreter.adaptivePredict(this._input, 43, this._ctx); 2 !== e && e !== n.ATN.INVALID_ALT_NUMBER; ) { | |
if (1 === e) | |
switch ((null != this._parseListeners && this.triggerExitRuleEvent(), (o = s), (this.state = 415), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 42, this._ctx))) { | |
case 1: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 362), !this.precpred(this._ctx, 13))) throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); | |
(this.state = 363), | |
(t = this._input.LA(1)), | |
0 != ((t - 35) & -32) || 0 == ((1 << (t - 35)) & ((1 << (m.OP_MUL - 35)) | (1 << (m.OP_DIV - 35)) | (1 << (m.OP_MOD - 35)))) | |
? this._errHandler.recoverInline(this) | |
: (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()), | |
(this.state = 364), | |
this.expression(14); | |
break; | |
case 2: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 365), !this.precpred(this._ctx, 12))) throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); | |
(this.state = 366), | |
(t = this._input.LA(1)), | |
t !== m.OP_ADD && t !== m.OP_SUB ? this._errHandler.recoverInline(this) : (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()), | |
(this.state = 367), | |
this.expression(13); | |
break; | |
case 3: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 368), !this.precpred(this._ctx, 11))) throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); | |
(this.state = 369), this.match(m.OP_SHIFT), (this.state = 370), this.expression(12); | |
break; | |
case 4: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 371), !this.precpred(this._ctx, 10))) throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); | |
(this.state = 372), this.match(m.OP_RELATIONAL), (this.state = 373), this.expression(11); | |
break; | |
case 5: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 374), !this.precpred(this._ctx, 9))) throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); | |
(this.state = 375), this.match(m.OP_EQUALITY), (this.state = 376), this.expression(10); | |
break; | |
case 6: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 377), !this.precpred(this._ctx, 8))) throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); | |
(this.state = 378), this.match(m.OP_BIT_AND), (this.state = 379), this.expression(9); | |
break; | |
case 7: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 380), !this.precpred(this._ctx, 7))) throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); | |
(this.state = 381), this.match(m.OP_BIT_XOR), (this.state = 382), this.expression(8); | |
break; | |
case 8: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 383), !this.precpred(this._ctx, 6))) throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); | |
(this.state = 384), this.match(m.OP_BIT_OR), (this.state = 385), this.expression(7); | |
break; | |
case 9: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 386), !this.precpred(this._ctx, 5))) throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); | |
(this.state = 387), this.match(m.OP_LOGICAL_AND), (this.state = 388), this.expression(6); | |
break; | |
case 10: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 389), !this.precpred(this._ctx, 4))) throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); | |
(this.state = 390), this.match(m.OP_LOGICAL_XOR), (this.state = 391), this.expression(5); | |
break; | |
case 11: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 392), !this.precpred(this._ctx, 3))) throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); | |
(this.state = 393), this.match(m.OP_LOGICAL_OR), (this.state = 394), this.expression(4); | |
break; | |
case 12: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 395), !this.precpred(this._ctx, 1))) throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); | |
(this.state = 396), | |
(t = this._input.LA(1)), | |
t !== m.OP_MODIFY && t !== m.OP_ASSIGN ? this._errHandler.recoverInline(this) : (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()), | |
(this.state = 397), | |
this.expression(2); | |
break; | |
case 13: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 398), !this.precpred(this._ctx, 15))) throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); | |
switch (((this.state = 407), this._errHandler.sync(this), this.interpreter.adaptivePredict(this._input, 41, this._ctx))) { | |
case 1: | |
(this.state = 399), this.array_subscript(); | |
break; | |
case 2: | |
(this.state = 400), this.match(m.DOT), (this.state = 401), this.function_call(); | |
break; | |
case 3: | |
(this.state = 402), this.match(m.DOT), (this.state = 403), this.match(m.IDENTIFIER); | |
break; | |
case 4: | |
(this.state = 404), this.match(m.DOT); | |
break; | |
case 5: | |
(this.state = 405), this.match(m.OP_INC); | |
break; | |
case 6: | |
(this.state = 406), this.match(m.OP_DEC); | |
} | |
break; | |
case 14: | |
if (((s = new V(r, i)), this.pushNewRecursionContext(s, a, m.RULE_expression), (this.state = 409), !this.precpred(this._ctx, 2))) throw this.createFailedPredicateException("this.precpred(this._ctx, 2)"); | |
(this.state = 410), this.match(m.QUESTION), (this.state = 411), this.expression_list(), (this.state = 412), this.match(m.COLON), (this.state = 413), this.expression_list(); | |
} | |
(this.state = 419), this._errHandler.sync(this), (e = this.interpreter.adaptivePredict(this._input, 43, this._ctx)); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(s.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.unrollRecursionContexts(r); | |
} | |
return s; | |
} | |
expression_list() { | |
let e = new q(this._ctx, this.state); | |
this.enterRule(e, 60, m.RULE_expression_list); | |
try { | |
let t; | |
for (this.enterOuterAlt(e, 1), this.state = 420, this.expression(0), this.state = 425, this._errHandler.sync(this), t = this.interpreter.adaptivePredict(this._input, 44, this._ctx); 2 !== t && t !== n.ATN.INVALID_ALT_NUMBER; ) | |
1 === t && ((this.state = 421), this.match(m.COMMA), (this.state = 422), this.expression(0)), (this.state = 427), this._errHandler.sync(this), (t = this.interpreter.adaptivePredict(this._input, 44, this._ctx)); | |
(this.state = 429), this._errHandler.sync(this), 1 === this.interpreter.adaptivePredict(this._input, 45, this._ctx) && ((this.state = 428), this.match(m.COMMA)); | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
type() { | |
let e, | |
t = new W(this._ctx, this.state); | |
this.enterRule(t, 62, m.RULE_type); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 431), | |
(e = this._input.LA(1)), | |
e !== m.KW_VOID && e !== m.TYPE && e !== m.IDENTIFIER ? this._errHandler.recoverInline(this) : (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
type_usage() { | |
let e, | |
t = new Q(this._ctx, this.state); | |
this.enterRule(t, 64, m.RULE_type_usage); | |
try { | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 436, this._errHandler.sync(this), e = this._input.LA(1); | |
0 == (-32 & e) && | |
0 != | |
((1 << e) & | |
((1 << m.Q_PRECISION) | | |
(1 << m.Q_LAYOUT) | | |
(1 << m.Q_INVARIANT) | | |
(1 << m.Q_SMOOTH) | | |
(1 << m.Q_FLAT) | | |
(1 << m.Q_CONST) | | |
(1 << m.Q_INOUT) | | |
(1 << m.Q_IN) | | |
(1 << m.Q_OUT) | | |
(1 << m.Q_CENTROID) | | |
(1 << m.Q_UNIFORM) | | |
(1 << m.Q_VARYING) | | |
(1 << m.Q_ATTRIBUTE) | | |
(1 << m.Q_HIGHP) | | |
(1 << m.Q_MEDIUMP) | | |
(1 << m.Q_LOWP))); | |
) | |
(this.state = 433), this.qualifier(), (this.state = 438), this._errHandler.sync(this), (e = this._input.LA(1)); | |
switch (((this.state = 441), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.KW_VOID: | |
case m.TYPE: | |
case m.IDENTIFIER: | |
(this.state = 439), this.type(); | |
break; | |
case m.KW_STRUCT: | |
(this.state = 440), this.type_declaration(); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
for (this.state = 446, this._errHandler.sync(this), e = this._input.LA(1); e === m.LSB; ) (this.state = 443), this.array_subscript(), (this.state = 448), this._errHandler.sync(this), (e = this._input.LA(1)); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
array_subscript() { | |
let e, | |
t = new K(this._ctx, this.state); | |
this.enterRule(t, 66, m.RULE_array_subscript); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 449), | |
this.match(m.LSB), | |
(this.state = 451), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
((0 == ((e - 31) & -32) && | |
0 != | |
((1 << (e - 31)) & | |
((1 << (m.TYPE - 31)) | | |
(1 << (m.BOOL_LITERAL - 31)) | | |
(1 << (m.INT_LITERAL - 31)) | | |
(1 << (m.FLOAT_LITERAL - 31)) | | |
(1 << (m.OP_ADD - 31)) | | |
(1 << (m.OP_SUB - 31)) | | |
(1 << (m.OP_INC - 31)) | | |
(1 << (m.OP_DEC - 31)) | | |
(1 << (m.OP_BIT_UNARY - 31)) | | |
(1 << (m.OP_LOGICAL_UNARY - 31)) | | |
(1 << (m.IDENTIFIER - 31))))) || | |
e === m.LRB) && | |
((this.state = 450), this.expression(0)), | |
(this.state = 453), | |
this.match(m.RSB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
qualifier() { | |
let e = new Y(this._ctx, this.state); | |
this.enterRule(e, 68, m.RULE_qualifier); | |
try { | |
switch (((this.state = 471), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.Q_LAYOUT: | |
this.enterOuterAlt(e, 1), (this.state = 455), this.layout_qualifier(); | |
break; | |
case m.Q_PRECISION: | |
this.enterOuterAlt(e, 2), (this.state = 456), this.match(m.Q_PRECISION); | |
break; | |
case m.Q_INVARIANT: | |
this.enterOuterAlt(e, 3), (this.state = 457), this.match(m.Q_INVARIANT); | |
break; | |
case m.Q_SMOOTH: | |
this.enterOuterAlt(e, 4), (this.state = 458), this.match(m.Q_SMOOTH); | |
break; | |
case m.Q_FLAT: | |
this.enterOuterAlt(e, 5), (this.state = 459), this.match(m.Q_FLAT); | |
break; | |
case m.Q_CONST: | |
this.enterOuterAlt(e, 6), (this.state = 460), this.match(m.Q_CONST); | |
break; | |
case m.Q_INOUT: | |
this.enterOuterAlt(e, 7), (this.state = 461), this.match(m.Q_INOUT); | |
break; | |
case m.Q_IN: | |
this.enterOuterAlt(e, 8), (this.state = 462), this.match(m.Q_IN); | |
break; | |
case m.Q_OUT: | |
this.enterOuterAlt(e, 9), (this.state = 463), this.match(m.Q_OUT); | |
break; | |
case m.Q_CENTROID: | |
this.enterOuterAlt(e, 10), (this.state = 464), this.match(m.Q_CENTROID); | |
break; | |
case m.Q_UNIFORM: | |
this.enterOuterAlt(e, 11), (this.state = 465), this.match(m.Q_UNIFORM); | |
break; | |
case m.Q_VARYING: | |
this.enterOuterAlt(e, 12), (this.state = 466), this.match(m.Q_VARYING); | |
break; | |
case m.Q_ATTRIBUTE: | |
this.enterOuterAlt(e, 13), (this.state = 467), this.match(m.Q_ATTRIBUTE); | |
break; | |
case m.Q_HIGHP: | |
this.enterOuterAlt(e, 14), (this.state = 468), this.match(m.Q_HIGHP); | |
break; | |
case m.Q_MEDIUMP: | |
this.enterOuterAlt(e, 15), (this.state = 469), this.match(m.Q_MEDIUMP); | |
break; | |
case m.Q_LOWP: | |
this.enterOuterAlt(e, 16), (this.state = 470), this.match(m.Q_LOWP); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
layout_qualifier() { | |
let e, | |
t = new $(this._ctx, this.state); | |
this.enterRule(t, 70, m.RULE_layout_qualifier); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 473), | |
this.match(m.Q_LAYOUT), | |
(this.state = 474), | |
this.match(m.LRB), | |
(this.state = 476), | |
this._errHandler.sync(this), | |
(e = this._input.LA(1)), | |
e === m.IDENTIFIER && ((this.state = 475), this.layout_qualifier_id_list()), | |
(this.state = 478), | |
this.match(m.RRB); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
layout_qualifier_id_list() { | |
let e, | |
t = new X(this._ctx, this.state); | |
this.enterRule(t, 72, m.RULE_layout_qualifier_id_list); | |
try { | |
let r; | |
for ( | |
this.enterOuterAlt(t, 1), this.state = 480, this.layout_qualifier_id(), this.state = 485, this._errHandler.sync(this), r = this.interpreter.adaptivePredict(this._input, 52, this._ctx); | |
2 !== r && r !== n.ATN.INVALID_ALT_NUMBER; | |
) | |
1 === r && ((this.state = 481), this.match(m.COMMA), (this.state = 482), this.layout_qualifier_id()), (this.state = 487), this._errHandler.sync(this), (r = this.interpreter.adaptivePredict(this._input, 52, this._ctx)); | |
(this.state = 489), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.COMMA && ((this.state = 488), this.match(m.COMMA)); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
layout_qualifier_id() { | |
let e, | |
t = new J(this._ctx, this.state); | |
this.enterRule(t, 74, m.RULE_layout_qualifier_id); | |
try { | |
if ((this.enterOuterAlt(t, 1), (this.state = 491), this.match(m.IDENTIFIER), (this.state = 497), this._errHandler.sync(this), (e = this._input.LA(1)), e === m.OP_ASSIGN)) | |
switch (((this.state = 492), this.match(m.OP_ASSIGN), (this.state = 495), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.IDENTIFIER: | |
(this.state = 493), this.match(m.IDENTIFIER); | |
break; | |
case m.BOOL_LITERAL: | |
case m.INT_LITERAL: | |
case m.FLOAT_LITERAL: | |
(this.state = 494), this.literal(); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
literal() { | |
let e = new Z(this._ctx, this.state); | |
this.enterRule(e, 76, m.RULE_literal); | |
try { | |
switch (((this.state = 501), this._errHandler.sync(this), this._input.LA(1))) { | |
case m.BOOL_LITERAL: | |
this.enterOuterAlt(e, 1), (this.state = 499), this.match(m.BOOL_LITERAL); | |
break; | |
case m.INT_LITERAL: | |
case m.FLOAT_LITERAL: | |
this.enterOuterAlt(e, 2), (this.state = 500), this.number_literal(); | |
break; | |
default: | |
throw new o.NoViableAltException(this); | |
} | |
} catch (t) { | |
if (!(t instanceof u.RecognitionException)) throw t; | |
(e.exception = t), this._errHandler.reportError(this, t), this._errHandler.recover(this, t); | |
} finally { | |
this.exitRule(); | |
} | |
return e; | |
} | |
number_literal() { | |
let e, | |
t = new ee(this._ctx, this.state); | |
this.enterRule(t, 78, m.RULE_number_literal); | |
try { | |
this.enterOuterAlt(t, 1), | |
(this.state = 503), | |
(e = this._input.LA(1)), | |
e !== m.INT_LITERAL && e !== m.FLOAT_LITERAL ? this._errHandler.recoverInline(this) : (this._input.LA(1) === h.Token.EOF && (this.matchedEOF = !0), this._errHandler.reportMatch(this), this.consume()); | |
} catch (e) { | |
if (!(e instanceof u.RecognitionException)) throw e; | |
(t.exception = e), this._errHandler.reportError(this, e), this._errHandler.recover(this, e); | |
} finally { | |
this.exitRule(); | |
} | |
return t; | |
} | |
sempred(e, t, r) { | |
return 29 !== t || this.expression_sempred(e, r); | |
} | |
expression_sempred(e, t) { | |
switch (t) { | |
case 0: | |
return this.precpred(this._ctx, 13); | |
case 1: | |
return this.precpred(this._ctx, 12); | |
case 2: | |
return this.precpred(this._ctx, 11); | |
case 3: | |
return this.precpred(this._ctx, 10); | |
case 4: | |
return this.precpred(this._ctx, 9); | |
case 5: | |
return this.precpred(this._ctx, 8); | |
case 6: | |
return this.precpred(this._ctx, 7); | |
case 7: | |
return this.precpred(this._ctx, 6); | |
case 8: | |
return this.precpred(this._ctx, 5); | |
case 9: | |
return this.precpred(this._ctx, 4); | |
case 10: | |
return this.precpred(this._ctx, 3); | |
case 11: | |
return this.precpred(this._ctx, 1); | |
case 12: | |
return this.precpred(this._ctx, 15); | |
case 13: | |
return this.precpred(this._ctx, 2); | |
} | |
return !0; | |
} | |
static get _ATN() { | |
return m.__ATN || (m.__ATN = new i.ATNDeserializer().deserialize(d.toCharArray(m._serializedATN))), m.__ATN; | |
} | |
} | |
(t.AntlrGlslParser = m), | |
(m.KW_BREAK = 1), | |
(m.KW_CONTINUE = 2), | |
(m.KW_DO = 3), | |
(m.KW_FOR = 4), | |
(m.KW_WHILE = 5), | |
(m.KW_SWITCH = 6), | |
(m.KW_CASE = 7), | |
(m.KW_DEFAULT = 8), | |
(m.KW_IF = 9), | |
(m.KW_ELSE = 10), | |
(m.KW_DISCARD = 11), | |
(m.KW_RETURN = 12), | |
(m.KW_STRUCT = 13), | |
(m.KW_VOID = 14), | |
(m.Q_PRECISION = 15), | |
(m.Q_LAYOUT = 16), | |
(m.Q_INVARIANT = 17), | |
(m.Q_SMOOTH = 18), | |
(m.Q_FLAT = 19), | |
(m.Q_CONST = 20), | |
(m.Q_INOUT = 21), | |
(m.Q_IN = 22), | |
(m.Q_OUT = 23), | |
(m.Q_CENTROID = 24), | |
(m.Q_UNIFORM = 25), | |
(m.Q_VARYING = 26), | |
(m.Q_ATTRIBUTE = 27), | |
(m.Q_HIGHP = 28), | |
(m.Q_MEDIUMP = 29), | |
(m.Q_LOWP = 30), | |
(m.TYPE = 31), | |
(m.BOOL_LITERAL = 32), | |
(m.INT_LITERAL = 33), | |
(m.FLOAT_LITERAL = 34), | |
(m.OP_MUL = 35), | |
(m.OP_ADD = 36), | |
(m.OP_SUB = 37), | |
(m.OP_DIV = 38), | |
(m.OP_MOD = 39), | |
(m.OP_INC = 40), | |
(m.OP_DEC = 41), | |
(m.OP_SHIFT = 42), | |
(m.OP_RELATIONAL = 43), | |
(m.OP_EQUALITY = 44), | |
(m.OP_BIT_AND = 45), | |
(m.OP_BIT_XOR = 46), | |
(m.OP_BIT_OR = 47), | |
(m.OP_BIT_UNARY = 48), | |
(m.OP_LOGICAL_AND = 49), | |
(m.OP_LOGICAL_OR = 50), | |
(m.OP_LOGICAL_XOR = 51), | |
(m.OP_LOGICAL_UNARY = 52), | |
(m.OP_MODIFY = 53), | |
(m.OP_ASSIGN = 54), | |
(m.PREPROCESSOR = 55), | |
(m.NEW_LINE = 56), | |
(m.SPACE = 57), | |
(m.TAB = 58), | |
(m.MULTI_LINE_COMMENT = 59), | |
(m.SINGLE_LINE_COMMENT = 60), | |
(m.IDENTIFIER = 61), | |
(m.DOT = 62), | |
(m.COMMA = 63), | |
(m.COLON = 64), | |
(m.SEMICOLON = 65), | |
(m.QUESTION = 66), | |
(m.LRB = 67), | |
(m.RRB = 68), | |
(m.LCB = 69), | |
(m.RCB = 70), | |
(m.LSB = 71), | |
(m.RSB = 72), | |
(m.RULE_start = 0), | |
(m.RULE_function_prototype = 1), | |
(m.RULE_function_definition = 2), | |
(m.RULE_function_header = 3), | |
(m.RULE_function_parameter_list = 4), | |
(m.RULE_function_call = 5), | |
(m.RULE_function_call_parameter_list = 6), | |
(m.RULE_statement = 7), | |
(m.RULE_compound_statement = 8), | |
(m.RULE_simple_statement = 9), | |
(m.RULE_selection_statement = 10), | |
(m.RULE_switch_statement = 11), | |
(m.RULE_case_group = 12), | |
(m.RULE_case_label = 13), | |
(m.RULE_iteration_statement = 14), | |
(m.RULE_for_iteration = 15), | |
(m.RULE_while_iteration = 16), | |
(m.RULE_do_while_iteration = 17), | |
(m.RULE_jump_statement = 18), | |
(m.RULE_expression_statement = 19), | |
(m.RULE_declaration_statement = 20), | |
(m.RULE_precision_declaration = 21), | |
(m.RULE_invariant_declaration = 22), | |
(m.RULE_variable_declaration = 23), | |
(m.RULE_single_variable_declaration = 24), | |
(m.RULE_type_declaration = 25), | |
(m.RULE_interface_block_declaration = 26), | |
(m.RULE_identifier_optarray = 27), | |
(m.RULE_identifier_optarray_optassignment = 28), | |
(m.RULE_expression = 29), | |
(m.RULE_expression_list = 30), | |
(m.RULE_type = 31), | |
(m.RULE_type_usage = 32), | |
(m.RULE_array_subscript = 33), | |
(m.RULE_qualifier = 34), | |
(m.RULE_layout_qualifier = 35), | |
(m.RULE_layout_qualifier_id_list = 36), | |
(m.RULE_layout_qualifier_id = 37), | |
(m.RULE_literal = 38), | |
(m.RULE_number_literal = 39), | |
(m.ruleNames = [ | |
"start", | |
"function_prototype", | |
"function_definition", | |
"function_header", | |
"function_parameter_list", | |
"function_call", | |
"function_call_parameter_list", | |
"statement", | |
"compound_statement", | |
"simple_statement", | |
"selection_statement", | |
"switch_statement", | |
"case_group", | |
"case_label", | |
"iteration_statement", | |
"for_iteration", | |
"while_iteration", | |
"do_while_iteration", | |
"jump_statement", | |
"expression_statement", | |
"declaration_statement", | |
"precision_declaration", | |
"invariant_declaration", | |
"variable_declaration", | |
"single_variable_declaration", | |
"type_declaration", | |
"interface_block_declaration", | |
"identifier_optarray", | |
"identifier_optarray_optassignment", | |
"expression", | |
"expression_list", | |
"type", | |
"type_usage", | |
"array_subscript", | |
"qualifier", | |
"layout_qualifier", | |
"layout_qualifier_id_list", | |
"layout_qualifier_id", | |
"literal", | |
"number_literal", | |
]), | |
(m._LITERAL_NAMES = [ | |
void 0, | |
"'break'", | |
"'continue'", | |
"'do'", | |
"'for'", | |
"'while'", | |
"'switch'", | |
"'case'", | |
"'default'", | |
"'if'", | |
"'else'", | |
"'discard'", | |
"'return'", | |
"'struct'", | |
"'void'", | |
"'precision'", | |
"'layout'", | |
"'invariant'", | |
"'smooth'", | |
"'flat'", | |
"'const'", | |
"'inout'", | |
"'in'", | |
"'out'", | |
"'centroid'", | |
"'uniform'", | |
"'varying'", | |
"'attribute'", | |
"'highp'", | |
"'mediump'", | |
"'lowp'", | |
void 0, | |
void 0, | |
void 0, | |
void 0, | |
"'*'", | |
"'+'", | |
"'-'", | |
"'/'", | |
"'%'", | |
"'++'", | |
"'--'", | |
void 0, | |
void 0, | |
void 0, | |
"'&'", | |
"'^'", | |
"'|'", | |
"'~'", | |
"'&&'", | |
"'||'", | |
"'^^'", | |
"'!'", | |
void 0, | |
"'='", | |
void 0, | |
void 0, | |
"' '", | |
"'\t'", | |
void 0, | |
void 0, | |
void 0, | |
"'.'", | |
"','", | |
"':'", | |
"';'", | |
"'?'", | |
"'('", | |
"')'", | |
"'{'", | |
"'}'", | |
"'['", | |
"']'", | |
]), | |
(m._SYMBOLIC_NAMES = [ | |
void 0, | |
"KW_BREAK", | |
"KW_CONTINUE", | |
"KW_DO", | |
"KW_FOR", | |
"KW_WHILE", | |
"KW_SWITCH", | |
"KW_CASE", | |
"KW_DEFAULT", | |
"KW_IF", | |
"KW_ELSE", | |
"KW_DISCARD", | |
"KW_RETURN", | |
"KW_STRUCT", | |
"KW_VOID", | |
"Q_PRECISION", | |
"Q_LAYOUT", | |
"Q_INVARIANT", | |
"Q_SMOOTH", | |
"Q_FLAT", | |
"Q_CONST", | |
"Q_INOUT", | |
"Q_IN", | |
"Q_OUT", | |
"Q_CENTROID", | |
"Q_UNIFORM", | |
"Q_VARYING", | |
"Q_ATTRIBUTE", | |
"Q_HIGHP", | |
"Q_MEDIUMP", | |
"Q_LOWP", | |
"TYPE", | |
"BOOL_LITERAL", | |
"INT_LITERAL", | |
"FLOAT_LITERAL", | |
"OP_MUL", | |
"OP_ADD", | |
"OP_SUB", | |
"OP_DIV", | |
"OP_MOD", | |
"OP_INC", | |
"OP_DEC", | |
"OP_SHIFT", | |
"OP_RELATIONAL", | |
"OP_EQUALITY", | |
"OP_BIT_AND", | |
"OP_BIT_XOR", | |
"OP_BIT_OR", | |
"OP_BIT_UNARY", | |
"OP_LOGICAL_AND", | |
"OP_LOGICAL_OR", | |
"OP_LOGICAL_XOR", | |
"OP_LOGICAL_UNARY", | |
"OP_MODIFY", | |
"OP_ASSIGN", | |
"PREPROCESSOR", | |
"NEW_LINE", | |
"SPACE", | |
"TAB", | |
"MULTI_LINE_COMMENT", | |
"SINGLE_LINE_COMMENT", | |
"IDENTIFIER", | |
"DOT", | |
"COMMA", | |
"COLON", | |
"SEMICOLON", | |
"QUESTION", | |
"LRB", | |
"RRB", | |
"LCB", | |
"RCB", | |
"LSB", | |
"RSB", | |
]), | |
(m.VOCABULARY = new p.VocabularyImpl(m._LITERAL_NAMES, m._SYMBOLIC_NAMES, [])), | |
(m._serializedATN = | |
'줝쪺֍꾺体؇쉁JǼ\t\t\t\t\t\t\b\t\b\t\t\t\n\t\n\v\t\v\f\t\f\r\t\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t !\t!"\t"#\t#$\t$%\t%&\t&\'\t\'(\t()\t)W\n\fZ\vf\nn\n\fq\vt\nv\nz\n\f}\v\n\b\b\b\n\b\t\t\t\n\t\n\n\n\n\n\f\n\n\v\n\n\n\v\v\v\v\v\v\v\v\n\v\f\f\f\f\f\f\f\f¦\n\f\r\r\r\r\r\r\r®\n\r\f\r\r±\v\r\r\r·\n\fº\v¿\nÆ\nÌ\nÏ\nÒ\nÕ\nØ\nð\nò\nø\nĊ\n\rċĐ\nĔ\n\fė\vĢ\n\fĥ\vĨ\nĪ\nĮ\nIJ\nĸ\n\fĻ\vŀ\n\fŃ\vņ\nŌ\n\fŏ\vœ\nŗ\n\fŚ\vş\nū\nƚ\nƢ\n\fƥ\v ƪ\n \f ƭ\v ư\n !!""Ƶ\n"\f""Ƹ\v""""Ƽ\n"""ƿ\n"\f""ǂ\v"###dž\n###$$$$$$$$$$$$$$$$$ǚ\n$%%%%ǟ\n%%%&&&&Ǧ\n&\f&&ǩ\v&&&Ǭ\n&\'\'\'\'\'Dz\n\'\'Ǵ\n\'(((Ǹ\n()))<*\b\n\f "$&(*,.02468:<>@BDFHJLNP\t!!??&\'*+2266%%()&\'78!!??#$ȼX[^\ba\nu\fw§´¾Å Ç"Ü$â&ñ(õ*ď,đ.Ě0ĝ2ī4į6Ł8Ŕ:ś<Ū>Ʀ@ƱBƶDǃFǙHǛJǢLǭNǷPǹRWSWTW*UWCVRVSVTVUWZXVXYYZX[\\\b\\]C]^_\b_`\n`abB"bc?ceEdf\nedeffgghFh\tivjo2klAln2mknqomoppsqortAsrsttvuiujv\vw{\txzD#yxz}{y{||~}{~E\bF\r > \n\vG\tH*(\f&\rC\v E ¡<¡¢F¢¥\t£¤\f¤¦\t¥£¥¦¦§¨\b¨©E©ª<ª«F«¯G¬®¬®±¯¯°°²±¯²³H³´¸µ·\t¶µ·º¸¶¸¹¹º¸»¿\n¼½\t½¿<¾»¾¼¿ÀÀÁBÁÂÆ ÃÆ"ÄÆ$ÅÂÅÃÅÄÆÇÈÈËEÉÌ0ÊÌ> ËÉËÊËÌÌÎÍÏCÎÍÎÏÏÑÐÒ<ÑÐÑÒÒÔÓÕCÔÓÔÕÕ×ÖØ> ×ÖרØÙÙÚFÚÛ\tÛ!ÜÝÝÞEÞß<ßàFàá\tá#âããä\täååæEæç<çèFèéCé%êòëòìò\ríïîð<ïîïððòñêñëñìñíòóóôCô\'õ÷> öøC÷ö÷øø)ùú,úûCûĐüý.ýþCþĐÿĀ4ĀāCāĐĂă0ăĄCĄĐąĆ6ĆćCćĐĈĊF$ĉĈĊċċĉċČČččĎCĎĐďùďüďÿďĂďąďĉĐ+đĕĒĔF$ēĒĔėĕēĕĖĖĘėĕĘę@!ę-ĚěěĜ?Ĝ/ĝĩB"Ğģ:ğĠAĠĢ:ġğĢĥģġģĤĤħĥģĦĨAħĦħĨĨĪĩĞĩĪĪ1īĭB"ĬĮ:ĭĬĭĮĮ3įıİIJ?ıİıIJIJijijĹGĴĵ0ĵĶCĶĸķĴĸĻĹķĹĺĺļĻĹļĽHĽ5ľŀF$ĿľŀŃŁĿŁłłŅŃŁńņ?ŅńŅņņŇŇōGňʼn0ʼnŊCŊŌŋňŌŏōŋōŎŎŐŏōŐŒHőœ8ŒőŒœœ7ŔŘ?ŕŗD#ŖŕŗŚŘŖŘřř9ŚŘśŞ8Ŝŝ8ŝş<ŞŜŞşş;Šš\bšūN(Ţū\fţū?ŤťEťŦ<ŦŧFŧūŨũ\tũū<ŪŠŪŢŪţŪŤŪŨūƣŬŭ\fŭŮ\tŮƢ<ůŰ\fŰű\tűƢ<Ųų\f\rųŴ,ŴƢ<ŵŶ\f\fŶŷ-ŷƢ<\rŸŹ\f\vŹź.źƢ<\fŻż\f\nżŽ/ŽƢ<\vžſ\f\tſƀ0ƀƢ<\nƁƂ\f\bƂƃ1ƃƢ<\tƄƅ\fƅƆ3ƆƢ<\bƇƈ\fƈƉ5ƉƢ<ƊƋ\fƋƌ4ƌƢ<ƍƎ\fƎƏ\tƏƢ<Ɛƙ\fƑƚD#ƒƓ@Ɠƚ\fƔƕ@ƕƚ?Ɩƚ@Ɨƚ*Ƙƚ+ƙƑƙƒƙƔƙƖƙƗƙƘƚƢƛƜ\fƜƝDƝƞ> ƞƟBƟƠ> ƠƢơŬơůơŲơŵơŸơŻơžơƁơƄơƇơƊơƍơƐơƛƢƥƣơƣƤƤ=ƥƣƦƫ<ƧƨAƨƪ<ƩƧƪƭƫƩƫƬƬƯƭƫƮưAƯƮƯưư?ƱƲ\tƲAƳƵF$ƴƳƵƸƶƴƶƷƷƻƸƶƹƼ@!ƺƼ4ƻƹƻƺƼǀƽƿD#ƾƽƿǂǀƾǀǁǁCǂǀǃDžIDŽdž<DžDŽDždždžLJLJLjJLjEljǚH%NJǚNjǚnjǚǍǚǎǚǏǚǐǚǑǚǒǚǓǚǔǚǕǚǖǚǗǚǘǚ ǙljǙNJǙNjǙnjǙǍǙǎǙǏǙǐǙǑǙǒǙǓǙǔǙǕǙǖǙǗǙǘǚGǛǜǜǞEǝǟJ&ǞǝǞǟǟǠǠǡFǡIǢǧL\'ǣǤAǤǦL\'ǥǣǦǩǧǥǧǨǨǫǩǧǪǬAǫǪǫǬǬKǭdz?ǮDZ8ǯDz?ǰDzN(DZǯDZǰDzǴdzǮdzǴǴMǵǸ"ǶǸP)ǷǵǷǶǸOǹǺ\t\bǺQ;VXeosu{¥¯¸¾ÅËÎÑÔ×ïñ÷ċďĕģħĩĭıĹŁŅōŒŘŞŪƙơƣƫƯƶƻǀDžǙǞǧǫDZdzǷ'); | |
class f extends l.ParserRuleContext { | |
function_prototype(e) { | |
return void 0 === e ? this.getRuleContexts(y) : this.getRuleContext(e, y); | |
} | |
function_definition(e) { | |
return void 0 === e ? this.getRuleContexts(g) : this.getRuleContext(e, g); | |
} | |
declaration_statement(e) { | |
return void 0 === e ? this.getRuleContexts(k) : this.getRuleContext(e, k); | |
} | |
SEMICOLON(e) { | |
return void 0 === e ? this.getTokens(m.SEMICOLON) : this.getToken(m.SEMICOLON, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_start; | |
} | |
accept(e) { | |
return e.visitStart ? e.visitStart(this) : e.visitChildren(this); | |
} | |
} | |
t.StartContext = f; | |
class y extends l.ParserRuleContext { | |
function_header() { | |
return this.getRuleContext(0, _); | |
} | |
SEMICOLON() { | |
return this.getToken(m.SEMICOLON, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_prototype; | |
} | |
accept(e) { | |
return e.visitFunction_prototype ? e.visitFunction_prototype(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_prototypeContext = y; | |
class g extends l.ParserRuleContext { | |
function_header() { | |
return this.getRuleContext(0, _); | |
} | |
compound_statement() { | |
return this.getRuleContext(0, E); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_definition; | |
} | |
accept(e) { | |
return e.visitFunction_definition ? e.visitFunction_definition(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_definitionContext = g; | |
class _ extends l.ParserRuleContext { | |
type_usage() { | |
return this.getRuleContext(0, Q); | |
} | |
IDENTIFIER() { | |
return this.getToken(m.IDENTIFIER, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
function_parameter_list() { | |
return this.tryGetRuleContext(0, T); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_header; | |
} | |
accept(e) { | |
return e.visitFunction_header ? e.visitFunction_header(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_headerContext = _; | |
class T extends l.ParserRuleContext { | |
KW_VOID() { | |
return this.tryGetToken(m.KW_VOID, 0); | |
} | |
single_variable_declaration(e) { | |
return void 0 === e ? this.getRuleContexts(B) : this.getRuleContext(e, B); | |
} | |
COMMA(e) { | |
return void 0 === e ? this.getTokens(m.COMMA) : this.getToken(m.COMMA, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_parameter_list; | |
} | |
accept(e) { | |
return e.visitFunction_parameter_list ? e.visitFunction_parameter_list(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_parameter_listContext = T; | |
class x extends l.ParserRuleContext { | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
TYPE() { | |
return this.tryGetToken(m.TYPE, 0); | |
} | |
IDENTIFIER() { | |
return this.tryGetToken(m.IDENTIFIER, 0); | |
} | |
array_subscript(e) { | |
return void 0 === e ? this.getRuleContexts(K) : this.getRuleContext(e, K); | |
} | |
function_call_parameter_list() { | |
return this.tryGetRuleContext(0, v); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_call; | |
} | |
accept(e) { | |
return e.visitFunction_call ? e.visitFunction_call(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_callContext = x; | |
class v extends l.ParserRuleContext { | |
KW_VOID() { | |
return this.tryGetToken(m.KW_VOID, 0); | |
} | |
expression_list() { | |
return this.tryGetRuleContext(0, q); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_function_call_parameter_list; | |
} | |
accept(e) { | |
return e.visitFunction_call_parameter_list ? e.visitFunction_call_parameter_list(this) : e.visitChildren(this); | |
} | |
} | |
t.Function_call_parameter_listContext = v; | |
class S extends l.ParserRuleContext { | |
compound_statement() { | |
return this.tryGetRuleContext(0, E); | |
} | |
simple_statement() { | |
return this.tryGetRuleContext(0, O); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_statement; | |
} | |
accept(e) { | |
return e.visitStatement ? e.visitStatement(this) : e.visitChildren(this); | |
} | |
} | |
t.StatementContext = S; | |
class E extends l.ParserRuleContext { | |
LCB() { | |
return this.getToken(m.LCB, 0); | |
} | |
RCB() { | |
return this.getToken(m.RCB, 0); | |
} | |
statement(e) { | |
return void 0 === e ? this.getRuleContexts(S) : this.getRuleContext(e, S); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_compound_statement; | |
} | |
accept(e) { | |
return e.visitCompound_statement ? e.visitCompound_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Compound_statementContext = E; | |
class O extends l.ParserRuleContext { | |
declaration_statement() { | |
return this.tryGetRuleContext(0, k); | |
} | |
expression_statement() { | |
return this.tryGetRuleContext(0, D); | |
} | |
selection_statement() { | |
return this.tryGetRuleContext(0, I); | |
} | |
iteration_statement() { | |
return this.tryGetRuleContext(0, R); | |
} | |
jump_statement() { | |
return this.tryGetRuleContext(0, w); | |
} | |
switch_statement() { | |
return this.tryGetRuleContext(0, N); | |
} | |
SEMICOLON() { | |
return this.tryGetToken(m.SEMICOLON, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_simple_statement; | |
} | |
accept(e) { | |
return e.visitSimple_statement ? e.visitSimple_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Simple_statementContext = O; | |
class I extends l.ParserRuleContext { | |
KW_IF() { | |
return this.getToken(m.KW_IF, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
expression() { | |
return this.getRuleContext(0, V); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
statement(e) { | |
return void 0 === e ? this.getRuleContexts(S) : this.getRuleContext(e, S); | |
} | |
KW_ELSE() { | |
return this.tryGetToken(m.KW_ELSE, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_selection_statement; | |
} | |
accept(e) { | |
return e.visitSelection_statement ? e.visitSelection_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Selection_statementContext = I; | |
class N extends l.ParserRuleContext { | |
KW_SWITCH() { | |
return this.getToken(m.KW_SWITCH, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
expression() { | |
return this.getRuleContext(0, V); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
LCB() { | |
return this.getToken(m.LCB, 0); | |
} | |
RCB() { | |
return this.getToken(m.RCB, 0); | |
} | |
case_group(e) { | |
return void 0 === e ? this.getRuleContexts(C) : this.getRuleContext(e, C); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_switch_statement; | |
} | |
accept(e) { | |
return e.visitSwitch_statement ? e.visitSwitch_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Switch_statementContext = N; | |
class C extends l.ParserRuleContext { | |
case_label() { | |
return this.getRuleContext(0, A); | |
} | |
statement(e) { | |
return void 0 === e ? this.getRuleContexts(S) : this.getRuleContext(e, S); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_case_group; | |
} | |
accept(e) { | |
return e.visitCase_group ? e.visitCase_group(this) : e.visitChildren(this); | |
} | |
} | |
t.Case_groupContext = C; | |
class A extends l.ParserRuleContext { | |
COLON() { | |
return this.getToken(m.COLON, 0); | |
} | |
KW_DEFAULT() { | |
return this.tryGetToken(m.KW_DEFAULT, 0); | |
} | |
KW_CASE() { | |
return this.tryGetToken(m.KW_CASE, 0); | |
} | |
expression() { | |
return this.tryGetRuleContext(0, V); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_case_label; | |
} | |
accept(e) { | |
return e.visitCase_label ? e.visitCase_label(this) : e.visitChildren(this); | |
} | |
} | |
t.Case_labelContext = A; | |
class R extends l.ParserRuleContext { | |
for_iteration() { | |
return this.tryGetRuleContext(0, P); | |
} | |
while_iteration() { | |
return this.tryGetRuleContext(0, b); | |
} | |
do_while_iteration() { | |
return this.tryGetRuleContext(0, L); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_iteration_statement; | |
} | |
accept(e) { | |
return e.visitIteration_statement ? e.visitIteration_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Iteration_statementContext = R; | |
class P extends l.ParserRuleContext { | |
KW_FOR() { | |
return this.getToken(m.KW_FOR, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
statement() { | |
return this.getRuleContext(0, S); | |
} | |
variable_declaration() { | |
return this.tryGetRuleContext(0, U); | |
} | |
expression_list(e) { | |
return void 0 === e ? this.getRuleContexts(q) : this.getRuleContext(e, q); | |
} | |
SEMICOLON(e) { | |
return void 0 === e ? this.getTokens(m.SEMICOLON) : this.getToken(m.SEMICOLON, e); | |
} | |
expression() { | |
return this.tryGetRuleContext(0, V); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_for_iteration; | |
} | |
accept(e) { | |
return e.visitFor_iteration ? e.visitFor_iteration(this) : e.visitChildren(this); | |
} | |
} | |
t.For_iterationContext = P; | |
class b extends l.ParserRuleContext { | |
KW_WHILE() { | |
return this.getToken(m.KW_WHILE, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
expression() { | |
return this.getRuleContext(0, V); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
statement() { | |
return this.getRuleContext(0, S); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_while_iteration; | |
} | |
accept(e) { | |
return e.visitWhile_iteration ? e.visitWhile_iteration(this) : e.visitChildren(this); | |
} | |
} | |
t.While_iterationContext = b; | |
class L extends l.ParserRuleContext { | |
KW_DO() { | |
return this.getToken(m.KW_DO, 0); | |
} | |
statement() { | |
return this.getRuleContext(0, S); | |
} | |
KW_WHILE() { | |
return this.getToken(m.KW_WHILE, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
expression() { | |
return this.getRuleContext(0, V); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
SEMICOLON() { | |
return this.getToken(m.SEMICOLON, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_do_while_iteration; | |
} | |
accept(e) { | |
return e.visitDo_while_iteration ? e.visitDo_while_iteration(this) : e.visitChildren(this); | |
} | |
} | |
t.Do_while_iterationContext = L; | |
class w extends l.ParserRuleContext { | |
SEMICOLON() { | |
return this.getToken(m.SEMICOLON, 0); | |
} | |
KW_CONTINUE() { | |
return this.tryGetToken(m.KW_CONTINUE, 0); | |
} | |
KW_BREAK() { | |
return this.tryGetToken(m.KW_BREAK, 0); | |
} | |
KW_DISCARD() { | |
return this.tryGetToken(m.KW_DISCARD, 0); | |
} | |
KW_RETURN() { | |
return this.tryGetToken(m.KW_RETURN, 0); | |
} | |
expression() { | |
return this.tryGetRuleContext(0, V); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_jump_statement; | |
} | |
accept(e) { | |
return e.visitJump_statement ? e.visitJump_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Jump_statementContext = w; | |
class D extends l.ParserRuleContext { | |
expression_list() { | |
return this.getRuleContext(0, q); | |
} | |
SEMICOLON() { | |
return this.tryGetToken(m.SEMICOLON, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_expression_statement; | |
} | |
accept(e) { | |
return e.visitExpression_statement ? e.visitExpression_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Expression_statementContext = D; | |
class k extends l.ParserRuleContext { | |
precision_declaration() { | |
return this.tryGetRuleContext(0, F); | |
} | |
SEMICOLON() { | |
return this.getToken(m.SEMICOLON, 0); | |
} | |
invariant_declaration() { | |
return this.tryGetRuleContext(0, M); | |
} | |
type_declaration() { | |
return this.tryGetRuleContext(0, j); | |
} | |
variable_declaration() { | |
return this.tryGetRuleContext(0, U); | |
} | |
interface_block_declaration() { | |
return this.tryGetRuleContext(0, G); | |
} | |
qualifier(e) { | |
return void 0 === e ? this.getRuleContexts(Y) : this.getRuleContext(e, Y); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_declaration_statement; | |
} | |
accept(e) { | |
return e.visitDeclaration_statement ? e.visitDeclaration_statement(this) : e.visitChildren(this); | |
} | |
} | |
t.Declaration_statementContext = k; | |
class F extends l.ParserRuleContext { | |
Q_PRECISION() { | |
return this.getToken(m.Q_PRECISION, 0); | |
} | |
type() { | |
return this.getRuleContext(0, W); | |
} | |
qualifier(e) { | |
return void 0 === e ? this.getRuleContexts(Y) : this.getRuleContext(e, Y); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_precision_declaration; | |
} | |
accept(e) { | |
return e.visitPrecision_declaration ? e.visitPrecision_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Precision_declarationContext = F; | |
class M extends l.ParserRuleContext { | |
Q_INVARIANT() { | |
return this.getToken(m.Q_INVARIANT, 0); | |
} | |
IDENTIFIER() { | |
return this.getToken(m.IDENTIFIER, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_invariant_declaration; | |
} | |
accept(e) { | |
return e.visitInvariant_declaration ? e.visitInvariant_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Invariant_declarationContext = M; | |
class U extends l.ParserRuleContext { | |
type_usage() { | |
return this.getRuleContext(0, Q); | |
} | |
identifier_optarray_optassignment(e) { | |
return void 0 === e ? this.getRuleContexts(z) : this.getRuleContext(e, z); | |
} | |
COMMA(e) { | |
return void 0 === e ? this.getTokens(m.COMMA) : this.getToken(m.COMMA, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_variable_declaration; | |
} | |
accept(e) { | |
return e.visitVariable_declaration ? e.visitVariable_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Variable_declarationContext = U; | |
class B extends l.ParserRuleContext { | |
type_usage() { | |
return this.getRuleContext(0, Q); | |
} | |
identifier_optarray_optassignment() { | |
return this.tryGetRuleContext(0, z); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_single_variable_declaration; | |
} | |
accept(e) { | |
return e.visitSingle_variable_declaration ? e.visitSingle_variable_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Single_variable_declarationContext = B; | |
class j extends l.ParserRuleContext { | |
KW_STRUCT() { | |
return this.getToken(m.KW_STRUCT, 0); | |
} | |
LCB() { | |
return this.getToken(m.LCB, 0); | |
} | |
RCB() { | |
return this.getToken(m.RCB, 0); | |
} | |
IDENTIFIER() { | |
return this.tryGetToken(m.IDENTIFIER, 0); | |
} | |
variable_declaration(e) { | |
return void 0 === e ? this.getRuleContexts(U) : this.getRuleContext(e, U); | |
} | |
SEMICOLON(e) { | |
return void 0 === e ? this.getTokens(m.SEMICOLON) : this.getToken(m.SEMICOLON, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_type_declaration; | |
} | |
accept(e) { | |
return e.visitType_declaration ? e.visitType_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Type_declarationContext = j; | |
class G extends l.ParserRuleContext { | |
LCB() { | |
return this.getToken(m.LCB, 0); | |
} | |
RCB() { | |
return this.getToken(m.RCB, 0); | |
} | |
qualifier(e) { | |
return void 0 === e ? this.getRuleContexts(Y) : this.getRuleContext(e, Y); | |
} | |
IDENTIFIER() { | |
return this.tryGetToken(m.IDENTIFIER, 0); | |
} | |
variable_declaration(e) { | |
return void 0 === e ? this.getRuleContexts(U) : this.getRuleContext(e, U); | |
} | |
SEMICOLON(e) { | |
return void 0 === e ? this.getTokens(m.SEMICOLON) : this.getToken(m.SEMICOLON, e); | |
} | |
identifier_optarray() { | |
return this.tryGetRuleContext(0, H); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_interface_block_declaration; | |
} | |
accept(e) { | |
return e.visitInterface_block_declaration ? e.visitInterface_block_declaration(this) : e.visitChildren(this); | |
} | |
} | |
t.Interface_block_declarationContext = G; | |
class H extends l.ParserRuleContext { | |
IDENTIFIER() { | |
return this.getToken(m.IDENTIFIER, 0); | |
} | |
array_subscript(e) { | |
return void 0 === e ? this.getRuleContexts(K) : this.getRuleContext(e, K); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_identifier_optarray; | |
} | |
accept(e) { | |
return e.visitIdentifier_optarray ? e.visitIdentifier_optarray(this) : e.visitChildren(this); | |
} | |
} | |
t.Identifier_optarrayContext = H; | |
class z extends l.ParserRuleContext { | |
identifier_optarray() { | |
return this.getRuleContext(0, H); | |
} | |
OP_ASSIGN() { | |
return this.tryGetToken(m.OP_ASSIGN, 0); | |
} | |
expression() { | |
return this.tryGetRuleContext(0, V); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_identifier_optarray_optassignment; | |
} | |
accept(e) { | |
return e.visitIdentifier_optarray_optassignment ? e.visitIdentifier_optarray_optassignment(this) : e.visitChildren(this); | |
} | |
} | |
t.Identifier_optarray_optassignmentContext = z; | |
class V extends l.ParserRuleContext { | |
literal() { | |
return this.tryGetRuleContext(0, Z); | |
} | |
function_call() { | |
return this.tryGetRuleContext(0, x); | |
} | |
IDENTIFIER() { | |
return this.tryGetToken(m.IDENTIFIER, 0); | |
} | |
LRB() { | |
return this.tryGetToken(m.LRB, 0); | |
} | |
expression(e) { | |
return void 0 === e ? this.getRuleContexts(V) : this.getRuleContext(e, V); | |
} | |
RRB() { | |
return this.tryGetToken(m.RRB, 0); | |
} | |
array_subscript() { | |
return this.tryGetRuleContext(0, K); | |
} | |
DOT() { | |
return this.tryGetToken(m.DOT, 0); | |
} | |
OP_INC() { | |
return this.tryGetToken(m.OP_INC, 0); | |
} | |
OP_DEC() { | |
return this.tryGetToken(m.OP_DEC, 0); | |
} | |
OP_ADD() { | |
return this.tryGetToken(m.OP_ADD, 0); | |
} | |
OP_SUB() { | |
return this.tryGetToken(m.OP_SUB, 0); | |
} | |
OP_LOGICAL_UNARY() { | |
return this.tryGetToken(m.OP_LOGICAL_UNARY, 0); | |
} | |
OP_BIT_UNARY() { | |
return this.tryGetToken(m.OP_BIT_UNARY, 0); | |
} | |
OP_MUL() { | |
return this.tryGetToken(m.OP_MUL, 0); | |
} | |
OP_DIV() { | |
return this.tryGetToken(m.OP_DIV, 0); | |
} | |
OP_MOD() { | |
return this.tryGetToken(m.OP_MOD, 0); | |
} | |
OP_SHIFT() { | |
return this.tryGetToken(m.OP_SHIFT, 0); | |
} | |
OP_RELATIONAL() { | |
return this.tryGetToken(m.OP_RELATIONAL, 0); | |
} | |
OP_EQUALITY() { | |
return this.tryGetToken(m.OP_EQUALITY, 0); | |
} | |
OP_BIT_AND() { | |
return this.tryGetToken(m.OP_BIT_AND, 0); | |
} | |
OP_BIT_XOR() { | |
return this.tryGetToken(m.OP_BIT_XOR, 0); | |
} | |
OP_BIT_OR() { | |
return this.tryGetToken(m.OP_BIT_OR, 0); | |
} | |
OP_LOGICAL_AND() { | |
return this.tryGetToken(m.OP_LOGICAL_AND, 0); | |
} | |
OP_LOGICAL_XOR() { | |
return this.tryGetToken(m.OP_LOGICAL_XOR, 0); | |
} | |
OP_LOGICAL_OR() { | |
return this.tryGetToken(m.OP_LOGICAL_OR, 0); | |
} | |
QUESTION() { | |
return this.tryGetToken(m.QUESTION, 0); | |
} | |
expression_list(e) { | |
return void 0 === e ? this.getRuleContexts(q) : this.getRuleContext(e, q); | |
} | |
COLON() { | |
return this.tryGetToken(m.COLON, 0); | |
} | |
OP_ASSIGN() { | |
return this.tryGetToken(m.OP_ASSIGN, 0); | |
} | |
OP_MODIFY() { | |
return this.tryGetToken(m.OP_MODIFY, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_expression; | |
} | |
accept(e) { | |
return e.visitExpression ? e.visitExpression(this) : e.visitChildren(this); | |
} | |
} | |
t.ExpressionContext = V; | |
class q extends l.ParserRuleContext { | |
expression(e) { | |
return void 0 === e ? this.getRuleContexts(V) : this.getRuleContext(e, V); | |
} | |
COMMA(e) { | |
return void 0 === e ? this.getTokens(m.COMMA) : this.getToken(m.COMMA, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_expression_list; | |
} | |
accept(e) { | |
return e.visitExpression_list ? e.visitExpression_list(this) : e.visitChildren(this); | |
} | |
} | |
t.Expression_listContext = q; | |
class W extends l.ParserRuleContext { | |
KW_VOID() { | |
return this.tryGetToken(m.KW_VOID, 0); | |
} | |
TYPE() { | |
return this.tryGetToken(m.TYPE, 0); | |
} | |
IDENTIFIER() { | |
return this.tryGetToken(m.IDENTIFIER, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_type; | |
} | |
accept(e) { | |
return e.visitType ? e.visitType(this) : e.visitChildren(this); | |
} | |
} | |
t.TypeContext = W; | |
class Q extends l.ParserRuleContext { | |
type() { | |
return this.tryGetRuleContext(0, W); | |
} | |
type_declaration() { | |
return this.tryGetRuleContext(0, j); | |
} | |
qualifier(e) { | |
return void 0 === e ? this.getRuleContexts(Y) : this.getRuleContext(e, Y); | |
} | |
array_subscript(e) { | |
return void 0 === e ? this.getRuleContexts(K) : this.getRuleContext(e, K); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_type_usage; | |
} | |
accept(e) { | |
return e.visitType_usage ? e.visitType_usage(this) : e.visitChildren(this); | |
} | |
} | |
t.Type_usageContext = Q; | |
class K extends l.ParserRuleContext { | |
LSB() { | |
return this.getToken(m.LSB, 0); | |
} | |
RSB() { | |
return this.getToken(m.RSB, 0); | |
} | |
expression() { | |
return this.tryGetRuleContext(0, V); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_array_subscript; | |
} | |
accept(e) { | |
return e.visitArray_subscript ? e.visitArray_subscript(this) : e.visitChildren(this); | |
} | |
} | |
t.Array_subscriptContext = K; | |
class Y extends l.ParserRuleContext { | |
layout_qualifier() { | |
return this.tryGetRuleContext(0, $); | |
} | |
Q_PRECISION() { | |
return this.tryGetToken(m.Q_PRECISION, 0); | |
} | |
Q_INVARIANT() { | |
return this.tryGetToken(m.Q_INVARIANT, 0); | |
} | |
Q_SMOOTH() { | |
return this.tryGetToken(m.Q_SMOOTH, 0); | |
} | |
Q_FLAT() { | |
return this.tryGetToken(m.Q_FLAT, 0); | |
} | |
Q_CONST() { | |
return this.tryGetToken(m.Q_CONST, 0); | |
} | |
Q_INOUT() { | |
return this.tryGetToken(m.Q_INOUT, 0); | |
} | |
Q_IN() { | |
return this.tryGetToken(m.Q_IN, 0); | |
} | |
Q_OUT() { | |
return this.tryGetToken(m.Q_OUT, 0); | |
} | |
Q_CENTROID() { | |
return this.tryGetToken(m.Q_CENTROID, 0); | |
} | |
Q_UNIFORM() { | |
return this.tryGetToken(m.Q_UNIFORM, 0); | |
} | |
Q_VARYING() { | |
return this.tryGetToken(m.Q_VARYING, 0); | |
} | |
Q_ATTRIBUTE() { | |
return this.tryGetToken(m.Q_ATTRIBUTE, 0); | |
} | |
Q_HIGHP() { | |
return this.tryGetToken(m.Q_HIGHP, 0); | |
} | |
Q_MEDIUMP() { | |
return this.tryGetToken(m.Q_MEDIUMP, 0); | |
} | |
Q_LOWP() { | |
return this.tryGetToken(m.Q_LOWP, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_qualifier; | |
} | |
accept(e) { | |
return e.visitQualifier ? e.visitQualifier(this) : e.visitChildren(this); | |
} | |
} | |
t.QualifierContext = Y; | |
class $ extends l.ParserRuleContext { | |
Q_LAYOUT() { | |
return this.getToken(m.Q_LAYOUT, 0); | |
} | |
LRB() { | |
return this.getToken(m.LRB, 0); | |
} | |
RRB() { | |
return this.getToken(m.RRB, 0); | |
} | |
layout_qualifier_id_list() { | |
return this.tryGetRuleContext(0, X); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_layout_qualifier; | |
} | |
accept(e) { | |
return e.visitLayout_qualifier ? e.visitLayout_qualifier(this) : e.visitChildren(this); | |
} | |
} | |
t.Layout_qualifierContext = $; | |
class X extends l.ParserRuleContext { | |
layout_qualifier_id(e) { | |
return void 0 === e ? this.getRuleContexts(J) : this.getRuleContext(e, J); | |
} | |
COMMA(e) { | |
return void 0 === e ? this.getTokens(m.COMMA) : this.getToken(m.COMMA, e); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_layout_qualifier_id_list; | |
} | |
accept(e) { | |
return e.visitLayout_qualifier_id_list ? e.visitLayout_qualifier_id_list(this) : e.visitChildren(this); | |
} | |
} | |
t.Layout_qualifier_id_listContext = X; | |
class J extends l.ParserRuleContext { | |
IDENTIFIER(e) { | |
return void 0 === e ? this.getTokens(m.IDENTIFIER) : this.getToken(m.IDENTIFIER, e); | |
} | |
OP_ASSIGN() { | |
return this.tryGetToken(m.OP_ASSIGN, 0); | |
} | |
literal() { | |
return this.tryGetRuleContext(0, Z); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_layout_qualifier_id; | |
} | |
accept(e) { | |
return e.visitLayout_qualifier_id ? e.visitLayout_qualifier_id(this) : e.visitChildren(this); | |
} | |
} | |
t.Layout_qualifier_idContext = J; | |
class Z extends l.ParserRuleContext { | |
BOOL_LITERAL() { | |
return this.tryGetToken(m.BOOL_LITERAL, 0); | |
} | |
number_literal() { | |
return this.tryGetRuleContext(0, ee); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_literal; | |
} | |
accept(e) { | |
return e.visitLiteral ? e.visitLiteral(this) : e.visitChildren(this); | |
} | |
} | |
t.LiteralContext = Z; | |
class ee extends l.ParserRuleContext { | |
INT_LITERAL() { | |
return this.tryGetToken(m.INT_LITERAL, 0); | |
} | |
FLOAT_LITERAL() { | |
return this.tryGetToken(m.FLOAT_LITERAL, 0); | |
} | |
constructor(e, t) { | |
super(e, t); | |
} | |
get ruleIndex() { | |
return m.RULE_number_literal; | |
} | |
accept(e) { | |
return e.visitNumber_literal ? e.visitNumber_literal(this) : e.visitChildren(this); | |
} | |
} | |
t.Number_literalContext = ee; | |
}, | |
1168: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Builtin = void 0); | |
const n = r(279), | |
i = r(9391), | |
s = r(2212), | |
o = r(2725), | |
a = r(7298), | |
l = r(1274), | |
c = r(3636), | |
u = r(1905), | |
h = r(1480), | |
p = r(9496), | |
d = r(2422), | |
m = r(1496), | |
f = r(1024), | |
y = r(3021), | |
g = r(9590), | |
_ = r(5668), | |
T = r(7539), | |
x = r(713), | |
v = r(6491), | |
S = r(2396), | |
E = r(4974), | |
O = r(7299), | |
I = r(3500), | |
N = r(3762), | |
C = r(6113), | |
A = r(7792), | |
R = r(8908), | |
P = r(7722), | |
b = r(7910), | |
L = r(8310), | |
w = r(9152); | |
class D { | |
constructor() { | |
(this.functions = new Array()), | |
(this.functionSummaries = new Map()), | |
(this.importantFunctions = new Array()), | |
(this.variables = new Map()), | |
(this.types = new Map()), | |
(this.keywords = new Array()), | |
(this.preprocessor = new Array()), | |
(this.qualifiers = new Map()), | |
(this.layoutParameters = new Array()), | |
(this.qualifierRules = new Array()), | |
(this.reservedWords = new Array()), | |
(this.genericTypes = new Map()), | |
(this.macros = new Array()); | |
} | |
setValues(e) { | |
(this.version = e), | |
this.loadReservedWords(), | |
this.loadKeywords(), | |
this.loadQualifiers(), | |
this.loadPreprocessor(), | |
this.loadLayoutParameters(), | |
this.loadTypes(), | |
this.loadGenericTypes(), | |
this.addConstructors(), | |
this.loadVariables(), | |
this.loadFunctions(), | |
this.loadFunctionSummaries(), | |
this.loadImportantFunctions(); | |
} | |
loadReservedWords() { | |
for (const e of E.reservedWords.get(this.version)) this.reservedWords.push(e); | |
} | |
loadKeywords() { | |
for (const e of O.keywords.get(this.version)) { | |
const t = this.getStage(e.stage); | |
this.keywords.push(new o.Keyword(e.name, t)); | |
} | |
} | |
loadQualifiers() { | |
for (const e of I.qualifiers.get(this.version)) this.qualifiers.set(e.name, new a.Qualifier(e.name, e.order)); | |
} | |
loadPreprocessor() { | |
for (const e of N.preprocessorDirectives) this.preprocessor.push(e); | |
for (const e of N.preprocessorMacros) this.macros.push(e); | |
} | |
loadLayoutParameters() { | |
if ("100" !== this.version) for (const e of C.layoutParameters) this.layoutParameters.push(new S.LayoutParameter(e.name, e.assignable, e.extension)); | |
} | |
loadTypes() { | |
this.loadTransparentTypes(w.transparentTypes.get(this.version)), | |
this.loadOpaqueTypes(w.floatingPointOpaqueTypes.get(this.version), l.TypeCategory.FLOATING_POINT_OPAQUE, c.TypeBase.FLOAT), | |
this.loadOpaqueTypes(w.signedIntegerOpaqueTypes.get(this.version), l.TypeCategory.SIGNED_INTEGER_OPAQUE, c.TypeBase.INT), | |
this.loadOpaqueTypes(w.unsignedIntegerOpaqueTypes.get(this.version), l.TypeCategory.UNSIGNED_INTEGER_OPAQUE, c.TypeBase.UINT), | |
this.loadCustomTypes(w.customTypes.get(this.version)); | |
} | |
loadTransparentTypes(e) { | |
for (const t of e) { | |
let e; | |
if (t.alias) e = this.types.get(t.alias); | |
else { | |
const r = this.stringToTypeBase(t.base); | |
e = v.Helper.createTypeDeclaration(t.name, t.width, t.height, r, l.TypeCategory.TRANSPARENT); | |
} | |
this.types.set(t.name, e); | |
} | |
} | |
stringToTypeBase(e) { | |
switch (e) { | |
case f.Constants.BOOL: | |
return c.TypeBase.BOOL; | |
case f.Constants.INT: | |
return c.TypeBase.INT; | |
case f.Constants.UINT: | |
return c.TypeBase.UINT; | |
case f.Constants.FLOAT: | |
return c.TypeBase.FLOAT; | |
default: | |
return c.TypeBase.NONE; | |
} | |
} | |
loadOpaqueTypes(e, t, r) { | |
for (const n of e) { | |
const e = v.Helper.createTypeDeclaration(n.name, f.Constants.INVALID, f.Constants.INVALID, r, t); | |
this.types.set(n.name, e); | |
} | |
} | |
loadCustomTypes(e) { | |
for (const t of e) { | |
const e = v.Helper.createTypeDeclaration(t.name, f.Constants.INVALID, f.Constants.INVALID, c.TypeBase.NONE, l.TypeCategory.CUSTOM); | |
this.addMembers(e, t), this.types.set(t.name, e); | |
} | |
} | |
addMembers(e, t) { | |
for (const r of t.members) { | |
const t = this.types.get(r.memberType), | |
n = v.Helper.createTypeUsage(r.memberType, t, new _.ArrayUsage()), | |
i = v.Helper.createVariableDeclaration(r.memberName, n, !1, !1); | |
this.addMemberPrecisionQualifier(n, r), e.members.push(i); | |
} | |
} | |
addMemberPrecisionQualifier(e, t) { | |
if (t.memberPrecision) { | |
const r = this.qualifiers.get(t.memberPrecision), | |
n = new h.QualifierUsage(t.memberPrecision, null, null, r); | |
e.qualifiers.push(n); | |
} | |
} | |
loadGenericTypes() { | |
for (const e of A.genericTypes.get(this.version)) { | |
const t = e.generic, | |
r = new Array(); | |
for (const t of e.real) r.push(t); | |
this.genericTypes.set(t, r); | |
} | |
} | |
addConstructors() { | |
for (const [e, t] of this.types) | |
if (!t.isOpaque()) { | |
this.functionSummaries.set(e, new y.FunctionInfo(e, null, d.ShaderStage.DEFAULT, !0, "")); | |
const r = x.ConstructorProcessor.getConstructors(t, this.types); | |
for (const e of r) this.functions.push(e); | |
} | |
} | |
loadVariables() { | |
for (const e of R.variables.get(this.version)) { | |
const t = void 0 === e.array ? f.Constants.INVALID : e.array, | |
r = this.types.get(e.type), | |
n = v.Helper.createTypeUsage(e.type, r, new _.ArrayUsage(t)); | |
this.addVariableQualifiers(n, e); | |
const i = this.createVariableSummary(e, n), | |
s = this.getStage(e.stage), | |
o = v.Helper.createVariableDeclaration(e.name, n, !1, !1, i, s, e.extension); | |
this.variables.set(e.name, o); | |
} | |
} | |
createVariableSummary(e, t) { | |
const r = new p.MarkdownString(); | |
if ((r.appendCodeblock(`${t.toString()} ${e.name};`), r.appendText(f.Constants.NEW_LINE), e.summary)) { | |
if ((r.appendText(e.summary), !e.notDocumented)) { | |
r.appendText(f.Constants.NEW_LINE); | |
const t = encodeURIComponent(JSON.stringify(e.name)); | |
r.appendMarkdown(`[Open documentation](command:${f.Constants.EXTENSION_NAME}.${m.GlslCommandProvider.OPEN_DOC}?${t})`), (r.isTrusted = !0); | |
} | |
} else e.min && r.appendText(`The actual value used is implementation dependent, but must be at least ${e.min}.`); | |
return r; | |
} | |
addVariableQualifiers(e, t) { | |
if (t.qualifiers) | |
for (const r of t.qualifiers) { | |
const t = this.qualifiers.get(r), | |
n = new h.QualifierUsage(r, null, null, t); | |
e.qualifiers.push(n); | |
} | |
} | |
loadFunctions() { | |
for (const e of P.functions.get(this.version)) | |
for (const t of g.GenericTypeProcessor.getFunctions(e, this.genericTypes)) { | |
const e = this.types.get(t.returnType), | |
r = v.Helper.createTypeUsage(t.returnType, e, new _.ArrayUsage()); | |
this.addReturnTypeQualifiers(t, r); | |
const n = this.getStage(t.stage), | |
i = v.Helper.createFunctionDeclaration(t.name, r, !1, n, t.extension); | |
this.addParameters(t, i); | |
const s = new T.LogicalFunction(); | |
s.prototypes.push(i), (i.logicalFunction = s), this.functions.push(s); | |
} | |
} | |
addReturnTypeQualifiers(e, t) { | |
if (e.qualifiers) | |
for (const r of e.qualifiers) { | |
const e = this.qualifiers.get(r), | |
n = new h.QualifierUsage(r, null, null, e); | |
t.qualifiers.push(n); | |
} | |
} | |
addParameters(e, t) { | |
for (const r of e.parameters) { | |
const e = this.types.get(r.type), | |
n = v.Helper.createTypeUsage(r.type, e, new _.ArrayUsage()), | |
i = v.Helper.createVariableDeclaration(r.name, n, !0, !1); | |
this.addVariableQualifiers(n, r), t.parameters.push(i); | |
} | |
} | |
loadFunctionSummaries() { | |
for (const e of b.functionSummaries.get(this.version)) { | |
const t = this.createFunctionSummary(e), | |
r = this.getStage(e.stage), | |
n = new y.FunctionInfo(e.name, t, r, !1, e.extension); | |
for (const t of e.parameters) n.parameters.set(t.name, t.summary); | |
this.functionSummaries.set(e.name, n); | |
} | |
} | |
createFunctionSummary(e) { | |
if (!e.summary) return null; | |
const t = new p.MarkdownString(); | |
t.appendText(e.summary), t.appendText(f.Constants.NEW_LINE); | |
const r = encodeURIComponent(JSON.stringify(e.name)); | |
return t.appendMarkdown(`[Open documentation](command:${f.Constants.EXTENSION_NAME}.${m.GlslCommandProvider.OPEN_DOC}?${r})`), (t.isTrusted = !0), t; | |
} | |
loadImportantFunctions() { | |
for (const e of L.importantFunctions) this.importantFunctions.push(e); | |
} | |
getStage(e) { | |
switch (e) { | |
case "vertex": | |
return d.ShaderStage.VERTEX; | |
case "fragment": | |
return d.ShaderStage.FRAGMENT; | |
default: | |
return d.ShaderStage.DEFAULT; | |
} | |
} | |
clone() { | |
const e = new D(); | |
for (const t of this.reservedWords) e.reservedWords.push(t); | |
for (const t of this.keywords) e.keywords.push(t); | |
for (const t of this.qualifiers.values()) e.qualifiers.set(t.name, new a.Qualifier(t.name, t.order)); | |
for (const t of this.preprocessor) e.preprocessor.push(t); | |
for (const t of this.layoutParameters) e.layoutParameters.push(t); | |
for (const t of this.qualifierRules) { | |
const r = new Set(); | |
for (const n of t) r.add(e.qualifiers.get(n.name)); | |
e.qualifierRules.push(r); | |
} | |
for (const [t, r] of this.types) | |
if ("mat2x2" === t || "mat3x3" === t || "mat4x4" === t) { | |
const n = e.types.get(r.name); | |
e.types.set(t, n); | |
} else { | |
const t = new s.TypeDeclaration(r.name, r.nameInterval, null, r.builtin, r.interval, r.width, r.height, r.typeBase, r.typeCategory); | |
for (const n of r.members) { | |
const r = e.types.get(n.type.name), | |
s = new u.TypeUsage(n.type.name, n.type.interval, n.type.nameInterval, null, r, n.type.array); | |
for (const e of n.type.qualifiers) { | |
const t = new h.QualifierUsage(e.name, e.nameInterval, null, e.qualifier); | |
s.qualifiers.push(t); | |
} | |
const o = new i.VariableDeclaration(n.name, n.nameInterval, null, n.builtin, n.declarationInterval, s, !1, !1); | |
t.members.push(o); | |
} | |
e.types.set(r.name, t); | |
} | |
for (const t of this.genericTypes) e.genericTypes.set(t[0], t[1]); | |
for (const t of this.variables.values()) { | |
const r = e.types.get(t.type.name), | |
n = new u.TypeUsage(t.type.name, t.type.interval, t.type.nameInterval, null, r, t.type.array); | |
for (const e of t.type.qualifiers) { | |
const t = new h.QualifierUsage(e.name, e.nameInterval, null, e.qualifier); | |
n.qualifiers.push(t); | |
} | |
const s = new i.VariableDeclaration(t.name, t.nameInterval, null, t.builtin, t.declarationInterval, n, !1, !1, t.summary, t.stage, t.extension); | |
e.variables.set(t.name, s); | |
} | |
for (const t of this.functions) { | |
const r = t.getDeclaration(), | |
s = e.types.get(r.returnType.name), | |
o = new u.TypeUsage(r.returnType.name, null, null, null, s, r.returnType.array); | |
for (const t of r.returnType.qualifiers) { | |
const r = e.qualifiers.get(t.name), | |
n = new h.QualifierUsage(t.name, null, null, r); | |
o.qualifiers.push(n); | |
} | |
const a = new n.FunctionDeclaration(r.name, r.nameInterval, null, o, r.builtIn, r.ctor, r.interval, null, r.stage, r.extension); | |
for (const t of r.parameters) { | |
const r = e.types.get(t.type.name), | |
n = new u.TypeUsage(t.type.name, null, null, null, r, t.type.array), | |
s = new i.VariableDeclaration(t.name, null, null, !0, null, n, !0, !1); | |
for (const r of t.type.qualifiers) { | |
const t = e.qualifiers.get(r.name), | |
i = new h.QualifierUsage(r.name, null, null, t); | |
n.qualifiers.push(i); | |
} | |
a.parameters.push(s); | |
} | |
const l = new T.LogicalFunction(); | |
l.prototypes.push(a), (a.logicalFunction = l), e.functions.push(l); | |
} | |
for (const t of this.functionSummaries) e.functionSummaries.set(t[0], t[1]); | |
for (const t of this.importantFunctions) e.importantFunctions.push(t); | |
for (const t of this.macros) e.macros.push(t); | |
return e; | |
} | |
reset() { | |
for (const e of this.qualifiers.values()) e.usages.length = 0; | |
for (const e of this.types.values()) (e.usages.length = 0), (e.ctorCalls.length = 0); | |
for (const e of this.variables.values()) e.usages.length = 0; | |
for (const e of this.functions.values()) e.calls.length = 0; | |
} | |
static get100() { | |
return this.builtin_100 || ((this.builtin_100 = new D()), this.builtin_100.setValues("100")), this.builtin_100.clone(); | |
} | |
static get300() { | |
return this.builtin_300 || ((this.builtin_300 = new D()), this.builtin_300.setValues("300")), this.builtin_300.clone(); | |
} | |
} | |
t.Builtin = D; | |
}, | |
713: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ConstructorProcessor = void 0); | |
const n = r(7539), | |
i = r(6491), | |
s = r(5668), | |
o = r(1274); | |
t.ConstructorProcessor = class { | |
static initialize(e, t) { | |
(this.result = new Array()), (this.td = e), (this.typeSize = e.width * e.height), (this.types = t); | |
} | |
static getConstructors(e, t) { | |
return ( | |
this.initialize(e, t), | |
e.isScalar() ? this.addScalarConstructors() : e.isVector() ? this.addVectorConstructors() : e.typeCategory === o.TypeCategory.CUSTOM && this.addConstructor(this.td.members.map((e) => e.type.declaration)), | |
this.result | |
); | |
} | |
static addScalarConstructors() { | |
for (const e of this.types) | |
if (this.canBeParameter(e)) { | |
const t = new Array(e[1]); | |
this.addConstructor(t); | |
} | |
} | |
static addVectorConstructors(e = new Array()) { | |
const t = this.getParametersSize(e); | |
if ((1 === e.length ? (e[0].isScalar() || t >= this.typeSize) && this.addConstructor(e) : e.length > 1 && t === this.typeSize && this.addConstructor(e), t < this.typeSize)) | |
for (const t of this.types) this.canBeParameter(t) && (e.push(t[1]), this.addVectorConstructors(e), e.pop()); | |
} | |
static addConstructor(e) { | |
const t = i.Helper.createTypeUsage(this.td.name, this.td, new s.ArrayUsage()), | |
r = i.Helper.createFunctionDeclaration(this.td.name, t, !0); | |
for (let t = 0; t < e.length; t++) { | |
const n = e[t], | |
o = i.Helper.createTypeUsage(n.name, n, new s.ArrayUsage()), | |
a = this.getParameterName(e, t), | |
l = i.Helper.createVariableDeclaration(a, o, !0, !1); | |
r.parameters.push(l); | |
} | |
const o = new n.LogicalFunction(); | |
o.prototypes.push(r), (r.logicalFunction = o), this.result.push(o); | |
} | |
static getParameterName(e, t) { | |
return this.td.typeCategory === o.TypeCategory.CUSTOM ? this.td.members[t].name : 1 === e.length ? "value" : `v${t}`; | |
} | |
static canBeParameter([e, t]) { | |
return t.typeCategory === o.TypeCategory.TRANSPARENT && "mat2x2" !== e && "mat3x3" !== e && "mat4x4" !== e; | |
} | |
static getParametersSize(e) { | |
let t = 0; | |
for (const r of e) t += r.width * r.height; | |
return t; | |
} | |
}; | |
}, | |
4876: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Documentation = void 0); | |
const n = r(7147), | |
i = r(9496), | |
s = r(5915), | |
o = r(4047); | |
class a { | |
static initialize() { | |
if (!this.initialized) { | |
for (const e of o.documentationRedirections) this.redirections.set(e.from, e.to); | |
this.initialized = !0; | |
} | |
} | |
static getDocumentation(e, t) { | |
var r; | |
this.initialize(); | |
const n = null !== (r = this.redirections.get(e)) && void 0 !== r ? r : e; | |
let i = this.documentations.get(n); | |
return i || ((i = this.getDocumentationFromFile(e, n, t)), this.documentations.set(n, i)), i; | |
} | |
static getDocumentationFromFile(e, t, r) { | |
const o = i.Uri.file(`${s.GlslEditor.getContext().extensionPath}/res/xhtml/${t}.xhtml`); | |
if (!n.existsSync(o.fsPath)) return `${e} — documentation is not available`; | |
const a = n.readFileSync(o.fsPath, "utf8"); | |
return this.createHtml(t, r, a); | |
} | |
static createHtml(e, t, r) { | |
return `\n <!DOCTYPE html>\n <html lang="en">\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width">\n <title>${e}</title>\n <script>\n MathJax = {\n options: {\n enableMenu: false\n }\n };\n <\/script>\n <script src="${t}"><\/script>\n </head>\n <body>\n ${r}\n </body>\n </html>\n `; | |
} | |
} | |
(t.Documentation = a), (a.documentations = new Map()), (a.redirections = new Map()), (a.initialized = !1); | |
}, | |
9590: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.GenericTypeGroup = t.GenericTypeProcessor = void 0), | |
(t.GenericTypeProcessor = class { | |
static initialize(e, t) { | |
(this.func = e), (this.genTypes = t); | |
} | |
static getFunctions(e, t) { | |
this.initialize(e, t); | |
const n = this.getGenericTypeGroup(), | |
i = new Array(); | |
if (n === r.NONE) return i.push(e), i; | |
{ | |
const e = this.getVariantCount(n); | |
for (let t = 0; t < e; t++) { | |
const e = this.createFunction(t); | |
i.push(e); | |
} | |
return i; | |
} | |
} | |
static createFunction(e) { | |
const t = { name: this.func.name, qualifiers: this.func.qualifiers, stage: this.func.stage, returnType: this.getType(this.func.returnType, e), parameters: new Array(), extension: this.func.extension }; | |
return this.addParameters(t, e), t; | |
} | |
static addParameters(e, t) { | |
for (const r of this.func.parameters) { | |
const n = { name: r.name, qualifiers: r.qualifiers, type: this.getType(r.type, t) }; | |
e.parameters.push(n); | |
} | |
} | |
static getType(e, t) { | |
const r = this.genTypes.get(e); | |
return r ? r[t] : e; | |
} | |
static getGenericTypeGroup() { | |
const e = this.getGenericTypeGroupOf(this.func.returnType); | |
if (e !== r.NONE) return e; | |
for (const e of this.func.parameters) { | |
const t = this.getGenericTypeGroupOf(e.type); | |
if (t !== r.NONE) return t; | |
} | |
return r.NONE; | |
} | |
static getGenericTypeGroupOf(e) { | |
switch (e) { | |
case "genType": | |
case "genIType": | |
case "genUType": | |
case "genBType": | |
return r.GEN_TYPE; | |
case "vec": | |
case "ivec": | |
case "uvec": | |
case "bvec": | |
return r.X_VEC; | |
case "gvec2": | |
case "gvec3": | |
case "gvec4": | |
case "gsampler2D": | |
case "gsampler3D": | |
case "gsamplerCube": | |
case "gsampler2DArray": | |
return r.G_SAMPLER; | |
case "mat": | |
return r.MAT; | |
default: | |
return r.NONE; | |
} | |
} | |
static getVariantCount(e) { | |
switch (e) { | |
case r.GEN_TYPE: | |
return this.genTypes.get("genType").length; | |
case r.X_VEC: | |
return this.genTypes.get("vec").length; | |
case r.G_SAMPLER: | |
return this.genTypes.get("gsampler2D").length; | |
case r.MAT: | |
return this.genTypes.get("mat").length; | |
default: | |
throw new Error(); | |
} | |
} | |
}), | |
(function (e) { | |
(e[(e.GEN_TYPE = 0)] = "GEN_TYPE"), (e[(e.X_VEC = 1)] = "X_VEC"), (e[(e.G_SAMPLER = 2)] = "G_SAMPLER"), (e[(e.MAT = 3)] = "MAT"), (e[(e.NONE = 4)] = "NONE"); | |
})((r = t.GenericTypeGroup || (t.GenericTypeGroup = {}))); | |
}, | |
4047: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.documentationRedirections = void 0), | |
(t.documentationRedirections = [ | |
{ from: "dFdy", to: "dFdx" }, | |
{ from: "floatBitsToUint", to: "floatBitsToInt" }, | |
{ from: "uintBitsToFloat", to: "intBitsToFloat" }, | |
{ from: "packUnorm2x16", to: "packUnorm" }, | |
{ from: "packSnorm2x16", to: "packUnorm" }, | |
{ from: "unpackUnorm2x16", to: "unpackUnorm" }, | |
{ from: "unpackSnorm2x16", to: "unpackUnorm" }, | |
]); | |
}, | |
7910: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.functionSummaries = void 0), | |
(t.functionSummaries = new Map([ | |
[ | |
"100", | |
[ | |
{ name: "acos", summary: "Return the arccosine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arccosine to return." }] }, | |
{ name: "asin", summary: "Return the arcsine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arcsine to return." }] }, | |
{ | |
name: "atan", | |
summary: "Return the arc-tangent of the parameters.", | |
parameters: [ | |
{ name: "y", summary: "Specify the numerator of the fraction whose arctangent to return." }, | |
{ name: "x", summary: "Specify the denominator of the fraction whose arctangent to return." }, | |
{ name: "y_over_x", summary: "Specify the fraction whose arctangent to return." }, | |
], | |
}, | |
{ name: "cos", summary: "Return the cosine of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the cosine." }] }, | |
{ name: "degrees", summary: "Convert a quantity in radians to degrees.", parameters: [{ name: "radians", summary: "Specify the quantity, in radians, to be converted to degrees." }] }, | |
{ name: "radians", summary: "Convert a quantity in degrees to radians.", parameters: [{ name: "degrees", summary: "Specify the quantity, in degrees, to be converted to radians." }] }, | |
{ name: "sin", summary: "Return the sine of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the sine." }] }, | |
{ name: "tan", summary: "Return the tangent of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the tangent." }] }, | |
{ name: "abs", summary: "Return the absolute value of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to return the absolute." }] }, | |
{ name: "ceil", summary: "Find the nearest integer that is greater than or equal to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ | |
name: "clamp", | |
summary: "Constrain a value to lie between two further values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to constrain." }, | |
{ name: "minVal", summary: "Specify the lower end of the range into which to constrain x." }, | |
{ name: "maxVal", summary: "Specify the upper end of the range into which to constrain x." }, | |
], | |
}, | |
{ name: "exp", summary: "Return the natural exponentiation of the parameter.", parameters: [{ name: "x", summary: "Specify the value to exponentiate." }] }, | |
{ name: "exp2", summary: "Return 2 raised to the power of the parameter.", parameters: [{ name: "x", summary: "Specify the value of the power to which 2 will be raised." }] }, | |
{ name: "floor", summary: "Find the nearest integer less than or equal to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "fract", summary: "Compute the fractional part of the argument.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "inversesqrt", summary: "Return the inverse of the square root of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the inverse of the square root." }] }, | |
{ name: "log", summary: "Return the natural logarithm of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the natural logarithm." }] }, | |
{ name: "log2", summary: "Return the base 2 logarithm of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the base 2 logarithm." }] }, | |
{ | |
name: "max", | |
summary: "Return the greater of two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the first value to compare." }, | |
{ name: "y", summary: "Specify the second value to compare." }, | |
], | |
}, | |
{ | |
name: "min", | |
summary: "Return the lesser of two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the first value to compare." }, | |
{ name: "y", summary: "Specify the second value to compare." }, | |
], | |
}, | |
{ | |
name: "mix", | |
summary: "Linearly interpolate between two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the start of the range in which to interpolate." }, | |
{ name: "y", summary: "Specify the end of the range in which to interpolate." }, | |
{ name: "a", summary: "Specify the value to use to interpolate between x and y." }, | |
], | |
}, | |
{ | |
name: "mod", | |
summary: "Compute value of one parameter modulo another.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to evaluate." }, | |
{ name: "y", summary: "Specify the value by which to perform the modulo." }, | |
], | |
}, | |
{ | |
name: "pow", | |
summary: "Return the value of the first parameter raised to the power of the second.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to raise to the power y." }, | |
{ name: "y", summary: "Specify the power to which to raise x." }, | |
], | |
}, | |
{ name: "sign", summary: "Extract the sign of the parameter.", parameters: [{ name: "x", summary: "Specify the value from which to extract the sign." }] }, | |
{ | |
name: "smoothstep", | |
summary: "Perform Hermite interpolation between two values.", | |
parameters: [ | |
{ name: "edge0", summary: "Specifies the value of the lower edge of the Hermite function." }, | |
{ name: "edge1", summary: "Specifies the value of the upper edge of the Hermite function." }, | |
{ name: "x", summary: "Specifies the source value for interpolation." }, | |
], | |
}, | |
{ name: "sqrt", summary: "Return the square root of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the square root." }] }, | |
{ | |
name: "step", | |
summary: "Generate a step function by comparing two values.", | |
parameters: [ | |
{ name: "edge", summary: "Specifies the location of the edge of the step function." }, | |
{ name: "x", summary: "Specify the value to be used to generate the step function." }, | |
], | |
}, | |
{ | |
name: "cross", | |
summary: "Calculate the cross product of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first of two vectors." }, | |
{ name: "y", summary: "Specifies the second of two vectors." }, | |
], | |
}, | |
{ | |
name: "distance", | |
summary: "Calculate the distance between two points.", | |
parameters: [ | |
{ name: "p0", summary: "Specifies the first of two points." }, | |
{ name: "p1", summary: "Specifies the second of two points." }, | |
], | |
}, | |
{ | |
name: "dot", | |
summary: "Calculate the dot product of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first of two vectors." }, | |
{ name: "y", summary: "Specifies the second of two vectors." }, | |
], | |
}, | |
{ | |
name: "equal", | |
summary: "Perform a component-wise equal-to comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "faceforward", | |
summary: "Return a vector pointing in the same direction as another.", | |
parameters: [ | |
{ name: "N", summary: "Specifies the vector to orient." }, | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "Nref", summary: "Specifies the reference vector." }, | |
], | |
}, | |
{ name: "length", summary: "Calculate the length of a vector.", parameters: [{ name: "x", summary: "Specifies a vector of which to calculate the length." }] }, | |
{ name: "normalize", summary: "Calculate the normalize product of two vectors.", parameters: [{ name: "v", summary: "Specifies the vector to normalize." }] }, | |
{ | |
name: "notEqual", | |
summary: "Perform a component-wise not-equal-to comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "reflect", | |
summary: "Calculate the reflection direction for an incident vector.", | |
parameters: [ | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "N", summary: "Specifies the normal vector." }, | |
], | |
}, | |
{ | |
name: "refract", | |
summary: "Calculate the refraction direction for an incident vector.", | |
parameters: [ | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "N", summary: "Specifies the normal vector." }, | |
{ name: "eta", summary: "Specifies the ratio of indices of refraction." }, | |
], | |
}, | |
{ name: "all", summary: "Check whether all elements of a boolean vector are true.", parameters: [{ name: "x", summary: "Specifies the vector to be tested for truth." }] }, | |
{ name: "any", summary: "Check whether any element of a boolean vector is true.", parameters: [{ name: "x", summary: "Specifies the vector to be tested for truth." }] }, | |
{ | |
name: "greaterThan", | |
summary: "Perform a component-wise greater-than comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "greaterThanEqual", | |
summary: "Perform a component-wise greater-than-or-equal comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "lessThan", | |
summary: "Perform a component-wise less-than comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "lessThanEqual", | |
summary: "Perform a component-wise less-than-or-equal comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ name: "not", summary: "Logically invert a boolean vector.", parameters: [{ name: "x", summary: "Specifies the vector to be inverted." }] }, | |
{ | |
name: "texture2D", | |
summary: "Retrieves texels from a texture.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "texture2DProj", | |
summary: "Perform a texture lookup with projection.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "texture2DLod", | |
summary: "Perform a texture lookup with explicit level-of-detail.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail." }, | |
], | |
}, | |
{ | |
name: "texture2DProjLod", | |
summary: "Perform a texture lookup with projection and explicit level-of-detail.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail from which to fetch texels." }, | |
], | |
}, | |
{ | |
name: "textureCube", | |
summary: "Retrieves texels from a texture.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "textureCubeLod", | |
summary: "Perform a texture lookup with explicit level-of-detail.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "coord", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail." }, | |
], | |
}, | |
{ | |
name: "matrixCompMult", | |
summary: "Perform a component-wise multiplication of two matrices.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first matrix multiplicand." }, | |
{ name: "y", summary: "Specifies the second matrix multiplicand." }, | |
], | |
}, | |
{ name: "fwidth", parameters: [{ name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ name: "dFdx", parameters: [{ name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ name: "dFdy", parameters: [{ name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ name: "texture2DLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "textureCubeLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "textureCubeGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ name: "acos", summary: "Return the arccosine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arccosine to return." }] }, | |
{ name: "acosh", summary: "Return the arc hyperbolic cosine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arc hyperbolic cosine to return." }] }, | |
{ name: "asin", summary: "Return the arcsine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arcsine to return." }] }, | |
{ name: "asinh", summary: "Return the arc hyperbolic sine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arc hyperbolic sine to return." }] }, | |
{ | |
name: "atan", | |
summary: "Return the arc-tangent of the parameters.", | |
parameters: [ | |
{ name: "y", summary: "Specify the numerator of the fraction whose arctangent to return." }, | |
{ name: "x", summary: "Specify the denominator of the fraction whose arctangent to return." }, | |
{ name: "y_over_x", summary: "Specify the fraction whose arctangent to return." }, | |
], | |
}, | |
{ name: "atanh", summary: "Return the arc hyperbolic tangent of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose arc hyperbolic tangent to return." }] }, | |
{ name: "cos", summary: "Return the cosine of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the cosine." }] }, | |
{ name: "cosh", summary: "Return the hyperbolic cosine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose hyperbolic cosine to return." }] }, | |
{ name: "degrees", summary: "Convert a quantity in radians to degrees.", parameters: [{ name: "radians", summary: "Specify the quantity, in radians, to be converted to degrees." }] }, | |
{ name: "radians", summary: "Convert a quantity in degrees to radians.", parameters: [{ name: "degrees", summary: "Specify the quantity, in degrees, to be converted to radians." }] }, | |
{ name: "sin", summary: "Return the sine of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the sine." }] }, | |
{ name: "sinh", summary: "Return the hyperbolic sine of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose hyperbolic sine to return." }] }, | |
{ name: "tan", summary: "Return the tangent of the parameter.", parameters: [{ name: "angle", summary: "Specify the quantity, in radians, of which to return the tangent." }] }, | |
{ name: "tanh", summary: "Return the hyperbolic tangent of the parameter.", parameters: [{ name: "x", summary: "Specify the value whose hyperbolic tangent to return." }] }, | |
{ name: "abs", summary: "Return the absolute value of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to return the absolute." }] }, | |
{ name: "ceil", summary: "Find the nearest integer that is greater than or equal to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ | |
name: "clamp", | |
summary: "Constrain a value to lie between two further values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to constrain." }, | |
{ name: "minVal", summary: "Specify the lower end of the range into which to constrain x." }, | |
{ name: "maxVal", summary: "Specify the upper end of the range into which to constrain x." }, | |
], | |
}, | |
{ | |
name: "dFdx", | |
summary: "Returns the derivative in x using local differencing for the input argument p.", | |
stage: "fragment", | |
parameters: [{ name: "p", summary: "Specifies the expression of which to take the partial derivative." }], | |
}, | |
{ | |
name: "dFdy", | |
summary: "Returns the derivative in y using local differencing for the input argument p.", | |
stage: "fragment", | |
parameters: [{ name: "p", summary: "Specifies the expression of which to take the partial derivative." }], | |
}, | |
{ name: "exp", summary: "Return the natural exponentiation of the parameter.", parameters: [{ name: "x", summary: "Specify the value to exponentiate." }] }, | |
{ name: "exp2", summary: "Return 2 raised to the power of the parameter.", parameters: [{ name: "x", summary: "Specify the value of the power to which 2 will be raised." }] }, | |
{ name: "floor", summary: "Find the nearest integer less than or equal to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "fract", summary: "Compute the fractional part of the argument.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "fwidth", summary: "Return the sum of the absolute derivatives in x and y.", stage: "fragment", parameters: [{ name: "p", summary: "Specifies the expression of which to take the partial derivative." }] }, | |
{ name: "inversesqrt", summary: "Return the inverse of the square root of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the inverse of the square root." }] }, | |
{ name: "isinf", summary: "Determine whether the parameter is positive or negative infinity.", parameters: [{ name: "x", summary: "Specifies the value to test for infinity." }] }, | |
{ name: "isnan", summary: "Determine whether the parameter is a number.", parameters: [{ name: "x", summary: "Specifies the value to test for NaN." }] }, | |
{ name: "log", summary: "Return the natural logarithm of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the natural logarithm." }] }, | |
{ name: "log2", summary: "Return the base 2 logarithm of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the base 2 logarithm." }] }, | |
{ | |
name: "max", | |
summary: "Return the greater of two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the first value to compare." }, | |
{ name: "y", summary: "Specify the second value to compare." }, | |
], | |
}, | |
{ | |
name: "min", | |
summary: "Return the lesser of two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the first value to compare." }, | |
{ name: "y", summary: "Specify the second value to compare." }, | |
], | |
}, | |
{ | |
name: "mix", | |
summary: "Linearly interpolate between two values.", | |
parameters: [ | |
{ name: "x", summary: "Specify the start of the range in which to interpolate." }, | |
{ name: "y", summary: "Specify the end of the range in which to interpolate." }, | |
{ name: "a", summary: "Specify the value to use to interpolate between x and y." }, | |
], | |
}, | |
{ | |
name: "mod", | |
summary: "Compute value of one parameter modulo another.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to evaluate." }, | |
{ name: "y", summary: "Specify the value by which to perform the modulo." }, | |
], | |
}, | |
{ | |
name: "modf", | |
summary: "Separate a value into its integer and fractional components.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to separate." }, | |
{ name: "i", summary: "A variable that receives the integer part of the argument." }, | |
], | |
}, | |
{ | |
name: "pow", | |
summary: "Return the value of the first parameter raised to the power of the second.", | |
parameters: [ | |
{ name: "x", summary: "Specify the value to raise to the power y." }, | |
{ name: "y", summary: "Specify the power to which to raise x." }, | |
], | |
}, | |
{ name: "round", summary: "Find the nearest integer to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "roundEven", summary: "Find the nearest even integer to the parameter.", parameters: [{ name: "x", summary: "Specify the value to evaluate." }] }, | |
{ name: "sign", summary: "Extract the sign of the parameter.", parameters: [{ name: "x", summary: "Specify the value from which to extract the sign." }] }, | |
{ | |
name: "smoothstep", | |
summary: "Perform Hermite interpolation between two values.", | |
parameters: [ | |
{ name: "edge0", summary: "Specifies the value of the lower edge of the Hermite function." }, | |
{ name: "edge1", summary: "Specifies the value of the upper edge of the Hermite function." }, | |
{ name: "x", summary: "Specifies the source value for interpolation." }, | |
], | |
}, | |
{ name: "sqrt", summary: "Return the square root of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the square root." }] }, | |
{ | |
name: "step", | |
summary: "Generate a step function by comparing two values.", | |
parameters: [ | |
{ name: "edge", summary: "Specifies the location of the edge of the step function." }, | |
{ name: "x", summary: "Specify the value to be used to generate the step function." }, | |
], | |
}, | |
{ name: "trunc", summary: "Find the truncated value of the parameter.", parameters: [{ name: "x", summary: "Specify the value of which to take the square root." }] }, | |
{ name: "floatBitsToInt", summary: "Produce the encoding of a floating point value as an integer.", parameters: [{ name: "x", summary: "Specifies the value whose floating point encoding to return." }] }, | |
{ name: "floatBitsToUint", summary: "Produce the encoding of a floating point value as an integer.", parameters: [{ name: "x", summary: "Specifies the value whose floating point encoding to return." }] }, | |
{ name: "intBitsToFloat", summary: "Produce a floating point using an encoding supplied as an integer.", parameters: [{ name: "x", summary: "Specifies the bit encoding to return as a floating point value." }] }, | |
{ name: "uintBitsToFloat", summary: "Produce a floating point using an encoding supplied as an integer.", parameters: [{ name: "x", summary: "Specifies the bit encoding to return as a floating point value." }] }, | |
{ | |
name: "packHalf2x16", | |
summary: "Convert two 32-bit floating-point quantities to 16-bit quantities and pack them into a single 32-bit integer.", | |
parameters: [{ name: "v", summary: "Specify a vector of two 32-bit floating point values that are to be converted to 16-bit representation and packed into the result." }], | |
}, | |
{ name: "packUnorm2x16", summary: "Pack floating-point values into an unsigned integer.", parameters: [{ name: "v", summary: "Specifies a vector of values to be packed into an unsigned integer." }] }, | |
{ name: "packSnorm2x16", summary: "Pack floating-point values into an unsigned integer.", parameters: [{ name: "v", summary: "Specifies a vector of values to be packed into an unsigned integer." }] }, | |
{ | |
name: "unpackHalf2x16", | |
summary: "Convert two 16-bit floating-point values packed into a single 32-bit integer into a vector of two 32-bit floating-point quantities.", | |
parameters: [{ name: "v", summary: "Specify a single 32-bit unsigned integer values that contains two 16-bit floating point values to be unpacked." }], | |
}, | |
{ name: "unpackUnorm2x16", summary: "Unpack floating-point values from an unsigned integer.", parameters: [{ name: "p", summary: "Specifies an unsigned integer containing packed floating-point values." }] }, | |
{ name: "unpackSnorm2x16", summary: "Unpack floating-point values from an unsigned integer.", parameters: [{ name: "p", summary: "Specifies an unsigned integer containing packed floating-point values." }] }, | |
{ | |
name: "cross", | |
summary: "Calculate the cross product of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first of two vectors." }, | |
{ name: "y", summary: "Specifies the second of two vectors." }, | |
], | |
}, | |
{ | |
name: "distance", | |
summary: "Calculate the distance between two points.", | |
parameters: [ | |
{ name: "p0", summary: "Specifies the first of two points." }, | |
{ name: "p1", summary: "Specifies the second of two points." }, | |
], | |
}, | |
{ | |
name: "dot", | |
summary: "Calculate the dot product of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first of two vectors." }, | |
{ name: "y", summary: "Specifies the second of two vectors." }, | |
], | |
}, | |
{ | |
name: "equal", | |
summary: "Perform a component-wise equal-to comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "faceforward", | |
summary: "Return a vector pointing in the same direction as another.", | |
parameters: [ | |
{ name: "N", summary: "Specifies the vector to orient." }, | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "Nref", summary: "Specifies the reference vector." }, | |
], | |
}, | |
{ name: "length", summary: "Calculate the length of a vector.", parameters: [{ name: "x", summary: "Specifies a vector of which to calculate the length." }] }, | |
{ name: "normalize", summary: "Calculate the normalize product of two vectors.", parameters: [{ name: "v", summary: "Specifies the vector to normalize." }] }, | |
{ | |
name: "notEqual", | |
summary: "Perform a component-wise not-equal-to comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "reflect", | |
summary: "Calculate the reflection direction for an incident vector.", | |
parameters: [ | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "N", summary: "Specifies the normal vector." }, | |
], | |
}, | |
{ | |
name: "refract", | |
summary: "Calculate the refraction direction for an incident vector.", | |
parameters: [ | |
{ name: "I", summary: "Specifies the incident vector." }, | |
{ name: "N", summary: "Specifies the normal vector." }, | |
{ name: "eta", summary: "Specifies the ratio of indices of refraction." }, | |
], | |
}, | |
{ name: "all", summary: "Check whether all elements of a boolean vector are true.", parameters: [{ name: "x", summary: "Specifies the vector to be tested for truth." }] }, | |
{ name: "any", summary: "Check whether any element of a boolean vector is true.", parameters: [{ name: "x", summary: "Specifies the vector to be tested for truth." }] }, | |
{ | |
name: "greaterThan", | |
summary: "Perform a component-wise greater-than comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "greaterThanEqual", | |
summary: "Perform a component-wise greater-than-or-equal comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "lessThan", | |
summary: "Perform a component-wise less-than comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ | |
name: "lessThanEqual", | |
summary: "Perform a component-wise less-than-or-equal comparison of two vectors.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first vector to be used in the comparison operation." }, | |
{ name: "y", summary: "Specifies the second vector to be used in the comparison operation." }, | |
], | |
}, | |
{ name: "not", summary: "Logically invert a boolean vector.", parameters: [{ name: "x", summary: "Specifies the vector to be inverted." }] }, | |
{ | |
name: "texelFetch", | |
summary: "Perform a lookup of a single texel within a texture.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "If present, specifies the level-of-detail within the texture from which the texel will be fetched." }, | |
], | |
}, | |
{ | |
name: "texelFetchOffset", | |
summary: "Perform a lookup of a single texel within a texture with an offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "If present, specifies the level-of-detail within the texture from which the texel will be fetched." }, | |
{ name: "offset", summary: "Specifies offset, in texels that will be applied to P before looking up the texel." }, | |
], | |
}, | |
{ | |
name: "texture", | |
summary: "Retrieves texels from a texture.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "textureGrad", | |
summary: "Perform a texture lookup with explicit gradients.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "dPdx", summary: "Specifies the partial derivative of P with respect to window x." }, | |
{ name: "dPdy", summary: "Specifies the partial derivative of P with respect to window y." }, | |
], | |
}, | |
{ | |
name: "textureGradOffset", | |
summary: "Perform a texture lookup with explicit gradients and offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "dPdx", summary: "Specifies the partial derivative of P with respect to window x." }, | |
{ name: "dPdy", summary: "Specifies the partial derivative of P with respect to window y." }, | |
{ name: "offset", summary: "Specifies the offset to be applied to the texture coordinates before sampling." }, | |
], | |
}, | |
{ | |
name: "textureLod", | |
summary: "Perform a texture lookup with explicit level-of-detail.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail." }, | |
], | |
}, | |
{ | |
name: "textureLodOffset", | |
summary: "Perform a texture lookup with explicit level-of-detail and offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which the texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail from which texels will be fetched." }, | |
{ name: "offset", summary: "Specifies the offset that will be applied to P before texels are fetched." }, | |
], | |
}, | |
{ | |
name: "textureOffset", | |
summary: "Perform a texture lookup with offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "offset", summary: "Specifies offset, in texels that will be applied to P before looking up the texel." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "textureProj", | |
summary: "Perform a texture lookup with projection.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "textureProjGrad", | |
summary: "Perform a texture lookup with projection and explicit gradients.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "dPdx", summary: "Specifies the partial derivative of P with respect to window x." }, | |
{ name: "dPdy", summary: "Specifies the partial derivative of P with respect to window y." }, | |
], | |
}, | |
{ | |
name: "textureProjGradOffset", | |
summary: "Perform a texture lookup with projection, explicit gradients and offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "dPdx", summary: "Specifies the partial derivative of P with respect to window x." }, | |
{ name: "dPdy", summary: "Specifies the partial derivative of P with respect to window y." }, | |
{ name: "offset", summary: "Specifies the offsets, in texels at which the texture will be sampled relative to the projection of P." }, | |
], | |
}, | |
{ | |
name: "textureProjLod", | |
summary: "Perform a texture lookup with projection and explicit level-of-detail.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail from which to fetch texels." }, | |
], | |
}, | |
{ | |
name: "textureProjLodOffset", | |
summary: "Perform a texture lookup with projection and explicit level-of-detail and offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which texture will be sampled." }, | |
{ name: "lod", summary: "Specifies the explicit level-of-detail from which to fetch texels." }, | |
{ name: "offset", summary: "Specifies the offset, in texels, to be applied to P before fetching texels." }, | |
], | |
}, | |
{ | |
name: "textureProjOffset", | |
summary: "Perform a texture lookup with projection and offset.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture from which texels will be retrieved is bound." }, | |
{ name: "P", summary: "Specifies the texture coordinates at which the texture will be sampled." }, | |
{ name: "offset", summary: "Specifies the offset that is applied to P before sampling occurs." }, | |
{ name: "bias", summary: "Specifies an optional bias to be applied during level-of-detail computation." }, | |
], | |
}, | |
{ | |
name: "textureSize", | |
summary: "Retrieve the dimensions of a level of a texture.", | |
parameters: [ | |
{ name: "sampler", summary: "Specifies the sampler to which the texture whose dimensions to retrieve is bound." }, | |
{ name: "lod", summary: "Specifies the level of the texture for which to retrieve the dimensions." }, | |
], | |
}, | |
{ name: "determinant", summary: "Calculate the determinant of a matrix.", parameters: [{ name: "m", summary: "Specifies the matrix of which to take the determinant." }] }, | |
{ name: "inverse", summary: "Calculate the inverse of a matrix.", parameters: [{ name: "m", summary: "Specifies the matrix of which to take the inverse." }] }, | |
{ | |
name: "matrixCompMult", | |
summary: "Perform a component-wise multiplication of two matrices.", | |
parameters: [ | |
{ name: "x", summary: "Specifies the first matrix multiplicand." }, | |
{ name: "y", summary: "Specifies the second matrix multiplicand." }, | |
], | |
}, | |
{ | |
name: "outerProduct", | |
summary: "Calculate the outer product of a pair of vectors.", | |
parameters: [ | |
{ name: "c", summary: "Specifies the parameter to be treated as a column vector." }, | |
{ name: "r", summary: "Specifies the parameter to be treated as a row vector." }, | |
], | |
}, | |
{ name: "transpose", summary: "Calculate the transpose of a matrix.", parameters: [{ name: "m", summary: "Specifies the matrix of which to take the transpose." }] }, | |
{ name: "texture2DLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "textureCubeLodEXT", parameters: [{ name: "sampler" }, { name: "coord" }, { name: "lod" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "texture2DProjGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
{ name: "textureCubeGradEXT", parameters: [{ name: "sampler" }, { name: "P" }, { name: "dPdx" }, { name: "dPdy" }], stage: "fragment", extension: "GL_EXT_shader_texture_lod" }, | |
], | |
], | |
])); | |
}, | |
7722: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.functions = void 0), | |
(t.functions = new Map([ | |
[ | |
"100", | |
[ | |
{ returnType: "genType", name: "acos", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "asin", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "atan", | |
parameters: [ | |
{ type: "genType", name: "y" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ returnType: "genType", name: "atan", parameters: [{ type: "genType", name: "y_over_x" }] }, | |
{ returnType: "genType", name: "cos", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "degrees", parameters: [{ type: "genType", name: "radians" }] }, | |
{ returnType: "genType", name: "radians", parameters: [{ type: "genType", name: "degrees" }] }, | |
{ returnType: "genType", name: "sin", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "tan", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "abs", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "ceil", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "minVal" }, | |
{ type: "genType", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "minVal" }, | |
{ type: "float", name: "maxVal" }, | |
], | |
}, | |
{ returnType: "genType", name: "exp", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "exp2", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "floor", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "fract", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "inversesqrt", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "log", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "log2", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "max", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "max", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "min", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "min", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mix", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
{ type: "genType", name: "a" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mix", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
{ type: "float", name: "a" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mod", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mod", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "pow", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ returnType: "genType", name: "sign", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "smoothstep", | |
parameters: [ | |
{ type: "genType", name: "edge0" }, | |
{ type: "genType", name: "edge1" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "smoothstep", | |
parameters: [ | |
{ type: "float", name: "edge0" }, | |
{ type: "float", name: "edge1" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ returnType: "genType", name: "sqrt", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "step", | |
parameters: [ | |
{ type: "genType", name: "edge" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "step", | |
parameters: [ | |
{ type: "float", name: "edge" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ | |
returnType: "vec3", | |
name: "cross", | |
parameters: [ | |
{ type: "vec3", name: "x" }, | |
{ type: "vec3", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "distance", | |
parameters: [ | |
{ type: "genType", name: "p0" }, | |
{ type: "genType", name: "p1" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "dot", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "bvec", name: "x" }, | |
{ type: "bvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "faceforward", | |
parameters: [ | |
{ type: "genType", name: "N" }, | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "Nref" }, | |
], | |
}, | |
{ returnType: "float", name: "length", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "normalize", parameters: [{ type: "genType", name: "v" }] }, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "bvec", name: "x" }, | |
{ type: "bvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "reflect", | |
parameters: [ | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "N" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "refract", | |
parameters: [ | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "N" }, | |
{ type: "float", name: "eta" }, | |
], | |
}, | |
{ returnType: "bool", name: "all", parameters: [{ type: "bvec", name: "x" }] }, | |
{ returnType: "bool", name: "any", parameters: [{ type: "bvec", name: "x" }] }, | |
{ | |
returnType: "bvec", | |
name: "greaterThan", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThan", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThanEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThanEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThan", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThan", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThanEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThanEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ returnType: "bvec", name: "not", parameters: [{ type: "bvec", name: "x" }] }, | |
{ | |
returnType: "vec4", | |
name: "texture2D", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2D", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProj", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProj", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProj", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "coord" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProj", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "coord" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DLod", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLod", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLod", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCube", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCube", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCubeLod", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "mat", | |
name: "matrixCompMult", | |
parameters: [ | |
{ type: "mat", name: "x" }, | |
{ type: "mat", name: "y" }, | |
], | |
}, | |
{ returnType: "genType", name: "fwidth", parameters: [{ type: "genType", name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ returnType: "genType", name: "dFdx", parameters: [{ type: "genType", name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ returnType: "genType", name: "dFdy", parameters: [{ type: "genType", name: "p" }], stage: "fragment", extension: "GL_OES_standard_derivatives" }, | |
{ | |
returnType: "vec4", | |
name: "texture2DLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCubeLodEXT", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCubeGradEXT", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ returnType: "genType", name: "acos", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "acosh", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "asin", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "asinh", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "atan", | |
parameters: [ | |
{ type: "genType", name: "y" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ returnType: "genType", name: "atan", parameters: [{ type: "genType", name: "y_over_x" }] }, | |
{ returnType: "genType", name: "atanh", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "cos", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "cosh", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "degrees", parameters: [{ type: "genType", name: "radians" }] }, | |
{ returnType: "genType", name: "radians", parameters: [{ type: "genType", name: "degrees" }] }, | |
{ returnType: "genType", name: "sin", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "sinh", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "tan", parameters: [{ type: "genType", name: "angle" }] }, | |
{ returnType: "genType", name: "tanh", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "abs", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genIType", name: "abs", parameters: [{ type: "genIType", name: "x" }] }, | |
{ returnType: "genType", name: "ceil", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "minVal" }, | |
{ type: "genType", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "minVal" }, | |
{ type: "float", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "genIType", name: "minVal" }, | |
{ type: "genIType", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "int", name: "minVal" }, | |
{ type: "int", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "genUType", name: "minVal" }, | |
{ type: "genUType", name: "maxVal" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "clamp", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "uint", name: "minVal" }, | |
{ type: "uint", name: "maxVal" }, | |
], | |
}, | |
{ returnType: "genType", name: "dFdx", parameters: [{ type: "genType", name: "p" }], stage: "fragment" }, | |
{ returnType: "genType", name: "dFdy", parameters: [{ type: "genType", name: "p" }], stage: "fragment" }, | |
{ returnType: "genType", name: "exp", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "exp2", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "floor", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "fract", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "fwidth", parameters: [{ type: "genType", name: "p" }], stage: "fragment" }, | |
{ returnType: "genType", name: "inversesqrt", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genBType", name: "isinf", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genBType", name: "isnan", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "log", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "log2", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "max", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "max", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "max", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "genIType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "max", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "int", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "max", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "genUType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "max", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "uint", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "min", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "min", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "min", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "genIType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genIType", | |
name: "min", | |
parameters: [ | |
{ type: "genIType", name: "x" }, | |
{ type: "int", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "min", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "genUType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genUType", | |
name: "min", | |
parameters: [ | |
{ type: "genUType", name: "x" }, | |
{ type: "uint", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mix", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
{ type: "genType", name: "a" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mix", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
{ type: "float", name: "a" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mix", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
{ type: "genBType", name: "a" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mod", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "float", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "mod", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "modf", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "i", qualifiers: ["out"] }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "pow", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ returnType: "genType", name: "round", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "roundEven", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "sign", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genIType", name: "sign", parameters: [{ type: "genIType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "smoothstep", | |
parameters: [ | |
{ type: "genType", name: "edge0" }, | |
{ type: "genType", name: "edge1" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "smoothstep", | |
parameters: [ | |
{ type: "float", name: "edge0" }, | |
{ type: "float", name: "edge1" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ returnType: "genType", name: "sqrt", parameters: [{ type: "genType", name: "x" }] }, | |
{ | |
returnType: "genType", | |
name: "step", | |
parameters: [ | |
{ type: "genType", name: "edge" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "step", | |
parameters: [ | |
{ type: "float", name: "edge" }, | |
{ type: "genType", name: "x" }, | |
], | |
}, | |
{ returnType: "genType", name: "trunc", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genIType", name: "floatBitsToInt", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genUType", name: "floatBitsToUint", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "intBitsToFloat", parameters: [{ type: "genIType", name: "x" }] }, | |
{ returnType: "genType", name: "uintBitsToFloat", parameters: [{ type: "genUType", name: "x" }] }, | |
{ qualifiers: ["highp"], returnType: "uint", name: "packHalf2x16", parameters: [{ qualifiers: ["mediump"], type: "vec2", name: "v" }] }, | |
{ qualifiers: ["highp"], returnType: "uint", name: "packUnorm2x16", parameters: [{ type: "vec2", name: "v" }] }, | |
{ qualifiers: ["highp"], returnType: "uint", name: "packSnorm2x16", parameters: [{ type: "vec2", name: "v" }] }, | |
{ qualifiers: ["mediump"], returnType: "vec2", name: "unpackHalf2x16", parameters: [{ qualifiers: ["highp"], type: "uint", name: "v" }] }, | |
{ qualifiers: ["highp"], returnType: "vec2", name: "unpackUnorm2x16", parameters: [{ qualifiers: ["highp"], type: "uint", name: "p" }] }, | |
{ qualifiers: ["highp"], returnType: "vec2", name: "unpackSnorm2x16", parameters: [{ qualifiers: ["highp"], type: "uint", name: "p" }] }, | |
{ | |
returnType: "vec3", | |
name: "cross", | |
parameters: [ | |
{ type: "vec3", name: "x" }, | |
{ type: "vec3", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "distance", | |
parameters: [ | |
{ type: "genType", name: "p0" }, | |
{ type: "genType", name: "p1" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "dot", | |
parameters: [ | |
{ type: "genType", name: "x" }, | |
{ type: "genType", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "bvec", name: "x" }, | |
{ type: "bvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "equal", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "faceforward", | |
parameters: [ | |
{ type: "genType", name: "N" }, | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "Nref" }, | |
], | |
}, | |
{ returnType: "float", name: "length", parameters: [{ type: "genType", name: "x" }] }, | |
{ returnType: "genType", name: "normalize", parameters: [{ type: "genType", name: "v" }] }, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "bvec", name: "x" }, | |
{ type: "bvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "notEqual", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "reflect", | |
parameters: [ | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "N" }, | |
], | |
}, | |
{ | |
returnType: "genType", | |
name: "refract", | |
parameters: [ | |
{ type: "genType", name: "I" }, | |
{ type: "genType", name: "N" }, | |
{ type: "float", name: "eta" }, | |
], | |
}, | |
{ returnType: "bool", name: "all", parameters: [{ type: "bvec", name: "x" }] }, | |
{ returnType: "bool", name: "any", parameters: [{ type: "bvec", name: "x" }] }, | |
{ | |
returnType: "bvec", | |
name: "greaterThan", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThan", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThan", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThanEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThanEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "greaterThanEqual", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThan", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThan", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThan", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThanEqual", | |
parameters: [ | |
{ type: "vec", name: "x" }, | |
{ type: "vec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThanEqual", | |
parameters: [ | |
{ type: "ivec", name: "x" }, | |
{ type: "ivec", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "bvec", | |
name: "lessThanEqual", | |
parameters: [ | |
{ type: "uvec", name: "x" }, | |
{ type: "uvec", name: "y" }, | |
], | |
}, | |
{ returnType: "bvec", name: "not", parameters: [{ type: "bvec", name: "x" }] }, | |
{ | |
returnType: "gvec4", | |
name: "texelFetch", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "ivec2", name: "P" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texelFetch", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "ivec3", name: "P" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texelFetch", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "ivec3", name: "P" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texelFetchOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "ivec2", name: "P" }, | |
{ type: "int", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texelFetchOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "ivec3", name: "P" }, | |
{ type: "int", name: "lod" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texelFetchOffset", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "ivec3", name: "P" }, | |
{ type: "int", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsamplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsamplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "texture", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "texture", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "texture", | |
parameters: [ | |
{ type: "samplerCubeShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "texture", | |
parameters: [ | |
{ type: "samplerCubeShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "texture", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "texture", | |
parameters: [ | |
{ type: "sampler2DArrayShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "gsamplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "samplerCubeShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureGrad", | |
parameters: [ | |
{ type: "sampler2DArrayShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGradOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGradOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureGradOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureGradOffset", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureGradOffset", | |
parameters: [ | |
{ type: "sampler2DArrayShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLod", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLod", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLod", | |
parameters: [ | |
{ type: "gsamplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureLod", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLod", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLodOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLodOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureLodOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureLodOffset", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec3", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureOffset", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProj", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProj", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProj", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGrad", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGrad", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGrad", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjGrad", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGradOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGradOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjGradOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjGradOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLod", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLod", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLod", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjLod", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLodOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLodOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjLodOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjLodOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "float", name: "lod" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec3", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "gvec4", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec3", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
], | |
}, | |
{ | |
returnType: "float", | |
name: "textureProjOffset", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "ivec2", name: "offset" }, | |
{ type: "float", name: "bias" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec2", | |
name: "textureSize", | |
parameters: [ | |
{ type: "gsampler2D", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec3", | |
name: "textureSize", | |
parameters: [ | |
{ type: "gsampler3D", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec2", | |
name: "textureSize", | |
parameters: [ | |
{ type: "gsamplerCube", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec2", | |
name: "textureSize", | |
parameters: [ | |
{ type: "sampler2DShadow", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec2", | |
name: "textureSize", | |
parameters: [ | |
{ type: "samplerCubeShadow", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec3", | |
name: "textureSize", | |
parameters: [ | |
{ type: "gsampler2DArray", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ | |
qualifiers: ["highp"], | |
returnType: "ivec3", | |
name: "textureSize", | |
parameters: [ | |
{ type: "sampler2DArrayShadow", name: "sampler" }, | |
{ type: "int", name: "lod" }, | |
], | |
}, | |
{ returnType: "float", name: "determinant", parameters: [{ type: "mat2", name: "m" }] }, | |
{ returnType: "float", name: "determinant", parameters: [{ type: "mat3", name: "m" }] }, | |
{ returnType: "float", name: "determinant", parameters: [{ type: "mat4", name: "m" }] }, | |
{ returnType: "mat2", name: "inverse", parameters: [{ type: "mat2", name: "m" }] }, | |
{ returnType: "mat3", name: "inverse", parameters: [{ type: "mat3", name: "m" }] }, | |
{ returnType: "mat4", name: "inverse", parameters: [{ type: "mat4", name: "m" }] }, | |
{ | |
returnType: "mat", | |
name: "matrixCompMult", | |
parameters: [ | |
{ type: "mat", name: "x" }, | |
{ type: "mat", name: "y" }, | |
], | |
}, | |
{ | |
returnType: "mat2", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec2", name: "c" }, | |
{ type: "vec2", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat3", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec3", name: "c" }, | |
{ type: "vec3", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat4", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec4", name: "c" }, | |
{ type: "vec4", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat2x3", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec3", name: "c" }, | |
{ type: "vec2", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat3x2", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec2", name: "c" }, | |
{ type: "vec3", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat2x4", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec4", name: "c" }, | |
{ type: "vec2", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat4x2", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec2", name: "c" }, | |
{ type: "vec4", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat3x4", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec4", name: "c" }, | |
{ type: "vec3", name: "r" }, | |
], | |
}, | |
{ | |
returnType: "mat4x3", | |
name: "outerProduct", | |
parameters: [ | |
{ type: "vec3", name: "c" }, | |
{ type: "vec4", name: "r" }, | |
], | |
}, | |
{ returnType: "mat2", name: "transpose", parameters: [{ type: "mat2", name: "m" }] }, | |
{ returnType: "mat3", name: "transpose", parameters: [{ type: "mat3", name: "m" }] }, | |
{ returnType: "mat4", name: "transpose", parameters: [{ type: "mat4", name: "m" }] }, | |
{ returnType: "mat2x3", name: "transpose", parameters: [{ type: "mat3x2", name: "m" }] }, | |
{ returnType: "mat2x4", name: "transpose", parameters: [{ type: "mat4x2", name: "m" }] }, | |
{ returnType: "mat3x2", name: "transpose", parameters: [{ type: "mat2x3", name: "m" }] }, | |
{ returnType: "mat3x4", name: "transpose", parameters: [{ type: "mat4x3", name: "m" }] }, | |
{ returnType: "mat4x2", name: "transpose", parameters: [{ type: "mat2x4", name: "m" }] }, | |
{ returnType: "mat4x3", name: "transpose", parameters: [{ type: "mat3x4", name: "m" }] }, | |
{ | |
returnType: "vec4", | |
name: "texture2DLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjLodEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCubeLodEXT", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "coord" }, | |
{ type: "float", name: "lod" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec2", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "texture2DProjGradEXT", | |
parameters: [ | |
{ type: "sampler2D", name: "sampler" }, | |
{ type: "vec4", name: "P" }, | |
{ type: "vec2", name: "dPdx" }, | |
{ type: "vec2", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
{ | |
returnType: "vec4", | |
name: "textureCubeGradEXT", | |
parameters: [ | |
{ type: "samplerCube", name: "sampler" }, | |
{ type: "vec3", name: "P" }, | |
{ type: "vec3", name: "dPdx" }, | |
{ type: "vec3", name: "dPdy" }, | |
], | |
stage: "fragment", | |
extension: "GL_EXT_shader_texture_lod", | |
}, | |
], | |
], | |
])); | |
}, | |
7792: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.genericTypes = void 0), | |
(t.genericTypes = new Map([ | |
[ | |
"100", | |
[ | |
{ generic: "genType", real: ["float", "vec2", "vec3", "vec4"] }, | |
{ generic: "genIType", real: ["int", "ivec2", "ivec3", "ivec4"] }, | |
{ generic: "genBType", real: ["bool", "bvec2", "bvec3", "bvec4"] }, | |
{ generic: "vec", real: ["vec2", "vec3", "vec4"] }, | |
{ generic: "ivec", real: ["ivec2", "ivec3", "ivec4"] }, | |
{ generic: "bvec", real: ["bvec2", "bvec3", "bvec4"] }, | |
{ generic: "gvec2", real: ["vec2", "ivec2"] }, | |
{ generic: "gvec3", real: ["vec3", "ivec3"] }, | |
{ generic: "gvec4", real: ["vec4", "ivec4"] }, | |
{ generic: "mat", real: ["mat2", "mat3", "mat4"] }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ generic: "genType", real: ["float", "vec2", "vec3", "vec4"] }, | |
{ generic: "genIType", real: ["int", "ivec2", "ivec3", "ivec4"] }, | |
{ generic: "genUType", real: ["uint", "uvec2", "uvec3", "uvec4"] }, | |
{ generic: "genBType", real: ["bool", "bvec2", "bvec3", "bvec4"] }, | |
{ generic: "vec", real: ["vec2", "vec3", "vec4"] }, | |
{ generic: "ivec", real: ["ivec2", "ivec3", "ivec4"] }, | |
{ generic: "uvec", real: ["uvec2", "uvec3", "uvec4"] }, | |
{ generic: "bvec", real: ["bvec2", "bvec3", "bvec4"] }, | |
{ generic: "gvec2", real: ["vec2", "ivec2", "uvec2"] }, | |
{ generic: "gvec3", real: ["vec3", "ivec3", "uvec3"] }, | |
{ generic: "gvec4", real: ["vec4", "ivec4", "uvec4"] }, | |
{ generic: "gsampler2D", real: ["sampler2D", "isampler2D", "usampler2D"] }, | |
{ generic: "gsampler3D", real: ["sampler3D", "isampler3D", "usampler3D"] }, | |
{ generic: "gsamplerCube", real: ["samplerCube", "isamplerCube", "usamplerCube"] }, | |
{ generic: "gsampler2DArray", real: ["sampler2DArray", "isampler2DArray", "usampler2DArray"] }, | |
{ generic: "mat", real: ["mat2", "mat3", "mat4", "mat2x2", "mat3x3", "mat4x4", "mat2x3", "mat3x2", "mat4x2", "mat2x4", "mat3x4", "mat4x3"] }, | |
], | |
], | |
])); | |
}, | |
8310: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.importantFunctions = void 0), | |
(t.importantFunctions = ["cross", "distance", "dot", "inverse", "length", "normalize", "reflect", "refract", "texture", "texture2D", "transpose", "vec2", "vec3", "vec4", "mat3", "mat4"]); | |
}, | |
7299: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.keywords = void 0), | |
(t.keywords = new Map([ | |
[ | |
"100", | |
[ | |
{ name: "break" }, | |
{ name: "continue" }, | |
{ name: "do" }, | |
{ name: "for" }, | |
{ name: "while" }, | |
{ name: "if" }, | |
{ name: "else" }, | |
{ name: "discard", stage: "fragment" }, | |
{ name: "return" }, | |
{ name: "struct" }, | |
{ name: "void" }, | |
{ name: "true" }, | |
{ name: "false" }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ name: "break" }, | |
{ name: "continue" }, | |
{ name: "do" }, | |
{ name: "for" }, | |
{ name: "while" }, | |
{ name: "switch" }, | |
{ name: "case" }, | |
{ name: "default" }, | |
{ name: "if" }, | |
{ name: "else" }, | |
{ name: "discard", stage: "fragment" }, | |
{ name: "return" }, | |
{ name: "struct" }, | |
{ name: "void" }, | |
{ name: "true" }, | |
{ name: "false" }, | |
], | |
], | |
])); | |
}, | |
6113: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.layoutParameters = void 0), | |
(t.layoutParameters = [ | |
{ name: "location", assignable: !0 }, | |
{ name: "shared" }, | |
{ name: "packed" }, | |
{ name: "std140" }, | |
{ name: "row_major" }, | |
{ name: "column_major" }, | |
{ name: "num_views", assignable: !0, extension: "GL_OVR_multiview2" }, | |
]); | |
}, | |
3762: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.preprocessorMacros = t.preprocessorDirectives = void 0), | |
(t.preprocessorDirectives = [ | |
[["version"], ["100", "300"], ["es"]], | |
[["define"]], | |
[["undef"]], | |
[["if"]], | |
[["ifdef"]], | |
[["ifndef"]], | |
[["else"]], | |
[["elif"]], | |
[["endif"]], | |
[["error"]], | |
[["pragma"], ["STDGL", "optimize(on)", "optimize(off)", "debug(on)", "debug(off)"]], | |
[["extension"], ["all", "GL_ANGLE_multi_draw", "GL_EXT_draw_buffers", "GL_OVR_multiview2", "GL_OES_standard_derivatives", "GL_EXT_shader_texture_lod", "GL_EXT_frag_depth"], ["require", "enable", "warn", "disable"]], | |
[["line"]], | |
]), | |
(t.preprocessorMacros = ["__LINE__", "__FILE__", "__VERSION__", "GL_ES", "GL_ANGLE_multi_draw", "GL_OVR_multiview2", "GL_OES_standard_derivatives", "GL_EXT_shader_texture_lod", "GL_EXT_frag_depth"]); | |
}, | |
3500: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.qualifiers = void 0), | |
(t.qualifiers = new Map([ | |
[ | |
"100", | |
[ | |
{ name: "precision", order: 10 }, | |
{ name: "invariant", order: 10 }, | |
{ name: "const", order: 30 }, | |
{ name: "inout", order: 31 }, | |
{ name: "in", order: 31 }, | |
{ name: "out", order: 31 }, | |
{ name: "uniform", order: 30 }, | |
{ name: "varying", order: 31 }, | |
{ name: "attribute", order: 31 }, | |
{ name: "highp", order: 40 }, | |
{ name: "mediump", order: 40 }, | |
{ name: "lowp", order: 40 }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ name: "precision", order: 10 }, | |
{ name: "layout", order: 10 }, | |
{ name: "invariant", order: 10 }, | |
{ name: "smooth", order: 20 }, | |
{ name: "flat", order: 20 }, | |
{ name: "const", order: 30 }, | |
{ name: "inout", order: 31 }, | |
{ name: "in", order: 31 }, | |
{ name: "out", order: 31 }, | |
{ name: "centroid", order: 30 }, | |
{ name: "uniform", order: 30 }, | |
{ name: "highp", order: 40 }, | |
{ name: "mediump", order: 40 }, | |
{ name: "lowp", order: 40 }, | |
], | |
], | |
])); | |
}, | |
4974: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.reservedWords = void 0), | |
(t.reservedWords = new Map([ | |
[ | |
"100", | |
[ | |
"asm", | |
"class", | |
"union", | |
"enum", | |
"typedef", | |
"template", | |
"this", | |
"goto", | |
"inline", | |
"noinline", | |
"volatile", | |
"public", | |
"static", | |
"extern", | |
"external", | |
"interface", | |
"long", | |
"short", | |
"double", | |
"half", | |
"fixed", | |
"unsigned", | |
"superp", | |
"input", | |
"output", | |
"hvec2", | |
"hvec3", | |
"hvec4", | |
"dvec2", | |
"dvec3", | |
"dvec4", | |
"fvec2", | |
"fvec3", | |
"fvec4", | |
"sampler3DRect", | |
"sampler1D", | |
"sampler1DShadow", | |
"sampler2DRect", | |
"sampler2DRectShadow", | |
"sizeof", | |
"cast", | |
"namespace", | |
"using", | |
"packed", | |
"switch", | |
"default", | |
"flat", | |
"sampler3D", | |
"sampler2DShadow", | |
], | |
], | |
[ | |
"300", | |
[ | |
"attribute", | |
"varying", | |
"coherent", | |
"volatile", | |
"restrict", | |
"readonly", | |
"writeonly", | |
"resource", | |
"atomic_uint", | |
"noperspective", | |
"patch sample", | |
"subroutine", | |
"common", | |
"partition", | |
"active", | |
"asm", | |
"class", | |
"union", | |
"enum", | |
"typedef", | |
"template", | |
"this", | |
"goto", | |
"inline", | |
"noinline", | |
"public", | |
"static", | |
"extern", | |
"external", | |
"interface", | |
"long", | |
"short", | |
"double", | |
"half", | |
"fixed", | |
"unsigned", | |
"superp", | |
"input", | |
"output", | |
"hvec2", | |
"hvec3", | |
"hvec4", | |
"dvec2", | |
"dvec3", | |
"dvec4", | |
"fvec2", | |
"fvec3", | |
"fvec4", | |
"sampler3DRect", | |
"filter", | |
"image1D", | |
"image2D", | |
"image3D", | |
"imageCube", | |
"iimage1D", | |
"iimage2D", | |
"iimage3D", | |
"iimageCube", | |
"uimage1D", | |
"uimage2D", | |
"uimage3D", | |
"uimageCube", | |
"image1DArray", | |
"image2DArray", | |
"iimage1DArray", | |
"iimage2DArray", | |
"uimage1DArray", | |
"uimage2DArray", | |
"imageBuffer", | |
"iimageBuffer", | |
"uimageBuffer", | |
"sampler1D", | |
"sampler1DShadow", | |
"sampler1DArray", | |
"sampler1DArrayShadow", | |
"isampler1D", | |
"isampler1DArray", | |
"usampler1D", | |
"usampler1DArray", | |
"sampler2DRect", | |
"sampler2DRectShadow", | |
"isampler2DRect", | |
"usampler2DRect", | |
"samplerBuffer", | |
"isamplerBuffer", | |
"usamplerBuffer", | |
"sampler2DMS", | |
"isampler2DMS", | |
"usampler2DMS", | |
"sampler2DMSArray", | |
"isampler2DMSArray", | |
"usampler2DMSArray", | |
"sizeof", | |
"cast", | |
"namespace", | |
"using", | |
], | |
], | |
])); | |
}, | |
9152: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.customTypes = t.unsignedIntegerOpaqueTypes = t.signedIntegerOpaqueTypes = t.floatingPointOpaqueTypes = t.transparentTypes = void 0), | |
(t.transparentTypes = new Map([ | |
[ | |
"100", | |
[ | |
{ name: "float", width: 1, height: 1, base: "float" }, | |
{ name: "int", width: 1, height: 1, base: "int" }, | |
{ name: "bool", width: 1, height: 1, base: "bool" }, | |
{ name: "vec2", width: 2, height: 1, base: "float" }, | |
{ name: "vec3", width: 3, height: 1, base: "float" }, | |
{ name: "vec4", width: 4, height: 1, base: "float" }, | |
{ name: "ivec2", width: 2, height: 1, base: "int" }, | |
{ name: "ivec3", width: 3, height: 1, base: "int" }, | |
{ name: "ivec4", width: 4, height: 1, base: "int" }, | |
{ name: "bvec2", width: 2, height: 1, base: "bool" }, | |
{ name: "bvec3", width: 3, height: 1, base: "bool" }, | |
{ name: "bvec4", width: 4, height: 1, base: "bool" }, | |
{ name: "mat2", width: 2, height: 2, base: "float" }, | |
{ name: "mat3", width: 3, height: 3, base: "float" }, | |
{ name: "mat4", width: 4, height: 4, base: "float" }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ name: "float", width: 1, height: 1, base: "float" }, | |
{ name: "int", width: 1, height: 1, base: "int" }, | |
{ name: "bool", width: 1, height: 1, base: "bool" }, | |
{ name: "uint", width: 1, height: 1, base: "uint" }, | |
{ name: "vec2", width: 2, height: 1, base: "float" }, | |
{ name: "vec3", width: 3, height: 1, base: "float" }, | |
{ name: "vec4", width: 4, height: 1, base: "float" }, | |
{ name: "ivec2", width: 2, height: 1, base: "int" }, | |
{ name: "ivec3", width: 3, height: 1, base: "int" }, | |
{ name: "ivec4", width: 4, height: 1, base: "int" }, | |
{ name: "bvec2", width: 2, height: 1, base: "bool" }, | |
{ name: "bvec3", width: 3, height: 1, base: "bool" }, | |
{ name: "bvec4", width: 4, height: 1, base: "bool" }, | |
{ name: "uvec2", width: 2, height: 1, base: "uint" }, | |
{ name: "uvec3", width: 3, height: 1, base: "uint" }, | |
{ name: "uvec4", width: 4, height: 1, base: "uint" }, | |
{ name: "mat2", width: 2, height: 2, base: "float" }, | |
{ name: "mat3", width: 3, height: 3, base: "float" }, | |
{ name: "mat4", width: 4, height: 4, base: "float" }, | |
{ name: "mat2x2", width: 2, height: 2, base: "float", alias: "mat2" }, | |
{ name: "mat2x3", width: 2, height: 3, base: "float" }, | |
{ name: "mat2x4", width: 2, height: 4, base: "float" }, | |
{ name: "mat3x2", width: 3, height: 2, base: "float" }, | |
{ name: "mat3x3", width: 3, height: 3, base: "float", alias: "mat3" }, | |
{ name: "mat3x4", width: 3, height: 4, base: "float" }, | |
{ name: "mat4x2", width: 4, height: 2, base: "float" }, | |
{ name: "mat4x3", width: 4, height: 3, base: "float" }, | |
{ name: "mat4x4", width: 4, height: 4, base: "float", alias: "mat4" }, | |
], | |
], | |
])), | |
(t.floatingPointOpaqueTypes = new Map([ | |
["100", [{ name: "sampler2D" }, { name: "samplerCube" }]], | |
["300", [{ name: "sampler2D" }, { name: "sampler3D" }, { name: "samplerCube" }, { name: "samplerCubeShadow" }, { name: "sampler2DShadow" }, { name: "sampler2DArray" }, { name: "sampler2DArrayShadow" }]], | |
])), | |
(t.signedIntegerOpaqueTypes = new Map([ | |
["100", []], | |
["300", [{ name: "isampler2D" }, { name: "isampler3D" }, { name: "isamplerCube" }, { name: "isampler2DArray" }]], | |
])), | |
(t.unsignedIntegerOpaqueTypes = new Map([ | |
["100", []], | |
["300", [{ name: "usampler2D" }, { name: "usampler3D" }, { name: "usamplerCube" }, { name: "usampler2DArray" }]], | |
])), | |
(t.customTypes = new Map([ | |
[ | |
"100", | |
[ | |
{ | |
name: "gl_DepthRangeParameters", | |
members: [ | |
{ memberPrecision: "highp", memberType: "float", memberName: "near" }, | |
{ memberPrecision: "highp", memberType: "float", memberName: "far" }, | |
{ memberPrecision: "highp", memberType: "float", memberName: "diff" }, | |
], | |
}, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ | |
name: "gl_DepthRangeParameters", | |
members: [ | |
{ memberPrecision: "highp", memberType: "float", memberName: "near" }, | |
{ memberPrecision: "highp", memberType: "float", memberName: "far" }, | |
{ memberPrecision: "highp", memberType: "float", memberName: "diff" }, | |
], | |
}, | |
], | |
], | |
])); | |
}, | |
8908: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.variables = void 0), | |
(t.variables = new Map([ | |
[ | |
"100", | |
[ | |
{ summary: "Contains the position of the current vertex.", type: "vec4", name: "gl_Position", qualifiers: ["highp"], stage: "vertex" }, | |
{ summary: "Contains size of rasterized points, in pixels.", type: "float", name: "gl_PointSize", qualifiers: ["mediump"], stage: "vertex" }, | |
{ summary: "Contains the window-relative coordinates of the current fragment.", type: "vec4", name: "gl_FragCoord", qualifiers: ["mediump"], stage: "fragment" }, | |
{ summary: "Indicates whether a primitive is front or back facing.", type: "bool", name: "gl_FrontFacing", stage: "fragment" }, | |
{ summary: "Contains the coordinate of a fragment within a point.", type: "vec2", name: "gl_PointCoord", qualifiers: ["mediump"], stage: "fragment" }, | |
{ | |
summary: "Writing to gl_FragColor specifies the fragment color that will be used by the subsequent fixed functionality pipeline.", | |
notDocumented: !0, | |
type: "vec4", | |
name: "gl_FragColor", | |
qualifiers: ["mediump"], | |
stage: "fragment", | |
}, | |
{ | |
summary: "The variable gl_FragData is an array. Writing to gl_FragData[n] specifies the fragment data that will be used by the subsequent fixed functionality pipeline for data n. The array's length is gl_MaxDrawBuffers.", | |
notDocumented: !0, | |
type: "vec4", | |
name: "gl_FragData", | |
array: 0, | |
qualifiers: ["mediump"], | |
stage: "fragment", | |
}, | |
{ summary: "Depth range in window coordinates.", notDocumented: !0, type: "gl_DepthRangeParameters", name: "gl_DepthRange", qualifiers: ["uniform"] }, | |
{ min: 8, type: "int", name: "gl_MaxVertexAttribs", qualifiers: ["const", "mediump"] }, | |
{ min: 128, type: "int", name: "gl_MaxVertexUniformVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 0, type: "int", name: "gl_MaxVertexTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 8, type: "int", name: "gl_MaxCombinedTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 8, type: "int", name: "gl_MaxTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 16, type: "int", name: "gl_MaxFragmentUniformVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 1, type: "int", name: "gl_MaxDrawBuffers", qualifiers: ["const", "mediump"] }, | |
{ min: 8, type: "int", name: "gl_MaxVaryingVectors", qualifiers: ["const", "mediump"] }, | |
{ notDocumented: !0, type: "int", name: "gl_DrawID", qualifiers: ["in"], stage: "vertex", extension: "GL_ANGLE_multi_draw" }, | |
{ notDocumented: !0, type: "float", name: "gl_FragDepthEXT", qualifiers: ["out", "mediump"], stage: "fragment", extension: "GL_EXT_frag_depth" }, | |
], | |
], | |
[ | |
"300", | |
[ | |
{ summary: "Contains the index of the current vertex.", type: "int", name: "gl_VertexID", qualifiers: ["in", "highp"], stage: "vertex" }, | |
{ summary: "Contains the index of the current primitive in an instanced draw command.", type: "int", name: "gl_InstanceID", qualifiers: ["in", "highp"], stage: "vertex" }, | |
{ summary: "Contains the position of the current vertex.", type: "vec4", name: "gl_Position", qualifiers: ["out", "highp"], stage: "vertex" }, | |
{ summary: "Contains size of rasterized points, in pixels.", type: "float", name: "gl_PointSize", qualifiers: ["out", "highp"], stage: "vertex" }, | |
{ summary: "Contains the window-relative coordinates of the current fragment.", type: "vec4", name: "gl_FragCoord", qualifiers: ["in", "highp"], stage: "fragment" }, | |
{ summary: "Indicates whether a primitive is front or back facing.", type: "bool", name: "gl_FrontFacing", qualifiers: ["in"], stage: "fragment" }, | |
{ summary: "Establishes a depth value for the current fragment.", type: "float", name: "gl_FragDepth", qualifiers: ["out", "highp"], stage: "fragment" }, | |
{ summary: "Contains the coordinate of a fragment within a point.", type: "vec2", name: "gl_PointCoord", qualifiers: ["in", "mediump"], stage: "fragment" }, | |
{ summary: "Depth range in window coordinates", notDocumented: !0, type: "gl_DepthRangeParameters", name: "gl_DepthRange", qualifiers: ["uniform"] }, | |
{ min: 16, type: "int", name: "gl_MaxVertexAttribs", qualifiers: ["const", "mediump"] }, | |
{ min: 256, type: "int", name: "gl_MaxVertexUniformVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 16, type: "int", name: "gl_MaxVertexOutputVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 15, type: "int", name: "gl_MaxFragmentInputVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 16, type: "int", name: "gl_MaxVertexTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 32, type: "int", name: "gl_MaxCombinedTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 16, type: "int", name: "gl_MaxTextureImageUnits", qualifiers: ["const", "mediump"] }, | |
{ min: 224, type: "int", name: "gl_MaxFragmentUniformVectors", qualifiers: ["const", "mediump"] }, | |
{ min: 4, type: "int", name: "gl_MaxDrawBuffers", qualifiers: ["const", "mediump"] }, | |
{ min: -8, type: "int", name: "gl_MinProgramTexelOffset", qualifiers: ["const", "mediump"] }, | |
{ min: 7, type: "int", name: "gl_MaxProgramTexelOffset", qualifiers: ["const", "mediump"] }, | |
{ notDocumented: !0, type: "int", name: "gl_DrawID", qualifiers: ["in"], stage: "vertex", extension: "GL_ANGLE_multi_draw" }, | |
{ notDocumented: !0, type: "float", name: "gl_FragDepthEXT", qualifiers: ["out", "mediump"], stage: "fragment", extension: "GL_EXT_frag_depth" }, | |
], | |
], | |
])); | |
}, | |
589: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Configurations = void 0); | |
const n = r(9496), | |
i = r(1024), | |
s = r(5915); | |
class o { | |
constructor() { | |
const e = n.workspace.getConfiguration(i.Constants.EXTENSION_NAME); | |
(this.strictRename = e.get(o.STRICT_RENAME)), | |
(this.alwaysOpenOnlineDoc = e.get(o.ALWAYS_OPEN_ONLINE_DOC)), | |
(this.alwaysOpenOfflineDocInNewTab = e.get(o.ALWAYS_OPEN_OFFLINE_DOC_IN_NEW_TAB)), | |
(this.codeInjection = e.get(o.CODE_INJECTION)), | |
(this.codeInjectionSource = e.get(o.CODE_INJECTION_SOURCE)), | |
(this.bracesOnSeparateLine = e.get(o.BRACES_ON_SEPARATE_LINE)), | |
(this.spaceAroundUnaryOperators = e.get(o.SPACE_AROUND_UNARY_OPERATORS)), | |
(this.spacesAroundBinaryOperators = e.get(o.SPACES_AROUND_BINARY_OPERATOS)), | |
(this.spacesAroundAssignmentOperators = e.get(o.SPACES_AROUND_ASSIGNMENT_OPERATORS)), | |
(this.spacesAroundTernaryOperators = e.get(o.SPACES_AROUND_TERNARY_OPERATORS)), | |
(this.spaceAfterKeywords = e.get(o.SPACE_AFTER_KEYWORDS)), | |
(this.spaceAfterFunctionNames = e.get(o.SPACE_AFTER_FUNCTION_NAMES)), | |
(this.spaceBeforeCommas = e.get(o.SPACE_BEFORE_COMMAS)), | |
(this.spaceAfterCommas = e.get(o.SPACE_AFTER_COMMAS)), | |
(this.spacesAroundDots = e.get(o.SPACES_AROUND_DOTS)), | |
(this.spaceBeforeCaseColons = e.get(o.SPACE_BEFORE_CASE_COLONS)), | |
(this.spaceBeforeSemicolonsInFor = e.get(o.SPACE_BEFORE_SEMICOLONS_IN_FOR)), | |
(this.spaceAfterSemicolonsInFor = e.get(o.SPACE_AFTER_SEMICOLONS_IN_FOR)), | |
(this.spacesInsideParentheses = e.get(o.SPACES_INSIDE_PARENTHESES)), | |
(this.spacesAroundBraces = e.get(o.SPACES_AROUND_BRACES)), | |
(this.spaceBeforeOpeningBrackets = e.get(o.SPACE_BEFORE_OPENING_BRACKETS)), | |
(this.spacesInsideBrackets = e.get(o.SPACES_INSIDE_BRACKETS)), | |
n.workspace.onDidChangeConfiguration((e) => { | |
const t = n.workspace.getConfiguration(i.Constants.EXTENSION_NAME); | |
e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.STRICT_RENAME}`) | |
? (this.strictRename = t.get(o.STRICT_RENAME)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.ALWAYS_OPEN_ONLINE_DOC}`) | |
? (this.alwaysOpenOnlineDoc = t.get(o.ALWAYS_OPEN_ONLINE_DOC)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.ALWAYS_OPEN_OFFLINE_DOC_IN_NEW_TAB}`) | |
? (this.alwaysOpenOfflineDocInNewTab = t.get(o.ALWAYS_OPEN_OFFLINE_DOC_IN_NEW_TAB)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.CODE_INJECTION}`) | |
? ((this.codeInjection = t.get(o.CODE_INJECTION)), s.GlslEditor.invalidateDocuments()) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.CODE_INJECTION_SOURCE}`) | |
? ((this.codeInjectionSource = t.get(o.CODE_INJECTION_SOURCE)), s.GlslEditor.invalidateDocuments()) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.BRACES_ON_SEPARATE_LINE}`) | |
? (this.bracesOnSeparateLine = t.get(o.BRACES_ON_SEPARATE_LINE)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_AROUND_UNARY_OPERATORS}`) | |
? (this.spaceAroundUnaryOperators = t.get(o.SPACE_AROUND_UNARY_OPERATORS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_AROUND_BINARY_OPERATOS}`) | |
? (this.spacesAroundBinaryOperators = t.get(o.SPACES_AROUND_BINARY_OPERATOS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_AROUND_ASSIGNMENT_OPERATORS}`) | |
? (this.spacesAroundAssignmentOperators = t.get(o.SPACES_AROUND_ASSIGNMENT_OPERATORS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_AROUND_TERNARY_OPERATORS}`) | |
? (this.spacesAroundTernaryOperators = t.get(o.SPACES_AROUND_TERNARY_OPERATORS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_AFTER_KEYWORDS}`) | |
? (this.spaceAfterKeywords = t.get(o.SPACE_AFTER_KEYWORDS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_AFTER_FUNCTION_NAMES}`) | |
? (this.spaceAfterFunctionNames = t.get(o.SPACE_AFTER_FUNCTION_NAMES)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_BEFORE_COMMAS}`) | |
? (this.spaceBeforeCommas = t.get(o.SPACE_BEFORE_COMMAS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_AFTER_COMMAS}`) | |
? (this.spaceAfterCommas = t.get(o.SPACE_AFTER_COMMAS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_AROUND_DOTS}`) | |
? (this.spacesAroundDots = t.get(o.SPACES_AROUND_DOTS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_BEFORE_CASE_COLONS}`) | |
? (this.spaceBeforeCaseColons = t.get(o.SPACE_BEFORE_CASE_COLONS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_BEFORE_SEMICOLONS_IN_FOR}`) | |
? (this.spaceBeforeSemicolonsInFor = t.get(o.SPACE_BEFORE_SEMICOLONS_IN_FOR)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_AFTER_SEMICOLONS_IN_FOR}`) | |
? (this.spaceAfterSemicolonsInFor = t.get(o.SPACE_AFTER_SEMICOLONS_IN_FOR)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_INSIDE_PARENTHESES}`) | |
? (this.spacesInsideParentheses = t.get(o.SPACES_INSIDE_PARENTHESES)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_AROUND_BRACES}`) | |
? (this.spacesAroundBraces = t.get(o.SPACES_AROUND_BRACES)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACE_BEFORE_OPENING_BRACKETS}`) | |
? (this.spaceBeforeOpeningBrackets = t.get(o.SPACE_BEFORE_OPENING_BRACKETS)) | |
: e.affectsConfiguration(`${i.Constants.EXTENSION_NAME}.${o.SPACES_INSIDE_BRACKETS}`) && (this.spacesInsideBrackets = t.get(o.SPACES_INSIDE_BRACKETS)); | |
}); | |
} | |
getStrictRename() { | |
return this.strictRename; | |
} | |
getAlwaysOpenOnlineDoc() { | |
return this.alwaysOpenOnlineDoc; | |
} | |
getAlwaysOpenOfflineDocInNewTab() { | |
return this.alwaysOpenOfflineDocInNewTab; | |
} | |
getCodeInjection() { | |
return this.codeInjection; | |
} | |
getCodeInjectionSource() { | |
return this.codeInjectionSource; | |
} | |
getBracesOnSeparateLine() { | |
return this.bracesOnSeparateLine; | |
} | |
getSpaceAroundUnaryOperators() { | |
return this.spaceAroundUnaryOperators; | |
} | |
getSpacesAroundBinaryOperators() { | |
return this.spacesAroundBinaryOperators; | |
} | |
getSpacesAroundAssignmentOperators() { | |
return this.spacesAroundAssignmentOperators; | |
} | |
getSpacesAroundTernaryOperators() { | |
return this.spacesAroundTernaryOperators; | |
} | |
getSpaceAfterKeywords() { | |
return this.spaceAfterKeywords; | |
} | |
getSpaceAfterFunctionNames() { | |
return this.spaceAfterFunctionNames; | |
} | |
getSpaceBeforeCommas() { | |
return this.spaceBeforeCommas; | |
} | |
getSpaceAfterCommas() { | |
return this.spaceAfterCommas; | |
} | |
getSpacesAroundDots() { | |
return this.spacesAroundDots; | |
} | |
getSpaceBeforeCaseColons() { | |
return this.spaceBeforeCaseColons; | |
} | |
getSpaceBeforeSemicolonsInFor() { | |
return this.spaceBeforeSemicolonsInFor; | |
} | |
getSpaceAfterSemicolonsInFor() { | |
return this.spaceAfterSemicolonsInFor; | |
} | |
getSpacesInsideParentheses() { | |
return this.spacesInsideParentheses; | |
} | |
getSpacesAroundBraces() { | |
return this.spacesAroundBraces; | |
} | |
getSpaceBeforeOpeningBrackets() { | |
return this.spaceBeforeOpeningBrackets; | |
} | |
getSpacesInsideBrackets() { | |
return this.spacesInsideBrackets; | |
} | |
} | |
(t.Configurations = o), | |
(o.STRICT_RENAME = "strictRename"), | |
(o.ALWAYS_OPEN_ONLINE_DOC = "alwaysOpenOnlineDoc"), | |
(o.ALWAYS_OPEN_OFFLINE_DOC_IN_NEW_TAB = "alwaysOpenOfflineDocInNewTab"), | |
(o.CODE_INJECTION = "codeInjection"), | |
(o.CODE_INJECTION_SOURCE = "codeInjectionSource"), | |
(o.BRACES_ON_SEPARATE_LINE = "format.placeBracesOnSeparateLine"), | |
(o.SPACE_AROUND_UNARY_OPERATORS = "format.placeSpaceAroundUnaryOperators"), | |
(o.SPACES_AROUND_BINARY_OPERATOS = "format.placeSpacesAroundBinaryOperators"), | |
(o.SPACES_AROUND_ASSIGNMENT_OPERATORS = "format.placeSpacesAroundAssignmentOperators"), | |
(o.SPACES_AROUND_TERNARY_OPERATORS = "format.placeSpacesAroundTernaryOperators"), | |
(o.SPACE_AFTER_KEYWORDS = "format.placeSpaceAfterKeywords"), | |
(o.SPACE_AFTER_FUNCTION_NAMES = "format.placeSpaceAfterFunctionNames"), | |
(o.SPACE_BEFORE_COMMAS = "format.placeSpaceBeforeCommas"), | |
(o.SPACE_AFTER_COMMAS = "format.placeSpaceAfterCommas"), | |
(o.SPACES_AROUND_DOTS = "format.placeSpacesAroundDots"), | |
(o.SPACE_BEFORE_CASE_COLONS = "format.placeSpaceBeforeCaseColons"), | |
(o.SPACE_BEFORE_SEMICOLONS_IN_FOR = "format.placeSpaceBeforeSemicolonsInFor"), | |
(o.SPACE_AFTER_SEMICOLONS_IN_FOR = "format.placeSpaceAfterSemicolonsInFor"), | |
(o.SPACES_INSIDE_PARENTHESES = "format.placeSpacesInsideParentheses"), | |
(o.SPACES_AROUND_BRACES = "format.placeSpacesAroundBraces"), | |
(o.SPACE_BEFORE_OPENING_BRACKETS = "format.placeSpaceBeforeOpeningBrackets"), | |
(o.SPACES_INSIDE_BRACKETS = "format.placeSpacesInsideBrackets"); | |
}, | |
1024: (e, t) => { | |
var r; | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Constants = void 0); | |
class n {} | |
(t.Constants = n), | |
(r = n), | |
(n.EXTENSION_NAME = "webgl-glsl-editor"), | |
(n.GLSL = "glsl"), | |
(n.VERT_GLSL = "vert.glsl"), | |
(n.VS_GLSL = "vs.glsl"), | |
(n.VERT = "vert"), | |
(n.VS = "vs"), | |
(n.VERTEX_EXTS = [r.VERT_GLSL, r.VS_GLSL, r.VERT, r.VS]), | |
(n.FRAG_GLSL = "frag.glsl"), | |
(n.FS_GLSL = "fs.glsl"), | |
(n.FRAG = "frag"), | |
(n.FS = "fs"), | |
(n.FRAGMENT_EXTS = [r.FRAG_GLSL, r.FS_GLSL, r.FRAG, r.FS]), | |
(n.FILE = "file"), | |
(n.UNTITLED = "untitled"), | |
(n.PREPROCESSED_GLSL = "webgl-glsl-editor-preprocessed"), | |
(n.VEC3 = "vec3"), | |
(n.VEC4 = "vec4"), | |
(n.BOOL = "bool"), | |
(n.FLOAT = "float"), | |
(n.INT = "int"), | |
(n.UINT = "uint"), | |
(n.COLOR = "color"), | |
(n.COLOUR = "colour"), | |
(n.EMPTY = ""), | |
(n.LRB = "("), | |
(n.RRB = ")"), | |
(n.LCB = "{"), | |
(n.RCB = "}"), | |
(n.LSB = "["), | |
(n.RSB = "]"), | |
(n.NEW_LINE = "\n"), | |
(n.TAB = "\t"), | |
(n.SPACE = " "), | |
(n.COMMA = ","), | |
(n.COLON = ":"), | |
(n.SEMICOLON = ";"), | |
(n.DOT = "."), | |
(n.xyzw = ["x", "y", "z", "w"]), | |
(n.rgba = ["r", "g", "b", "a"]), | |
(n.stpq = ["s", "t", "p", "q"]), | |
(n.INVALID = -1); | |
}, | |
8682: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.DocumentInfo = void 0); | |
const n = r(9496), | |
i = r(352), | |
s = r(6509), | |
o = r(2993), | |
a = r(3595), | |
l = r(2238), | |
c = r(4196), | |
u = r(1168), | |
h = r(2422), | |
p = r(1024), | |
d = r(5915), | |
m = r(2); | |
t.DocumentInfo = class { | |
constructor(e) { | |
(this.lastProcessedVersion = p.Constants.INVALID), | |
(this.injectionOffset = 0), | |
(this.injectionLineCount = 0), | |
(this.injectionError = !1), | |
(this.invalid = !1), | |
(this.version = 100), | |
(this.regions = new m.DocumentRegions()), | |
(this.uri = e), | |
this.setShaderStage(); | |
} | |
reset() { | |
this.builtin && this.builtin.reset(), this.regions.reset(), (this.rootScope = new l.Scope(null, null)); | |
} | |
getVisitor() { | |
return this.visitor; | |
} | |
getExtension(e = 1) { | |
return this.uri.path | |
.substring(this.uri.path.lastIndexOf("/") + 1) | |
.split(p.Constants.DOT) | |
.slice(-e) | |
.join(p.Constants.DOT); | |
} | |
getStageName() { | |
const e = this.getExtension(), | |
t = this.getExtension(2); | |
return p.Constants.VERTEX_EXTS.includes(e) || p.Constants.VERTEX_EXTS.includes(t) ? p.Constants.VERT : p.Constants.FRAGMENT_EXTS.includes(e) || p.Constants.FRAGMENT_EXTS.includes(t) ? p.Constants.FRAG : p.Constants.EMPTY; | |
} | |
getShaderStage() { | |
return this.stage; | |
} | |
setShaderStage() { | |
const e = this.getStageName(); | |
e === p.Constants.FRAG ? (this.stage = h.ShaderStage.FRAGMENT) : e === p.Constants.VERT ? (this.stage = h.ShaderStage.VERTEX) : (this.stage = h.ShaderStage.DEFAULT); | |
} | |
isGlsl300es() { | |
return 300 === this.version; | |
} | |
isGlsl100es() { | |
return 100 === this.version; | |
} | |
getVersion() { | |
return this.version; | |
} | |
setVersion(e) { | |
(e === this.version && this.builtin) || ((this.version = e), (this.builtin = 100 === e ? u.Builtin.get100() : u.Builtin.get300())); | |
} | |
getRootScope() { | |
return this.rootScope; | |
} | |
getTokens() { | |
return this.tokens; | |
} | |
getTokenAt(e) { | |
for (const t of this.getTokens()) if (this.intervalToRange(new c.Interval(t.startIndex, t.stopIndex + 1, this)).contains(e)) return t; | |
return null; | |
} | |
processElements(e) { | |
(e.version > this.lastProcessedVersion || this.invalid) && (this.processDocument(e), this.processVisitor(), (this.lastProcessedVersion = e.version), (this.invalid = !1)); | |
} | |
processDocument(e) { | |
(this.document = e), (this.lexer = this.createLexer()), (this.parser = this.createParser()); | |
} | |
createLexer() { | |
const e = i.CharStreams.fromString(this.getText()), | |
t = new o.AntlrGlslLexer(e); | |
return (this.tokens = t.getAllTokens()), t.reset(), t; | |
} | |
getText() { | |
const e = this.document.getText(); | |
if (d.GlslEditor.CONFIGURATIONS.getCodeInjection() && this.uri.scheme !== p.Constants.PREPROCESSED_GLSL) { | |
const t = d.GlslEditor.CONFIGURATIONS.getCodeInjectionSource(); | |
let r = t.join(p.Constants.NEW_LINE) + p.Constants.NEW_LINE; | |
return (this.injectionLineCount = t.length), (this.injectionOffset = r.length), (r += e), r; | |
} | |
return (this.injectionLineCount = 0), (this.injectionOffset = 0), e; | |
} | |
createParser() { | |
const e = new i.CommonTokenStream(this.lexer), | |
t = new a.AntlrGlslParser(e); | |
return t.removeErrorListeners(), t; | |
} | |
processVisitor() { | |
const e = this.parser.start(); | |
(this.visitor = new s.GlslVisitor(this.uri)), this.visitor.visit(e), this.parser.reset(); | |
} | |
getLineCount() { | |
return this.document.lineCount; | |
} | |
intervalToLocation(e) { | |
const t = this.intervalToRange(e); | |
return new n.Location(this.document.uri, t); | |
} | |
intervalToRange(e) { | |
if (!e) return null; | |
const t = this.offsetToPosition(e.startIndex), | |
r = this.offsetToPosition(e.stopIndex); | |
return new n.Range(t, r); | |
} | |
offsetToPosition(e) { | |
return this.document.positionAt(e); | |
} | |
positionToOffset(e) { | |
return this.document.offsetAt(e); | |
} | |
lineAndCharacterToRange(e, t) { | |
const r = new n.Position(e - 1, t); | |
return new n.Range(r, r); | |
} | |
getTextInInterval(e) { | |
return this.document.getText(this.intervalToRange(e)); | |
} | |
getFunctionPrototypeAt(e) { | |
return this.getElementAt(e, "functionPrototypes"); | |
} | |
getFunctionDefinitionAt(e) { | |
return this.getElementAt(e, "functionDefinitions"); | |
} | |
getFunctionCallAt(e) { | |
return this.getElementAt(e, "functionCalls"); | |
} | |
getVariableDeclarationAt(e) { | |
return this.getElementAt(e, "variableDeclarations"); | |
} | |
getVariableUsageAt(e) { | |
return this.getElementAt(e, "variableUsages"); | |
} | |
getTypeDeclarationAt(e) { | |
return this.getElementAt(e, "typeDeclarations"); | |
} | |
getTypeUsageAt(e) { | |
return this.getElementAt(e, "typeUsages"); | |
} | |
getElementAt(e, t) { | |
var r; | |
let n = this.rootScope; | |
for (; n; ) { | |
for (const i of n[t]) if (i.nameInterval && !i.nameInterval.isInjected() && (null === (r = this.intervalToRange(i.nameInterval)) || void 0 === r ? void 0 : r.contains(e))) return i; | |
n = this.getChildScope(n, e); | |
} | |
return null; | |
} | |
getChildScope(e, t) { | |
var r; | |
for (const n of e.children) if (null === (r = this.intervalToRange(n.interval)) || void 0 === r ? void 0 : r.contains(t)) return n; | |
return null; | |
} | |
getScopeAt(e, t = this.rootScope) { | |
const r = this.getChildScope(t, e); | |
return r ? this.getScopeAt(e, r) : t; | |
} | |
getDepthAt(e) { | |
return this.getScopeDepthAt(e, this.rootScope, 0) + this.getCaseDepthAt(e); | |
} | |
getScopeDepthAt(e, t, r) { | |
const n = this.getChildScope(t, e); | |
if (n) { | |
const t = n.elseIfScope ? 0 : 1; | |
return this.getScopeDepthAt(e, n, r + t); | |
} | |
return r; | |
} | |
getCaseDepthAt(e) { | |
var t; | |
let r = 0; | |
for (const n of this.regions.caseStatementsRegions) (null === (t = this.intervalToRange(n)) || void 0 === t ? void 0 : t.contains(e)) && r++; | |
return r; | |
} | |
getInjectionLineCount() { | |
return this.uri.scheme === p.Constants.PREPROCESSED_GLSL ? 0 : this.injectionLineCount; | |
} | |
getInjectionOffset() { | |
return this.uri.scheme === p.Constants.PREPROCESSED_GLSL ? 0 : this.injectionOffset; | |
} | |
invalidate() { | |
this.invalid = !0; | |
} | |
getDocument() { | |
return this.document; | |
} | |
getRegions() { | |
return this.regions; | |
} | |
getPreprocessedText() { | |
return this.preprocessedText; | |
} | |
setPreprocessedText(e) { | |
this.preprocessedText = e; | |
} | |
hasInjectionError() { | |
return this.injectionError; | |
} | |
setInjectionError(e) { | |
this.injectionError = e; | |
} | |
isExtensionAvailable(e, t) { | |
if (!e) return !0; | |
let r = !1; | |
for (const n of this.regions.preprocessorRegions) n.interval.stopIndex <= t && (n.extension === e || "all" === n.extension) && (r = "disable" !== n.extensionState); | |
return r; | |
} | |
}; | |
}, | |
2: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), | |
(t.DocumentRegions = void 0), | |
(t.DocumentRegions = class { | |
constructor() { | |
(this.completionRegions = new Array()), | |
(this.foldingRegions = new Array()), | |
(this.semanticRegions = new Array()), | |
(this.colorRegions = new Array()), | |
(this.signatureRegions = new Array()), | |
(this.forHeaderRegions = new Array()), | |
(this.typeDeclarationRegions = new Array()), | |
(this.unaryExpressionRegions = new Array()), | |
(this.caseHeaderRegions = new Array()), | |
(this.caseStatementsRegions = new Array()), | |
(this.scopelessInterfaceBlockRegions = new Array()), | |
(this.commentRegions = new Array()), | |
(this.preprocessorRegions = new Array()), | |
(this.layoutRegions = new Array()), | |
(this.scopedCurlyBracePositions = new Array()); | |
} | |
reset() { | |
(this.completionRegions.length = 0), | |
(this.foldingRegions.length = 0), | |
(this.semanticRegions.length = 0), | |
(this.colorRegions.length = 0), | |
(this.signatureRegions.length = 0), | |
(this.forHeaderRegions.length = 0), | |
(this.typeDeclarationRegions.length = 0), | |
(this.unaryExpressionRegions.length = 0), | |
(this.caseHeaderRegions.length = 0), | |
(this.caseStatementsRegions.length = 0), | |
(this.scopelessInterfaceBlockRegions.length = 0), | |
(this.commentRegions.length = 0), | |
(this.preprocessorRegions.length = 0), | |
(this.layoutRegions.length = 0), | |
(this.scopedCurlyBracePositions.length = 0); | |
} | |
}); | |
}, | |
5915: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlslEditor = void 0); | |
const n = r(9496), | |
i = r(8682), | |
s = r(589), | |
o = r(1024), | |
a = r(5604); | |
class l { | |
static initialize(e) { | |
this.context = e; | |
} | |
static getContext() { | |
return this.context; | |
} | |
static processElements(e) { | |
this.getDocumentInfo(e.uri).processElements(e); | |
} | |
static getDocumentInfo(e) { | |
const t = `${e.scheme}:${e.path}`; | |
let r = this.documentInfos.get(t); | |
return r || ((r = new i.DocumentInfo(e)), this.documentInfos.set(t, r)), r; | |
} | |
static invalidateDocuments() { | |
for (const e of this.documentInfos.values()) e.invalidate(), e.getDocument().isClosed || a.HostDependent.textChanged(e.getDocument()); | |
} | |
static getDiagnosticCollection() { | |
return this.collection; | |
} | |
} | |
(t.GlslEditor = l), (l.CONFIGURATIONS = new s.Configurations()), (l.documentInfos = new Map()), (l.collection = n.languages.createDiagnosticCollection(o.Constants.GLSL)); | |
}, | |
6509: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlslVisitor = void 0); | |
const n = r(5915), | |
i = r(3595), | |
s = r(3361), | |
o = r(6491), | |
a = r(2238), | |
l = r(3530), | |
c = r(6188), | |
u = r(2993), | |
h = r(2775), | |
p = r(2333), | |
d = r(4196), | |
m = r(3032), | |
f = r(3229); | |
class y extends l.AbstractParseTreeVisitor { | |
constructor(e) { | |
super(), (this.uri = e); | |
} | |
initialize() { | |
(this.di = n.GlslEditor.getDocumentInfo(this.uri)), this.di.reset(), this.setTokenInformations(), (this.scope = this.di.getRootScope()); | |
} | |
setTokenInformations() { | |
this.di.setVersion(100); | |
let e = !0; | |
const t = new g(); | |
for (let r = 0; r < this.di.getTokens().length; r++) { | |
const n = this.di.getTokens()[r]; | |
this.addCommentFoldingRegionBasedOnToken(t, n, r), this.addPreprocessorRegion(n), n.type !== u.AntlrGlslLexer.TAB && n.type !== u.AntlrGlslLexer.SPACE && (this.setVersionIfTokenIsVersionPreprocessor(n, e), (e = !1)); | |
} | |
this.addSingleLineCommentFoldingRegionIfExists(t); | |
} | |
setVersionIfTokenIsVersionPreprocessor(e, t) { | |
if (t && e.type === u.AntlrGlslLexer.PREPROCESSOR && e.text.startsWith("#version")) { | |
const t = e.text.includes("300") ? 300 : 100; | |
this.di.setVersion(t); | |
} | |
} | |
addPreprocessorRegion(e) { | |
if (e.type === u.AntlrGlslLexer.PREPROCESSOR) { | |
const t = new d.Interval(e.startIndex, e.stopIndex + 1, this.di); | |
let r = "", | |
n = ""; | |
if (new RegExp("\\s*#\\s*extension\\s+.*?\\s*:\\s*.*?\\s*").test(e.text)) { | |
const t = e.text.indexOf("extension") + 9, | |
i = e.text.substring(t).split(":"); | |
(r = i[0].trim()), (n = i[1].trim()); | |
} | |
this.di.getRegions().preprocessorRegions.push(new f.PreprocessorRegion(e.text, t, r, n)); | |
} | |
} | |
addCommentFoldingRegionBasedOnToken(e, t, r) { | |
t.type === u.AntlrGlslLexer.SINGLE_LINE_COMMENT | |
? (this.di.getRegions().commentRegions.push(new d.Interval(t.startIndex, t.stopIndex + 1, this.di)), this.growSingleLineComment(e, t)) | |
: this.addCommentFoldingRegionIfExists(e, t, r); | |
} | |
growSingleLineComment(e, t) { | |
e.firstComment || (e.firstComment = t), (e.lastComment = t); | |
} | |
addCommentFoldingRegionIfExists(e, t, r) { | |
if (t.type === u.AntlrGlslLexer.MULTI_LINE_COMMENT) { | |
const e = r + 1 === this.di.getTokens().length ? t : this.di.getTokens()[r + 1]; | |
o.Helper.addFoldingRegionFromComment(this.di, t, e), this.di.getRegions().commentRegions.push(new d.Interval(t.startIndex, t.stopIndex + 1, this.di)); | |
} | |
t.type !== u.AntlrGlslLexer.NEW_LINE && t.type !== u.AntlrGlslLexer.TAB && t.type !== u.AntlrGlslLexer.SPACE && (this.addSingleLineCommentFoldingRegionIfExists(e), (e.firstComment = null), (e.lastComment = null)); | |
} | |
addSingleLineCommentFoldingRegionIfExists(e) { | |
e.firstComment !== e.lastComment && null != e.firstComment && o.Helper.addFoldingRegionFromComment(this.di, e.firstComment, e.lastComment); | |
} | |
getCurrentFunction() { | |
return this.currentFunction; | |
} | |
visitStart(e) { | |
this.initialize(), this.visitChildren(e); | |
} | |
visitType_declaration(e) { | |
new c.TypeDeclarationProcessor().getTypeDeclaration(e, this.scope, this.di, 0, !1, !1); | |
} | |
visitVariable_declaration(e) { | |
new h.VariableDeclarationProcessor().getDeclarations(e, this.scope, this.di), this.visitList(e.type_usage().qualifier()); | |
} | |
visitInvariant_declaration(e) { | |
new m.VariableUsageProcessor().getVariableUsage(e.IDENTIFIER(), this.scope, this.di); | |
} | |
visitInterface_block_declaration(e) { | |
var t, r; | |
o.Helper.addFoldingRegionFromTokens(this.di, null !== (r = null === (t = e.IDENTIFIER()) || void 0 === t ? void 0 : t.symbol) && void 0 !== r ? r : e.LCB().symbol, e.RCB().symbol), | |
new h.VariableDeclarationProcessor().getInterfaceBlockVariableDeclaration(e, this.scope, this.di), | |
this.visitList(e.qualifier()); | |
} | |
visitFunction_prototype(e) { | |
(this.scope = this.createScopeFromFunctionPrototype(this.scope, e)), new s.FunctionProcessor().getFunctionPrototype(e, this.scope, this.di), (this.scope = this.scope.parent); | |
} | |
createScopeFromFunctionPrototype(e, t) { | |
const r = new d.Interval(t.function_header().LRB().symbol.startIndex, t.SEMICOLON().symbol.stopIndex + 1, this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
visitFunction_definition(e) { | |
(this.scope = this.createScopeFromFunctionDefinition(this.scope, e)), | |
o.Helper.addFoldingRegionFromTokens(this.di, e.function_header().IDENTIFIER().symbol, e.compound_statement().RCB().symbol), | |
(this.currentFunction = new s.FunctionProcessor().getFunctionDefinition(e, this.scope, this.di)), | |
this.di.getRegions().scopedCurlyBracePositions.push(e.compound_statement().LCB().symbol.startIndex), | |
this.visit(e.compound_statement()), | |
(this.currentFunction = null), | |
(this.scope = this.scope.parent); | |
} | |
createScopeFromFunctionDefinition(e, t) { | |
const r = new d.Interval(t.function_header().LRB().symbol.startIndex + 1, t.compound_statement().RCB().symbol.stopIndex, this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
visitExpression(e) { | |
new p.ExpressionProcessor().processExpression(e, this.scope, this.di); | |
} | |
visitFor_iteration(e) { | |
(this.scope = this.createScopeFromForIteration(this.scope, e)), | |
this.di.getRegions().forHeaderRegions.push(new d.Interval(e.LRB().symbol.startIndex, e.RRB().symbol.stopIndex, this.di)), | |
e.statement().compound_statement() && o.Helper.addFoldingRegionFromTokens(this.di, e.KW_FOR().symbol, e.stop), | |
this.visitChildren(e), | |
(this.scope = this.scope.parent); | |
} | |
createScopeFromForIteration(e, t) { | |
const r = t.statement().simple_statement() ? 1 : 0; | |
0 === r && this.di.getRegions().scopedCurlyBracePositions.push(t.statement().compound_statement().LCB().symbol.startIndex); | |
const n = new d.Interval(t.LRB().symbol.startIndex + 1, t.statement().stop.stopIndex + r, this.di), | |
i = new a.Scope(n, e); | |
return e.children.push(i), i; | |
} | |
visitWhile_iteration(e) { | |
this.visit(e.expression()), | |
(this.scope = this.createScopeFromWhileIteration(this.scope, e)), | |
e.statement().compound_statement() && o.Helper.addFoldingRegionFromTokens(this.di, e.KW_WHILE().symbol, e.stop), | |
this.visit(e.statement()), | |
(this.scope = this.scope.parent); | |
} | |
visitDo_while_iteration(e) { | |
(this.scope = this.createScopeFromWhileIteration(this.scope, e)), | |
e.statement().compound_statement() && o.Helper.addFoldingRegionFromTokens(this.di, e.KW_DO().symbol, e.statement().stop), | |
this.visit(e.statement()), | |
(this.scope = this.scope.parent), | |
this.visit(e.expression()); | |
} | |
createScopeFromWhileIteration(e, t) { | |
const r = o.Helper.getIntervalFromStatement(t.statement(), this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
visitSelection_statement(e) { | |
this.visitIfStatement(e), e.statement().length > 1 && this.visitElseStatement(e); | |
} | |
visitIfStatement(e) { | |
this.visit(e.expression()), | |
(this.scope = this.createScopeFromIf(this.scope, e)), | |
e.statement()[0].compound_statement() && o.Helper.addFoldingRegionFromTokens(this.di, e.KW_IF().symbol, e.statement()[0].stop), | |
this.visit(e.statement()[0]), | |
(this.scope = this.scope.parent); | |
} | |
visitElseStatement(e) { | |
(this.scope = this.createScopeFromElse(this.scope, e)), | |
e.statement()[1].compound_statement() && o.Helper.addFoldingRegionFromTokens(this.di, e.KW_ELSE().symbol, e.statement()[1].stop), | |
this.visit(e.statement()[1]), | |
(this.scope = this.scope.parent); | |
} | |
createScopeFromIf(e, t) { | |
const r = o.Helper.getIntervalFromStatement(t.statement()[0], this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
createScopeFromElse(e, t) { | |
var r; | |
const n = o.Helper.getIntervalFromStatement(t.statement()[1], this.di), | |
i = !!(null === (r = t.statement()[1].simple_statement()) || void 0 === r ? void 0 : r.selection_statement()), | |
s = new a.Scope(n, e, i); | |
return e.children.push(s), s; | |
} | |
visitSwitch_statement(e) { | |
this.visit(e.expression()), (this.scope = this.createScopeFromSwitch(this.scope, e)), o.Helper.addFoldingRegionFromTokens(this.di, e.KW_SWITCH().symbol, e.stop), this.visitList(e.case_group()), (this.scope = this.scope.parent); | |
} | |
createScopeFromSwitch(e, t) { | |
const r = new d.Interval(t.LCB().symbol.startIndex + 1, t.RCB().symbol.stopIndex, this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
visitCase_group(e) { | |
o.Helper.addFoldingRegionFromTokens(this.di, e.start, e.stop, -1), | |
this.di.getRegions().caseHeaderRegions.push(new d.Interval(e.case_label().start.startIndex, e.case_label().stop.stopIndex + 1, this.di)), | |
e.statement()[0].simple_statement() && this.di.getRegions().caseStatementsRegions.push(new d.Interval(e.statement()[0].start.startIndex, e.statement()[e.statement().length - 1].stop.stopIndex + 1, this.di)), | |
this.visitChildren(e); | |
} | |
visitCompound_statement(e) { | |
this.isScoped(e) ? ((this.scope = this.createScope(this.scope, e)), o.Helper.addFoldingRegionFromTokens(this.di, e.start, e.stop), this.visitChildren(e), (this.scope = this.scope.parent)) : this.visitChildren(e); | |
} | |
isScoped(e) { | |
const t = e.parent.parent; | |
return ( | |
e.parent.ruleIndex !== i.AntlrGlslParser.RULE_function_definition && | |
t.ruleIndex !== i.AntlrGlslParser.RULE_selection_statement && | |
t.ruleIndex !== i.AntlrGlslParser.RULE_for_iteration && | |
t.ruleIndex !== i.AntlrGlslParser.RULE_while_iteration && | |
t.ruleIndex !== i.AntlrGlslParser.RULE_do_while_iteration && | |
t.ruleIndex !== i.AntlrGlslParser.RULE_switch_statement | |
); | |
} | |
createScope(e, t) { | |
const r = o.Helper.getIntervalFromCompoundStatement(t, this.di), | |
n = new a.Scope(r, e); | |
return e.children.push(n), n; | |
} | |
visitLayout_qualifier(e) { | |
this.di.getRegions().layoutRegions.push(new d.Interval(e.LRB().symbol.startIndex, e.RRB().symbol.stopIndex, this.di)); | |
} | |
visitList(e) { | |
for (const t of e) this.visit(t); | |
} | |
defaultResult() {} | |
} | |
t.GlslVisitor = y; | |
class g {} | |
}, | |
4498: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.addSharedFeatures = t.addSharedCommands = t.selector = void 0); | |
const n = r(9496), | |
i = r(1024), | |
s = r(3742), | |
o = r(1496), | |
a = r(3141), | |
l = r(9519), | |
c = r(1154), | |
u = r(1301), | |
h = r(7266), | |
p = r(3703), | |
d = r(844), | |
m = r(9766), | |
f = r(4413), | |
y = r(3936), | |
g = r(3086), | |
_ = r(4395), | |
T = r(6481), | |
x = r(7186), | |
v = r(3017), | |
S = r(8940); | |
(t.selector = [ | |
{ language: i.Constants.GLSL, scheme: i.Constants.FILE }, | |
{ language: i.Constants.GLSL, scheme: i.Constants.UNTITLED }, | |
{ language: i.Constants.GLSL, scheme: i.Constants.PREPROCESSED_GLSL }, | |
{ language: i.Constants.VERT, scheme: i.Constants.FILE }, | |
{ language: i.Constants.VERT, scheme: i.Constants.UNTITLED }, | |
{ language: i.Constants.VERT, scheme: i.Constants.PREPROCESSED_GLSL }, | |
{ language: i.Constants.VS, scheme: i.Constants.FILE }, | |
{ language: i.Constants.VS, scheme: i.Constants.UNTITLED }, | |
{ language: i.Constants.VS, scheme: i.Constants.PREPROCESSED_GLSL }, | |
{ language: i.Constants.FRAG, scheme: i.Constants.FILE }, | |
{ language: i.Constants.FRAG, scheme: i.Constants.UNTITLED }, | |
{ language: i.Constants.FRAG, scheme: i.Constants.PREPROCESSED_GLSL }, | |
{ language: i.Constants.FS, scheme: i.Constants.FILE }, | |
{ language: i.Constants.FS, scheme: i.Constants.UNTITLED }, | |
{ language: i.Constants.FS, scheme: i.Constants.PREPROCESSED_GLSL }, | |
]), | |
(t.addSharedCommands = function (e) { | |
e.subscriptions.push( | |
n.commands.registerCommand(`${i.Constants.EXTENSION_NAME}.${o.GlslCommandProvider.OPEN_DOC}`, (e) => { | |
o.GlslCommandProvider.openDoc(e); | |
}) | |
), | |
e.subscriptions.push( | |
n.commands.registerCommand(`${i.Constants.EXTENSION_NAME}.${o.GlslCommandProvider.OPEN_DOCS_GL}`, () => { | |
o.GlslCommandProvider.openDocsGl(); | |
}) | |
), | |
e.subscriptions.push( | |
n.commands.registerCommand(`${i.Constants.EXTENSION_NAME}.${o.GlslCommandProvider.OPEN_GL_ES_2}`, () => { | |
o.GlslCommandProvider.openGlEs2(); | |
}) | |
), | |
e.subscriptions.push( | |
n.commands.registerCommand(`${i.Constants.EXTENSION_NAME}.${o.GlslCommandProvider.OPEN_GL_ES_3}`, () => { | |
o.GlslCommandProvider.openGlEs3(); | |
}) | |
), | |
e.subscriptions.push( | |
n.commands.registerCommand(`${i.Constants.EXTENSION_NAME}.${o.GlslCommandProvider.GENERATE_PREPROCESSED}`, () => { | |
o.GlslCommandProvider.openPreprocessedGlsl(); | |
}) | |
); | |
}), | |
(t.addSharedFeatures = function (e) { | |
e.subscriptions.push(n.languages.registerDocumentSemanticTokensProvider(t.selector, new d.GlslDocumentSemanticTokensProvider(), new d.GlslSemanticTokensLegend())), | |
e.subscriptions.push(n.languages.registerHoverProvider(t.selector, new y.GlslHoverProvider())), | |
e.subscriptions.push(n.languages.registerDocumentHighlightProvider(t.selector, new p.GlslDocumentHighlightProvider())), | |
e.subscriptions.push(n.languages.registerCompletionItemProvider(t.selector, new a.GlslCompletionProvider(), i.Constants.DOT)), | |
e.subscriptions.push(n.languages.registerDocumentSymbolProvider(t.selector, new m.GlslDocumentSymbolProvider())), | |
e.subscriptions.push(n.languages.registerDeclarationProvider(t.selector, new l.GlslDeclarationProvider())), | |
e.subscriptions.push(n.languages.registerDefinitionProvider(t.selector, new c.GlslDefinitionProvider())), | |
e.subscriptions.push(n.languages.registerTypeDefinitionProvider(t.selector, new S.GlslTypeDefinitionProvider())), | |
e.subscriptions.push(n.languages.registerImplementationProvider(t.selector, new g.GlslImplementationProvider())), | |
e.subscriptions.push(n.languages.registerReferenceProvider(t.selector, new T.GlslReferenceProvider())), | |
e.subscriptions.push(n.languages.registerRenameProvider(t.selector, new x.GlslRenameProvider())), | |
e.subscriptions.push(n.languages.registerCallHierarchyProvider(t.selector, new s.GlslCallHierarchyProvider())), | |
// HACK: disable color provider | |
//e.subscriptions.push(n.languages.registerColorProvider(t.selector, new u.GlslDocumentColorProvider())), | |
e.subscriptions.push(n.languages.registerSignatureHelpProvider(t.selector, new v.GlslSignatureHelpProvider(), i.Constants.LRB, i.Constants.COMMA)), | |
e.subscriptions.push(n.languages.registerFoldingRangeProvider(t.selector, new f.GlslFoldingProvider())), | |
e.subscriptions.push(n.languages.registerDocumentFormattingEditProvider(t.selector, new h.GlslDocumentFormattingProvider())), | |
e.subscriptions.push(n.languages.registerDocumentRangeFormattingEditProvider(t.selector, new h.GlslDocumentFormattingProvider())); | |
// HACK: disable inlay hint provider | |
// e.subscriptions.push(n.languages.registerInlayHintsProvider(t.selector, new _.GlslInlayHintsProvider())); | |
}); | |
}, | |
5604: (e, t) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.HostDependent = void 0); | |
class r { | |
static getDocumentation(e, t) { | |
return ""; | |
} | |
static displayPreprocessedCode(e) {} | |
static textChanged(e) {} | |
} | |
(t.HostDependent = r), (r.webExtension = !1); | |
}, | |
2333: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ExpressionProcessor = void 0); | |
const n = r(6491), | |
i = r(7263), | |
s = r(5668), | |
o = r(3636), | |
a = r(9924), | |
l = r(3361), | |
c = r(3032), | |
u = r(1274), | |
h = r(1905), | |
p = r(7539), | |
d = r(6188), | |
m = r(4196), | |
f = r(279), | |
y = r(9391), | |
g = r(1024), | |
_ = r(5766), | |
T = r(3150), | |
x = r(8644), | |
v = r(5660), | |
S = r(4020), | |
E = r(3603); | |
class O { | |
initialize(e, t, r) { | |
(this.ctx = e), (this.scope = t), (this.di = r); | |
} | |
processExpression(e, t, r) { | |
if ((this.initialize(e, t, r), e)) { | |
if (this.isLiteral()) return this.processLiteral(); | |
if (this.isIdentifier()) return this.processIdentifier(); | |
if (this.isParenthesizedExpression()) return this.processParenthesizedExpression(); | |
if (this.isModuloExpression()) return this.processModuloExpression(); | |
if (this.isArithmeticUnaryExpression()) return this.processArithmeticUnaryExpression(); | |
if (this.isArithmeticBinaryExpression()) return this.processArithmeticBinaryExpression(); | |
if (this.isArrayExpression()) return this.processArrayExpression(); | |
if (this.isLengthExpression()) return this.processLengthExpression(); | |
if (this.isMemberExpression()) return this.processMemberExpression(); | |
if (this.isFunctionExpression()) return this.processFunctionExpression(); | |
if (this.isComplementExpression()) return this.processComplementExpression(); | |
if (this.isBitExpression()) return this.processBitExpression(); | |
if (this.isLogicalUnaryExpression()) return this.processLogicalUnaryExpression(); | |
if (this.isRelationalExpression()) return this.processRelationalExpression(); | |
if (this.isEqualityExpression()) return this.processEqualityExpression(); | |
if (this.isLogicalBinaryExpression()) return this.processLogicalBinaryExpression(); | |
if (this.isTernaryExpression()) return this.processTernaryExpression(); | |
if (this.isShiftExpression()) return this.processShiftExpression(); | |
if (this.isAssignmentOrModifyExpression()) return this.processAssignmentOrModifyExpression(); | |
if (this.isCompletionExpression()) return this.processCompletionExpression(); | |
for (const e of this.ctx.expression()) new O().processExpression(e, this.scope, this.di); | |
return null; | |
} | |
return null; | |
} | |
isLiteral() { | |
return !!this.ctx.literal(); | |
} | |
processLiteral() { | |
return this.ctx.literal().BOOL_LITERAL() | |
? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.BOOL), new s.ArrayUsage(), !0) | |
: this.ctx.literal().number_literal().FLOAT_LITERAL() | |
? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.FLOAT), new s.ArrayUsage(), !0, this.computeNumber(this.ctx.literal().text), !0) | |
: this.ctx.literal().text.toLowerCase().endsWith("u") | |
? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.UINT), new s.ArrayUsage(), !0, this.computeNumber(this.ctx.literal().text), !0) | |
: new T.ExpressionResult(this.di.builtin.types.get(g.Constants.INT), new s.ArrayUsage(), !0, this.computeNumber(this.ctx.literal().text), !0); | |
} | |
computeNumber(e) { | |
return e.toLowerCase().endsWith("f") || e.toLowerCase().endsWith("u") ? +e.substring(0, e.length - 1) : +e; | |
} | |
isIdentifier() { | |
return this.ctx.IDENTIFIER() && !this.ctx.DOT(); | |
} | |
processIdentifier() { | |
const e = new c.VariableUsageProcessor().getVariableUsage(this.ctx.IDENTIFIER(), this.scope, this.di); | |
if (e.declaration) { | |
const t = e.declaration.type.containsQualifier(this.di.builtin.qualifiers.get("const")); | |
return new T.ExpressionResult(e.declaration.type.declaration, e.declaration.type.array, t, null, !1, e.declaration.isColorVariable()); | |
} | |
return null; | |
} | |
isParenthesizedExpression() { | |
return !!this.ctx.LRB(); | |
} | |
processParenthesizedExpression() { | |
return new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
} | |
isModuloExpression() { | |
return !!this.ctx.OP_MOD(); | |
} | |
processModuloExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
return !(e && t && e instanceof T.ExpressionResult && t instanceof T.ExpressionResult && e.type && t.type) || | |
e.array.isArray() || | |
t.array.isArray() || | |
e.type.typeBase !== t.type.typeBase || | |
(e.type.typeBase !== o.TypeBase.INT && e.type.typeBase !== o.TypeBase.UINT) || | |
(!e.type.isScalar() && !t.type.isScalar() && e.type.width !== t.type.width) | |
? null | |
: e.type.isVector() | |
? new T.ExpressionResult(e.type, e.array, e.constant && t.constant) | |
: new T.ExpressionResult(t.type, t.array, e.constant && t.constant); | |
} | |
isArithmeticBinaryExpression() { | |
return !(2 !== this.ctx.expression().length || (!this.ctx.OP_ADD() && !this.ctx.OP_SUB() && !this.ctx.OP_DIV() && !this.ctx.OP_MUL())); | |
} | |
processArithmeticBinaryExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
if ( | |
e && | |
t && | |
e instanceof T.ExpressionResult && | |
t instanceof T.ExpressionResult && | |
e.type && | |
t.type && | |
(e.type.typeBase === o.TypeBase.INT || e.type.typeBase === o.TypeBase.UINT || e.type.typeBase === o.TypeBase.FLOAT) && | |
(t.type.typeBase === o.TypeBase.INT || t.type.typeBase === o.TypeBase.UINT || t.type.typeBase === o.TypeBase.FLOAT) && | |
((e.type.typeBase === o.TypeBase.FLOAT && t.type.typeBase === o.TypeBase.FLOAT) || e.type.typeBase === t.type.typeBase) && | |
!e.array.isArray() && | |
!t.array.isArray() | |
) { | |
if (e.type.isScalar() && t.type.isScalar()) return e; | |
if (e.type.isScalar() && !t.type.isScalar()) return t; | |
if (!e.type.isScalar() && t.type.isScalar()) return e; | |
if (e.type.isVector() && t.type.isVector() && e.type.width === t.type.width) return e; | |
if (!this.ctx.OP_MUL() && e.type.isMatrix() && t.type.isMatrix() && e.type.width === t.type.width && e.type.height === t.type.height) return e; | |
if (this.ctx.OP_MUL() && ((e.type.isMatrix() && !t.type.isScalar()) || (!e.type.isScalar() && t.type.isMatrix())) && e.type.width === (t.type.isMatrix() ? t.type.height : t.type.width)) { | |
if (e.type.isVector()) { | |
const r = this.di.builtin.types.get(`vec${t.type.width}`); | |
return new T.ExpressionResult(r, new s.ArrayUsage(), e.constant && t.constant); | |
} | |
if (t.type.isVector()) { | |
const r = this.di.builtin.types.get(`vec${e.type.height}`); | |
return new T.ExpressionResult(r, new s.ArrayUsage(), e.constant && t.constant); | |
} | |
{ | |
const r = this.di.builtin.types.get(`mat${t.type.width}x${e.type.height}`); | |
return new T.ExpressionResult(r, new s.ArrayUsage(), e.constant && t.constant); | |
} | |
} | |
} | |
return null; | |
} | |
isArithmeticUnaryExpression() { | |
return !(1 !== this.ctx.expression().length || (!this.ctx.OP_INC() && !this.ctx.OP_DEC() && !this.ctx.OP_SUB() && !this.ctx.OP_ADD())); | |
} | |
processArithmeticUnaryExpression() { | |
this.di.getRegions().unaryExpressionRegions.push(n.Helper.getIntervalFromParserRule(this.ctx, this.di)); | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
return e && e instanceof T.ExpressionResult && !e.array.isArray() && e.type && (e.type.typeBase === o.TypeBase.INT || e.type.typeBase === o.TypeBase.UINT || e.type.typeBase === o.TypeBase.FLOAT) ? e : null; | |
} | |
isArrayExpression() { | |
return !!this.ctx.array_subscript(); | |
} | |
processArrayExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
if ((new O().processExpression(this.ctx.array_subscript().expression(), this.scope, this.di), e && e instanceof T.ExpressionResult && e.type)) { | |
if (e.array.isArray()) return new T.ExpressionResult(e.type, new s.ArrayUsage(), e.constant); | |
if (e.type.isVector()) return new T.ExpressionResult(this.typeBaseToType(e.type.typeBase), new s.ArrayUsage(), e.constant); | |
if (e.type.isMatrix()) return new T.ExpressionResult(this.di.builtin.types.get(`vec${e.type.height}`), new s.ArrayUsage(), e.constant); | |
} | |
return null; | |
} | |
isLengthExpression() { | |
return this.ctx.DOT() && !!this.ctx.function_call(); | |
} | |
processLengthExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
return this.processCompletionRegion(e), e && e instanceof T.ExpressionResult && e.array.isArray() ? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.INT), new s.ArrayUsage(), !0, e.array.arraySize) : null; | |
} | |
isFunctionExpression() { | |
return this.ctx.function_call() && !this.ctx.DOT(); | |
} | |
processFunctionExpression() { | |
var e, t, r; | |
const i = this.getParameters(), | |
s = this.ctx.function_call().IDENTIFIER() ? this.ctx.function_call().IDENTIFIER() : this.ctx.function_call().TYPE(), | |
o = s.text, | |
l = n.Helper.getIntervalFromParserRule(this.ctx.function_call(), this.di), | |
c = n.Helper.getIntervalFromTerminalNode(s, this.di), | |
u = this.getLogicalFunction(o, c, i); | |
if ((this.di.getRegions().semanticRegions.push(new x.SemanticRegion(s.symbol, x.SemanticType.FUNCTION)), this.addSignatureRegion(o, i), u)) { | |
const n = u.getDeclaration(), | |
s = this.di.getVisitor().getCurrentFunction(), | |
h = new a.FunctionCall(o, c, this.scope, l, u, n.builtIn, s); | |
null == s || s.outgoingCalls.push(h), u.calls.push(h), this.scope.functionCalls.push(h); | |
for (let e = 0; e < i.length; e++) { | |
const t = i[e]; | |
if (t && t.constructorCall && (u.prototypes.some((t) => t.parameters[e].isColorVariable()) || u.definitions.some((t) => t.parameters[e].isColorVariable()))) { | |
const e = new _.ColorRegion(t.constructorCall, t.constructorParameters); | |
this.di.getRegions().colorRegions.push(e); | |
} | |
} | |
const p = | |
null === (r = null === (t = null === (e = this.ctx.function_call()) || void 0 === e ? void 0 : e.function_call_parameter_list()) || void 0 === t ? void 0 : t.expression_list()) || void 0 === r ? void 0 : r.expression(); | |
if (p) for (const e of p) h.parametersStartOffset.push(e.start.startIndex); | |
if (n.returnType.declaration) { | |
n.ctor && n.returnType.declaration.ctorCalls.push(h); | |
const e = n.builtIn && "dFdx" !== o && "dFdy" !== o && "fwidth" !== o && i.every((e) => e && e.constant), | |
t = this.isColorConstructor(n, i), | |
r = t ? h : null, | |
s = t ? i.map((e) => e.value) : null; | |
return new T.ExpressionResult(n.returnType.declaration, n.returnType.array, e, null, !1, !1, r, s); | |
} | |
return null; | |
} | |
return null; | |
} | |
addSignatureRegion(e, t) { | |
var r, n; | |
const i = this.ctx.function_call(), | |
s = new m.Interval(i.LRB().symbol.startIndex + 1, i.RRB().symbol.stopIndex, this.di), | |
o = new S.SignatureRegion(e, s); | |
for (let e = 0; e < (null === (n = null === (r = i.function_call_parameter_list()) || void 0 === r ? void 0 : r.expression_list()) || void 0 === n ? void 0 : n.COMMA().length) + 1; e++) { | |
const r = t.length > e ? t[e] : null, | |
n = this.computeParameterInterval(e), | |
i = new v.SignatureParameterRegion(null == r ? void 0 : r.type, null == r ? void 0 : r.array, n); | |
o.parameters.push(i); | |
} | |
if (!i.function_call_parameter_list() || !i.function_call_parameter_list().expression_list()) { | |
const e = i.LRB().symbol.stopIndex, | |
t = i.RRB().symbol.startIndex, | |
r = new m.Interval(e, t, this.di), | |
n = new v.SignatureParameterRegion(null, null, r); | |
o.parameters.push(n); | |
} | |
this.di.getRegions().signatureRegions.push(o); | |
} | |
computeParameterInterval(e) { | |
const t = this.ctx.function_call(), | |
r = t.function_call_parameter_list().expression_list(), | |
n = 0 === e ? t.LRB().symbol.startIndex : r.COMMA()[e - 1].symbol.startIndex, | |
i = e >= r.COMMA().length ? t.RRB().symbol.startIndex : r.COMMA()[e].symbol.startIndex; | |
return new m.Interval(n, i, this.di); | |
} | |
isColorConstructor(e, t) { | |
const r = e.ctor && t.every((e) => e && e.numberLiteral), | |
n = e.name === g.Constants.VEC3 && (1 === t.length || 3 === t.length), | |
i = e.name === g.Constants.VEC4 && (1 === t.length || 4 === t.length); | |
return r && (n || i); | |
} | |
getParameters() { | |
var e; | |
const t = new Array(); | |
if (null === (e = this.ctx.function_call().function_call_parameter_list()) || void 0 === e ? void 0 : e.expression_list()) | |
for (const e of this.ctx.function_call().function_call_parameter_list().expression_list().expression()) { | |
const r = new O().processExpression(e, this.scope, this.di); | |
if (r && r instanceof T.ExpressionResult) t.push(r); | |
else if (r && r instanceof Array) for (const e of r) t.push(e); | |
else t.push(null); | |
} | |
return t; | |
} | |
getLogicalFunction(e, t, r) { | |
if (r.some((e) => !e || !e.type)) return null; | |
const i = l.FunctionProcessor.searchFunction(e, t, r, this.scope, this.di); | |
if (i) return i; | |
const s = n.Helper.getArraySizeFromArraySubscript(this.ctx.function_call().array_subscript(), this.scope, this.di); | |
if (s.isArray()) { | |
const n = d.TypeDeclarationProcessor.searchTypeDeclaration(e, t, this.scope, this.di); | |
if (n && r.every((e) => e && e.type === n) && r.length) return this.createLogicalFunction(e, t, n, s.specifyArraySize(r.length), r); | |
} else { | |
const n = d.TypeDeclarationProcessor.searchTypeDeclaration(e, t, this.scope, this.di); | |
if (this.isMatrixCtor(n, r)) return this.createLogicalFunction(e, t, n, s, r); | |
} | |
return null; | |
} | |
createLogicalFunction(e, t, r, n, i) { | |
const o = new h.TypeUsage(e, t, t, null, r, n), | |
a = new f.FunctionDeclaration(e, r.nameInterval, null, o, r.builtin, !0, r.interval, null); | |
for (let e = 0; e < i.length; e++) { | |
const t = new h.TypeUsage(i[e].type.name, null, null, null, i[e].type, new s.ArrayUsage()), | |
n = new y.VariableDeclaration(`v${e}`, null, null, r.builtin, null, t, !0, !1); | |
a.parameters.push(n); | |
} | |
const l = new p.LogicalFunction(); | |
return (a.logicalFunction = l), l.prototypes.push(a), this.di.getRootScope().functions.push(l), l; | |
} | |
isMatrixCtor(e, t) { | |
if (!e || !e.isMatrix()) return !1; | |
if (1 === t.length && (t[0].type.isScalar() || t[0].type.isMatrix())) return !0; | |
const r = e.width * e.height; | |
let n = 0; | |
for (const e of t) { | |
if (e.type.typeCategory !== u.TypeCategory.TRANSPARENT || e.type.isMatrix()) return !1; | |
n += e.type.width * e.type.height; | |
} | |
return r === n; | |
} | |
isMemberExpression() { | |
return this.ctx.DOT() && !!this.ctx.IDENTIFIER(); | |
} | |
processMemberExpression() { | |
var e, t; | |
const r = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
if ((this.processCompletionRegion(r), r && r instanceof T.ExpressionResult && !r.array.isArray())) { | |
const o = this.ctx.IDENTIFIER().text, | |
a = null === (e = r.type) || void 0 === e ? void 0 : e.members.find((e) => e.name === o); | |
if (a) { | |
const e = n.Helper.getIntervalFromTerminalNode(this.ctx.IDENTIFIER(), this.di), | |
t = new i.VariableUsage(o, this.scope, e, a); | |
return this.scope.variableUsages.push(t), this.addSemanticToken(a, this.ctx.IDENTIFIER().symbol), a.usages.push(t), new T.ExpressionResult(a.type.declaration, a.type.array, r.constant); | |
} | |
if ((null === (t = r.type) || void 0 === t ? void 0 : t.isVector()) && this.isSwizzle(o)) { | |
if (1 === o.length) return new T.ExpressionResult(this.typeBaseToType(r.type.typeBase), new s.ArrayUsage(), r.constant); | |
if (o.length <= 4) { | |
const e = n.Helper.getVectorTypeName(r.type.typeBase, o.length); | |
return new T.ExpressionResult(this.di.builtin.types.get(e), new s.ArrayUsage(), r.constant); | |
} | |
} | |
} | |
return null; | |
} | |
addSemanticToken(e, t) { | |
if (e.name) { | |
const e = new x.SemanticRegion(t, x.SemanticType.VARIABLE); | |
this.di.getRegions().semanticRegions.push(e); | |
} | |
} | |
isComplementExpression() { | |
return !!this.ctx.OP_BIT_UNARY(); | |
} | |
processComplementExpression() { | |
this.di.getRegions().unaryExpressionRegions.push(n.Helper.getIntervalFromParserRule(this.ctx, this.di)); | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
return e && e instanceof T.ExpressionResult && e.type && (e.type.typeBase === o.TypeBase.INT || e.type.typeBase === o.TypeBase.UINT) ? e : null; | |
} | |
isBitExpression() { | |
return !!this.ctx.OP_BIT_AND() || !!this.ctx.OP_BIT_OR() || !!this.ctx.OP_BIT_XOR(); | |
} | |
processBitExpression() { | |
var e; | |
const t = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
r = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
if ( | |
t && | |
t instanceof T.ExpressionResult && | |
r && | |
r instanceof T.ExpressionResult && | |
t.type && | |
r.type && | |
t.type.typeBase === r.type.typeBase && | |
!t.array.isArray() && | |
!r.array.isArray() && | |
(t.type.typeBase === o.TypeBase.INT || t.type.typeBase === o.TypeBase.UINT) | |
) { | |
if (!t.type.isVector() || !r.type.isVector()) { | |
const n = (null === (e = t.type) || void 0 === e ? void 0 : e.isVector()) ? t.type : r.type; | |
return new T.ExpressionResult(n, new s.ArrayUsage(), t.constant && r.constant); | |
} | |
if (t.type.width === r.type.width) return new T.ExpressionResult(t.type, new s.ArrayUsage(), t.constant && r.constant); | |
} | |
return null; | |
} | |
isLogicalBinaryExpression() { | |
return !!this.ctx.OP_LOGICAL_AND() || !!this.ctx.OP_LOGICAL_OR() || !!this.ctx.OP_LOGICAL_XOR(); | |
} | |
processLogicalBinaryExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
return e && t && e instanceof T.ExpressionResult && t instanceof T.ExpressionResult && e.type && t.type && e.type.name === g.Constants.BOOL && e.type.name === t.type.name && !e.array.isArray() && !t.array.isArray() | |
? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.BOOL), new s.ArrayUsage(), e.constant && t.constant) | |
: null; | |
} | |
isLogicalUnaryExpression() { | |
return !!this.ctx.OP_LOGICAL_UNARY(); | |
} | |
processLogicalUnaryExpression() { | |
this.di.getRegions().unaryExpressionRegions.push(n.Helper.getIntervalFromParserRule(this.ctx, this.di)); | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
return e && e instanceof T.ExpressionResult && e.type && e.type.name === g.Constants.BOOL && !e.array.isArray() ? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.BOOL), new s.ArrayUsage(), e.constant) : null; | |
} | |
isRelationalExpression() { | |
return !!this.ctx.OP_RELATIONAL(); | |
} | |
processRelationalExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
return e && | |
t && | |
e instanceof T.ExpressionResult && | |
t instanceof T.ExpressionResult && | |
e.type && | |
t.type && | |
e.type.name === t.type.name && | |
!e.array.isArray() && | |
!t.array.isArray() && | |
e.type.isScalar() && | |
(e.type.typeBase === o.TypeBase.INT || e.type.typeBase === o.TypeBase.UINT || e.type.typeBase === o.TypeBase.FLOAT) | |
? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.BOOL), new s.ArrayUsage(), e.constant && t.constant) | |
: null; | |
} | |
isEqualityExpression() { | |
return !!this.ctx.OP_EQUALITY(); | |
} | |
processEqualityExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
return e && t && e instanceof T.ExpressionResult && t instanceof T.ExpressionResult ? new T.ExpressionResult(this.di.builtin.types.get(g.Constants.BOOL), new s.ArrayUsage(), e.constant && t.constant) : null; | |
} | |
isShiftExpression() { | |
return !!this.ctx.OP_SHIFT(); | |
} | |
processShiftExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
return !(e && t && e instanceof T.ExpressionResult && t instanceof T.ExpressionResult && e.type && t.type) || | |
e.array.isArray() || | |
t.array.isArray() || | |
(e.type.typeBase !== o.TypeBase.INT && e.type.typeBase !== o.TypeBase.UINT) || | |
(t.type.typeBase !== o.TypeBase.INT && t.type.typeBase !== o.TypeBase.UINT) || | |
!((e.type.isScalar() && t.type.isScalar()) || (e.type.isVector() && (t.type.isScalar() || e.type.width === t.type.width))) | |
? null | |
: new T.ExpressionResult(e.type, new s.ArrayUsage(), e.constant && t.constant); | |
} | |
isTernaryExpression() { | |
return !!this.ctx.QUESTION(); | |
} | |
processTernaryExpression() { | |
new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
const e = this.ctx.expression_list()[0], | |
t = this.ctx.expression_list()[1]; | |
for (const e of t.expression()) new O().processExpression(e, this.scope, this.di); | |
const r = new Array(); | |
for (const t of e.expression()) { | |
const e = new O().processExpression(t, this.scope, this.di); | |
if (e) | |
if (e instanceof T.ExpressionResult) r.push(e); | |
else for (const t of e) r.push(t); | |
} | |
return r; | |
} | |
isAssignmentOrModifyExpression() { | |
return !!this.ctx.OP_ASSIGN() || !!this.ctx.OP_MODIFY(); | |
} | |
processAssignmentOrModifyExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di), | |
t = new O().processExpression(this.ctx.expression()[1], this.scope, this.di); | |
if (e instanceof T.ExpressionResult && t instanceof T.ExpressionResult && e.colorVariable && t.constructorCall) { | |
const e = new _.ColorRegion(t.constructorCall, t.constructorParameters); | |
this.di.getRegions().colorRegions.push(e); | |
} | |
return e; | |
} | |
isCompletionExpression() { | |
return !!this.ctx.DOT(); | |
} | |
processCompletionExpression() { | |
const e = new O().processExpression(this.ctx.expression()[0], this.scope, this.di); | |
return this.processCompletionRegion(e), null; | |
} | |
processCompletionRegion(e) { | |
var t, r, i; | |
if (e && e instanceof T.ExpressionResult && (e.array.isArray() || (null === (t = e.type) || void 0 === t ? void 0 : t.isVector()) || (null === (r = e.type) || void 0 === r ? void 0 : r.typeCategory) === u.TypeCategory.CUSTOM)) { | |
const t = n.Helper.getIntervalFromParserRule(this.ctx.expression()[0], this.di), | |
r = new h.TypeUsage(e.type.name, t, null, this.scope, e.type, e.array), | |
s = this.ctx.DOT().symbol.stopIndex + 1, | |
o = this.ctx.IDENTIFIER() ? this.ctx.IDENTIFIER().symbol.stopIndex + 1 : s, | |
a = new m.Interval(s, o, this.di), | |
l = new E.CompletionRegion(r, a, (null === (i = this.ctx.IDENTIFIER()) || void 0 === i ? void 0 : i.text) || ""); | |
this.di.getRegions().completionRegions.push(l); | |
} | |
} | |
typeBaseToType(e) { | |
const t = n.Helper.getScalarTypeName(e); | |
return this.di.builtin.types.get(t); | |
} | |
isSwizzle(e) { | |
return !(e.length < 1 || e.length > 4) && (this.allCharactersFromSet(e, g.Constants.rgba) || this.allCharactersFromSet(e, g.Constants.xyzw) || this.allCharactersFromSet(e, g.Constants.stpq)); | |
} | |
allCharactersFromSet(e, t) { | |
for (const r of e) if (!t.includes(r)) return !1; | |
return !0; | |
} | |
} | |
t.ExpressionProcessor = O; | |
}, | |
3150: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.ExpressionResult = void 0); | |
const n = r(5668); | |
t.ExpressionResult = class { | |
constructor(e, t = new n.ArrayUsage(), r = !1, i = null, s = !1, o = !1, a = null, l = new Array()) { | |
(this.type = e), (this.array = t), (this.constant = r), (this.value = i), (this.numberLiteral = s), (this.colorVariable = o), (this.constructorCall = a), (this.constructorParameters = l); | |
} | |
}; | |
}, | |
3361: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.FunctionProcessor = void 0); | |
const n = r(6491), | |
i = r(279), | |
s = r(7539), | |
o = r(7e3), | |
a = r(2775), | |
l = r(8644); | |
t.FunctionProcessor = class { | |
initialize(e, t, r) { | |
(this.fhc = e), (this.di = r), (this.scope = t); | |
} | |
static searchFunction(e, t, r, n, i) { | |
for (var s; n; ) { | |
const i = n.functions.find((n) => this.areFunctionsMatch(n, e, t, r)); | |
if (i) return i; | |
if (this.anyTypeOrVariable(e, t, n)) return null; | |
n = n.parent; | |
} | |
return null !== (s = i.builtin.functions.find((n) => this.areFunctionsMatch(n, e, t, r))) && void 0 !== s ? s : null; | |
} | |
static areFunctionsMatch(e, t, r, i) { | |
const s = e.getDeclaration(); | |
return s.name === t && s.parameters.length === i.length && this.areParametersMatch(s, i) && n.Helper.isALowerThanB(s.interval, r); | |
} | |
static areParametersMatch(e, t) { | |
var r; | |
for (let n = 0; n < t.length; n++) if ((null === (r = e.parameters[n].type) || void 0 === r ? void 0 : r.declaration) !== t[n].type) return !1; | |
return !0; | |
} | |
static anyTypeOrVariable(e, t, r) { | |
return r.typeDeclarations.some((r) => r.name === e && n.Helper.isALowerThanB(r.interval, t)) || r.variableDeclarations.some((r) => r.name === e && n.Helper.isALowerThanB(r.nameInterval, t)); | |
} | |
getFunctionPrototype(e, t, r) { | |
this.initialize(e.function_header(), t, r); | |
const s = n.Helper.getIntervalFromParserRule(e, this.di), | |
a = n.Helper.getIntervalFromTerminalNode(this.fhc.IDENTIFIER(), this.di), | |
c = new o.TypeUsageProcessor().getReturnType(this.fhc.type_usage(), this.scope.parent, r), | |
u = this.fhc.IDENTIFIER().text, | |
h = new i.FunctionDeclaration(u, a, this.scope.parent, c, !1, !1, s, this.scope); | |
return ( | |
this.addParameters(h, !0), | |
this.getLogicalFunction(h).prototypes.push(h), | |
this.di.getRootScope().functionPrototypes.push(h), | |
this.di.getRegions().semanticRegions.push(new l.SemanticRegion(this.fhc.IDENTIFIER().symbol, l.SemanticType.FUNCTION, [l.SemanticModifier.DECLARATION])), | |
h | |
); | |
} | |
getFunctionDefinition(e, t, r) { | |
this.initialize(e.function_header(), t, r); | |
const s = n.Helper.getIntervalFromParserRule(e, this.di), | |
a = n.Helper.getIntervalFromTerminalNode(this.fhc.IDENTIFIER(), this.di), | |
c = new o.TypeUsageProcessor().getReturnType(this.fhc.type_usage(), this.scope.parent, r), | |
u = this.fhc.IDENTIFIER().text, | |
h = new i.FunctionDeclaration(u, a, this.scope.parent, c, !1, !1, s, this.scope); | |
return ( | |
this.addParameters(h, !1), | |
this.getLogicalFunction(h).definitions.push(h), | |
this.di.getRootScope().functionDefinitions.push(h), | |
this.di.getRegions().semanticRegions.push(new l.SemanticRegion(this.fhc.IDENTIFIER().symbol, l.SemanticType.FUNCTION, [l.SemanticModifier.DEFINITION])), | |
h | |
); | |
} | |
getLogicalFunction(e) { | |
let t = this.di.getRootScope().functions.find((t) => t.connects(e)); | |
return t || ((t = new s.LogicalFunction()), this.di.getRootScope().functions.push(t)), (e.logicalFunction = t), t; | |
} | |
addParameters(e, t) { | |
const r = this.fhc.function_parameter_list(); | |
if (r && r.single_variable_declaration()) | |
for (const n of r.single_variable_declaration()) { | |
const r = new a.VariableDeclarationProcessor().getParameterDeclaration(n, t, this.scope, this.di); | |
e.parameters.push(r); | |
} | |
} | |
}; | |
}, | |
6491: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.Helper = void 0); | |
const n = r(4196), | |
i = r(5668), | |
s = r(2333), | |
o = r(3636), | |
a = r(2212), | |
l = r(1905), | |
c = r(9496), | |
u = r(2422), | |
h = r(9391), | |
p = r(279), | |
d = r(3150), | |
m = r(1024), | |
f = r(9570); | |
class y { | |
static getArraySizeFromArraySubscript(e, t, r) { | |
if (!e.length) return new i.ArrayUsage(); | |
const n = new s.ExpressionProcessor().processExpression(e[0].expression(), t, r); | |
for (let n = 1; n < e.length; n++) new s.ExpressionProcessor().processExpression(e[n].expression(), t, r); | |
const o = e[0].LSB(), | |
a = e[e.length - 1].RSB(), | |
l = n && n instanceof d.ExpressionResult && n.value ? n.value : 0; | |
return new i.ArrayUsage(l, this.getIntervalFromTerminalNodes(o, a, r), e.length > 1); | |
} | |
static getArraySizeFromIdentifierOptarray(e, t, r) { | |
return e ? this.getArraySizeFromArraySubscript(e.array_subscript(), t, r) : new i.ArrayUsage(); | |
} | |
static getArraySizeFromIdentifierOptarrayOptassignment(e, t, r) { | |
return e ? this.getArraySizeFromIdentifierOptarray(e.identifier_optarray(), t, r) : new i.ArrayUsage(); | |
} | |
static createTypeDeclaration(e, t, r, n, i) { | |
return new a.TypeDeclaration(e, null, null, !0, null, t, r, n, i); | |
} | |
static createTypeUsage(e, t, r) { | |
return new l.TypeUsage(e, null, null, null, t, r, !1); | |
} | |
static createVariableDeclaration(e, t, r, n, i, s = u.ShaderStage.DEFAULT, o = "") { | |
return new h.VariableDeclaration(e, null, null, !0, null, t, r, n, i, s, o); | |
} | |
static createFunctionDeclaration(e, t, r, n = u.ShaderStage.DEFAULT, i = "") { | |
return new p.FunctionDeclaration(e, null, null, t, !0, r, null, null, n, i); | |
} | |
static getIntervalFromStatement(e, t) { | |
return (null == e ? void 0 : e.compound_statement()) ? this.getIntervalFromCompoundStatement(e.compound_statement(), t) : this.getIntervalFromParserRule(e, t); | |
} | |
static getIntervalFromCompoundStatement(e, t) { | |
return e ? new n.Interval(e.start.stopIndex + 1, e.stop.startIndex, t) : null; | |
} | |
static getIntervalFromParserRule(e, t) { | |
return e ? new n.Interval(e.start.startIndex, e.stop.stopIndex + 1, t) : null; | |
} | |
static getIntervalFromParserRules(e, t, r) { | |
return new n.Interval(e.start.startIndex, t.stop.stopIndex + 1, r); | |
} | |
static getIntervalFromTerminalNode(e, t) { | |
return e ? new n.Interval(e.symbol.startIndex, e.symbol.stopIndex + 1, t) : null; | |
} | |
static getIntervalFromTerminalNodes(e, t, r) { | |
return new n.Interval(e.symbol.startIndex, t.symbol.stopIndex + 1, r); | |
} | |
static addFoldingRegionFromTokens(e, t, r, n = -2) { | |
this.addFoldingRegion(e, t.line - 1, r.line + n); | |
} | |
static addFoldingRegionFromComment(e, t, r) { | |
t === r ? this.addFoldingRegion(e, t.line - 1, e.getLineCount() - 1, c.FoldingRangeKind.Comment) : this.addFoldingRegion(e, t.line - 1, r.line - 1, c.FoldingRangeKind.Comment); | |
} | |
static addFoldingRegion(e, t, r, n) { | |
const i = t - e.getInjectionLineCount(), | |
s = r - e.getInjectionLineCount(); | |
i >= 0 && e.getRegions().foldingRegions.push(new f.FoldingRegion(i, s, n)); | |
} | |
static isALowerThanB(e, t) { | |
return !e || !t || e.stopIndex < t.startIndex; | |
} | |
static isALowerThanOffset(e, t) { | |
return e && e.stopIndex < t; | |
} | |
static isPositionInScope(e, t, r) { | |
var n; | |
return e && ((null === (n = r.intervalToRange(e.interval)) || void 0 === n ? void 0 : n.contains(t)) || e.isGlobal()); | |
} | |
static getTypeName(e, t) { | |
return 1 === t ? this.getScalarTypeName(e) : this.getVectorTypeName(e, t); | |
} | |
static getVectorTypeName(e, t) { | |
return `${y.typeBaseToPrefix(e)}vec${t}`; | |
} | |
static getScalarTypeName(e) { | |
switch (e) { | |
case o.TypeBase.BOOL: | |
return m.Constants.BOOL; | |
case o.TypeBase.FLOAT: | |
return m.Constants.FLOAT; | |
case o.TypeBase.INT: | |
return m.Constants.INT; | |
case o.TypeBase.UINT: | |
return m.Constants.UINT; | |
default: | |
return null; | |
} | |
} | |
static typeBaseToPrefix(e) { | |
switch (e) { | |
case o.TypeBase.BOOL: | |
return "b"; | |
case o.TypeBase.FLOAT: | |
return m.Constants.EMPTY; | |
case o.TypeBase.INT: | |
return "i"; | |
case o.TypeBase.UINT: | |
return "u"; | |
default: | |
return null; | |
} | |
} | |
static isInCorrectStage(e, t) { | |
return e === u.ShaderStage.DEFAULT || e === t.getShaderStage(); | |
} | |
} | |
t.Helper = y; | |
}, | |
6188: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypeDeclarationProcessor = void 0); | |
const n = r(2212), | |
i = r(6491), | |
s = r(3636), | |
o = r(1274), | |
a = r(2238), | |
l = r(4196), | |
c = r(2775), | |
u = r(279), | |
h = r(1905), | |
p = r(5668), | |
d = r(7539), | |
m = r(1024), | |
f = r(8644); | |
t.TypeDeclarationProcessor = class { | |
initialize(e, t) { | |
(this.di = t), (this.scope = e); | |
} | |
static searchTypeDeclaration(e, t, r, n) { | |
for (var s; r; ) { | |
const n = r.typeDeclarations.find((r) => r.name === e && i.Helper.isALowerThanB(r.interval, t)); | |
if (n) return n; | |
if (this.anyVariableOrFunction(e, t, r)) return null; | |
r = r.parent; | |
} | |
return null !== (s = n.builtin.types.get(e)) && void 0 !== s ? s : null; | |
} | |
static anyVariableOrFunction(e, t, r) { | |
return ( | |
r.variableDeclarations.some((r) => r.name === e && i.Helper.isALowerThanB(r.declarationInterval, t)) || | |
r.functionPrototypes.some((r) => r.name === e && i.Helper.isALowerThanB(r.interval, t)) || | |
r.functionDefinitions.some((r) => r.name === e && i.Helper.isALowerThanB(r.interval, t)) | |
); | |
} | |
getInterfaceBlockDeclaration(e, t, r) { | |
this.initialize(t, r); | |
const a = e.IDENTIFIER() ? e.IDENTIFIER().text : null, | |
u = i.Helper.getIntervalFromTerminalNode(e.IDENTIFIER(), this.di), | |
h = new l.Interval(e.start.startIndex, e.RCB().symbol.stopIndex + 1, this.di), | |
p = s.TypeBase.NONE, | |
d = o.TypeCategory.CUSTOM, | |
y = new n.TypeDeclaration(a, u, t, !1, h, m.Constants.INVALID, m.Constants.INVALID, p, d, !0); | |
if ( | |
(r.getRegions().typeDeclarationRegions.push(new l.Interval(e.start.startIndex, e.stop.stopIndex, r)), | |
t.typeDeclarations.push(y), | |
a && this.di.getRegions().semanticRegions.push(new f.SemanticRegion(e.IDENTIFIER().symbol, f.SemanticType.USER_TYPE)), | |
e.identifier_optarray()) | |
) | |
this.createInnerScope(e), this.addMembers(y, e.variable_declaration()), (this.scope = this.scope.parent); | |
else { | |
this.di.getRegions().scopelessInterfaceBlockRegions.push(new l.Interval(e.LCB().symbol.stopIndex + 1, e.RCB().symbol.startIndex, this.di)); | |
for (const t of e.variable_declaration()) new c.VariableDeclarationProcessor().getDeclarations(t, this.scope, this.di).forEach((e) => y.interfaceMembers.push(e)); | |
} | |
return y; | |
} | |
getTypeDeclaration(e, t, r, a, c, u) { | |
if ((this.initialize(t, r), i.Helper.addFoldingRegionFromTokens(this.di, e.KW_STRUCT().symbol, e.RCB().symbol), 0 !== a)) return this.td; | |
const h = e.IDENTIFIER() ? e.IDENTIFIER().text : null, | |
p = i.Helper.getIntervalFromTerminalNode(e.IDENTIFIER(), this.di), | |
d = i.Helper.getIntervalFromParserRule(e, this.di), | |
y = s.TypeBase.NONE, | |
g = o.TypeCategory.CUSTOM, | |
_ = new n.TypeDeclaration(h, p, t, !1, d, m.Constants.INVALID, m.Constants.INVALID, y, g, !1, u || c); | |
return ( | |
this.di.getRegions().typeDeclarationRegions.push(new l.Interval(e.start.startIndex, e.stop.stopIndex, this.di)), | |
c ? this.di.getRootScope().typeDeclarations.push(_) : t.typeDeclarations.push(_), | |
this.createInnerScope(e), | |
this.addMembers(_, e.variable_declaration()), | |
(this.scope = this.scope.parent), | |
h && (this.createConstructor(_), this.di.getRegions().semanticRegions.push(new f.SemanticRegion(e.IDENTIFIER().symbol, f.SemanticType.USER_TYPE))), | |
0 === a && (this.td = _), | |
_ | |
); | |
} | |
createConstructor(e) { | |
const t = new h.TypeUsage(e.name, e.nameInterval, e.nameInterval, this.scope, e, new p.ArrayUsage()), | |
r = new u.FunctionDeclaration(e.name, e.nameInterval, this.scope, t, !1, !0, e.interval, null); | |
for (const t of e.members) r.parameters.push(t); | |
const n = new d.LogicalFunction(); | |
n.prototypes.push(r), (r.logicalFunction = n), this.scope.functions.push(n), this.scope.functionPrototypes.push(r); | |
} | |
createInnerScope(e) { | |
const t = new l.Interval(e.LCB().symbol.stopIndex + 1, e.RCB().symbol.startIndex, this.di), | |
r = new a.Scope(t, this.scope); | |
this.scope.children.push(r), (this.scope = r); | |
} | |
addMembers(e, t) { | |
for (const r of t) new c.VariableDeclarationProcessor().getDeclarations(r, this.scope, this.di).forEach((t) => e.members.push(t)); | |
} | |
}; | |
}, | |
7e3: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.TypeUsageProcessor = void 0); | |
const n = r(1905), | |
i = r(6491), | |
s = r(6188), | |
o = r(1480), | |
a = r(5668), | |
l = r(8644); | |
t.TypeUsageProcessor = class { | |
initialize(e, t, r) { | |
(this.di = t), (this.scope = e), (this.tuc = r); | |
} | |
getReturnType(e, t, r) { | |
return this.initialize(t, r, e), this.getType(0, new a.ArrayUsage(), !1, !0); | |
} | |
getParameterType(e, t, r, n) { | |
this.initialize(r, n, e); | |
const i = this.getType(0, t, !0); | |
return this.addImplicitParameterQualifiers(i), i; | |
} | |
addImplicitParameterQualifiers(e) { | |
e.qualifiers.some((e) => e.isParameterQualifier()) || e.implicitQualifiers.push(this.di.builtin.qualifiers.get("in")); | |
} | |
getInterfaceBlockType(e, t, r) { | |
(this.di = r), (this.scope = t); | |
const o = e.identifier_optarray() ? i.Helper.getArraySizeFromIdentifierOptarray(e.identifier_optarray(), this.scope, this.di) : null, | |
a = new s.TypeDeclarationProcessor().getInterfaceBlockDeclaration(e, this.scope, this.di), | |
l = new n.TypeUsage(a.name, a.interval, null, this.scope, a, o, !0); | |
return this.addQualifiers(l, e.qualifier()), l; | |
} | |
getMemberType(e, t, r, n, i) { | |
return this.initialize(r, n, e), this.getType(i, t); | |
} | |
getType(e, t, r = !1, n = !1) { | |
return this.tuc.type() ? this.getRealType(e, t) : this.getStructType(e, t, r, n); | |
} | |
getRealType(e, t) { | |
const r = this.tuc.type().text, | |
o = i.Helper.getIntervalFromParserRule(this.tuc.type(), this.di), | |
a = i.Helper.getIntervalFromParserRule(this.tuc, this.di), | |
c = i.Helper.getArraySizeFromArraySubscript(this.tuc.array_subscript(), this.scope, this.di).mergeArrays(t), | |
u = s.TypeDeclarationProcessor.searchTypeDeclaration(r, o, this.scope, this.di), | |
h = new n.TypeUsage(r, a, o, this.scope, u, c), | |
p = this.getToken(this.tuc.type()); | |
if ((!u || (u && !u.builtin)) && p) { | |
const e = (null == h ? void 0 : h.name.startsWith("gl_")) ? l.SemanticType.BUILTIN_TYPE : l.SemanticType.USER_TYPE; | |
this.di.getRegions().semanticRegions.push(new l.SemanticRegion(p, e)); | |
} | |
return this.addQualifiers(h, this.tuc.qualifier()), 0 === e && (this.scope.typeUsages.push(h), u && u.usages.push(h)), h; | |
} | |
getToken(e) { | |
return e.TYPE() ? e.TYPE().symbol : e.IDENTIFIER() ? e.IDENTIFIER().symbol : null; | |
} | |
getStructType(e, t, r, o) { | |
const a = this.tuc.type_declaration(), | |
l = i.Helper.getArraySizeFromArraySubscript(this.tuc.array_subscript(), this.scope, this.di).mergeArrays(t), | |
c = new s.TypeDeclarationProcessor().getTypeDeclaration(a, this.scope, this.di, e, r, o), | |
u = new n.TypeUsage(c.name, c.interval, null, this.scope, c, l, !0); | |
return this.addQualifiers(u, this.tuc.qualifier()), u; | |
} | |
addQualifiers(e, t) { | |
for (const r of t) { | |
const t = this.getQualifierUsage(r, this.scope); | |
t && e.qualifiers.push(t); | |
} | |
} | |
getQualifierUsage(e, t) { | |
const r = e.text.replace(new RegExp(",", "g"), ", ").replace(new RegExp("=", "g"), " = "), | |
n = i.Helper.getIntervalFromParserRule(e, this.di), | |
s = this.di.builtin.qualifiers.get(r), | |
a = new o.QualifierUsage(r, n, t, s); | |
return s && s.usages.push(a), a; | |
} | |
}; | |
}, | |
2775: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.VariableDeclarationProcessor = void 0); | |
const n = r(6491), | |
i = r(9391), | |
s = r(7e3), | |
o = r(5668), | |
a = r(2333), | |
l = r(5766), | |
c = r(3150), | |
u = r(8644); | |
t.VariableDeclarationProcessor = class { | |
initialize(e, t) { | |
(this.di = t), (this.scope = e); | |
} | |
static searchVariableDeclaration(e, t, r, i) { | |
for (var s; r; ) { | |
const i = r.variableDeclarations.find((r) => r.name === e && n.Helper.isALowerThanB(r.nameInterval, t)); | |
if (i) return i; | |
if (this.anyTypeOrFunction(e, t, r)) return null; | |
r = r.parent; | |
} | |
return null !== (s = i.builtin.variables.get(e)) && void 0 !== s ? s : null; | |
} | |
static anyTypeOrFunction(e, t, r) { | |
return ( | |
r.typeDeclarations.some((r) => r.name === e && n.Helper.isALowerThanB(r.interval, t)) || | |
r.functionPrototypes.some((r) => r.name === e && n.Helper.isALowerThanB(r.interval, t)) || | |
r.functionDefinitions.some((r) => r.name === e && n.Helper.isALowerThanB(r.interval, t)) | |
); | |
} | |
getParameterDeclaration(e, t, r, o) { | |
this.initialize(r, o); | |
const a = e.identifier_optarray_optassignment() ? e.identifier_optarray_optassignment().identifier_optarray() : null, | |
l = a ? a.IDENTIFIER().text : null, | |
c = a ? n.Helper.getIntervalFromTerminalNode(a.IDENTIFIER(), this.di) : null, | |
u = n.Helper.getIntervalFromParserRule(e, this.di), | |
h = n.Helper.getArraySizeFromIdentifierOptarray(a, this.scope, this.di), | |
p = new s.TypeUsageProcessor().getParameterType(e.type_usage(), h, r, o), | |
d = new i.VariableDeclaration(l, c, r, !1, u, p, t, !t); | |
return e.type_usage().type_declaration() && p.declaration.usages.push(p), r.variableDeclarations.push(d), this.addSemanticToken(d, null == a ? void 0 : a.IDENTIFIER().symbol), d; | |
} | |
addSemanticToken(e, t) { | |
if (e.name) { | |
const r = [u.SemanticModifier.DECLARATION]; | |
e.type.qualifiers.some((e) => "const" === e.name) && r.push(u.SemanticModifier.CONST); | |
const n = new u.SemanticRegion(t, u.SemanticType.VARIABLE, r); | |
this.di.getRegions().semanticRegions.push(n); | |
} | |
} | |
getInterfaceBlockVariableDeclaration(e, t, r) { | |
this.initialize(t, r); | |
const o = !!e.identifier_optarray(), | |
a = new s.TypeUsageProcessor().getInterfaceBlockType(e, t, r); | |
if (o) { | |
const t = e.identifier_optarray().IDENTIFIER().text, | |
r = n.Helper.getIntervalFromTerminalNode(e.identifier_optarray().IDENTIFIER(), this.di), | |
s = n.Helper.getIntervalFromParserRule(e, this.di), | |
o = new i.VariableDeclaration(t, r, this.scope, !1, s, a, !1, !1); | |
return this.scope.variableDeclarations.push(o), a.declaration.usages.push(a), this.addSemanticToken(o, null == e ? void 0 : e.identifier_optarray().IDENTIFIER().symbol), o; | |
} | |
return null; | |
} | |
getDeclarations(e, t, r) { | |
this.initialize(t, r); | |
const l = e.identifier_optarray_optassignment(), | |
c = new Array(); | |
if (l.length) { | |
for (let t = 0; t < l.length; t++) { | |
const r = l[t], | |
o = n.Helper.getArraySizeFromIdentifierOptarrayOptassignment(r, this.scope, this.di), | |
u = new s.TypeUsageProcessor().getMemberType(e.type_usage(), o, this.scope, this.di, t), | |
h = r.identifier_optarray().IDENTIFIER().text, | |
p = n.Helper.getIntervalFromTerminalNode(r.identifier_optarray().IDENTIFIER(), this.di), | |
d = n.Helper.getIntervalFromParserRules(e, r, this.di), | |
m = new i.VariableDeclaration(h, p, this.scope, !1, d, u, !1, !1), | |
f = new a.ExpressionProcessor().processExpression(r.expression(), this.scope, this.di); | |
this.scope.variableDeclarations.push(m), this.addSemanticToken(m, null == r ? void 0 : r.identifier_optarray().IDENTIFIER().symbol), this.handleColorRegion(m, f), c.push(m); | |
} | |
if (e.type_usage().type_declaration()) { | |
const e = c[0].type; | |
e.declaration.usages.push(e); | |
} | |
} else { | |
const t = new s.TypeUsageProcessor().getMemberType(e.type_usage(), new o.ArrayUsage(), this.scope, this.di, 0); | |
if (!t.qualifiers.some((e) => e.name.startsWith("layout"))) { | |
const r = null, | |
s = null, | |
o = n.Helper.getIntervalFromParserRule(e, this.di), | |
a = new i.VariableDeclaration(r, s, this.scope, !1, o, t, !1, !1); | |
this.scope.variableDeclarations.push(a), c.push(a); | |
} | |
} | |
return c; | |
} | |
handleColorRegion(e, t) { | |
if (t instanceof c.ExpressionResult && e.isColorVariable() && t.constructorCall) { | |
const e = new l.ColorRegion(t.constructorCall, t.constructorParameters); | |
this.di.getRegions().colorRegions.push(e); | |
} | |
} | |
}; | |
}, | |
3032: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.VariableUsageProcessor = void 0); | |
const n = r(6491), | |
i = r(2775), | |
s = r(7263), | |
o = r(8644); | |
t.VariableUsageProcessor = class { | |
getVariableUsage(e, t, r) { | |
this.di = r; | |
const o = n.Helper.getIntervalFromTerminalNode(e, r), | |
a = e.text, | |
l = i.VariableDeclarationProcessor.searchVariableDeclaration(a, o, t, r), | |
c = new s.VariableUsage(a, t, o, l); | |
return l && (t.variableUsages.push(c), l.usages.push(c), this.addSemanticToken(l, e.symbol)), c; | |
} | |
addSemanticToken(e, t) { | |
if (e.name && !e.builtin) { | |
const r = []; | |
e.type.qualifiers.some((e) => "const" === e.name) && r.push(o.SemanticModifier.CONST); | |
const n = new o.SemanticRegion(t, o.SemanticType.VARIABLE, r); | |
this.di.getRegions().semanticRegions.push(n); | |
} | |
} | |
}; | |
}, | |
3742: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlslCallHierarchyProvider = void 0); | |
const n = r(9496), | |
i = r(54), | |
s = r(5180), | |
o = r(8510); | |
class a extends i.PositionalProviderBase { | |
prepareCallHierarchy(e, t, r) { | |
var n; | |
return (this.stage = o.HierarcySearchStage.PREPARE), null === (n = this.processElements(e, t)) || void 0 === n ? void 0 : n.map((e) => e.getItem()); | |
} | |
provideCallHierarchyIncomingCalls(e, t) { | |
this.stage = o.HierarcySearchStage.INCOMING; | |
const r = this.processElements(this.document, e.selectionRange.start), | |
n = new Array(); | |
for (const e of r) { | |
const t = e.toIncomingCall(); | |
n.push(t); | |
} | |
return n; | |
} | |
provideCallHierarchyOutgoingCalls(e, t) { | |
this.stage = o.HierarcySearchStage.OUTGOING; | |
const r = this.processElements(this.document, e.selectionRange.start), | |
n = new Array(); | |
for (const e of r) { | |
const t = e.toOutgoingCall(); | |
n.push(t); | |
} | |
return n; | |
} | |
processFunctionPrototype(e) { | |
if (e.logicalFunction.definitions.length) return this.processFunctionDefinition(e.logicalFunction.definitions[0]); | |
if (this.stage === o.HierarcySearchStage.PREPARE) { | |
const t = this.createItemFromDeclaration(e); | |
return [new s.HierarchyElement(t, e.logicalFunction)]; | |
} | |
return this.stage === o.HierarcySearchStage.INCOMING ? this.createIncomingElements(e.logicalFunction) : []; | |
} | |
processFunctionDefinition(e) { | |
if (this.stage === o.HierarcySearchStage.PREPARE) { | |
const t = this.createItemFromDeclaration(e); | |
return [new s.HierarchyElement(t, e.logicalFunction)]; | |
} | |
return this.stage === o.HierarcySearchStage.INCOMING ? this.createIncomingElements(e.logicalFunction) : this.createOutgoingElements(e); | |
} | |
processFunctionCall(e) { | |
return this.stage === o.HierarcySearchStage.PREPARE | |
? this.createPrepareElementsFromCall(e) | |
: this.stage === o.HierarcySearchStage.INCOMING | |
? this.createIncomingElements(e.logicalFunction) | |
: e.logicalFunction.definitions.length | |
? this.createOutgoingElements(e.logicalFunction.definitions[0]) | |
: []; | |
} | |
processTypeDeclaration(e) { | |
if (this.stage === o.HierarcySearchStage.PREPARE) { | |
const t = this.createItemFromTypeDeclaration(e); | |
return [new s.HierarchyElement(t, null)]; | |
} | |
if (this.stage === o.HierarcySearchStage.INCOMING) { | |
if (e.ctorCalls.length) { | |
const t = e.ctorCalls[0].logicalFunction; | |
return this.createIncomingElements(t); | |
} | |
return []; | |
} | |
return []; | |
} | |
defaultReturn() { | |
return this.stage === o.HierarcySearchStage.PREPARE ? null : []; | |
} | |
createPrepareElementsFromCall(e) { | |
if (e.logicalFunction.definitions.length) { | |
const t = this.createItemFromDeclaration(e.logicalFunction.definitions[0]); | |
return [new s.HierarchyElement(t, e.logicalFunction)]; | |
} | |
if (e.logicalFunction.hasDeclaration()) { | |
const t = this.createItemWithoutDefinition(e); | |
return [new s.HierarchyElement(t, e.logicalFunction)]; | |
} | |
return null; | |
} | |
createIncomingElements(e) { | |
const t = new Array(); | |
for (const r of e.calls) this.addIncomingElement(t, r); | |
return t; | |
} | |
addIncomingElement(e, t) { | |
const r = t.incomingCall; | |
if (r) { | |
const n = e.find((e) => e.getLogicalFunction() === r.logicalFunction); | |
if (n) { | |
const e = this.di.intervalToRange(t.nameInterval); | |
n.getRanges().push(e); | |
} else { | |
const n = this.createIncomingElement(r, t); | |
e.push(n); | |
} | |
} | |
} | |
createIncomingElement(e, t) { | |
const r = this.createItemFromIncomingCall(e), | |
n = this.di.intervalToRange(t.nameInterval), | |
i = new s.HierarchyElement(r, e.logicalFunction); | |
return i.getRanges().push(n), i; | |
} | |
createOutgoingElements(e) { | |
const t = new Array(); | |
for (const r of e.outgoingCalls) this.addOutgoingElement(t, r); | |
return t; | |
} | |
addOutgoingElement(e, t) { | |
const r = e.find((e) => e.getLogicalFunction() === t.logicalFunction); | |
if (r) { | |
const e = this.di.intervalToRange(t.nameInterval); | |
r.getRanges().push(e); | |
} else { | |
const r = this.createOutgoingElement(t); | |
e.push(r); | |
} | |
} | |
createOutgoingElement(e) { | |
let t; | |
e.logicalFunction.definitions.length ? (t = this.createItemFromDeclaration(e.logicalFunction.definitions[0])) : e.logicalFunction.hasDeclaration() && (t = this.createItemWithoutDefinition(e)); | |
const r = new s.HierarchyElement(t, e.logicalFunction), | |
n = this.di.intervalToRange(e.nameInterval); | |
return r.getRanges().push(n), r; | |
} | |
createItemFromDeclaration(e) { | |
const t = this.di.intervalToRange(e.nameInterval); | |
return new n.CallHierarchyItem(n.SymbolKind.Function, e.name, `(${e.toStringParameters()})`, this.document.uri, t, t); | |
} | |
createItemWithoutDefinition(e) { | |
var t, r; | |
const i = e.logicalFunction.getDeclaration(), | |
s = i.ctor ? n.SymbolKind.Struct : n.SymbolKind.Function; | |
let o; | |
return ( | |
(o = | |
i.ctor && (null === (r = null === (t = i.returnType) || void 0 === t ? void 0 : t.declaration) || void 0 === r ? void 0 : r.nameInterval) | |
? this.di.intervalToRange(i.returnType.declaration.nameInterval) | |
: this.di.intervalToRange(e.nameInterval)), | |
new n.CallHierarchyItem(s, i.name, `(${i.toStringParameters()})`, this.document.uri, o, o) | |
); | |
} | |
createItemFromIncomingCall(e) { | |
var t, r; | |
const i = e.ctor ? n.SymbolKind.Struct : n.SymbolKind.Function; | |
let s; | |
return ( | |
(s = | |
e.ctor && (null === (r = null === (t = e.returnType) || void 0 === t ? void 0 : t.declaration) || void 0 === r ? void 0 : r.nameInterval) | |
? this.di.intervalToRange(e.returnType.declaration.nameInterval) | |
: this.di.intervalToRange(e.nameInterval)), | |
new n.CallHierarchyItem(i, e.name, `(${e.toStringParameters()})`, this.document.uri, s, s) | |
); | |
} | |
createItemFromTypeDeclaration(e) { | |
const t = this.di.intervalToRange(e.nameInterval); | |
return new n.CallHierarchyItem(n.SymbolKind.Struct, e.name, `(${e.toStringConstructorParameters()})`, this.document.uri, t, t); | |
} | |
} | |
t.GlslCallHierarchyProvider = a; | |
}, | |
1496: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlslCommandProvider = void 0); | |
const n = r(9496), | |
i = r(1024), | |
s = r(5915), | |
o = r(5604); | |
class a { | |
static openDocsGl() { | |
n.env.openExternal(n.Uri.parse("http://docs.gl")); | |
} | |
static openGlEs2() { | |
n.env.openExternal(n.Uri.parse("https://www.khronos.org/registry/OpenGL-Refpages/es2.0")); | |
} | |
static openGlEs3() { | |
n.env.openExternal(n.Uri.parse("https://www.khronos.org/registry/OpenGL-Refpages/es3.0")); | |
} | |
static openDoc(e) { | |
o.HostDependent.webExtension || s.GlslEditor.CONFIGURATIONS.getAlwaysOpenOnlineDoc() ? n.env.openExternal(n.Uri.parse(`http://docs.gl/el3/${e}`)) : this.openOfflineDoc(e); | |
} | |
static openPreprocessedGlsl() { | |
const e = n.window.activeTextEditor.document; | |
(null == e ? void 0 : e.languageId) !== i.Constants.GLSL | |
? n.window.showWarningMessage("The active file have to be a GLSL file.") | |
: o.HostDependent.webExtension | |
? n.window.showWarningMessage("The web extension can't generate preprocessed GLSL source code. Try it with the desktop version.") | |
: o.HostDependent.displayPreprocessedCode(e); | |
} | |
static openOfflineDoc(e) { | |
(this.panel && this.isPanelUsable && !s.GlslEditor.CONFIGURATIONS.getAlwaysOpenOfflineDocInNewTab()) || (this.panel = this.createPanel(e)), (this.panel.title = e); | |
const t = n.Uri.file(`${s.GlslEditor.getContext().extensionPath}/res/js/mml-chtml.js`), | |
r = this.panel.webview.asWebviewUri(t); | |
this.panel.webview.html = o.HostDependent.getDocumentation(e, r); | |
} | |
static createPanel(e) { | |
var t; | |
const r = n.window.createWebviewPanel("documentation", e, n.ViewColumn.Beside, { enableScripts: !0, enableCommandUris: !0, localResourceRoots: [n.Uri.file(`${s.GlslEditor.getContext().extensionPath}/res/js`)] }); | |
return ( | |
null === (t = this.panelEventHandler) || void 0 === t || t.dispose(), | |
(this.isPanelUsable = !0), | |
(this.panelEventHandler = r.onDidDispose(() => { | |
this.isPanelUsable = !1; | |
})), | |
r | |
); | |
} | |
} | |
(t.GlslCommandProvider = a), (a.OPEN_DOCS_GL = "opendocsgl"), (a.OPEN_GL_ES_2 = "opengles2"), (a.OPEN_GL_ES_3 = "opengles3"), (a.OPEN_DOC = "opendoc"), (a.GENERATE_PREPROCESSED = "generatepreprocessed"), (a.isPanelUsable = !1); | |
}, | |
3141: (e, t, r) => { | |
Object.defineProperty(t, "__esModule", { value: !0 }), (t.GlslCompletionProvider = void 0); | |
const n = r(9496), | |
i = r(5915), | |
s = r(1274), | |
o = r(2422), | |
a = r(6491), | |
l = r(1024), | |
c = r(2993), | |
u = r(4226); | |
t.GlslCompletionProvider = class { | |
initialize(e, t, r) { | |
i.GlslEditor.processElements(e), (this.di = i.GlslEditor.getDocumentInfo(e.uri)), (this.position = t), (this.context = r), (this.offset = this.di.positionToOffset(this.position)), (this.items = new Array()); | |
} | |
provideCompletionItems(e, t, r, n) { | |
return this.initialize(e, t, n), this.isCompletionTriggeredByFloatingPoint() || this.isInCommentRegion() || this.addCompletionItems(), this.items; | |
} | |
addCompletionItems() { | |
const e = this.getPreprocessorRegion(); | |
e ? this.addPreprocessorCompletionItems(e) : this.isInLayoutQualifier() ? this.addLayoutQualifierParameterCompletionItems() : this.addGeneralCompletionItems(); | |
} | |
addGeneralCompletionItems() { | |
const e = this.getCompletionExpression(); | |
if (e) this.completeAfterDot(e); | |
else { | |
const e = this.di.getScopeAt(this.position); | |
this.addLanguageElements(), this.addItems(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment