@tokens-studio/tokenscript-interpreter 0.36.3 → 0.37.0
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/chunk-2EEKBDOX.js +5308 -0
- package/dist/chunk-2EEKBDOX.js.map +1 -0
- package/dist/chunk-2NMUBWBX.js +5861 -0
- package/dist/chunk-2NMUBWBX.js.map +1 -0
- package/dist/chunk-2OHE65GL.js +5779 -0
- package/dist/chunk-2OHE65GL.js.map +1 -0
- package/dist/chunk-2PZR6BQ6.js +5773 -0
- package/dist/chunk-2PZR6BQ6.js.map +1 -0
- package/dist/chunk-2QDDLPUW.js +5858 -0
- package/dist/chunk-2QDDLPUW.js.map +1 -0
- package/dist/chunk-4DUQBXYY.js +5762 -0
- package/dist/chunk-4DUQBXYY.js.map +1 -0
- package/dist/chunk-4SLJE4IW.js +5322 -0
- package/dist/chunk-4SLJE4IW.js.map +1 -0
- package/dist/chunk-6ABZOYUP.js +5802 -0
- package/dist/chunk-6ABZOYUP.js.map +1 -0
- package/dist/chunk-6HQZVWXZ.js +5341 -0
- package/dist/chunk-6HQZVWXZ.js.map +1 -0
- package/dist/chunk-6UY773C4.js +5292 -0
- package/dist/chunk-6UY773C4.js.map +1 -0
- package/dist/chunk-75Z55XEZ.js +5681 -0
- package/dist/chunk-75Z55XEZ.js.map +1 -0
- package/dist/chunk-7IWYKR22.js +5778 -0
- package/dist/chunk-7IWYKR22.js.map +1 -0
- package/dist/chunk-AVZUAMNS.js +5757 -0
- package/dist/chunk-AVZUAMNS.js.map +1 -0
- package/dist/chunk-BL7GZSRR.js +5724 -0
- package/dist/chunk-BL7GZSRR.js.map +1 -0
- package/dist/chunk-BMZ5NY7J.js +93 -0
- package/dist/chunk-BMZ5NY7J.js.map +1 -0
- package/dist/{chunk-AXH5N7KV.js → chunk-BNLQ6GCU.js} +2 -6
- package/dist/chunk-BNLQ6GCU.js.map +1 -0
- package/dist/chunk-BSJBGMCX.js +93 -0
- package/dist/{chunk-RI2BWY7D.js.map → chunk-BSJBGMCX.js.map} +1 -1
- package/dist/chunk-BUJRELXW.js +5342 -0
- package/dist/chunk-BUJRELXW.js.map +1 -0
- package/dist/chunk-DCOIGXSK.js +5763 -0
- package/dist/chunk-DCOIGXSK.js.map +1 -0
- package/dist/chunk-DZDZDYPO.js +5654 -0
- package/dist/chunk-DZDZDYPO.js.map +1 -0
- package/dist/{chunk-5S3H4SYX.js → chunk-GAE7SZLZ.js} +154 -9
- package/dist/chunk-GAE7SZLZ.js.map +1 -0
- package/dist/chunk-HFLLWRRV.js +5791 -0
- package/dist/chunk-HFLLWRRV.js.map +1 -0
- package/dist/{lib/chunk-ODVWXGOM.js → chunk-JL4UU4PY.js} +2 -8
- package/dist/chunk-JL4UU4PY.js.map +1 -0
- package/dist/{chunk-CKLFRLH7.js → chunk-JUGNHFDN.js} +220 -338
- package/dist/chunk-JUGNHFDN.js.map +1 -0
- package/dist/{chunk-RI2BWY7D.js → chunk-K2OUSWUX.js} +2 -3
- package/dist/chunk-K2OUSWUX.js.map +1 -0
- package/dist/chunk-KOLA6XR5.js +5770 -0
- package/dist/chunk-KOLA6XR5.js.map +1 -0
- package/dist/{chunk-3ZOUTFP5.js → chunk-L77CTMYP.js} +169 -296
- package/dist/chunk-L77CTMYP.js.map +1 -0
- package/dist/chunk-LIXBSHBJ.js +99 -0
- package/dist/chunk-LIXBSHBJ.js.map +1 -0
- package/dist/chunk-LM5SZQV5.js +5763 -0
- package/dist/chunk-LM5SZQV5.js.map +1 -0
- package/dist/chunk-M76AGXPG.js +5772 -0
- package/dist/chunk-M76AGXPG.js.map +1 -0
- package/dist/{chunk-QP7M6WUR.js → chunk-OV2GMYVM.js} +221 -341
- package/dist/chunk-OV2GMYVM.js.map +1 -0
- package/dist/{chunk-33CDF4L4.js → chunk-P4VLJQEI.js} +235 -838
- package/dist/chunk-P4VLJQEI.js.map +1 -0
- package/dist/chunk-QLSMLF5S.js +5302 -0
- package/dist/chunk-QLSMLF5S.js.map +1 -0
- package/dist/chunk-QYTZHMUN.js +5831 -0
- package/dist/chunk-QYTZHMUN.js.map +1 -0
- package/dist/chunk-SBM4WTQW.js +5771 -0
- package/dist/chunk-SBM4WTQW.js.map +1 -0
- package/dist/chunk-UAQCLV6Y.js +5816 -0
- package/dist/chunk-UAQCLV6Y.js.map +1 -0
- package/dist/chunk-YIZGWYGL.js +5300 -0
- package/dist/chunk-YIZGWYGL.js.map +1 -0
- package/dist/chunk-Z437BNC5.js +107 -0
- package/dist/chunk-Z437BNC5.js.map +1 -0
- package/dist/cli.js +182 -17
- package/dist/cli.js.map +1 -1
- package/dist/compliance-suite.js +3 -5
- package/dist/compliance-suite.js.map +1 -1
- package/dist/config-Bb9I9K-y.d.ts +1005 -0
- package/dist/config-Be-GTPYh.d.ts +976 -0
- package/dist/config-BkIqJNxv.d.ts +1009 -0
- package/dist/config-Cp5BqDfR.d.ts +731 -0
- package/dist/config-D36YRJGj.d.ts +1007 -0
- package/dist/{config-CFhN7-6U.d.ts → config-DB5rZBMx.d.ts} +109 -17
- package/dist/config-DQj8LHMT.d.ts +995 -0
- package/dist/{config-DtbN3iyg.d.ts → config-Mw_Iq324.d.ts} +5 -2
- package/dist/config-P6Ivo_zY.d.ts +997 -0
- package/dist/config-RCpZF46f.d.ts +960 -0
- package/dist/lib/{chunk-PXS4WZYB.cjs → chunk-EMRAAGPR.cjs} +102 -100
- package/dist/lib/chunk-EMRAAGPR.cjs.map +1 -0
- package/dist/lib/{chunk-XHA2RNU7.cjs → chunk-JQKYSUJJ.cjs} +728 -568
- package/dist/lib/chunk-JQKYSUJJ.cjs.map +1 -0
- package/dist/lib/{chunk-73YLAUUC.js → chunk-MD2DETZV.js} +5 -3
- package/dist/lib/chunk-MD2DETZV.js.map +1 -0
- package/dist/lib/chunk-SLITBMFB.js +114 -0
- package/dist/lib/chunk-SLITBMFB.js.map +1 -0
- package/dist/lib/{chunk-F5SBEZH2.js → chunk-VXZQQBEA.js} +175 -16
- package/dist/lib/chunk-VXZQQBEA.js.map +1 -0
- package/dist/lib/{chunk-LEYHQJTL.cjs → chunk-ZMMIYWFF.cjs} +11 -2
- package/dist/lib/chunk-ZMMIYWFF.cjs.map +1 -0
- package/dist/lib/index.cjs +99 -91
- package/dist/lib/index.d.cts +4 -4
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +3 -3
- package/dist/lib/{interpreter-6QwMkUqD.d.cts → interpreter-ByrEtz7T.d.ts} +54 -4
- package/dist/lib/{interpreter-v7WiwSP9.d.ts → interpreter-CG0Jw_k-.d.cts} +54 -4
- package/dist/lib/interpreter.cjs +81 -73
- package/dist/lib/interpreter.d.cts +7 -6
- package/dist/lib/interpreter.d.ts +7 -6
- package/dist/lib/interpreter.js +3 -3
- package/dist/lib/processor-node.cjs +12 -12
- package/dist/lib/processor-node.d.cts +3 -3
- package/dist/lib/processor-node.d.ts +3 -3
- package/dist/lib/processor-node.js +3 -3
- package/dist/lib/processor.cjs +17 -17
- package/dist/lib/processor.d.cts +4 -4
- package/dist/lib/processor.d.ts +4 -4
- package/dist/lib/processor.js +3 -3
- package/dist/lib/schema.cjs +5 -5
- package/dist/lib/schema.d.cts +1 -1
- package/dist/lib/schema.d.ts +1 -1
- package/dist/lib/schema.js +3 -3
- package/dist/lib/syntax-highlighting.cjs +15 -15
- package/dist/lib/syntax-highlighting.d.cts +1 -1
- package/dist/lib/syntax-highlighting.d.ts +1 -1
- package/dist/lib/syntax-highlighting.js +2 -2
- package/dist/lib/{types-BI0AZ4Ej.d.ts → types-BZAWM2oN.d.ts} +2 -2
- package/dist/lib/{types-cFwP43uv.d.cts → types-BhyJ6plH.d.cts} +2 -2
- package/dist/lib/{types-EB8V9c46.d.cts → types-DA9_CC7p.d.cts} +5 -2
- package/dist/lib/{types-EB8V9c46.d.ts → types-DA9_CC7p.d.ts} +5 -2
- package/dist/lib/types.cjs +10 -6
- package/dist/lib/types.d.cts +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/types.js +1 -1
- package/dist/processor/index.d.ts +1 -1
- package/dist/processor/index.js +18 -2
- package/dist/processor/index.js.map +1 -1
- package/dist/repl.d.ts +15 -3
- package/dist/repl.js +6 -8
- package/dist/repl.js.map +1 -1
- package/dist/token-schemas.js +414 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-33CDF4L4.js.map +0 -1
- package/dist/chunk-3ZOUTFP5.js.map +0 -1
- package/dist/chunk-5S3H4SYX.js.map +0 -1
- package/dist/chunk-AXH5N7KV.js.map +0 -1
- package/dist/chunk-CKLFRLH7.js.map +0 -1
- package/dist/chunk-GJIOYGP6.js +0 -6446
- package/dist/chunk-GJIOYGP6.js.map +0 -1
- package/dist/chunk-HHCPY4WI.js +0 -6456
- package/dist/chunk-HHCPY4WI.js.map +0 -1
- package/dist/chunk-MXKGYBE4.js +0 -6457
- package/dist/chunk-MXKGYBE4.js.map +0 -1
- package/dist/chunk-NGG6MBER.js +0 -6452
- package/dist/chunk-NGG6MBER.js.map +0 -1
- package/dist/chunk-QP7M6WUR.js.map +0 -1
- package/dist/lib/chunk-73YLAUUC.js.map +0 -1
- package/dist/lib/chunk-F5SBEZH2.js.map +0 -1
- package/dist/lib/chunk-LEYHQJTL.cjs.map +0 -1
- package/dist/lib/chunk-ODVWXGOM.js.map +0 -1
- package/dist/lib/chunk-PXS4WZYB.cjs.map +0 -1
- package/dist/lib/chunk-XHA2RNU7.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Token, A as ASTNode, I as ISymbolType, e as Config, R as ReferenceRecord } from './types-
|
|
1
|
+
import { T as Token, A as ASTNode, I as ISymbolType, e as Config, R as ReferenceRecord } from './types-DA9_CC7p.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Union type for serialized error data that can be passed in error data objects.
|
|
@@ -366,7 +366,8 @@ declare enum ParserErrorCode {
|
|
|
366
366
|
UNEXPECTED_END = "PARSER_UNEXPECTED_END",
|
|
367
367
|
CONDITION_MUST_BE_BOOLEAN = "PARSER_CONDITION_MUST_BE_BOOLEAN",
|
|
368
368
|
INVALID_SYNTAX = "PARSER_INVALID_SYNTAX",
|
|
369
|
-
TOLERANT_REQUIRES_INLINE = "PARSER_TOLERANT_REQUIRES_INLINE"
|
|
369
|
+
TOLERANT_REQUIRES_INLINE = "PARSER_TOLERANT_REQUIRES_INLINE",
|
|
370
|
+
UNALLOWED_INLINE_SYNTAX = "PARSER_UNALLOWED_INLINE_SYNTAX"
|
|
370
371
|
}
|
|
371
372
|
interface ParserErrorData {
|
|
372
373
|
[ParserErrorCode.UNEXPECTED_TOKEN]: {
|
|
@@ -382,6 +383,9 @@ interface ParserErrorData {
|
|
|
382
383
|
};
|
|
383
384
|
[ParserErrorCode.UNEXPECTED_END]: Record<string, never>;
|
|
384
385
|
[ParserErrorCode.TOLERANT_REQUIRES_INLINE]: Record<string, never>;
|
|
386
|
+
[ParserErrorCode.UNALLOWED_INLINE_SYNTAX]: {
|
|
387
|
+
originalError: string;
|
|
388
|
+
};
|
|
385
389
|
}
|
|
386
390
|
|
|
387
391
|
declare enum ProcessorErrorCode {
|
|
@@ -583,6 +587,16 @@ interface LexerOptions {
|
|
|
583
587
|
* Instead, it will return partial tokens where appropriate.
|
|
584
588
|
*/
|
|
585
589
|
tolerant?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* If true, unquoted strings consume greedily until whitespace or a
|
|
592
|
+
* structural delimiter ({, }, (, ), [, ], ", ', ,, ;).
|
|
593
|
+
*
|
|
594
|
+
* This allows values like `http://foo.bar` to be parsed as a single string
|
|
595
|
+
* instead of being split on `:`, `/`, and `.`.
|
|
596
|
+
*
|
|
597
|
+
* Intended for inline mode (token $value parsing) only.
|
|
598
|
+
*/
|
|
599
|
+
greedyStrings?: boolean;
|
|
586
600
|
}
|
|
587
601
|
declare class Lexer {
|
|
588
602
|
private text;
|
|
@@ -600,6 +614,7 @@ declare class Lexer {
|
|
|
600
614
|
*/
|
|
601
615
|
private _lastUnitableToken;
|
|
602
616
|
private tolerant;
|
|
617
|
+
private greedyStrings;
|
|
603
618
|
private collectedTokens;
|
|
604
619
|
constructor(text: string, options?: LexerOptions);
|
|
605
620
|
/**
|
|
@@ -619,7 +634,18 @@ declare class Lexer {
|
|
|
619
634
|
private isDigit;
|
|
620
635
|
private isValidIdentifierStart;
|
|
621
636
|
private isValidStringElement;
|
|
637
|
+
/**
|
|
638
|
+
* Greedy variant of isValidStringElement.
|
|
639
|
+
* Consumes everything except whitespace and structural delimiters.
|
|
640
|
+
* Used in inline mode to allow values like `http://foo.bar` as a single string.
|
|
641
|
+
*/
|
|
642
|
+
private isValidStringElementGreedy;
|
|
622
643
|
private stringElement;
|
|
644
|
+
/**
|
|
645
|
+
* Non-greedy string element parsing, used when in format-adjacent position
|
|
646
|
+
* so that unit suffixes are correctly extracted even in greedy mode.
|
|
647
|
+
*/
|
|
648
|
+
private stringElementNonGreedy;
|
|
623
649
|
private reference;
|
|
624
650
|
private explicitString;
|
|
625
651
|
/**
|
|
@@ -794,7 +820,31 @@ interface ParseExpressionResult {
|
|
|
794
820
|
parser: Parser;
|
|
795
821
|
ast: ASTNode | null;
|
|
796
822
|
}
|
|
797
|
-
|
|
823
|
+
/**
|
|
824
|
+
* Parsing mode — determines how the lexer and parser behave.
|
|
825
|
+
*
|
|
826
|
+
* - `"inline"` — Expression-only mode for token `$value` fields.
|
|
827
|
+
* Enables greedy strings (URLs, dotted paths parsed as single tokens).
|
|
828
|
+
* No statements (variable, if, while, etc.).
|
|
829
|
+
*
|
|
830
|
+
* - `"script"` — Full statement mode for schema/function bodies.
|
|
831
|
+
* Standard lexing (`:`, `.`, `/` produce separate tokens).
|
|
832
|
+
*/
|
|
833
|
+
type ParseMode = "inline" | "script";
|
|
834
|
+
/**
|
|
835
|
+
* Derive LexerOptions from a ParseMode, with optional overrides.
|
|
836
|
+
*
|
|
837
|
+
* Centralises the coupling between mode and lexer flags so call sites
|
|
838
|
+
* don't have to manually keep them in sync.
|
|
839
|
+
*/
|
|
840
|
+
declare function lexerOptionsForMode(mode: ParseMode, overrides?: Partial<LexerOptions>): LexerOptions;
|
|
841
|
+
interface ParseExpressionOptions {
|
|
842
|
+
/** Parsing mode. Defaults to `"script"`. */
|
|
843
|
+
mode?: ParseMode;
|
|
844
|
+
/** Extra lexer options merged on top of the mode defaults. */
|
|
845
|
+
lexerOverrides?: Partial<LexerOptions>;
|
|
846
|
+
}
|
|
847
|
+
declare function parseExpression(text: string, options?: ParseExpressionOptions): ParseExpressionResult;
|
|
798
848
|
|
|
799
849
|
declare class SymbolTable {
|
|
800
850
|
private symbols;
|
|
@@ -861,4 +911,4 @@ declare class Interpreter {
|
|
|
861
911
|
interpret(): InterpreterResult;
|
|
862
912
|
}
|
|
863
913
|
|
|
864
|
-
export { type AllErrorCodes as A,
|
|
914
|
+
export { type AllErrorCodes as A, isInterpreterError as B, ColorErrorCode as C, isLanguageError as D, type ErrorOptions as E, FunctionsErrorCode as F, isLexerError as G, isParserError as H, InterpreterError as I, isProcessorError as J, lexerOptionsForMode as K, LanguageError as L, parseExpression as M, serializeError as N, OperationsErrorCode as O, ProcessorError as P, type SerializedError as S, type TolerantParseResult as T, UnitErrorCode as U, LexerError as a, ParserError as b, type ColorErrorData as c, ConfigErrorCode as d, type ConfigErrorData as e, type FunctionsErrorData as f, type IncompleteInfo as g, IncompleteType as h, Interpreter as i, InterpreterErrorCode as j, type InterpreterErrorData as k, type InterpreterResult as l, Lexer as m, LexerErrorCode as n, type LexerErrorData as o, type OperationsErrorData as p, type ParseMode as q, ParseState as r, Parser as s, ParserErrorCode as t, type ParserErrorData as u, ProcessorErrorCode as v, type ProcessorErrorData as w, SymbolsErrorCode as x, type SymbolsErrorData as y, type UnitErrorData as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Token, A as ASTNode, I as ISymbolType, e as Config, R as ReferenceRecord } from './types-
|
|
1
|
+
import { T as Token, A as ASTNode, I as ISymbolType, e as Config, R as ReferenceRecord } from './types-DA9_CC7p.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Union type for serialized error data that can be passed in error data objects.
|
|
@@ -366,7 +366,8 @@ declare enum ParserErrorCode {
|
|
|
366
366
|
UNEXPECTED_END = "PARSER_UNEXPECTED_END",
|
|
367
367
|
CONDITION_MUST_BE_BOOLEAN = "PARSER_CONDITION_MUST_BE_BOOLEAN",
|
|
368
368
|
INVALID_SYNTAX = "PARSER_INVALID_SYNTAX",
|
|
369
|
-
TOLERANT_REQUIRES_INLINE = "PARSER_TOLERANT_REQUIRES_INLINE"
|
|
369
|
+
TOLERANT_REQUIRES_INLINE = "PARSER_TOLERANT_REQUIRES_INLINE",
|
|
370
|
+
UNALLOWED_INLINE_SYNTAX = "PARSER_UNALLOWED_INLINE_SYNTAX"
|
|
370
371
|
}
|
|
371
372
|
interface ParserErrorData {
|
|
372
373
|
[ParserErrorCode.UNEXPECTED_TOKEN]: {
|
|
@@ -382,6 +383,9 @@ interface ParserErrorData {
|
|
|
382
383
|
};
|
|
383
384
|
[ParserErrorCode.UNEXPECTED_END]: Record<string, never>;
|
|
384
385
|
[ParserErrorCode.TOLERANT_REQUIRES_INLINE]: Record<string, never>;
|
|
386
|
+
[ParserErrorCode.UNALLOWED_INLINE_SYNTAX]: {
|
|
387
|
+
originalError: string;
|
|
388
|
+
};
|
|
385
389
|
}
|
|
386
390
|
|
|
387
391
|
declare enum ProcessorErrorCode {
|
|
@@ -583,6 +587,16 @@ interface LexerOptions {
|
|
|
583
587
|
* Instead, it will return partial tokens where appropriate.
|
|
584
588
|
*/
|
|
585
589
|
tolerant?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* If true, unquoted strings consume greedily until whitespace or a
|
|
592
|
+
* structural delimiter ({, }, (, ), [, ], ", ', ,, ;).
|
|
593
|
+
*
|
|
594
|
+
* This allows values like `http://foo.bar` to be parsed as a single string
|
|
595
|
+
* instead of being split on `:`, `/`, and `.`.
|
|
596
|
+
*
|
|
597
|
+
* Intended for inline mode (token $value parsing) only.
|
|
598
|
+
*/
|
|
599
|
+
greedyStrings?: boolean;
|
|
586
600
|
}
|
|
587
601
|
declare class Lexer {
|
|
588
602
|
private text;
|
|
@@ -600,6 +614,7 @@ declare class Lexer {
|
|
|
600
614
|
*/
|
|
601
615
|
private _lastUnitableToken;
|
|
602
616
|
private tolerant;
|
|
617
|
+
private greedyStrings;
|
|
603
618
|
private collectedTokens;
|
|
604
619
|
constructor(text: string, options?: LexerOptions);
|
|
605
620
|
/**
|
|
@@ -619,7 +634,18 @@ declare class Lexer {
|
|
|
619
634
|
private isDigit;
|
|
620
635
|
private isValidIdentifierStart;
|
|
621
636
|
private isValidStringElement;
|
|
637
|
+
/**
|
|
638
|
+
* Greedy variant of isValidStringElement.
|
|
639
|
+
* Consumes everything except whitespace and structural delimiters.
|
|
640
|
+
* Used in inline mode to allow values like `http://foo.bar` as a single string.
|
|
641
|
+
*/
|
|
642
|
+
private isValidStringElementGreedy;
|
|
622
643
|
private stringElement;
|
|
644
|
+
/**
|
|
645
|
+
* Non-greedy string element parsing, used when in format-adjacent position
|
|
646
|
+
* so that unit suffixes are correctly extracted even in greedy mode.
|
|
647
|
+
*/
|
|
648
|
+
private stringElementNonGreedy;
|
|
623
649
|
private reference;
|
|
624
650
|
private explicitString;
|
|
625
651
|
/**
|
|
@@ -794,7 +820,31 @@ interface ParseExpressionResult {
|
|
|
794
820
|
parser: Parser;
|
|
795
821
|
ast: ASTNode | null;
|
|
796
822
|
}
|
|
797
|
-
|
|
823
|
+
/**
|
|
824
|
+
* Parsing mode — determines how the lexer and parser behave.
|
|
825
|
+
*
|
|
826
|
+
* - `"inline"` — Expression-only mode for token `$value` fields.
|
|
827
|
+
* Enables greedy strings (URLs, dotted paths parsed as single tokens).
|
|
828
|
+
* No statements (variable, if, while, etc.).
|
|
829
|
+
*
|
|
830
|
+
* - `"script"` — Full statement mode for schema/function bodies.
|
|
831
|
+
* Standard lexing (`:`, `.`, `/` produce separate tokens).
|
|
832
|
+
*/
|
|
833
|
+
type ParseMode = "inline" | "script";
|
|
834
|
+
/**
|
|
835
|
+
* Derive LexerOptions from a ParseMode, with optional overrides.
|
|
836
|
+
*
|
|
837
|
+
* Centralises the coupling between mode and lexer flags so call sites
|
|
838
|
+
* don't have to manually keep them in sync.
|
|
839
|
+
*/
|
|
840
|
+
declare function lexerOptionsForMode(mode: ParseMode, overrides?: Partial<LexerOptions>): LexerOptions;
|
|
841
|
+
interface ParseExpressionOptions {
|
|
842
|
+
/** Parsing mode. Defaults to `"script"`. */
|
|
843
|
+
mode?: ParseMode;
|
|
844
|
+
/** Extra lexer options merged on top of the mode defaults. */
|
|
845
|
+
lexerOverrides?: Partial<LexerOptions>;
|
|
846
|
+
}
|
|
847
|
+
declare function parseExpression(text: string, options?: ParseExpressionOptions): ParseExpressionResult;
|
|
798
848
|
|
|
799
849
|
declare class SymbolTable {
|
|
800
850
|
private symbols;
|
|
@@ -861,4 +911,4 @@ declare class Interpreter {
|
|
|
861
911
|
interpret(): InterpreterResult;
|
|
862
912
|
}
|
|
863
913
|
|
|
864
|
-
export { type AllErrorCodes as A,
|
|
914
|
+
export { type AllErrorCodes as A, isInterpreterError as B, ColorErrorCode as C, isLanguageError as D, type ErrorOptions as E, FunctionsErrorCode as F, isLexerError as G, isParserError as H, InterpreterError as I, isProcessorError as J, lexerOptionsForMode as K, LanguageError as L, parseExpression as M, serializeError as N, OperationsErrorCode as O, ProcessorError as P, type SerializedError as S, type TolerantParseResult as T, UnitErrorCode as U, LexerError as a, ParserError as b, type ColorErrorData as c, ConfigErrorCode as d, type ConfigErrorData as e, type FunctionsErrorData as f, type IncompleteInfo as g, IncompleteType as h, Interpreter as i, InterpreterErrorCode as j, type InterpreterErrorData as k, type InterpreterResult as l, Lexer as m, LexerErrorCode as n, type LexerErrorData as o, type OperationsErrorData as p, type ParseMode as q, ParseState as r, Parser as s, ParserErrorCode as t, type ParserErrorData as u, ProcessorErrorCode as v, type ProcessorErrorData as w, SymbolsErrorCode as x, type SymbolsErrorData as y, type UnitErrorData as z };
|
package/dist/lib/interpreter.cjs
CHANGED
|
@@ -1,290 +1,298 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkJQKYSUJJ_cjs = require('./chunk-JQKYSUJJ.cjs');
|
|
4
|
+
var chunkEMRAAGPR_cjs = require('./chunk-EMRAAGPR.cjs');
|
|
5
|
+
var chunkZMMIYWFF_cjs = require('./chunk-ZMMIYWFF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "ASTNodes", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkJQKYSUJJ_cjs.ASTNodes; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "ColorManager", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkJQKYSUJJ_cjs.ColorManager; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "ColorSpecificationSchema", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkJQKYSUJJ_cjs.ColorSpecificationSchema; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "Config", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkJQKYSUJJ_cjs.Config; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "ConstantsSpecificationSchema", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkJQKYSUJJ_cjs.ConstantsSpecificationSchema; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "DEFAULT_LANGUAGE_OPTIONS", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkJQKYSUJJ_cjs.DEFAULT_LANGUAGE_OPTIONS; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "FunctionSpecificationSchema", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkJQKYSUJJ_cjs.FunctionSpecificationSchema; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "FunctionsManager", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkJQKYSUJJ_cjs.FunctionsManager; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "IncompleteType", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkJQKYSUJJ_cjs.IncompleteType; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "Interpreter", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkJQKYSUJJ_cjs.Interpreter; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "Lexer", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkJQKYSUJJ_cjs.Lexer; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "ParseState", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkJQKYSUJJ_cjs.ParseState; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "Parser", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkJQKYSUJJ_cjs.Parser; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "PartialBinOpNode", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialBinOpNode; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "PartialFunctionCallNode", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialFunctionCallNode; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "PartialParenNode", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialParenNode; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "PartialReferenceNode", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialReferenceNode; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "PartialStringNode", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialStringNode; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "PartialUnaryOpNode", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkJQKYSUJJ_cjs.PartialUnaryOpNode; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "UnitManager", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkJQKYSUJJ_cjs.UnitManager; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "UnitSpecificationSchema", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkJQKYSUJJ_cjs.UnitSpecificationSchema; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "collectAllReferences", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkJQKYSUJJ_cjs.collectAllReferences; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "collectReferenceNodes", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkJQKYSUJJ_cjs.collectReferenceNodes; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "evaluateExpression", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkJQKYSUJJ_cjs.evaluateExpression; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "filterAST", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkJQKYSUJJ_cjs.filterAST; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "hasPartialNodes", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkJQKYSUJJ_cjs.hasPartialNodes; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "lexerOptionsForMode", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkJQKYSUJJ_cjs.lexerOptionsForMode; }
|
|
112
116
|
});
|
|
113
117
|
Object.defineProperty(exports, "parseExpression", {
|
|
114
118
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkJQKYSUJJ_cjs.parseExpression; }
|
|
116
120
|
});
|
|
117
121
|
Object.defineProperty(exports, "parseTolerantly", {
|
|
118
122
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkJQKYSUJJ_cjs.parseTolerantly; }
|
|
120
124
|
});
|
|
121
125
|
Object.defineProperty(exports, "renameReferences", {
|
|
122
126
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkJQKYSUJJ_cjs.renameReferences; }
|
|
124
128
|
});
|
|
125
129
|
Object.defineProperty(exports, "tokenizeTolerantly", {
|
|
126
130
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkJQKYSUJJ_cjs.tokenizeTolerantly; }
|
|
128
132
|
});
|
|
129
133
|
Object.defineProperty(exports, "walkAST", {
|
|
130
134
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkJQKYSUJJ_cjs.walkAST; }
|
|
132
136
|
});
|
|
133
137
|
Object.defineProperty(exports, "BaseSymbolType", {
|
|
134
138
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkEMRAAGPR_cjs.BaseSymbolType; }
|
|
136
140
|
});
|
|
137
141
|
Object.defineProperty(exports, "BooleanSymbol", {
|
|
138
142
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkEMRAAGPR_cjs.BooleanSymbol; }
|
|
140
144
|
});
|
|
141
145
|
Object.defineProperty(exports, "ColorErrorCode", {
|
|
142
146
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkEMRAAGPR_cjs.ColorErrorCode; }
|
|
144
148
|
});
|
|
145
149
|
Object.defineProperty(exports, "ColorSymbol", {
|
|
146
150
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkEMRAAGPR_cjs.ColorSymbol; }
|
|
148
152
|
});
|
|
149
153
|
Object.defineProperty(exports, "ConfigErrorCode", {
|
|
150
154
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkEMRAAGPR_cjs.ConfigErrorCode; }
|
|
152
156
|
});
|
|
153
157
|
Object.defineProperty(exports, "DictionarySymbol", {
|
|
154
158
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkEMRAAGPR_cjs.DictionarySymbol; }
|
|
156
160
|
});
|
|
157
161
|
Object.defineProperty(exports, "FunctionsErrorCode", {
|
|
158
162
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkEMRAAGPR_cjs.FunctionsErrorCode; }
|
|
160
164
|
});
|
|
161
165
|
Object.defineProperty(exports, "InterpreterError", {
|
|
162
166
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkEMRAAGPR_cjs.InterpreterError; }
|
|
164
168
|
});
|
|
165
169
|
Object.defineProperty(exports, "InterpreterErrorCode", {
|
|
166
170
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkEMRAAGPR_cjs.InterpreterErrorCode; }
|
|
168
172
|
});
|
|
169
173
|
Object.defineProperty(exports, "LanguageError", {
|
|
170
174
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkEMRAAGPR_cjs.LanguageError; }
|
|
172
176
|
});
|
|
173
177
|
Object.defineProperty(exports, "LexerError", {
|
|
174
178
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkEMRAAGPR_cjs.LexerError; }
|
|
176
180
|
});
|
|
177
181
|
Object.defineProperty(exports, "LexerErrorCode", {
|
|
178
182
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkEMRAAGPR_cjs.LexerErrorCode; }
|
|
180
184
|
});
|
|
181
185
|
Object.defineProperty(exports, "ListSymbol", {
|
|
182
186
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkEMRAAGPR_cjs.ListSymbol; }
|
|
184
188
|
});
|
|
185
189
|
Object.defineProperty(exports, "NullSymbol", {
|
|
186
190
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkEMRAAGPR_cjs.NullSymbol; }
|
|
188
192
|
});
|
|
189
193
|
Object.defineProperty(exports, "NumberSymbol", {
|
|
190
194
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkEMRAAGPR_cjs.NumberSymbol; }
|
|
192
196
|
});
|
|
193
197
|
Object.defineProperty(exports, "NumberWithUnitSymbol", {
|
|
194
198
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkEMRAAGPR_cjs.NumberWithUnitSymbol; }
|
|
196
200
|
});
|
|
197
201
|
Object.defineProperty(exports, "OperationsErrorCode", {
|
|
198
202
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkEMRAAGPR_cjs.OperationsErrorCode; }
|
|
200
204
|
});
|
|
201
205
|
Object.defineProperty(exports, "ParserError", {
|
|
202
206
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkEMRAAGPR_cjs.ParserError; }
|
|
204
208
|
});
|
|
205
209
|
Object.defineProperty(exports, "ParserErrorCode", {
|
|
206
210
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkEMRAAGPR_cjs.ParserErrorCode; }
|
|
208
212
|
});
|
|
209
213
|
Object.defineProperty(exports, "ProcessorError", {
|
|
210
214
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkEMRAAGPR_cjs.ProcessorError; }
|
|
212
216
|
});
|
|
213
217
|
Object.defineProperty(exports, "ProcessorErrorCode", {
|
|
214
218
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkEMRAAGPR_cjs.ProcessorErrorCode; }
|
|
216
220
|
});
|
|
217
221
|
Object.defineProperty(exports, "StringSymbol", {
|
|
218
222
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkEMRAAGPR_cjs.StringSymbol; }
|
|
220
224
|
});
|
|
221
225
|
Object.defineProperty(exports, "SymbolsErrorCode", {
|
|
222
226
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkEMRAAGPR_cjs.SymbolsErrorCode; }
|
|
224
228
|
});
|
|
225
229
|
Object.defineProperty(exports, "TokenSymbol", {
|
|
226
230
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkEMRAAGPR_cjs.TokenSymbol; }
|
|
228
232
|
});
|
|
229
233
|
Object.defineProperty(exports, "UnitErrorCode", {
|
|
230
234
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkEMRAAGPR_cjs.UnitErrorCode; }
|
|
232
236
|
});
|
|
233
237
|
Object.defineProperty(exports, "getMessage", {
|
|
234
238
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkEMRAAGPR_cjs.getMessage; }
|
|
236
240
|
});
|
|
237
241
|
Object.defineProperty(exports, "getResultTypeName", {
|
|
238
242
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkEMRAAGPR_cjs.getResultTypeName; }
|
|
240
244
|
});
|
|
241
245
|
Object.defineProperty(exports, "isInterpreterError", {
|
|
242
246
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkEMRAAGPR_cjs.isInterpreterError; }
|
|
244
248
|
});
|
|
245
249
|
Object.defineProperty(exports, "isLanguageError", {
|
|
246
250
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkEMRAAGPR_cjs.isLanguageError; }
|
|
248
252
|
});
|
|
249
253
|
Object.defineProperty(exports, "isLexerError", {
|
|
250
254
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkEMRAAGPR_cjs.isLexerError; }
|
|
252
256
|
});
|
|
253
257
|
Object.defineProperty(exports, "isParserError", {
|
|
254
258
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkEMRAAGPR_cjs.isParserError; }
|
|
256
260
|
});
|
|
257
261
|
Object.defineProperty(exports, "isProcessorError", {
|
|
258
262
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkEMRAAGPR_cjs.isProcessorError; }
|
|
260
264
|
});
|
|
261
265
|
Object.defineProperty(exports, "jsValueToSymbolType", {
|
|
262
266
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkEMRAAGPR_cjs.jsValueToSymbolType; }
|
|
264
268
|
});
|
|
265
269
|
Object.defineProperty(exports, "serializeError", {
|
|
266
270
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
271
|
+
get: function () { return chunkEMRAAGPR_cjs.serializeError; }
|
|
268
272
|
});
|
|
269
273
|
Object.defineProperty(exports, "Operations", {
|
|
270
274
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
275
|
+
get: function () { return chunkZMMIYWFF_cjs.Operations; }
|
|
272
276
|
});
|
|
273
277
|
Object.defineProperty(exports, "ReservedKeyword", {
|
|
274
278
|
enumerable: true,
|
|
275
|
-
get: function () { return
|
|
279
|
+
get: function () { return chunkZMMIYWFF_cjs.ReservedKeyword; }
|
|
280
|
+
});
|
|
281
|
+
Object.defineProperty(exports, "SCRIPT_ONLY_STATEMENT_KEYWORDS", {
|
|
282
|
+
enumerable: true,
|
|
283
|
+
get: function () { return chunkZMMIYWFF_cjs.SCRIPT_ONLY_STATEMENT_KEYWORDS; }
|
|
276
284
|
});
|
|
277
285
|
Object.defineProperty(exports, "SupportedFormats", {
|
|
278
286
|
enumerable: true,
|
|
279
|
-
get: function () { return
|
|
287
|
+
get: function () { return chunkZMMIYWFF_cjs.SupportedFormats; }
|
|
280
288
|
});
|
|
281
289
|
Object.defineProperty(exports, "TokenType", {
|
|
282
290
|
enumerable: true,
|
|
283
|
-
get: function () { return
|
|
291
|
+
get: function () { return chunkZMMIYWFF_cjs.TokenType; }
|
|
284
292
|
});
|
|
285
293
|
Object.defineProperty(exports, "UNINTERPRETED_KEYWORDS", {
|
|
286
294
|
enumerable: true,
|
|
287
|
-
get: function () { return
|
|
295
|
+
get: function () { return chunkZMMIYWFF_cjs.UNINTERPRETED_KEYWORDS; }
|
|
288
296
|
});
|
|
289
297
|
//# sourceMappingURL=interpreter.cjs.map
|
|
290
298
|
//# sourceMappingURL=interpreter.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as ASTNode, T as Token, O as Operations,
|
|
2
|
-
export { B as BaseSymbolType, a as BooleanSymbol, C as ColorManager, b as ColorSpecification, c as ColorSpecificationSchema, d as ColorSymbol, f as ConfigOptions, g as ConstantsSpecification, h as ConstantsSpecificationSchema, D as DEFAULT_LANGUAGE_OPTIONS, i as DictionarySymbol, F as FunctionSpecification, j as FunctionSpecificationSchema, k as FunctionsManager, I as ISymbolType, J as JsValue, L as LanguageOptions, l as ListSymbol, N as NullSymbol, m as NumberSymbol, n as NumberWithUnitSymbol, o as ReferenceRecordValue, p as ReservedKeyword, S as
|
|
3
|
-
import { A as AllErrorCodes, L as LanguageError, T as TolerantParseResult } from './interpreter-
|
|
4
|
-
export { C as ColorErrorCode, c as ColorErrorData, d as ConfigErrorCode, e as ConfigErrorData, E as ErrorOptions, F as FunctionsErrorCode, f as FunctionsErrorData, g as IncompleteInfo, h as IncompleteType, i as Interpreter, I as InterpreterError, j as InterpreterErrorCode, k as InterpreterErrorData, l as InterpreterResult, m as Lexer, a as LexerError, n as LexerErrorCode, o as LexerErrorData, O as OperationsErrorCode, p as OperationsErrorData,
|
|
1
|
+
import { A as ASTNode, T as Token, O as Operations, u as TokenType, R as ReferenceRecord, e as Config, K as ReferenceNode, M as BinOpNode, P as FunctionCallNode, Q as ImplicitListNode, V as ListNode, W as NoOpNode, X as NumNode, Y as StringNode, Z as UnaryOpNode } from './types-DA9_CC7p.cjs';
|
|
2
|
+
export { B as BaseSymbolType, a as BooleanSymbol, C as ColorManager, b as ColorSpecification, c as ColorSpecificationSchema, d as ColorSymbol, f as ConfigOptions, g as ConstantsSpecification, h as ConstantsSpecificationSchema, D as DEFAULT_LANGUAGE_OPTIONS, i as DictionarySymbol, F as FunctionSpecification, j as FunctionSpecificationSchema, k as FunctionsManager, I as ISymbolType, J as JsValue, L as LanguageOptions, l as ListSymbol, N as NullSymbol, m as NumberSymbol, n as NumberWithUnitSymbol, o as ReferenceRecordValue, p as ReservedKeyword, S as SCRIPT_ONLY_STATEMENT_KEYWORDS, q as StringSymbol, r as SupportedFormats, s as SymbolMetadata, t as TokenSymbol, U as UNINTERPRETED_KEYWORDS, v as UnitManager, w as UnitSpecification, x as UnitSpecificationSchema, y as collectReferenceNodes, z as filterAST, E as getResultTypeName, G as jsValueToSymbolType, H as walkAST } from './types-DA9_CC7p.cjs';
|
|
3
|
+
import { A as AllErrorCodes, L as LanguageError, q as ParseMode, T as TolerantParseResult } from './interpreter-CG0Jw_k-.cjs';
|
|
4
|
+
export { C as ColorErrorCode, c as ColorErrorData, d as ConfigErrorCode, e as ConfigErrorData, E as ErrorOptions, F as FunctionsErrorCode, f as FunctionsErrorData, g as IncompleteInfo, h as IncompleteType, i as Interpreter, I as InterpreterError, j as InterpreterErrorCode, k as InterpreterErrorData, l as InterpreterResult, m as Lexer, a as LexerError, n as LexerErrorCode, o as LexerErrorData, O as OperationsErrorCode, p as OperationsErrorData, r as ParseState, s as Parser, b as ParserError, t as ParserErrorCode, u as ParserErrorData, P as ProcessorError, v as ProcessorErrorCode, w as ProcessorErrorData, S as SerializedError, x as SymbolsErrorCode, y as SymbolsErrorData, U as UnitErrorCode, z as UnitErrorData, B as isInterpreterError, D as isLanguageError, G as isLexerError, H as isParserError, J as isProcessorError, K as lexerOptionsForMode, M as parseExpression, N as serializeError } from './interpreter-CG0Jw_k-.cjs';
|
|
5
5
|
import '@tokens-studio/schema-validation';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -116,7 +116,8 @@ declare function renameReferences(originalValue: string, ast: ASTNode, renameMap
|
|
|
116
116
|
interface EvalOptions {
|
|
117
117
|
references?: ReferenceRecord;
|
|
118
118
|
config?: Config;
|
|
119
|
-
|
|
119
|
+
/** Parsing mode. Defaults to `"script"`. */
|
|
120
|
+
mode?: ParseMode;
|
|
120
121
|
}
|
|
121
122
|
interface EvalSuccess {
|
|
122
123
|
success: true;
|
|
@@ -224,4 +225,4 @@ declare const ASTNodes: {
|
|
|
224
225
|
UnaryOpNode: typeof UnaryOpNode;
|
|
225
226
|
};
|
|
226
227
|
|
|
227
|
-
export { ASTNode, ASTNodes, AllErrorCodes, Config, type EvalError, type EvalOptions, type EvalResult, type EvalSuccess, LanguageError, Operations, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, type ReferenceInfo, ReferenceRecord, Token, TokenType, TolerantParseResult, collectAllReferences, evaluateExpression, getMessage, hasPartialNodes, parseTolerantly, renameReferences, tokenizeTolerantly };
|
|
228
|
+
export { ASTNode, ASTNodes, AllErrorCodes, Config, type EvalError, type EvalOptions, type EvalResult, type EvalSuccess, LanguageError, Operations, ParseMode, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, type ReferenceInfo, ReferenceRecord, Token, TokenType, TolerantParseResult, collectAllReferences, evaluateExpression, getMessage, hasPartialNodes, parseTolerantly, renameReferences, tokenizeTolerantly };
|