solve-engine 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexer-y8uY6n6t.d.cts → Lexer-Cfm79Dak.d.cts} +1 -1
- package/dist/{Lexer-Dkt7KGaU.d.ts → Lexer-W9MBOP0V.d.ts} +1 -1
- package/dist/{PackageRegistry-wUQyVEyw.d.ts → PackageRegistry-CjDt-Jy_.d.ts} +4 -4
- package/dist/{PackageRegistry-CblRmrHc.d.cts → PackageRegistry-pHtKythi.d.cts} +4 -4
- package/dist/{Parselet-C974vhZG.d.cts → Parselet-Cu0bLSis.d.cts} +1 -1
- package/dist/{Parselet-CsmtM3It.d.ts → Parselet-DEdF9I7n.d.ts} +1 -1
- package/dist/{Token-DnU2hwFY.d.cts → Token-BzG5G4ja.d.cts} +30 -0
- package/dist/{Token-DnU2hwFY.d.ts → Token-BzG5G4ja.d.ts} +30 -0
- package/dist/{TokenNormalizer-CqBCrYkR.d.cts → TokenNormalizer-DGVa24Q-.d.cts} +1 -1
- package/dist/{TokenNormalizer-B8zmhO5X.d.ts → TokenNormalizer-t_GotBxr.d.ts} +1 -1
- package/dist/{chunk-AF5AE52C.js → chunk-2CS6OMZK.js} +7 -6
- package/dist/chunk-2CS6OMZK.js.map +1 -0
- package/dist/{chunk-XJCMXB2E.cjs → chunk-2MV4HBKC.cjs} +187 -61
- package/dist/chunk-2MV4HBKC.cjs.map +1 -0
- package/dist/{chunk-J73SJHR3.cjs → chunk-2NPS5DQ3.cjs} +558 -341
- package/dist/chunk-2NPS5DQ3.cjs.map +1 -0
- package/dist/{chunk-QWY3VEZN.js → chunk-3MNKQZ77.js} +65 -12
- package/dist/chunk-3MNKQZ77.js.map +1 -0
- package/dist/{chunk-BOAVE4FC.cjs → chunk-43G3JT2E.cjs} +1491 -218
- package/dist/chunk-43G3JT2E.cjs.map +1 -0
- package/dist/{chunk-WQTTOGXC.cjs → chunk-4AVD7NZW.cjs} +4 -4
- package/dist/{chunk-WQTTOGXC.cjs.map → chunk-4AVD7NZW.cjs.map} +1 -1
- package/dist/{chunk-HTXVVJRA.cjs → chunk-4CVLFLOB.cjs} +112 -2
- package/dist/chunk-4CVLFLOB.cjs.map +1 -0
- package/dist/{chunk-ZS6CRJZP.js → chunk-6GCKCWLB.js} +9 -3
- package/dist/chunk-6GCKCWLB.js.map +1 -0
- package/dist/{chunk-CGIDYRAX.cjs → chunk-AHCLWAM5.cjs} +18 -10
- package/dist/chunk-AHCLWAM5.cjs.map +1 -0
- package/dist/{chunk-KVILKGMS.js → chunk-AJA6LUI7.js} +36 -2
- package/dist/chunk-AJA6LUI7.js.map +1 -0
- package/dist/{chunk-EHAHVROS.cjs → chunk-CLVQBF5C.cjs} +5 -5
- package/dist/{chunk-EHAHVROS.cjs.map → chunk-CLVQBF5C.cjs.map} +1 -1
- package/dist/{chunk-34RRD7PC.js → chunk-CYFK5SY2.js} +111 -3
- package/dist/chunk-CYFK5SY2.js.map +1 -0
- package/dist/{chunk-23MFG6GG.js → chunk-DDQVZGLO.js} +12 -12
- package/dist/{chunk-23MFG6GG.js.map → chunk-DDQVZGLO.js.map} +1 -1
- package/dist/{chunk-F7G7ZFIZ.cjs → chunk-EAAHVJ4P.cjs} +3 -3
- package/dist/{chunk-F7G7ZFIZ.cjs.map → chunk-EAAHVJ4P.cjs.map} +1 -1
- package/dist/{chunk-OWXIOHQB.js → chunk-FIFQPKBA.js} +1417 -144
- package/dist/chunk-FIFQPKBA.js.map +1 -0
- package/dist/{chunk-626UW5RU.js → chunk-GPPLSM2Z.js} +61 -2
- package/dist/chunk-GPPLSM2Z.js.map +1 -0
- package/dist/{chunk-4QADQTWS.js → chunk-KHJUSHFU.js} +231 -14
- package/dist/chunk-KHJUSHFU.js.map +1 -0
- package/dist/{chunk-2R7SVDDB.cjs → chunk-M4F66R4O.cjs} +72 -72
- package/dist/{chunk-2R7SVDDB.cjs.map → chunk-M4F66R4O.cjs.map} +1 -1
- package/dist/{chunk-6NTVRDQV.cjs → chunk-M4Q47KHF.cjs} +126 -73
- package/dist/chunk-M4Q47KHF.cjs.map +1 -0
- package/dist/{chunk-LIPPNDBE.js → chunk-M5E34VG5.js} +3 -3
- package/dist/{chunk-LIPPNDBE.js.map → chunk-M5E34VG5.js.map} +1 -1
- package/dist/{chunk-53B6KDDJ.cjs → chunk-MBNQVDVC.cjs} +38 -3
- package/dist/{chunk-53B6KDDJ.cjs.map → chunk-MBNQVDVC.cjs.map} +1 -1
- package/dist/{chunk-2A3VOGVG.js → chunk-MEOHSQEH.js} +6 -5
- package/dist/chunk-MEOHSQEH.js.map +1 -0
- package/dist/{chunk-ZH2PCJ4V.cjs → chunk-MTX2KVU7.cjs} +71 -70
- package/dist/chunk-MTX2KVU7.cjs.map +1 -0
- package/dist/{chunk-QNJ4ACRT.cjs → chunk-NJTXJ5AG.cjs} +37 -15
- package/dist/chunk-NJTXJ5AG.cjs.map +1 -0
- package/dist/{chunk-EEJSQEHC.cjs → chunk-NZFKROS7.cjs} +26 -20
- package/dist/chunk-NZFKROS7.cjs.map +1 -0
- package/dist/{chunk-OJ6LW7VQ.js → chunk-OFXOTECC.js} +13 -5
- package/dist/chunk-OFXOTECC.js.map +1 -0
- package/dist/{chunk-3YNVWKR2.cjs → chunk-OUHT5Z36.cjs} +28 -5
- package/dist/chunk-OUHT5Z36.cjs.map +1 -0
- package/dist/{chunk-KFRBAXKW.js → chunk-OWRHDUJD.js} +3 -3
- package/dist/{chunk-KFRBAXKW.js.map → chunk-OWRHDUJD.js.map} +1 -1
- package/dist/{chunk-4MG4XKO2.js → chunk-PCPX42KL.js} +38 -3
- package/dist/{chunk-4MG4XKO2.js.map → chunk-PCPX42KL.js.map} +1 -1
- package/dist/{chunk-FI4WDYSL.cjs → chunk-R24DI24X.cjs} +61 -2
- package/dist/chunk-R24DI24X.cjs.map +1 -0
- package/dist/{chunk-VM5ZKDLH.js → chunk-SFQWJMKT.js} +5 -5
- package/dist/{chunk-VM5ZKDLH.js.map → chunk-SFQWJMKT.js.map} +1 -1
- package/dist/{chunk-6BKTCEUP.cjs → chunk-TY3TLZAW.cjs} +36 -2
- package/dist/chunk-TY3TLZAW.cjs.map +1 -0
- package/dist/{chunk-DM3LMRBC.js → chunk-UKPGSAZW.js} +187 -61
- package/dist/chunk-UKPGSAZW.js.map +1 -0
- package/dist/{chunk-NH2O2AUR.js → chunk-WC5FFSHB.js} +26 -4
- package/dist/chunk-WC5FFSHB.js.map +1 -0
- package/dist/{chunk-7J2Q77OH.cjs → chunk-WWOLFXTX.cjs} +11 -10
- package/dist/chunk-WWOLFXTX.cjs.map +1 -0
- package/dist/{chunk-PG2K5BL6.cjs → chunk-X2BWAZAU.cjs} +53 -53
- package/dist/{chunk-PG2K5BL6.cjs.map → chunk-X2BWAZAU.cjs.map} +1 -1
- package/dist/{chunk-GOLDJNMZ.js → chunk-XBTEO4OB.js} +28 -5
- package/dist/chunk-XBTEO4OB.js.map +1 -0
- package/dist/{chunk-EPOXXJBK.js → chunk-YU2CUNFO.js} +3 -3
- package/dist/{chunk-EPOXXJBK.js.map → chunk-YU2CUNFO.js.map} +1 -1
- package/dist/constants.cjs +4 -4
- package/dist/constants.js +1 -1
- package/dist/engine.cjs +29 -30
- package/dist/engine.d.cts +6 -6
- package/dist/engine.d.ts +6 -6
- package/dist/engine.js +19 -20
- package/dist/format.cjs +7 -8
- package/dist/format.cjs.map +1 -1
- package/dist/format.js +2 -3
- package/dist/format.js.map +1 -1
- package/dist/index.cjs +28 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/dist/language.cjs +12 -12
- package/dist/language.d.cts +6 -6
- package/dist/language.d.ts +6 -6
- package/dist/language.js +5 -5
- package/dist/lexer.cjs +19 -19
- package/dist/lexer.d.cts +3 -3
- package/dist/lexer.d.ts +3 -3
- package/dist/lexer.js +7 -7
- package/dist/normalizer.cjs +12 -12
- package/dist/normalizer.d.cts +3 -3
- package/dist/normalizer.d.ts +3 -3
- package/dist/normalizer.js +6 -6
- package/dist/packages.cjs +36 -37
- package/dist/packages.d.cts +5 -47
- package/dist/packages.d.ts +5 -47
- package/dist/packages.js +13 -14
- package/dist/parser.cjs +12 -12
- package/dist/parser.d.cts +3 -2
- package/dist/parser.d.ts +3 -2
- package/dist/parser.js +4 -4
- package/dist/resolvers.d.cts +1 -1
- package/dist/resolvers.d.ts +1 -1
- package/dist/uom.cjs +14 -14
- package/dist/uom.d.cts +12 -4
- package/dist/uom.d.ts +12 -4
- package/dist/uom.js +4 -4
- package/dist/vm.cjs +17 -17
- package/dist/vm.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-2A3VOGVG.js.map +0 -1
- package/dist/chunk-34RRD7PC.js.map +0 -1
- package/dist/chunk-3YNVWKR2.cjs.map +0 -1
- package/dist/chunk-4QADQTWS.js.map +0 -1
- package/dist/chunk-626UW5RU.js.map +0 -1
- package/dist/chunk-6BKTCEUP.cjs.map +0 -1
- package/dist/chunk-6NTVRDQV.cjs.map +0 -1
- package/dist/chunk-7J2Q77OH.cjs.map +0 -1
- package/dist/chunk-AF5AE52C.js.map +0 -1
- package/dist/chunk-BOAVE4FC.cjs.map +0 -1
- package/dist/chunk-CGIDYRAX.cjs.map +0 -1
- package/dist/chunk-DM3LMRBC.js.map +0 -1
- package/dist/chunk-EEJSQEHC.cjs.map +0 -1
- package/dist/chunk-FI4WDYSL.cjs.map +0 -1
- package/dist/chunk-GOLDJNMZ.js.map +0 -1
- package/dist/chunk-HTXVVJRA.cjs.map +0 -1
- package/dist/chunk-J73SJHR3.cjs.map +0 -1
- package/dist/chunk-KVILKGMS.js.map +0 -1
- package/dist/chunk-NH2O2AUR.js.map +0 -1
- package/dist/chunk-OJ6LW7VQ.js.map +0 -1
- package/dist/chunk-OT6OJY7C.cjs +0 -114
- package/dist/chunk-OT6OJY7C.cjs.map +0 -1
- package/dist/chunk-OWXIOHQB.js.map +0 -1
- package/dist/chunk-QNJ4ACRT.cjs.map +0 -1
- package/dist/chunk-QWY3VEZN.js.map +0 -1
- package/dist/chunk-RFYD5TJE.js +0 -111
- package/dist/chunk-RFYD5TJE.js.map +0 -1
- package/dist/chunk-XJCMXB2E.cjs.map +0 -1
- package/dist/chunk-ZH2PCJ4V.cjs.map +0 -1
- package/dist/chunk-ZS6CRJZP.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkR24DI24X_cjs = require('./chunk-R24DI24X.cjs');
|
|
4
|
+
var chunkOUHT5Z36_cjs = require('./chunk-OUHT5Z36.cjs');
|
|
5
|
+
var chunkCLVQBF5C_cjs = require('./chunk-CLVQBF5C.cjs');
|
|
6
6
|
var chunkM4N5GA5Z_cjs = require('./chunk-M4N5GA5Z.cjs');
|
|
7
7
|
|
|
8
8
|
// src/lexer/ExpressionLexer.ts
|
|
9
|
-
|
|
9
|
+
chunkR24DI24X_cjs.registerAllTokenTypes();
|
|
10
10
|
function buildCharClassTable() {
|
|
11
11
|
const table = new Uint8Array(128);
|
|
12
12
|
for (let i = 48; i <= 57; i++) table[i] = 2 /* DIGIT */;
|
|
@@ -198,14 +198,14 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
198
198
|
*/
|
|
199
199
|
this.pendingRawLineToken = null;
|
|
200
200
|
this.localeCode = localeCode;
|
|
201
|
-
this.locale =
|
|
201
|
+
this.locale = chunkOUHT5Z36_cjs.getLocale(localeCode);
|
|
202
202
|
this.configuredLookup = lookup ?? null;
|
|
203
203
|
this.keywordMap = /* @__PURE__ */ new Map();
|
|
204
204
|
for (const [k, v] of Object.entries(this.locale.keywordMap)) {
|
|
205
205
|
this.keywordMap.set(k.toLowerCase(), v);
|
|
206
206
|
}
|
|
207
207
|
this.mergedKeywords = new Map(this.keywordMap);
|
|
208
|
-
this.mergedUnits = new Set(
|
|
208
|
+
this.mergedUnits = new Set(chunkCLVQBF5C_cjs.knownUnits);
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
* Test `text` against every registered `rawLinePatterns` rule, in
|
|
@@ -220,7 +220,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
220
220
|
if (m && typeof m[1] === "string") {
|
|
221
221
|
const value = m[1].trim();
|
|
222
222
|
if (value.length > 0) {
|
|
223
|
-
return new LexerToken(rule.tokenType,
|
|
223
|
+
return new LexerToken(rule.tokenType, chunkR24DI24X_cjs.tokenTypeId(rule.tokenType), value, value, 0, 0, this.line, 1);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -229,7 +229,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
229
229
|
/** Rebuild merged keyword and unit collections after plugin registration. */
|
|
230
230
|
rebuildMergedCollections() {
|
|
231
231
|
this.mergedKeywords = new Map([...this.keywordMap, ...this.pluginKeywordMap]);
|
|
232
|
-
this.mergedUnits = /* @__PURE__ */ new Set([...
|
|
232
|
+
this.mergedUnits = /* @__PURE__ */ new Set([...chunkCLVQBF5C_cjs.knownUnits, ...this.pluginUnits]);
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
* Register a plugin to extend the lexer with custom tokens.
|
|
@@ -306,7 +306,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
306
306
|
}
|
|
307
307
|
if (plugin.units) {
|
|
308
308
|
for (const unit of plugin.units) {
|
|
309
|
-
if (
|
|
309
|
+
if (chunkCLVQBF5C_cjs.knownUnits.has(unit)) {
|
|
310
310
|
throw chunkM4N5GA5Z_cjs.ErrorFactory.config(
|
|
311
311
|
"PLUGIN_UNIT_COLLISION",
|
|
312
312
|
`Plugin unit "${unit}" conflicts with a built-in unit. Built-in units cannot be overridden.`,
|
|
@@ -527,20 +527,20 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
527
527
|
switch (cc) {
|
|
528
528
|
case 2 /* DIGIT */:
|
|
529
529
|
case 4 /* DOT */:
|
|
530
|
-
yield new LexerToken("NUMBER",
|
|
530
|
+
yield new LexerToken("NUMBER", chunkR24DI24X_cjs.tokenTypeId("NUMBER"), this.input, this.input, 0, 0, 1, 1);
|
|
531
531
|
tokenIndex++;
|
|
532
532
|
break;
|
|
533
533
|
case 3 /* ALPHA */: {
|
|
534
534
|
const input2 = this.input;
|
|
535
535
|
const identLower = input2.toLowerCase();
|
|
536
536
|
if (this.mergedUnits.has(input2)) {
|
|
537
|
-
yield new LexerToken("UNIT",
|
|
537
|
+
yield new LexerToken("UNIT", chunkR24DI24X_cjs.tokenTypeId("UNIT"), input2, input2, 0, 0, 1, 1);
|
|
538
538
|
} else {
|
|
539
539
|
const kwType = this.mergedKeywords.get(identLower);
|
|
540
540
|
if (kwType) {
|
|
541
|
-
yield new LexerToken(kwType,
|
|
541
|
+
yield new LexerToken(kwType, chunkR24DI24X_cjs.tokenTypeId(kwType), input2, input2, 0, 0, 1, 1);
|
|
542
542
|
} else {
|
|
543
|
-
yield new LexerToken("IDENT",
|
|
543
|
+
yield new LexerToken("IDENT", chunkR24DI24X_cjs.tokenTypeId("IDENT"), input2, input2, 0, 0, 1, 1);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
tokenIndex++;
|
|
@@ -549,7 +549,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
549
549
|
case 5 /* OPERATOR */: {
|
|
550
550
|
const opType = OP_MAP[c0];
|
|
551
551
|
if (opType) {
|
|
552
|
-
yield new LexerToken(opType,
|
|
552
|
+
yield new LexerToken(opType, chunkR24DI24X_cjs.tokenTypeId(opType), this.input, this.input, 0, 0, 1, 1);
|
|
553
553
|
tokenIndex++;
|
|
554
554
|
}
|
|
555
555
|
break;
|
|
@@ -565,61 +565,61 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
565
565
|
tokenIndex++;
|
|
566
566
|
break;
|
|
567
567
|
case 8 /* DOLLAR */:
|
|
568
|
-
yield new LexerToken("DOLLAR",
|
|
568
|
+
yield new LexerToken("DOLLAR", chunkR24DI24X_cjs.tokenTypeId("DOLLAR"), "$", "$", 0, 0, 1, 1);
|
|
569
569
|
tokenIndex++;
|
|
570
570
|
break;
|
|
571
571
|
case 11 /* BACKTICK */:
|
|
572
|
-
yield new LexerToken("BACKTICK_OPEN",
|
|
572
|
+
yield new LexerToken("BACKTICK_OPEN", chunkR24DI24X_cjs.tokenTypeId("BACKTICK_OPEN"), "`", "`", 0, 0, 1, 1);
|
|
573
573
|
tokenIndex++;
|
|
574
574
|
break;
|
|
575
575
|
default: {
|
|
576
576
|
if (c0 === 215) {
|
|
577
|
-
yield new LexerToken("STAR",
|
|
577
|
+
yield new LexerToken("STAR", chunkR24DI24X_cjs.tokenTypeId("STAR"), "\xD7", "\xD7", 0, 0, 1, 1);
|
|
578
578
|
tokenIndex++;
|
|
579
579
|
} else if (c0 === 247) {
|
|
580
|
-
yield new LexerToken("SLASH",
|
|
580
|
+
yield new LexerToken("SLASH", chunkR24DI24X_cjs.tokenTypeId("SLASH"), "\xF7", "\xF7", 0, 0, 1, 1);
|
|
581
581
|
tokenIndex++;
|
|
582
582
|
} else if (c0 === 8800) {
|
|
583
|
-
yield new LexerToken("NEQ",
|
|
583
|
+
yield new LexerToken("NEQ", chunkR24DI24X_cjs.tokenTypeId("NEQ"), "\u2260", "\u2260", 0, 0, 1, 1);
|
|
584
584
|
tokenIndex++;
|
|
585
585
|
} else if (c0 === 163) {
|
|
586
|
-
yield new LexerToken("POUND",
|
|
586
|
+
yield new LexerToken("POUND", chunkR24DI24X_cjs.tokenTypeId("POUND"), "\xA3", "\xA3", 0, 0, 1, 1);
|
|
587
587
|
tokenIndex++;
|
|
588
588
|
} else if (c0 === 8364) {
|
|
589
|
-
yield new LexerToken("EURO",
|
|
589
|
+
yield new LexerToken("EURO", chunkR24DI24X_cjs.tokenTypeId("EURO"), "\u20AC", "\u20AC", 0, 0, 1, 1);
|
|
590
590
|
tokenIndex++;
|
|
591
591
|
} else if (c0 === 165) {
|
|
592
|
-
yield new LexerToken("YEN",
|
|
592
|
+
yield new LexerToken("YEN", chunkR24DI24X_cjs.tokenTypeId("YEN"), "\xA5", "\xA5", 0, 0, 1, 1);
|
|
593
593
|
tokenIndex++;
|
|
594
594
|
} else if (c0 === 8381) {
|
|
595
|
-
yield new LexerToken("RUBLE",
|
|
595
|
+
yield new LexerToken("RUBLE", chunkR24DI24X_cjs.tokenTypeId("RUBLE"), "\u20BD", "\u20BD", 0, 0, 1, 1);
|
|
596
596
|
tokenIndex++;
|
|
597
597
|
} else if (c0 === 8361) {
|
|
598
|
-
yield new LexerToken("WON",
|
|
598
|
+
yield new LexerToken("WON", chunkR24DI24X_cjs.tokenTypeId("WON"), "\u20A9", "\u20A9", 0, 0, 1, 1);
|
|
599
599
|
tokenIndex++;
|
|
600
600
|
} else if (c0 === 8377) {
|
|
601
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
601
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B9", "\u20B9", 0, 0, 1, 1);
|
|
602
602
|
tokenIndex++;
|
|
603
603
|
} else if (c0 === 8378) {
|
|
604
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
604
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20BA", "\u20BA", 0, 0, 1, 1);
|
|
605
605
|
tokenIndex++;
|
|
606
606
|
} else if (c0 === 8372) {
|
|
607
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
607
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B4", "\u20B4", 0, 0, 1, 1);
|
|
608
608
|
tokenIndex++;
|
|
609
609
|
} else if (c0 === 8362) {
|
|
610
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
610
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20AA", "\u20AA", 0, 0, 1, 1);
|
|
611
611
|
tokenIndex++;
|
|
612
612
|
} else if (c0 === 8363) {
|
|
613
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
613
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20AB", "\u20AB", 0, 0, 1, 1);
|
|
614
614
|
tokenIndex++;
|
|
615
615
|
} else if (c0 === 8358) {
|
|
616
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
616
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20A6", "\u20A6", 0, 0, 1, 1);
|
|
617
617
|
tokenIndex++;
|
|
618
618
|
} else if (c0 === 8369) {
|
|
619
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
619
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B1", "\u20B1", 0, 0, 1, 1);
|
|
620
620
|
tokenIndex++;
|
|
621
621
|
} else if (c0 >= 128) {
|
|
622
|
-
yield new LexerToken("IDENT",
|
|
622
|
+
yield new LexerToken("IDENT", chunkR24DI24X_cjs.tokenTypeId("IDENT"), this.input, this.input, 0, 0, 1, 1);
|
|
623
623
|
tokenIndex++;
|
|
624
624
|
}
|
|
625
625
|
break;
|
|
@@ -674,12 +674,12 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
674
674
|
yield this.tokenizeNumber();
|
|
675
675
|
} else {
|
|
676
676
|
const col = this.pos - this.lineStartPos + 1;
|
|
677
|
-
yield new LexerToken("DOT",
|
|
677
|
+
yield new LexerToken("DOT", chunkR24DI24X_cjs.tokenTypeId("DOT"), ".", ".", this.pos, 0, this.line, col);
|
|
678
678
|
this.pos++;
|
|
679
679
|
}
|
|
680
680
|
} else {
|
|
681
681
|
const col = this.pos - this.lineStartPos + 1;
|
|
682
|
-
yield new LexerToken("DOT",
|
|
682
|
+
yield new LexerToken("DOT", chunkR24DI24X_cjs.tokenTypeId("DOT"), ".", ".", this.pos, 0, this.line, col);
|
|
683
683
|
this.pos++;
|
|
684
684
|
}
|
|
685
685
|
tokenIndex++;
|
|
@@ -702,7 +702,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
702
702
|
// ── Dollar sign $ ─────────────────────────────────────────────
|
|
703
703
|
case 8 /* DOLLAR */: {
|
|
704
704
|
const col = this.pos - this.lineStartPos + 1;
|
|
705
|
-
yield new LexerToken("DOLLAR",
|
|
705
|
+
yield new LexerToken("DOLLAR", chunkR24DI24X_cjs.tokenTypeId("DOLLAR"), "$", "$", this.pos, 0, this.line, col);
|
|
706
706
|
this.pos++;
|
|
707
707
|
tokenIndex++;
|
|
708
708
|
break;
|
|
@@ -710,7 +710,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
710
710
|
// ── Backtick ` ───────────────────────────────────────────────
|
|
711
711
|
case 11 /* BACKTICK */: {
|
|
712
712
|
const col = this.pos - this.lineStartPos + 1;
|
|
713
|
-
yield new LexerToken("BACKTICK_OPEN",
|
|
713
|
+
yield new LexerToken("BACKTICK_OPEN", chunkR24DI24X_cjs.tokenTypeId("BACKTICK_OPEN"), "`", "`", this.pos, 0, this.line, col);
|
|
714
714
|
this.pos++;
|
|
715
715
|
if (openSpan) {
|
|
716
716
|
const span = openSpan;
|
|
@@ -731,63 +731,63 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
731
731
|
default: {
|
|
732
732
|
const col = this.pos - this.lineStartPos + 1;
|
|
733
733
|
if (c0 === 215) {
|
|
734
|
-
yield new LexerToken("STAR",
|
|
734
|
+
yield new LexerToken("STAR", chunkR24DI24X_cjs.tokenTypeId("STAR"), "\xD7", "\xD7", this.pos, 0, this.line, col);
|
|
735
735
|
this.pos++;
|
|
736
736
|
tokenIndex++;
|
|
737
737
|
} else if (c0 === 247) {
|
|
738
|
-
yield new LexerToken("SLASH",
|
|
738
|
+
yield new LexerToken("SLASH", chunkR24DI24X_cjs.tokenTypeId("SLASH"), "\xF7", "\xF7", this.pos, 0, this.line, col);
|
|
739
739
|
this.pos++;
|
|
740
740
|
tokenIndex++;
|
|
741
741
|
} else if (c0 === 8800) {
|
|
742
|
-
yield new LexerToken("NEQ",
|
|
742
|
+
yield new LexerToken("NEQ", chunkR24DI24X_cjs.tokenTypeId("NEQ"), "\u2260", "\u2260", this.pos, 0, this.line, col);
|
|
743
743
|
this.pos++;
|
|
744
744
|
tokenIndex++;
|
|
745
745
|
} else if (c0 === 163) {
|
|
746
|
-
yield new LexerToken("POUND",
|
|
746
|
+
yield new LexerToken("POUND", chunkR24DI24X_cjs.tokenTypeId("POUND"), "\xA3", "\xA3", this.pos, 0, this.line, col);
|
|
747
747
|
this.pos++;
|
|
748
748
|
tokenIndex++;
|
|
749
749
|
} else if (c0 === 8364) {
|
|
750
|
-
yield new LexerToken("EURO",
|
|
750
|
+
yield new LexerToken("EURO", chunkR24DI24X_cjs.tokenTypeId("EURO"), "\u20AC", "\u20AC", this.pos, 0, this.line, col);
|
|
751
751
|
this.pos++;
|
|
752
752
|
tokenIndex++;
|
|
753
753
|
} else if (c0 === 165) {
|
|
754
|
-
yield new LexerToken("YEN",
|
|
754
|
+
yield new LexerToken("YEN", chunkR24DI24X_cjs.tokenTypeId("YEN"), "\xA5", "\xA5", this.pos, 0, this.line, col);
|
|
755
755
|
this.pos++;
|
|
756
756
|
tokenIndex++;
|
|
757
757
|
} else if (c0 === 8381) {
|
|
758
|
-
yield new LexerToken("RUBLE",
|
|
758
|
+
yield new LexerToken("RUBLE", chunkR24DI24X_cjs.tokenTypeId("RUBLE"), "\u20BD", "\u20BD", this.pos, 0, this.line, col);
|
|
759
759
|
this.pos++;
|
|
760
760
|
tokenIndex++;
|
|
761
761
|
} else if (c0 === 8361) {
|
|
762
|
-
yield new LexerToken("WON",
|
|
762
|
+
yield new LexerToken("WON", chunkR24DI24X_cjs.tokenTypeId("WON"), "\u20A9", "\u20A9", this.pos, 0, this.line, col);
|
|
763
763
|
this.pos++;
|
|
764
764
|
tokenIndex++;
|
|
765
765
|
} else if (c0 === 8377) {
|
|
766
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
766
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B9", "\u20B9", this.pos, 0, this.line, col);
|
|
767
767
|
this.pos++;
|
|
768
768
|
tokenIndex++;
|
|
769
769
|
} else if (c0 === 8378) {
|
|
770
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
770
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20BA", "\u20BA", this.pos, 0, this.line, col);
|
|
771
771
|
this.pos++;
|
|
772
772
|
tokenIndex++;
|
|
773
773
|
} else if (c0 === 8372) {
|
|
774
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
774
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B4", "\u20B4", this.pos, 0, this.line, col);
|
|
775
775
|
this.pos++;
|
|
776
776
|
tokenIndex++;
|
|
777
777
|
} else if (c0 === 8362) {
|
|
778
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
778
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20AA", "\u20AA", this.pos, 0, this.line, col);
|
|
779
779
|
this.pos++;
|
|
780
780
|
tokenIndex++;
|
|
781
781
|
} else if (c0 === 8363) {
|
|
782
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
782
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20AB", "\u20AB", this.pos, 0, this.line, col);
|
|
783
783
|
this.pos++;
|
|
784
784
|
tokenIndex++;
|
|
785
785
|
} else if (c0 === 8358) {
|
|
786
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
786
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20A6", "\u20A6", this.pos, 0, this.line, col);
|
|
787
787
|
this.pos++;
|
|
788
788
|
tokenIndex++;
|
|
789
789
|
} else if (c0 === 8369) {
|
|
790
|
-
yield new LexerToken("CURRENCY_SYMBOL",
|
|
790
|
+
yield new LexerToken("CURRENCY_SYMBOL", chunkR24DI24X_cjs.tokenTypeId("CURRENCY_SYMBOL"), "\u20B1", "\u20B1", this.pos, 0, this.line, col);
|
|
791
791
|
this.pos++;
|
|
792
792
|
tokenIndex++;
|
|
793
793
|
} else if (c0 >= 128) {
|
|
@@ -828,7 +828,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
828
828
|
}
|
|
829
829
|
const text2 = input.slice(start, pos);
|
|
830
830
|
this.pos = pos;
|
|
831
|
-
return new LexerToken("NUMBER",
|
|
831
|
+
return new LexerToken("NUMBER", chunkR24DI24X_cjs.tokenTypeId("NUMBER"), text2, text2, start, 0, this.line, startCol);
|
|
832
832
|
}
|
|
833
833
|
if (next === 98 || next === 66) {
|
|
834
834
|
pos += 2;
|
|
@@ -837,7 +837,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
837
837
|
}
|
|
838
838
|
const text2 = input.slice(start, pos);
|
|
839
839
|
this.pos = pos;
|
|
840
|
-
return new LexerToken("NUMBER",
|
|
840
|
+
return new LexerToken("NUMBER", chunkR24DI24X_cjs.tokenTypeId("NUMBER"), text2, text2, start, 0, this.line, startCol);
|
|
841
841
|
}
|
|
842
842
|
if (next === 111 || next === 79) {
|
|
843
843
|
pos += 2;
|
|
@@ -846,7 +846,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
846
846
|
}
|
|
847
847
|
const text2 = input.slice(start, pos);
|
|
848
848
|
this.pos = pos;
|
|
849
|
-
return new LexerToken("NUMBER",
|
|
849
|
+
return new LexerToken("NUMBER", chunkR24DI24X_cjs.tokenTypeId("NUMBER"), text2, text2, start, 0, this.line, startCol);
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
852
|
let hasIntPart = false;
|
|
@@ -904,12 +904,12 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
904
904
|
pos++;
|
|
905
905
|
const text2 = input.slice(start, pos);
|
|
906
906
|
this.pos = pos;
|
|
907
|
-
return new LexerToken("BIGINT",
|
|
907
|
+
return new LexerToken("BIGINT", chunkR24DI24X_cjs.tokenTypeId("BIGINT"), text2, text2, start, 0, this.line, startCol);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
const text = input.slice(start, pos);
|
|
911
911
|
this.pos = pos;
|
|
912
|
-
return new LexerToken("NUMBER",
|
|
912
|
+
return new LexerToken("NUMBER", chunkR24DI24X_cjs.tokenTypeId("NUMBER"), text, text, start, 0, this.line, startCol);
|
|
913
913
|
}
|
|
914
914
|
// ── Inline identifier / keyword tokenizer ──────────────────────────────
|
|
915
915
|
/**
|
|
@@ -941,22 +941,22 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
941
941
|
pos++;
|
|
942
942
|
this.pos = pos;
|
|
943
943
|
const fullText = input.slice(start, pos);
|
|
944
|
-
return new LexerToken("INLINE_SOLVE_START",
|
|
944
|
+
return new LexerToken("INLINE_SOLVE_START", chunkR24DI24X_cjs.tokenTypeId("INLINE_SOLVE_START"), fullText, fullText, start, 0, this.line, startCol);
|
|
945
945
|
}
|
|
946
946
|
const isKnownUnit = this.mergedUnits.has(identText);
|
|
947
947
|
if (isKnownUnit) {
|
|
948
948
|
if (!this.isFollowedByLParen(pos)) {
|
|
949
949
|
this.pos = pos;
|
|
950
|
-
return new LexerToken("UNIT",
|
|
950
|
+
return new LexerToken("UNIT", chunkR24DI24X_cjs.tokenTypeId("UNIT"), identText, identText, start, 0, this.line, startCol);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
const localeKwType = this.mergedKeywords.get(identLower);
|
|
954
954
|
if (localeKwType) {
|
|
955
955
|
this.pos = pos;
|
|
956
|
-
return new LexerToken(localeKwType,
|
|
956
|
+
return new LexerToken(localeKwType, chunkR24DI24X_cjs.tokenTypeId(localeKwType), identText, identText, start, 0, this.line, startCol);
|
|
957
957
|
}
|
|
958
958
|
this.pos = pos;
|
|
959
|
-
return new LexerToken("IDENT",
|
|
959
|
+
return new LexerToken("IDENT", chunkR24DI24X_cjs.tokenTypeId("IDENT"), identText, identText, start, 0, this.line, startCol);
|
|
960
960
|
}
|
|
961
961
|
/**
|
|
962
962
|
* Peek past in-expression whitespace (space, tab) from `pos` to check
|
|
@@ -993,7 +993,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
993
993
|
if (twoCharType) {
|
|
994
994
|
const text2 = input.slice(pos, pos + 2);
|
|
995
995
|
this.pos = pos + 2;
|
|
996
|
-
return new LexerToken(twoCharType,
|
|
996
|
+
return new LexerToken(twoCharType, chunkR24DI24X_cjs.tokenTypeId(twoCharType), text2, text2, pos, 0, this.line, col);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
if (c0 === 47 && c1 === 47) {
|
|
@@ -1005,19 +1005,19 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
const text2 = input.slice(pos, commentPos);
|
|
1007
1007
|
this.pos = commentPos;
|
|
1008
|
-
return new LexerToken("COMMENT",
|
|
1008
|
+
return new LexerToken("COMMENT", chunkR24DI24X_cjs.tokenTypeId("COMMENT"), text2, text2, pos, 0, this.line, col);
|
|
1009
1009
|
}
|
|
1010
1010
|
if (c0 === 60 && c1 === 60) {
|
|
1011
1011
|
this.pos = pos + 2;
|
|
1012
|
-
return new LexerToken("LSHIFT",
|
|
1012
|
+
return new LexerToken("LSHIFT", chunkR24DI24X_cjs.tokenTypeId("LSHIFT"), "<<", "<<", pos, 0, this.line, col);
|
|
1013
1013
|
}
|
|
1014
1014
|
if (c0 === 62 && c1 === 62) {
|
|
1015
1015
|
if (input.charCodeAt(pos + 2) === 62) {
|
|
1016
1016
|
this.pos = pos + 3;
|
|
1017
|
-
return new LexerToken("URSHIFT",
|
|
1017
|
+
return new LexerToken("URSHIFT", chunkR24DI24X_cjs.tokenTypeId("URSHIFT"), ">>>", ">>>", pos, 0, this.line, col);
|
|
1018
1018
|
}
|
|
1019
1019
|
this.pos = pos + 2;
|
|
1020
|
-
return new LexerToken("RSHIFT",
|
|
1020
|
+
return new LexerToken("RSHIFT", chunkR24DI24X_cjs.tokenTypeId("RSHIFT"), ">>", ">>", pos, 0, this.line, col);
|
|
1021
1021
|
}
|
|
1022
1022
|
if (this.hasPluginOps) {
|
|
1023
1023
|
const pluginInner = this.pluginOperators.get(c0);
|
|
@@ -1026,7 +1026,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1026
1026
|
if (pluginType) {
|
|
1027
1027
|
const text2 = input.slice(pos, pos + 2);
|
|
1028
1028
|
this.pos = pos + 2;
|
|
1029
|
-
return new LexerToken(pluginType,
|
|
1029
|
+
return new LexerToken(pluginType, chunkR24DI24X_cjs.tokenTypeId(pluginType), text2, text2, pos, 0, this.line, col);
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
@@ -1034,7 +1034,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1034
1034
|
this.pos = pos + 1;
|
|
1035
1035
|
const opType = OP_MAP[c0];
|
|
1036
1036
|
const text = input.charAt(pos);
|
|
1037
|
-
return new LexerToken(opType || "ERROR",
|
|
1037
|
+
return new LexerToken(opType || "ERROR", chunkR24DI24X_cjs.tokenTypeId(opType || "ERROR"), text, text, pos, 0, this.line, col);
|
|
1038
1038
|
}
|
|
1039
1039
|
// ── String literal tokenizer ──────────────────────────────────────────
|
|
1040
1040
|
/**
|
|
@@ -1053,7 +1053,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1053
1053
|
pos++;
|
|
1054
1054
|
const text2 = input.slice(start, pos);
|
|
1055
1055
|
this.pos = pos;
|
|
1056
|
-
return new LexerToken("STRING",
|
|
1056
|
+
return new LexerToken("STRING", chunkR24DI24X_cjs.tokenTypeId("STRING"), text2, text2, start, lineBreaks, this.line, startCol);
|
|
1057
1057
|
}
|
|
1058
1058
|
if (c0 === 92 && pos + 1 < len) {
|
|
1059
1059
|
pos += 2;
|
|
@@ -1068,7 +1068,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
const text = input.slice(start, pos);
|
|
1070
1070
|
this.pos = pos;
|
|
1071
|
-
return new LexerToken("STRING",
|
|
1071
|
+
return new LexerToken("STRING", chunkR24DI24X_cjs.tokenTypeId("STRING"), text, text, start, lineBreaks, this.line, startCol);
|
|
1072
1072
|
}
|
|
1073
1073
|
// ── Markdown line scanner (Phase B) ───────────────────────────────────
|
|
1074
1074
|
/**
|
|
@@ -1316,7 +1316,7 @@ var _ExpressionLexer = class _ExpressionLexer {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
const text = input.slice(start, pos);
|
|
1318
1318
|
this.pos = pos;
|
|
1319
|
-
return new LexerToken("COMMENT",
|
|
1319
|
+
return new LexerToken("COMMENT", chunkR24DI24X_cjs.tokenTypeId("COMMENT"), text, text, start, 0, this.line, startCol);
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
1322
|
_ExpressionLexer.CHAR_CLASS = buildCharClassTable();
|
|
@@ -1324,5 +1324,5 @@ var ExpressionLexer = _ExpressionLexer;
|
|
|
1324
1324
|
|
|
1325
1325
|
exports.ExpressionLexer = ExpressionLexer;
|
|
1326
1326
|
exports.LexerToken = LexerToken;
|
|
1327
|
-
//# sourceMappingURL=chunk-
|
|
1328
|
-
//# sourceMappingURL=chunk-
|
|
1327
|
+
//# sourceMappingURL=chunk-M4F66R4O.cjs.map
|
|
1328
|
+
//# sourceMappingURL=chunk-M4F66R4O.cjs.map
|