@tokens-studio/tokenscript-interpreter 0.36.4 → 0.37.1
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-3D6X7EAK.js +6605 -0
- package/dist/chunk-3D6X7EAK.js.map +1 -0
- package/dist/chunk-6KHDVYST.js +6616 -0
- package/dist/chunk-6KHDVYST.js.map +1 -0
- package/dist/chunk-6MXPTXGR.js +6591 -0
- package/dist/chunk-6MXPTXGR.js.map +1 -0
- package/dist/chunk-EM64RW7I.js +6592 -0
- package/dist/chunk-EM64RW7I.js.map +1 -0
- package/dist/chunk-H7YXFZ4I.js +6605 -0
- package/dist/chunk-H7YXFZ4I.js.map +1 -0
- package/dist/chunk-Z437BNC5.js +107 -0
- package/dist/chunk-Z437BNC5.js.map +1 -0
- package/dist/cli.js +149 -16
- 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-B-kbeoff.d.ts +927 -0
- package/dist/config-Mw_Iq324.d.ts +921 -0
- package/dist/lib/{chunk-S7WGJBSX.js → chunk-24FMHL6W.js} +16 -3
- package/dist/lib/chunk-24FMHL6W.js.map +1 -0
- package/dist/lib/{chunk-2BDFE7U4.js → chunk-4L54VFWU.js} +132 -15
- package/dist/lib/chunk-4L54VFWU.js.map +1 -0
- package/dist/lib/{chunk-UF6I25ED.cjs → chunk-KX5QZ5G2.cjs} +685 -567
- package/dist/lib/chunk-KX5QZ5G2.cjs.map +1 -0
- package/dist/lib/{chunk-K65UI6KX.cjs → chunk-OABJLZRZ.cjs} +113 -100
- package/dist/lib/chunk-OABJLZRZ.cjs.map +1 -0
- package/dist/lib/{chunk-AEOBCHBK.js → chunk-SLITBMFB.js} +10 -3
- package/dist/lib/chunk-SLITBMFB.js.map +1 -0
- package/dist/lib/{chunk-KHF2VXWO.cjs → chunk-ZMMIYWFF.cjs} +10 -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-DdF_Hj-J.d.ts → interpreter-B7BcLEBz.d.cts} +54 -4
- package/dist/lib/{interpreter-Cz_vWDDa.d.cts → interpreter-wKto6JTb.d.ts} +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-DRpZJjkx.d.ts → types-BHcQYEQ-.d.ts} +2 -2
- package/dist/lib/{types-CxQPMHn1.d.ts → types-BMYcHiSq.d.cts} +9 -1
- package/dist/lib/{types-CxQPMHn1.d.cts → types-BMYcHiSq.d.ts} +9 -1
- package/dist/lib/{types-6QQt-XVS.d.cts → types-BOyxzACN.d.cts} +2 -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/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/dist/lib/chunk-2BDFE7U4.js.map +0 -1
- package/dist/lib/chunk-AEOBCHBK.js.map +0 -1
- package/dist/lib/chunk-K65UI6KX.cjs.map +0 -1
- package/dist/lib/chunk-KHF2VXWO.cjs.map +0 -1
- package/dist/lib/chunk-S7WGJBSX.js.map +0 -1
- package/dist/lib/chunk-UF6I25ED.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-BMYcHiSq.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 };
|
package/dist/lib/interpreter.cjs
CHANGED
|
@@ -1,290 +1,298 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkKX5QZ5G2_cjs = require('./chunk-KX5QZ5G2.cjs');
|
|
4
|
+
var chunkOABJLZRZ_cjs = require('./chunk-OABJLZRZ.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 chunkKX5QZ5G2_cjs.ASTNodes; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "ColorManager", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkKX5QZ5G2_cjs.ColorManager; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "ColorSpecificationSchema", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkKX5QZ5G2_cjs.ColorSpecificationSchema; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "Config", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkKX5QZ5G2_cjs.Config; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "ConstantsSpecificationSchema", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkKX5QZ5G2_cjs.ConstantsSpecificationSchema; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "DEFAULT_LANGUAGE_OPTIONS", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkKX5QZ5G2_cjs.DEFAULT_LANGUAGE_OPTIONS; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "FunctionSpecificationSchema", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkKX5QZ5G2_cjs.FunctionSpecificationSchema; }
|
|
36
36
|
});
|
|
37
37
|
Object.defineProperty(exports, "FunctionsManager", {
|
|
38
38
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkKX5QZ5G2_cjs.FunctionsManager; }
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "IncompleteType", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkKX5QZ5G2_cjs.IncompleteType; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "Interpreter", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkKX5QZ5G2_cjs.Interpreter; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "Lexer", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkKX5QZ5G2_cjs.Lexer; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "ParseState", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkKX5QZ5G2_cjs.ParseState; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "Parser", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkKX5QZ5G2_cjs.Parser; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "PartialBinOpNode", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialBinOpNode; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "PartialFunctionCallNode", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialFunctionCallNode; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "PartialParenNode", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialParenNode; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "PartialReferenceNode", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialReferenceNode; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "PartialStringNode", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialStringNode; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "PartialUnaryOpNode", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkKX5QZ5G2_cjs.PartialUnaryOpNode; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "UnitManager", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkKX5QZ5G2_cjs.UnitManager; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "UnitSpecificationSchema", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkKX5QZ5G2_cjs.UnitSpecificationSchema; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "collectAllReferences", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkKX5QZ5G2_cjs.collectAllReferences; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "collectReferenceNodes", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkKX5QZ5G2_cjs.collectReferenceNodes; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "evaluateExpression", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkKX5QZ5G2_cjs.evaluateExpression; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "filterAST", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkKX5QZ5G2_cjs.filterAST; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "hasPartialNodes", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkKX5QZ5G2_cjs.hasPartialNodes; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "lexerOptionsForMode", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkKX5QZ5G2_cjs.lexerOptionsForMode; }
|
|
112
116
|
});
|
|
113
117
|
Object.defineProperty(exports, "parseExpression", {
|
|
114
118
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkKX5QZ5G2_cjs.parseExpression; }
|
|
116
120
|
});
|
|
117
121
|
Object.defineProperty(exports, "parseTolerantly", {
|
|
118
122
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkKX5QZ5G2_cjs.parseTolerantly; }
|
|
120
124
|
});
|
|
121
125
|
Object.defineProperty(exports, "renameReferences", {
|
|
122
126
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkKX5QZ5G2_cjs.renameReferences; }
|
|
124
128
|
});
|
|
125
129
|
Object.defineProperty(exports, "tokenizeTolerantly", {
|
|
126
130
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkKX5QZ5G2_cjs.tokenizeTolerantly; }
|
|
128
132
|
});
|
|
129
133
|
Object.defineProperty(exports, "walkAST", {
|
|
130
134
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkKX5QZ5G2_cjs.walkAST; }
|
|
132
136
|
});
|
|
133
137
|
Object.defineProperty(exports, "BaseSymbolType", {
|
|
134
138
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkOABJLZRZ_cjs.BaseSymbolType; }
|
|
136
140
|
});
|
|
137
141
|
Object.defineProperty(exports, "BooleanSymbol", {
|
|
138
142
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkOABJLZRZ_cjs.BooleanSymbol; }
|
|
140
144
|
});
|
|
141
145
|
Object.defineProperty(exports, "ColorErrorCode", {
|
|
142
146
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkOABJLZRZ_cjs.ColorErrorCode; }
|
|
144
148
|
});
|
|
145
149
|
Object.defineProperty(exports, "ColorSymbol", {
|
|
146
150
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkOABJLZRZ_cjs.ColorSymbol; }
|
|
148
152
|
});
|
|
149
153
|
Object.defineProperty(exports, "ConfigErrorCode", {
|
|
150
154
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkOABJLZRZ_cjs.ConfigErrorCode; }
|
|
152
156
|
});
|
|
153
157
|
Object.defineProperty(exports, "DictionarySymbol", {
|
|
154
158
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkOABJLZRZ_cjs.DictionarySymbol; }
|
|
156
160
|
});
|
|
157
161
|
Object.defineProperty(exports, "FunctionsErrorCode", {
|
|
158
162
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkOABJLZRZ_cjs.FunctionsErrorCode; }
|
|
160
164
|
});
|
|
161
165
|
Object.defineProperty(exports, "InterpreterError", {
|
|
162
166
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkOABJLZRZ_cjs.InterpreterError; }
|
|
164
168
|
});
|
|
165
169
|
Object.defineProperty(exports, "InterpreterErrorCode", {
|
|
166
170
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkOABJLZRZ_cjs.InterpreterErrorCode; }
|
|
168
172
|
});
|
|
169
173
|
Object.defineProperty(exports, "LanguageError", {
|
|
170
174
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkOABJLZRZ_cjs.LanguageError; }
|
|
172
176
|
});
|
|
173
177
|
Object.defineProperty(exports, "LexerError", {
|
|
174
178
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkOABJLZRZ_cjs.LexerError; }
|
|
176
180
|
});
|
|
177
181
|
Object.defineProperty(exports, "LexerErrorCode", {
|
|
178
182
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkOABJLZRZ_cjs.LexerErrorCode; }
|
|
180
184
|
});
|
|
181
185
|
Object.defineProperty(exports, "ListSymbol", {
|
|
182
186
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkOABJLZRZ_cjs.ListSymbol; }
|
|
184
188
|
});
|
|
185
189
|
Object.defineProperty(exports, "NullSymbol", {
|
|
186
190
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkOABJLZRZ_cjs.NullSymbol; }
|
|
188
192
|
});
|
|
189
193
|
Object.defineProperty(exports, "NumberSymbol", {
|
|
190
194
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkOABJLZRZ_cjs.NumberSymbol; }
|
|
192
196
|
});
|
|
193
197
|
Object.defineProperty(exports, "NumberWithUnitSymbol", {
|
|
194
198
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkOABJLZRZ_cjs.NumberWithUnitSymbol; }
|
|
196
200
|
});
|
|
197
201
|
Object.defineProperty(exports, "OperationsErrorCode", {
|
|
198
202
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkOABJLZRZ_cjs.OperationsErrorCode; }
|
|
200
204
|
});
|
|
201
205
|
Object.defineProperty(exports, "ParserError", {
|
|
202
206
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkOABJLZRZ_cjs.ParserError; }
|
|
204
208
|
});
|
|
205
209
|
Object.defineProperty(exports, "ParserErrorCode", {
|
|
206
210
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkOABJLZRZ_cjs.ParserErrorCode; }
|
|
208
212
|
});
|
|
209
213
|
Object.defineProperty(exports, "ProcessorError", {
|
|
210
214
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkOABJLZRZ_cjs.ProcessorError; }
|
|
212
216
|
});
|
|
213
217
|
Object.defineProperty(exports, "ProcessorErrorCode", {
|
|
214
218
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkOABJLZRZ_cjs.ProcessorErrorCode; }
|
|
216
220
|
});
|
|
217
221
|
Object.defineProperty(exports, "StringSymbol", {
|
|
218
222
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkOABJLZRZ_cjs.StringSymbol; }
|
|
220
224
|
});
|
|
221
225
|
Object.defineProperty(exports, "SymbolsErrorCode", {
|
|
222
226
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkOABJLZRZ_cjs.SymbolsErrorCode; }
|
|
224
228
|
});
|
|
225
229
|
Object.defineProperty(exports, "TokenSymbol", {
|
|
226
230
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
231
|
+
get: function () { return chunkOABJLZRZ_cjs.TokenSymbol; }
|
|
228
232
|
});
|
|
229
233
|
Object.defineProperty(exports, "UnitErrorCode", {
|
|
230
234
|
enumerable: true,
|
|
231
|
-
get: function () { return
|
|
235
|
+
get: function () { return chunkOABJLZRZ_cjs.UnitErrorCode; }
|
|
232
236
|
});
|
|
233
237
|
Object.defineProperty(exports, "getMessage", {
|
|
234
238
|
enumerable: true,
|
|
235
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkOABJLZRZ_cjs.getMessage; }
|
|
236
240
|
});
|
|
237
241
|
Object.defineProperty(exports, "getResultTypeName", {
|
|
238
242
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkOABJLZRZ_cjs.getResultTypeName; }
|
|
240
244
|
});
|
|
241
245
|
Object.defineProperty(exports, "isInterpreterError", {
|
|
242
246
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkOABJLZRZ_cjs.isInterpreterError; }
|
|
244
248
|
});
|
|
245
249
|
Object.defineProperty(exports, "isLanguageError", {
|
|
246
250
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkOABJLZRZ_cjs.isLanguageError; }
|
|
248
252
|
});
|
|
249
253
|
Object.defineProperty(exports, "isLexerError", {
|
|
250
254
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkOABJLZRZ_cjs.isLexerError; }
|
|
252
256
|
});
|
|
253
257
|
Object.defineProperty(exports, "isParserError", {
|
|
254
258
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkOABJLZRZ_cjs.isParserError; }
|
|
256
260
|
});
|
|
257
261
|
Object.defineProperty(exports, "isProcessorError", {
|
|
258
262
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkOABJLZRZ_cjs.isProcessorError; }
|
|
260
264
|
});
|
|
261
265
|
Object.defineProperty(exports, "jsValueToSymbolType", {
|
|
262
266
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkOABJLZRZ_cjs.jsValueToSymbolType; }
|
|
264
268
|
});
|
|
265
269
|
Object.defineProperty(exports, "serializeError", {
|
|
266
270
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
271
|
+
get: function () { return chunkOABJLZRZ_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-BMYcHiSq.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-BMYcHiSq.cjs';
|
|
3
|
+
import { A as AllErrorCodes, L as LanguageError, q as ParseMode, T as TolerantParseResult } from './interpreter-B7BcLEBz.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-B7BcLEBz.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 };
|
|
@@ -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-BMYcHiSq.js';
|
|
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-BMYcHiSq.js';
|
|
3
|
+
import { A as AllErrorCodes, L as LanguageError, q as ParseMode, T as TolerantParseResult } from './interpreter-wKto6JTb.js';
|
|
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-wKto6JTb.js';
|
|
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 };
|
package/dist/lib/interpreter.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ASTNodes, ColorManager, ColorSpecificationSchema, Config, ConstantsSpecificationSchema, DEFAULT_LANGUAGE_OPTIONS, FunctionSpecificationSchema, FunctionsManager, IncompleteType, Interpreter, Lexer, ParseState, Parser, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, UnitManager, UnitSpecificationSchema, collectAllReferences, collectReferenceNodes, evaluateExpression, filterAST, hasPartialNodes, parseExpression, parseTolerantly, renameReferences, tokenizeTolerantly, walkAST } from './chunk-
|
|
2
|
-
export { BaseSymbolType, BooleanSymbol, ColorErrorCode, ColorSymbol, ConfigErrorCode, DictionarySymbol, FunctionsErrorCode, InterpreterError, InterpreterErrorCode, LanguageError, LexerError, LexerErrorCode, ListSymbol, NullSymbol, NumberSymbol, NumberWithUnitSymbol, OperationsErrorCode, ParserError, ParserErrorCode, ProcessorError, ProcessorErrorCode, StringSymbol, SymbolsErrorCode, TokenSymbol, UnitErrorCode, getMessage, getResultTypeName, isInterpreterError, isLanguageError, isLexerError, isParserError, isProcessorError, jsValueToSymbolType, serializeError } from './chunk-
|
|
3
|
-
export { Operations, ReservedKeyword, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-
|
|
1
|
+
export { ASTNodes, ColorManager, ColorSpecificationSchema, Config, ConstantsSpecificationSchema, DEFAULT_LANGUAGE_OPTIONS, FunctionSpecificationSchema, FunctionsManager, IncompleteType, Interpreter, Lexer, ParseState, Parser, PartialBinOpNode, PartialFunctionCallNode, PartialParenNode, PartialReferenceNode, PartialStringNode, PartialUnaryOpNode, UnitManager, UnitSpecificationSchema, collectAllReferences, collectReferenceNodes, evaluateExpression, filterAST, hasPartialNodes, lexerOptionsForMode, parseExpression, parseTolerantly, renameReferences, tokenizeTolerantly, walkAST } from './chunk-4L54VFWU.js';
|
|
2
|
+
export { BaseSymbolType, BooleanSymbol, ColorErrorCode, ColorSymbol, ConfigErrorCode, DictionarySymbol, FunctionsErrorCode, InterpreterError, InterpreterErrorCode, LanguageError, LexerError, LexerErrorCode, ListSymbol, NullSymbol, NumberSymbol, NumberWithUnitSymbol, OperationsErrorCode, ParserError, ParserErrorCode, ProcessorError, ProcessorErrorCode, StringSymbol, SymbolsErrorCode, TokenSymbol, UnitErrorCode, getMessage, getResultTypeName, isInterpreterError, isLanguageError, isLexerError, isParserError, isProcessorError, jsValueToSymbolType, serializeError } from './chunk-24FMHL6W.js';
|
|
3
|
+
export { Operations, ReservedKeyword, SCRIPT_ONLY_STATEMENT_KEYWORDS, SupportedFormats, TokenType, UNINTERPRETED_KEYWORDS } from './chunk-SLITBMFB.js';
|
|
4
4
|
//# sourceMappingURL=interpreter.js.map
|
|
5
5
|
//# sourceMappingURL=interpreter.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
3
|
+
var chunkKX5QZ5G2_cjs = require('./chunk-KX5QZ5G2.cjs');
|
|
4
|
+
require('./chunk-OABJLZRZ.cjs');
|
|
5
|
+
var chunkZMMIYWFF_cjs = require('./chunk-ZMMIYWFF.cjs');
|
|
6
6
|
var fs = require('fs/promises');
|
|
7
7
|
var path = require('path');
|
|
8
8
|
var yauzl = require('yauzl');
|
|
@@ -40,11 +40,11 @@ function parseJson(content, fileName) {
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
chunkZMMIYWFF_cjs.__name(parseJson, "parseJson");
|
|
44
44
|
function removeJsonExtension(fileName) {
|
|
45
45
|
return fileName.replace(/\.json$/i, "");
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
chunkZMMIYWFF_cjs.__name(removeJsonExtension, "removeJsonExtension");
|
|
48
48
|
async function loadZipToMemory(zipPath) {
|
|
49
49
|
return new Promise((resolve, reject) => {
|
|
50
50
|
const filesContent = {};
|
|
@@ -103,7 +103,7 @@ async function loadZipToMemory(zipPath) {
|
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
chunkZMMIYWFF_cjs.__name(loadZipToMemory, "loadZipToMemory");
|
|
107
107
|
function detectFileType(filePath, stats) {
|
|
108
108
|
if (stats.isDirectory()) {
|
|
109
109
|
return "DIRECTORY" /* DIRECTORY */;
|
|
@@ -113,7 +113,7 @@ function detectFileType(filePath, stats) {
|
|
|
113
113
|
if (ext === ".json") return "JSON" /* JSON */;
|
|
114
114
|
throw new Error(`Unsupported file type: ${ext}`);
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
chunkZMMIYWFF_cjs.__name(detectFileType, "detectFileType");
|
|
117
117
|
async function collectJsonFiles(filePath) {
|
|
118
118
|
const fileStats = await fs__default.default.stat(filePath);
|
|
119
119
|
const fileType = detectFileType(filePath, fileStats);
|
|
@@ -145,7 +145,7 @@ async function collectJsonFiles(filePath) {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
chunkZMMIYWFF_cjs.__name(collectJsonFiles, "collectJsonFiles");
|
|
149
149
|
|
|
150
150
|
// src/processor/utils/normalizer.ts
|
|
151
151
|
function normalizeJsonFiles(jsonFiles) {
|
|
@@ -165,7 +165,7 @@ function normalizeJsonFiles(jsonFiles) {
|
|
|
165
165
|
}
|
|
166
166
|
return jsonFiles;
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
chunkZMMIYWFF_cjs.__name(normalizeJsonFiles, "normalizeJsonFiles");
|
|
169
169
|
|
|
170
170
|
// src/processor/processFiles.ts
|
|
171
171
|
async function processTokensFromFiles({
|
|
@@ -175,16 +175,16 @@ async function processTokensFromFiles({
|
|
|
175
175
|
activeTheme,
|
|
176
176
|
builder
|
|
177
177
|
}) {
|
|
178
|
-
await
|
|
178
|
+
await chunkKX5QZ5G2_cjs.fetchAndRegisterSchemas(schemas ?? []);
|
|
179
179
|
const jsonFiles = await collectJsonFiles(inputPath);
|
|
180
180
|
const normalizedFiles = normalizeJsonFiles(jsonFiles);
|
|
181
|
-
return
|
|
181
|
+
return chunkKX5QZ5G2_cjs.processTokenSets(normalizedFiles, {
|
|
182
182
|
activeSets,
|
|
183
183
|
activeTheme,
|
|
184
184
|
builder
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
chunkZMMIYWFF_cjs.__name(processTokensFromFiles, "processTokensFromFiles");
|
|
188
188
|
|
|
189
189
|
exports.processTokensFromFiles = processTokensFromFiles;
|
|
190
190
|
//# sourceMappingURL=processor-node.cjs.map
|