@garrix82/reactgenie-dsl 1.0.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/README.md +436 -0
- package/dist/__test__/dsl-descriptor.test.d.ts +1 -0
- package/dist/__test__/dsl-descriptor.test.js +27 -0
- package/dist/__test__/dsl-descriptor.test.js.map +1 -0
- package/dist/__test__/example_descriptor.d.ts +125 -0
- package/dist/__test__/example_descriptor.js +607 -0
- package/dist/__test__/example_descriptor.js.map +1 -0
- package/dist/__test__/food_descriptor.state.json +1 -0
- package/dist/__test__/food_descriptor.test.d.ts +74 -0
- package/dist/__test__/food_descriptor.test.js +205 -0
- package/dist/__test__/food_descriptor.test.js.map +1 -0
- package/dist/__test__/nl-interpreter-provider-selection.test.d.ts +1 -0
- package/dist/__test__/nl-interpreter-provider-selection.test.js +73 -0
- package/dist/__test__/nl-interpreter-provider-selection.test.js.map +1 -0
- package/dist/__test__/nl-interpreter.test.d.ts +1 -0
- package/dist/__test__/nl-interpreter.test.js +86 -0
- package/dist/__test__/nl-interpreter.test.js.map +1 -0
- package/dist/decorators/__test__/decorators.test.d.ts +1 -0
- package/dist/decorators/__test__/decorators.test.js +182 -0
- package/dist/decorators/__test__/decorators.test.js.map +1 -0
- package/dist/decorators/__test__/inheritance-descriptor.test.d.ts +1 -0
- package/dist/decorators/__test__/inheritance-descriptor.test.js +107 -0
- package/dist/decorators/__test__/inheritance-descriptor.test.js.map +1 -0
- package/dist/decorators/decorators.d.ts +20 -0
- package/dist/decorators/decorators.js +520 -0
- package/dist/decorators/decorators.js.map +1 -0
- package/dist/decorators/index.d.ts +2 -0
- package/dist/decorators/index.js +19 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/store.d.ts +12 -0
- package/dist/decorators/store.js +43 -0
- package/dist/decorators/store.js.map +1 -0
- package/dist/dsl/__test__/dsl-interpreter.test.d.ts +1 -0
- package/dist/dsl/__test__/dsl-interpreter.test.js +334 -0
- package/dist/dsl/__test__/dsl-interpreter.test.js.map +1 -0
- package/dist/dsl/__test__/parser.gen.test.d.ts +1 -0
- package/dist/dsl/__test__/parser.gen.test.js +283 -0
- package/dist/dsl/__test__/parser.gen.test.js.map +1 -0
- package/dist/dsl/dsl-interpreter.d.ts +66 -0
- package/dist/dsl/dsl-interpreter.js +767 -0
- package/dist/dsl/dsl-interpreter.js.map +1 -0
- package/dist/dsl/index.d.ts +1 -0
- package/dist/dsl/index.js +18 -0
- package/dist/dsl/index.js.map +1 -0
- package/dist/dsl/parser.gen.d.ts +10 -0
- package/dist/dsl/parser.gen.js +1524 -0
- package/dist/dsl/parser.gen.js.map +1 -0
- package/dist/dsl-descriptor.d.ts +75 -0
- package/dist/dsl-descriptor.js +151 -0
- package/dist/dsl-descriptor.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/nl/__test__/context-aware-prompt.test.d.ts +1 -0
- package/dist/nl/__test__/context-aware-prompt.test.js +247 -0
- package/dist/nl/__test__/context-aware-prompt.test.js.map +1 -0
- package/dist/nl/__test__/context-selector.test.d.ts +1 -0
- package/dist/nl/__test__/context-selector.test.js +20 -0
- package/dist/nl/__test__/context-selector.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser-groq-transport.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser-groq-transport.test.js +87 -0
- package/dist/nl/__test__/nl-parser-groq-transport.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser-openai-parity.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser-openai-parity.test.js +206 -0
- package/dist/nl/__test__/nl-parser-openai-parity.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser-openai-sampling.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser-openai-sampling.test.js +44 -0
- package/dist/nl/__test__/nl-parser-openai-sampling.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser-openai-transport.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser-openai-transport.test.js +55 -0
- package/dist/nl/__test__/nl-parser-openai-transport.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser-utils.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser-utils.test.js +70 -0
- package/dist/nl/__test__/nl-parser-utils.test.js.map +1 -0
- package/dist/nl/__test__/nl-parser.test.d.ts +1 -0
- package/dist/nl/__test__/nl-parser.test.js +64 -0
- package/dist/nl/__test__/nl-parser.test.js.map +1 -0
- package/dist/nl/__test__/parameter-tuning.test.d.ts +1 -0
- package/dist/nl/__test__/parameter-tuning.test.js +95 -0
- package/dist/nl/__test__/parameter-tuning.test.js.map +1 -0
- package/dist/nl/__test__/semantic-parsing-experiment.test.d.ts +1 -0
- package/dist/nl/__test__/semantic-parsing-experiment.test.js +178 -0
- package/dist/nl/__test__/semantic-parsing-experiment.test.js.map +1 -0
- package/dist/nl/context-selector.d.ts +17 -0
- package/dist/nl/context-selector.js +99 -0
- package/dist/nl/context-selector.js.map +1 -0
- package/dist/nl/index.d.ts +6 -0
- package/dist/nl/index.js +15 -0
- package/dist/nl/index.js.map +1 -0
- package/dist/nl/llm-monitoring.d.ts +49 -0
- package/dist/nl/llm-monitoring.js +243 -0
- package/dist/nl/llm-monitoring.js.map +1 -0
- package/dist/nl/llm-monitoring.test.d.ts +5 -0
- package/dist/nl/llm-monitoring.test.js +101 -0
- package/dist/nl/llm-monitoring.test.js.map +1 -0
- package/dist/nl/nl-parser-groq.d.ts +21 -0
- package/dist/nl/nl-parser-groq.js +357 -0
- package/dist/nl/nl-parser-groq.js.map +1 -0
- package/dist/nl/nl-parser-utils.d.ts +101 -0
- package/dist/nl/nl-parser-utils.js +255 -0
- package/dist/nl/nl-parser-utils.js.map +1 -0
- package/dist/nl/nl-parser.d.ts +30 -0
- package/dist/nl/nl-parser.js +433 -0
- package/dist/nl/nl-parser.js.map +1 -0
- package/dist/nl/prompt-gen.d.ts +93 -0
- package/dist/nl/prompt-gen.js +369 -0
- package/dist/nl/prompt-gen.js.map +1 -0
- package/dist/nl/prompt-res.d.ts +16 -0
- package/dist/nl/prompt-res.js +190 -0
- package/dist/nl/prompt-res.js.map +1 -0
- package/dist/nl-interpreter.d.ts +48 -0
- package/dist/nl-interpreter.js +155 -0
- package/dist/nl-interpreter.js.map +1 -0
- package/lib/__test__/dsl-descriptor.test.ts +27 -0
- package/lib/__test__/example_descriptor.ts +762 -0
- package/lib/__test__/food_descriptor.state.json +1 -0
- package/lib/__test__/food_descriptor.test.ts +331 -0
- package/lib/__test__/nl-interpreter-provider-selection.test.ts +126 -0
- package/lib/__test__/nl-interpreter.test.ts +129 -0
- package/lib/decorators/__test__/decorators.test.ts +177 -0
- package/lib/decorators/__test__/inheritance-descriptor.test.ts +92 -0
- package/lib/decorators/decorators.ts +754 -0
- package/lib/decorators/index.ts +2 -0
- package/lib/decorators/store.ts +47 -0
- package/lib/dsl/__test__/dsl-interpreter.test.ts +453 -0
- package/lib/dsl/__test__/parser.gen.test.ts +296 -0
- package/lib/dsl/dsl-interpreter.ts +974 -0
- package/lib/dsl/index.ts +1 -0
- package/lib/dsl/parser.gen.js +1479 -0
- package/lib/dsl/parser.pegjs +130 -0
- package/lib/dsl-descriptor.ts +241 -0
- package/lib/index.ts +5 -0
- package/lib/nl/__test__/context-aware-prompt.test.ts +372 -0
- package/lib/nl/__test__/context-selector.test.ts +27 -0
- package/lib/nl/__test__/nl-parser-groq-transport.test.ts +139 -0
- package/lib/nl/__test__/nl-parser-openai-parity.test.ts +381 -0
- package/lib/nl/__test__/nl-parser-openai-sampling.test.ts +73 -0
- package/lib/nl/__test__/nl-parser-openai-transport.test.ts +79 -0
- package/lib/nl/__test__/nl-parser-utils.test.ts +98 -0
- package/lib/nl/__test__/nl-parser.test.ts +119 -0
- package/lib/nl/__test__/parameter-tuning.test.ts +137 -0
- package/lib/nl/__test__/semantic-parsing-experiment.test.ts +260 -0
- package/lib/nl/context-selector.ts +123 -0
- package/lib/nl/index.ts +19 -0
- package/lib/nl/llm-monitoring.test.ts +136 -0
- package/lib/nl/llm-monitoring.ts +339 -0
- package/lib/nl/nl-parser-groq.ts +510 -0
- package/lib/nl/nl-parser-utils.ts +310 -0
- package/lib/nl/nl-parser.ts +616 -0
- package/lib/nl/prompt-gen.ts +607 -0
- package/lib/nl/prompt-res.ts +207 -0
- package/lib/nl-interpreter.ts +262 -0
- package/package.json +58 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DslInterpreter = exports.InvalidParameterTypeError = exports.FunctionStaticError = exports.FunctionMissingError = exports.FieldStaticError = exports.FieldMissingError = exports.ClassMissingError = exports.InterpreterError = void 0;
|
|
4
|
+
const parser_gen_js_1 = require("./parser.gen.js");
|
|
5
|
+
const dsl_descriptor_1 = require("../dsl-descriptor");
|
|
6
|
+
function parseType(value_type) {
|
|
7
|
+
if (value_type.endsWith("[]")) {
|
|
8
|
+
return {
|
|
9
|
+
is_array: true,
|
|
10
|
+
original_type: value_type.substring(0, value_type.length - 2),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return { is_array: false, original_type: value_type };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class InterpreterError extends Error {
|
|
18
|
+
}
|
|
19
|
+
exports.InterpreterError = InterpreterError;
|
|
20
|
+
class ClassMissingError extends InterpreterError {
|
|
21
|
+
constructor(class_name) {
|
|
22
|
+
super(`Class ${class_name} is missing`);
|
|
23
|
+
this.class_name = class_name;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ClassMissingError = ClassMissingError;
|
|
27
|
+
class FieldMissingError extends InterpreterError {
|
|
28
|
+
constructor(class_name, field_name) {
|
|
29
|
+
super(`Field ${class_name}.${field_name} is missing`);
|
|
30
|
+
this.class_name = class_name;
|
|
31
|
+
this.field_name = field_name;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.FieldMissingError = FieldMissingError;
|
|
35
|
+
class FieldStaticError extends InterpreterError {
|
|
36
|
+
constructor(class_name, field_name) {
|
|
37
|
+
super(`Field ${class_name}.${field_name} should be static`);
|
|
38
|
+
this.class_name = class_name;
|
|
39
|
+
this.field_name = field_name;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.FieldStaticError = FieldStaticError;
|
|
43
|
+
class FunctionMissingError extends InterpreterError {
|
|
44
|
+
constructor(class_name, func_name) {
|
|
45
|
+
super(`Function ${class_name}.${func_name} is missing`);
|
|
46
|
+
this.class_name = class_name;
|
|
47
|
+
this.func_name = func_name;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.FunctionMissingError = FunctionMissingError;
|
|
51
|
+
class FunctionStaticError extends InterpreterError {
|
|
52
|
+
constructor(class_name, func_name) {
|
|
53
|
+
super(`Function ${class_name}.${func_name} should be static`);
|
|
54
|
+
this.class_name = class_name;
|
|
55
|
+
this.func_name = func_name;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.FunctionStaticError = FunctionStaticError;
|
|
59
|
+
class InvalidParameterTypeError extends InterpreterError {
|
|
60
|
+
constructor(func_name, parameter_name, expected_type, received_type) {
|
|
61
|
+
super(`Invalid DSL: ${func_name}(${parameter_name}: ...) requires a dotted accessor such as .name, but received ${received_type}.`);
|
|
62
|
+
this.func_name = func_name;
|
|
63
|
+
this.parameter_name = parameter_name;
|
|
64
|
+
this.expected_type = expected_type;
|
|
65
|
+
this.received_type = received_type;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.InvalidParameterTypeError = InvalidParameterTypeError;
|
|
69
|
+
class DslInterpreter {
|
|
70
|
+
matching(value, template) {
|
|
71
|
+
if (typeof value === "string" && typeof template === "string") {
|
|
72
|
+
return value.toLowerCase().includes(template.toLowerCase());
|
|
73
|
+
}
|
|
74
|
+
if (typeof value === "string" && typeof template === "number") {
|
|
75
|
+
const parsed = new Date(value);
|
|
76
|
+
if (!isNaN(parsed.getTime())) {
|
|
77
|
+
return parsed.getMonth() + 1 === template;
|
|
78
|
+
}
|
|
79
|
+
return value.includes(String(template));
|
|
80
|
+
}
|
|
81
|
+
if ((typeof value === "number" || typeof value === "boolean") && typeof template === "string") {
|
|
82
|
+
const asNum = Number(template);
|
|
83
|
+
if (!isNaN(asNum))
|
|
84
|
+
return value === asNum;
|
|
85
|
+
return String(value).toLowerCase() === template.toLowerCase();
|
|
86
|
+
}
|
|
87
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
88
|
+
return value === template;
|
|
89
|
+
}
|
|
90
|
+
if (value && template && typeof value === "object" && typeof template === "object") {
|
|
91
|
+
if (typeof value._getConstructorParams === "function" && typeof template._getConstructorParams === "function") {
|
|
92
|
+
return (JSON.stringify(value._getConstructorParams()) ===
|
|
93
|
+
JSON.stringify(template._getConstructorParams()));
|
|
94
|
+
}
|
|
95
|
+
return JSON.stringify(value) === JSON.stringify(template);
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
contains(value, template) {
|
|
100
|
+
if (typeof value === "string" && typeof template === "string") {
|
|
101
|
+
return value.toLowerCase().includes(template.toLowerCase());
|
|
102
|
+
}
|
|
103
|
+
if (typeof value === "string" && typeof template === "number") {
|
|
104
|
+
const parsed = new Date(value);
|
|
105
|
+
if (!isNaN(parsed.getTime())) {
|
|
106
|
+
return parsed.getMonth() + 1 === template;
|
|
107
|
+
}
|
|
108
|
+
return value.includes(String(template));
|
|
109
|
+
}
|
|
110
|
+
else if (Array.isArray(value)) {
|
|
111
|
+
let contains = false;
|
|
112
|
+
for (let i = 0; i < value.length; i++) {
|
|
113
|
+
if (this.matching(value[i], template)) {
|
|
114
|
+
contains = true;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return contains;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return value === template;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
equals(a, b) {
|
|
125
|
+
if (a === b) {
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
else if (typeof a === "string" && typeof b === "string") {
|
|
129
|
+
return a.toLowerCase() === b.toLowerCase();
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
compareObjectsSafely(left, right) {
|
|
136
|
+
const leftCompare = left?.constructor?.compare;
|
|
137
|
+
if (typeof leftCompare === "function") {
|
|
138
|
+
return leftCompare(left, right);
|
|
139
|
+
}
|
|
140
|
+
const rightCompare = right?.constructor?.compare;
|
|
141
|
+
if (typeof rightCompare === "function") {
|
|
142
|
+
return rightCompare(left, right);
|
|
143
|
+
}
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
constructor(classDescriptors, dry_run = false) {
|
|
147
|
+
this.dry_run = dry_run;
|
|
148
|
+
this.arrayFunctionDescriptors = [
|
|
149
|
+
new dsl_descriptor_1.FuncDescriptor("matching", [
|
|
150
|
+
new dsl_descriptor_1.ParamDescriptor("field", "accessor"),
|
|
151
|
+
new dsl_descriptor_1.ParamDescriptor("value", "object"),
|
|
152
|
+
], "object[]", false),
|
|
153
|
+
new dsl_descriptor_1.FuncDescriptor("contains", [
|
|
154
|
+
new dsl_descriptor_1.ParamDescriptor("field", "accessor"),
|
|
155
|
+
new dsl_descriptor_1.ParamDescriptor("value", "object"),
|
|
156
|
+
], "object[]", false),
|
|
157
|
+
new dsl_descriptor_1.FuncDescriptor("between", [
|
|
158
|
+
new dsl_descriptor_1.ParamDescriptor("field", "accessor"),
|
|
159
|
+
new dsl_descriptor_1.ParamDescriptor("from", "object", false),
|
|
160
|
+
new dsl_descriptor_1.ParamDescriptor("to", "object", false),
|
|
161
|
+
], "object[]", false),
|
|
162
|
+
new dsl_descriptor_1.FuncDescriptor("equals", [
|
|
163
|
+
new dsl_descriptor_1.ParamDescriptor("field", "accessor"),
|
|
164
|
+
new dsl_descriptor_1.ParamDescriptor("value", "object"),
|
|
165
|
+
], "object[]", false),
|
|
166
|
+
new dsl_descriptor_1.FuncDescriptor("sort", [
|
|
167
|
+
new dsl_descriptor_1.ParamDescriptor("field", "accessor"),
|
|
168
|
+
new dsl_descriptor_1.ParamDescriptor("ascending", "boolean"),
|
|
169
|
+
], "object[]", false),
|
|
170
|
+
new dsl_descriptor_1.FuncDescriptor("index", [new dsl_descriptor_1.ParamDescriptor("index", "int")], "object", false),
|
|
171
|
+
new dsl_descriptor_1.FuncDescriptor("length", [], "int", false)
|
|
172
|
+
];
|
|
173
|
+
this.arrayFunctionImplementations = {
|
|
174
|
+
matching: async ({ value, array, }) => {
|
|
175
|
+
return array.filter((element) => {
|
|
176
|
+
return this.matching(element.fieldValue, value);
|
|
177
|
+
}).map((v) => v.element);
|
|
178
|
+
},
|
|
179
|
+
contains: async ({ value, array, }) => {
|
|
180
|
+
return array.filter((element) => {
|
|
181
|
+
return this.contains(element.fieldValue, value);
|
|
182
|
+
}).map((v) => v.element);
|
|
183
|
+
},
|
|
184
|
+
between: async ({ from, to, array, }) => {
|
|
185
|
+
let newArray = [];
|
|
186
|
+
for (const element of array) {
|
|
187
|
+
let first = true;
|
|
188
|
+
let second = true;
|
|
189
|
+
let value = element.fieldValue;
|
|
190
|
+
let valueIsPrimitive = typeof value === "string" ||
|
|
191
|
+
typeof value === "number" ||
|
|
192
|
+
typeof value === "boolean";
|
|
193
|
+
if (from !== undefined) {
|
|
194
|
+
let fromIsPrimitive = typeof from === "string" ||
|
|
195
|
+
typeof from === "number" ||
|
|
196
|
+
typeof from === "boolean";
|
|
197
|
+
if (fromIsPrimitive && valueIsPrimitive) {
|
|
198
|
+
first = value >= from;
|
|
199
|
+
}
|
|
200
|
+
else if (fromIsPrimitive && !valueIsPrimitive) {
|
|
201
|
+
const compareResult = this.compareObjectsSafely(value, from);
|
|
202
|
+
first = compareResult !== null ? compareResult >= 0 : false;
|
|
203
|
+
}
|
|
204
|
+
else if (!fromIsPrimitive && valueIsPrimitive) {
|
|
205
|
+
const compareResult = this.compareObjectsSafely(value, from);
|
|
206
|
+
first = compareResult !== null ? compareResult >= 0 : false;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
const compareResult = this.compareObjectsSafely(value, from);
|
|
210
|
+
first = compareResult !== null ? compareResult >= 0 : false;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (to !== undefined) {
|
|
214
|
+
let toIsPrimitive = typeof to === "string" ||
|
|
215
|
+
typeof to === "number" ||
|
|
216
|
+
typeof to === "boolean";
|
|
217
|
+
if (toIsPrimitive && valueIsPrimitive) {
|
|
218
|
+
second = value <= to;
|
|
219
|
+
}
|
|
220
|
+
else if (toIsPrimitive && !valueIsPrimitive) {
|
|
221
|
+
const compareResult = this.compareObjectsSafely(value, to);
|
|
222
|
+
second = compareResult !== null ? compareResult <= 0 : false;
|
|
223
|
+
}
|
|
224
|
+
else if (!toIsPrimitive && valueIsPrimitive) {
|
|
225
|
+
const compareResult = this.compareObjectsSafely(value, to);
|
|
226
|
+
second = compareResult !== null ? compareResult <= 0 : false;
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
const compareResult = this.compareObjectsSafely(value, to);
|
|
230
|
+
second = compareResult !== null ? compareResult <= 0 : false;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (first && second) {
|
|
234
|
+
newArray.push(element.element);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return newArray;
|
|
238
|
+
},
|
|
239
|
+
equals: async ({ value, array, }) => {
|
|
240
|
+
return array.filter((element) => {
|
|
241
|
+
return this.equals(element.fieldValue, value);
|
|
242
|
+
}).map((v) => v.element);
|
|
243
|
+
},
|
|
244
|
+
sort: async ({ ascending, array, }) => {
|
|
245
|
+
return array.sort((a, b) => {
|
|
246
|
+
if (ascending) {
|
|
247
|
+
if (a.fieldValue < b.fieldValue) {
|
|
248
|
+
return -1;
|
|
249
|
+
}
|
|
250
|
+
else if (a.fieldValue > b.fieldValue) {
|
|
251
|
+
return 1;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
return 0;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
if (a.fieldValue < b.fieldValue) {
|
|
259
|
+
return 1;
|
|
260
|
+
}
|
|
261
|
+
else if (a.fieldValue > b.fieldValue) {
|
|
262
|
+
return -1;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
return 0;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}).map((v) => v.element);
|
|
269
|
+
},
|
|
270
|
+
index: async ({ index, array }) => {
|
|
271
|
+
console.assert(typeof index === "number");
|
|
272
|
+
if (index < 0) {
|
|
273
|
+
index = array.length + index;
|
|
274
|
+
}
|
|
275
|
+
return array[index];
|
|
276
|
+
},
|
|
277
|
+
length: async ({ array }) => {
|
|
278
|
+
return array.length;
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
this.resolveSteps = [];
|
|
282
|
+
this.resolveStepsEnabled = false;
|
|
283
|
+
this.classDescriptors = [...classDescriptors];
|
|
284
|
+
this.classDescriptors.push(new dsl_descriptor_1.ClassDescriptor("String", [], [], null));
|
|
285
|
+
this.classDescriptors.push(new dsl_descriptor_1.ClassDescriptor("Number", [], [], null));
|
|
286
|
+
this.classDescriptors.push(new dsl_descriptor_1.ClassDescriptor("float", [], [], null));
|
|
287
|
+
this.classDescriptors.push(new dsl_descriptor_1.ClassDescriptor("int", [], [], null));
|
|
288
|
+
this.classDescriptors.push(new dsl_descriptor_1.ClassDescriptor("Boolean", [], [], null));
|
|
289
|
+
}
|
|
290
|
+
async interpret(input) {
|
|
291
|
+
const ast = (0, parser_gen_js_1.parse)(input);
|
|
292
|
+
var lastResult = null;
|
|
293
|
+
for (const statement of ast) {
|
|
294
|
+
lastResult = await this.resolve(statement);
|
|
295
|
+
}
|
|
296
|
+
return lastResult;
|
|
297
|
+
}
|
|
298
|
+
async interpretSteps(input) {
|
|
299
|
+
const ast = (0, parser_gen_js_1.parse)(input);
|
|
300
|
+
var lastResult = null;
|
|
301
|
+
let allSteps = [];
|
|
302
|
+
for (const statement of ast) {
|
|
303
|
+
this.resolveSteps = [];
|
|
304
|
+
this.resolveStepsEnabled = true;
|
|
305
|
+
lastResult = await this.resolve(statement);
|
|
306
|
+
this.resolveStepsEnabled = false;
|
|
307
|
+
allSteps.push({ ast: statement, result: lastResult, steps: this.resolveSteps });
|
|
308
|
+
}
|
|
309
|
+
return allSteps;
|
|
310
|
+
}
|
|
311
|
+
async describe(ast) {
|
|
312
|
+
switch (ast.type) {
|
|
313
|
+
case "array":
|
|
314
|
+
const elements = [];
|
|
315
|
+
for (const e of ast.value) {
|
|
316
|
+
elements.push(await this.describe(e));
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
type: "array",
|
|
320
|
+
elements: elements,
|
|
321
|
+
};
|
|
322
|
+
case "string":
|
|
323
|
+
case "int":
|
|
324
|
+
case "boolean":
|
|
325
|
+
return ast.value;
|
|
326
|
+
case "object":
|
|
327
|
+
if (ast.value !== undefined) {
|
|
328
|
+
if (ast.objectType == "string" || ast.objectType == "int" || ast.objectType == "float" || ast.objectType == "number") {
|
|
329
|
+
return {
|
|
330
|
+
type: "object",
|
|
331
|
+
objectType: ast.objectType,
|
|
332
|
+
value: ast.value,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
if (ast.value.update !== undefined) {
|
|
337
|
+
await ast.value.update();
|
|
338
|
+
}
|
|
339
|
+
return { type: "object", value: await ast.value.description() };
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
console.assert(ast.objectType == "void");
|
|
344
|
+
return { type: "object", value: "undefined" };
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
async describeSteps(list) {
|
|
349
|
+
const steps = [];
|
|
350
|
+
for (const e of list) {
|
|
351
|
+
steps.push(await this.describe(e.result));
|
|
352
|
+
}
|
|
353
|
+
return steps;
|
|
354
|
+
}
|
|
355
|
+
strip(ast) {
|
|
356
|
+
switch (ast.type) {
|
|
357
|
+
case "class":
|
|
358
|
+
return this.classDescriptors.find((c) => c.className === ast.value)
|
|
359
|
+
.classConstructor;
|
|
360
|
+
case "array":
|
|
361
|
+
return ast.value.map((v) => this.strip(v));
|
|
362
|
+
case "accessor":
|
|
363
|
+
return ast;
|
|
364
|
+
case "string":
|
|
365
|
+
case "int":
|
|
366
|
+
case "boolean":
|
|
367
|
+
case "object":
|
|
368
|
+
return ast.value;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
async resolve(ast, env = null) {
|
|
372
|
+
let result = null;
|
|
373
|
+
switch (ast.type) {
|
|
374
|
+
case "access":
|
|
375
|
+
result = await this.resolveAccess(ast, env);
|
|
376
|
+
break;
|
|
377
|
+
case "index":
|
|
378
|
+
result = await this.resolveIndex(ast, env);
|
|
379
|
+
break;
|
|
380
|
+
case "function_call":
|
|
381
|
+
result = await this.resolveFunctionCall(ast, env);
|
|
382
|
+
break;
|
|
383
|
+
case "array":
|
|
384
|
+
result = await this.resolveArray(ast, env);
|
|
385
|
+
break;
|
|
386
|
+
case "string":
|
|
387
|
+
case "int":
|
|
388
|
+
case "float":
|
|
389
|
+
case "boolean":
|
|
390
|
+
case "accessor":
|
|
391
|
+
case "object":
|
|
392
|
+
result = ast;
|
|
393
|
+
break;
|
|
394
|
+
default:
|
|
395
|
+
throw new Error("Unsupported AST type: " + ast.type);
|
|
396
|
+
}
|
|
397
|
+
if (this.resolveStepsEnabled) {
|
|
398
|
+
this.resolveSteps.push({ ast: ast, result: result });
|
|
399
|
+
}
|
|
400
|
+
return result;
|
|
401
|
+
}
|
|
402
|
+
describeResolvedParameterType(param) {
|
|
403
|
+
if (!param || typeof param !== "object") {
|
|
404
|
+
return typeof param;
|
|
405
|
+
}
|
|
406
|
+
if (param.type === "object" && typeof param.objectType === "string") {
|
|
407
|
+
return param.objectType;
|
|
408
|
+
}
|
|
409
|
+
return param.type || typeof param;
|
|
410
|
+
}
|
|
411
|
+
validateResolvedParameters(func_name, funcDescriptor, parameters) {
|
|
412
|
+
for (const descriptor of funcDescriptor.parameters) {
|
|
413
|
+
const param = parameters.get(descriptor.name);
|
|
414
|
+
if (param == null) {
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
if (descriptor.type === "accessor" && param.type !== "accessor") {
|
|
418
|
+
throw new InvalidParameterTypeError(func_name, descriptor.name, descriptor.type, this.describeResolvedParameterType(param));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
async resolveAccess(ast, env) {
|
|
423
|
+
console.assert(env == null);
|
|
424
|
+
let parent;
|
|
425
|
+
if (typeof ast.parent === "string") {
|
|
426
|
+
parent = { type: "class", value: ast.parent };
|
|
427
|
+
}
|
|
428
|
+
else if (ast.parent.type === "object") {
|
|
429
|
+
parent = ast.parent;
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
parent = await this.resolve(ast.parent, null);
|
|
433
|
+
}
|
|
434
|
+
if (typeof ast.access === "string") {
|
|
435
|
+
const isObject = parent.type === "object";
|
|
436
|
+
const className = isObject ? parent.objectType : parent.value;
|
|
437
|
+
const classDescriptor = this.classDescriptors.find((c) => c.className === className);
|
|
438
|
+
if (classDescriptor === undefined) {
|
|
439
|
+
if (parent.type == "array") {
|
|
440
|
+
const arrayValue = [];
|
|
441
|
+
for (const v of parent.value) {
|
|
442
|
+
try {
|
|
443
|
+
arrayValue.push(await this.resolveAccess({
|
|
444
|
+
...ast,
|
|
445
|
+
parent: v
|
|
446
|
+
}, env));
|
|
447
|
+
}
|
|
448
|
+
catch (e) {
|
|
449
|
+
console.log(e);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
let objType = null;
|
|
453
|
+
if (arrayValue.length > 0) {
|
|
454
|
+
objType = arrayValue[0].objectType;
|
|
455
|
+
}
|
|
456
|
+
return {
|
|
457
|
+
type: "array",
|
|
458
|
+
value: arrayValue,
|
|
459
|
+
objectType: objType
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
throw new ClassMissingError(className);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
const fieldDescriptor = Array.from(classDescriptor.fields).find((f) => f.field === ast.access);
|
|
467
|
+
if (fieldDescriptor === undefined) {
|
|
468
|
+
throw new FieldMissingError(className, ast.access);
|
|
469
|
+
}
|
|
470
|
+
if (!isObject && !fieldDescriptor.isStatic) {
|
|
471
|
+
throw new FieldStaticError(className, ast.access);
|
|
472
|
+
}
|
|
473
|
+
const fieldType = parseType(fieldDescriptor.fieldType);
|
|
474
|
+
let fieldValue;
|
|
475
|
+
if (this.dry_run) {
|
|
476
|
+
if (fieldType.is_array) {
|
|
477
|
+
fieldValue = [null];
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
fieldValue = null;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
if (isObject) {
|
|
485
|
+
const parentObject = this.strip(parent);
|
|
486
|
+
if (parentObject === undefined || parentObject === null) {
|
|
487
|
+
throw new InterpreterError(`Cannot access ${className}.${ast.access}: target object is undefined`);
|
|
488
|
+
}
|
|
489
|
+
if (!this.dry_run) {
|
|
490
|
+
await parentObject.update();
|
|
491
|
+
}
|
|
492
|
+
fieldValue = parentObject[ast.access];
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
fieldValue = classDescriptor.classConstructor[ast.access];
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (fieldType.is_array) {
|
|
499
|
+
return {
|
|
500
|
+
type: "array",
|
|
501
|
+
value: fieldValue.map((v) => {
|
|
502
|
+
return {
|
|
503
|
+
type: "object",
|
|
504
|
+
value: v,
|
|
505
|
+
objectType: fieldType.original_type,
|
|
506
|
+
};
|
|
507
|
+
}),
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
return {
|
|
512
|
+
type: "object",
|
|
513
|
+
value: fieldValue,
|
|
514
|
+
objectType: fieldType.original_type,
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
return await this.resolve(ast.access, parent);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
async resolveIndex(ast, env) {
|
|
523
|
+
console.assert(env == null);
|
|
524
|
+
let indexParam;
|
|
525
|
+
if (typeof ast.index === "number") {
|
|
526
|
+
indexParam = { type: "int", value: ast.index };
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
indexParam = ast.index;
|
|
530
|
+
}
|
|
531
|
+
return await this.resolve({
|
|
532
|
+
type: "access",
|
|
533
|
+
parent: ast.parent,
|
|
534
|
+
access: {
|
|
535
|
+
type: "function_call",
|
|
536
|
+
func_name: "index",
|
|
537
|
+
parameters: [{ parameter: "index", value: indexParam }],
|
|
538
|
+
},
|
|
539
|
+
}, env);
|
|
540
|
+
}
|
|
541
|
+
async resolveArray(ast, env) {
|
|
542
|
+
console.assert(env == null);
|
|
543
|
+
const values = [];
|
|
544
|
+
for (const v of ast.value) {
|
|
545
|
+
values.push(await this.resolve(v, null));
|
|
546
|
+
}
|
|
547
|
+
console.assert(values.every((v) => v.type === "object"));
|
|
548
|
+
console.assert(values.every((v) => v.objectType === values[0].objectType));
|
|
549
|
+
return {
|
|
550
|
+
type: "array",
|
|
551
|
+
value: values,
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
async resolveFunctionCall(ast, env) {
|
|
555
|
+
const parameter_entries = [];
|
|
556
|
+
if (ast.parameters !== null) {
|
|
557
|
+
for (const p of ast.parameters) {
|
|
558
|
+
parameter_entries.push([p.parameter, await this.resolve(p.value, null)]);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
const parameters = new Map(parameter_entries);
|
|
562
|
+
let classDescriptor;
|
|
563
|
+
let funcDescriptor;
|
|
564
|
+
let isArray = false;
|
|
565
|
+
let isArrayElementFunction = false;
|
|
566
|
+
if (env !== null) {
|
|
567
|
+
switch (env.type) {
|
|
568
|
+
case "class":
|
|
569
|
+
classDescriptor =
|
|
570
|
+
this.classDescriptors.find((c) => c.className === env.value);
|
|
571
|
+
if (classDescriptor === undefined) {
|
|
572
|
+
throw new ClassMissingError(env.value);
|
|
573
|
+
}
|
|
574
|
+
funcDescriptor = Array.from(classDescriptor.functions).find((f) => f.func_name === ast.func_name);
|
|
575
|
+
if (funcDescriptor === undefined) {
|
|
576
|
+
throw new FunctionMissingError(env.value, ast.func_name);
|
|
577
|
+
}
|
|
578
|
+
else if (!funcDescriptor.isStatic) {
|
|
579
|
+
throw new FunctionStaticError(env.value, ast.func_name);
|
|
580
|
+
}
|
|
581
|
+
break;
|
|
582
|
+
case "object":
|
|
583
|
+
classDescriptor = this.classDescriptors.find((c) => c.className === env.objectType);
|
|
584
|
+
if (classDescriptor === undefined) {
|
|
585
|
+
throw new ClassMissingError(env.objectType);
|
|
586
|
+
}
|
|
587
|
+
funcDescriptor = Array.from(classDescriptor.functions).find((f) => f.func_name === ast.func_name);
|
|
588
|
+
if (funcDescriptor === undefined) {
|
|
589
|
+
throw new FunctionMissingError(env.objectType, ast.func_name);
|
|
590
|
+
}
|
|
591
|
+
break;
|
|
592
|
+
case "array":
|
|
593
|
+
if (env.value.length == 0)
|
|
594
|
+
return {
|
|
595
|
+
type: "array",
|
|
596
|
+
value: [],
|
|
597
|
+
objectType: null
|
|
598
|
+
};
|
|
599
|
+
funcDescriptor = this.arrayFunctionDescriptors.find((f) => f.func_name === ast.func_name);
|
|
600
|
+
if (funcDescriptor === undefined || env.value[0]["type"] === "array") {
|
|
601
|
+
const arrayValue = [];
|
|
602
|
+
for (const v of env.value) {
|
|
603
|
+
arrayValue.push(await this.resolveFunctionCall(ast, v));
|
|
604
|
+
}
|
|
605
|
+
return {
|
|
606
|
+
type: "array",
|
|
607
|
+
value: arrayValue,
|
|
608
|
+
objectType: arrayValue[0].objectType
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
if (env.value.length > 0) {
|
|
612
|
+
funcDescriptor = JSON.parse(JSON.stringify(funcDescriptor));
|
|
613
|
+
funcDescriptor.returnType = funcDescriptor.returnType.replace("object", env.value[0].objectType);
|
|
614
|
+
}
|
|
615
|
+
isArray = true;
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
const classDescriptor = this.classDescriptors.find((c) => c.className === ast.func_name);
|
|
621
|
+
funcDescriptor = Array.from(classDescriptor.functions).find((f) => f.func_name === "constructor");
|
|
622
|
+
}
|
|
623
|
+
this.validateResolvedParameters(ast.func_name, funcDescriptor, parameters);
|
|
624
|
+
let matchedParameters = {};
|
|
625
|
+
for (const descriptor of funcDescriptor.parameters) {
|
|
626
|
+
const param = parameters.get(descriptor.name);
|
|
627
|
+
if (param != null) {
|
|
628
|
+
matchedParameters[descriptor.name] = this.strip(param);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
if (env === null) {
|
|
632
|
+
const classDescriptor = this.classDescriptors.find((c) => c.className === ast.func_name);
|
|
633
|
+
if (this.dry_run) {
|
|
634
|
+
return {
|
|
635
|
+
type: "object",
|
|
636
|
+
value: null,
|
|
637
|
+
objectType: ast.func_name,
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
return {
|
|
642
|
+
type: "object",
|
|
643
|
+
value: new classDescriptor.classConstructor(matchedParameters),
|
|
644
|
+
objectType: ast.func_name,
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
const returnType = parseType(funcDescriptor.returnType);
|
|
649
|
+
if (isArray) {
|
|
650
|
+
for (const element of env.value) {
|
|
651
|
+
if (element.type == "object" && !this.dry_run) {
|
|
652
|
+
await element.value.update();
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
matchedParameters["array"] = this.strip(env);
|
|
656
|
+
if (matchedParameters["field"] !== undefined) {
|
|
657
|
+
function constructAccess(accessor, parent) {
|
|
658
|
+
if (typeof accessor == "string") {
|
|
659
|
+
return {
|
|
660
|
+
type: "access",
|
|
661
|
+
parent: parent,
|
|
662
|
+
access: accessor,
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
if (accessor.type == "access") {
|
|
667
|
+
return {
|
|
668
|
+
type: "access",
|
|
669
|
+
parent: constructAccess(accessor.parent, parent),
|
|
670
|
+
access: accessor.access,
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
const field = matchedParameters["field"].field;
|
|
676
|
+
if (this.dry_run) {
|
|
677
|
+
await this.resolve(constructAccess(field, {
|
|
678
|
+
type: "object",
|
|
679
|
+
value: null,
|
|
680
|
+
objectType: returnType.original_type,
|
|
681
|
+
}), null);
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
if (ast.func_name != "index" && ast.func_name != "length") {
|
|
685
|
+
const originalArray = matchedParameters["array"];
|
|
686
|
+
const array = [];
|
|
687
|
+
for (const element of originalArray) {
|
|
688
|
+
const fieldValue = await this.strip(await this.resolve(constructAccess(field, {
|
|
689
|
+
type: "object",
|
|
690
|
+
value: element,
|
|
691
|
+
objectType: returnType.original_type,
|
|
692
|
+
})));
|
|
693
|
+
array.push({
|
|
694
|
+
element: element,
|
|
695
|
+
fieldValue: fieldValue,
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
matchedParameters["array"] = array;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
const targetImplementation = isArray
|
|
704
|
+
? this.arrayFunctionImplementations
|
|
705
|
+
: this.strip(env);
|
|
706
|
+
if (!isArray &&
|
|
707
|
+
env?.type === "object" &&
|
|
708
|
+
!this.dry_run &&
|
|
709
|
+
(targetImplementation === undefined || targetImplementation === null)) {
|
|
710
|
+
throw new InterpreterError(`Cannot call ${ast.func_name}: target object is undefined`);
|
|
711
|
+
}
|
|
712
|
+
if (returnType.is_array) {
|
|
713
|
+
if (this.dry_run) {
|
|
714
|
+
return {
|
|
715
|
+
type: "array",
|
|
716
|
+
value: [{
|
|
717
|
+
type: "object",
|
|
718
|
+
value: null,
|
|
719
|
+
objectType: returnType.original_type,
|
|
720
|
+
}],
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
else {
|
|
724
|
+
if (env.type === "object" && !this.dry_run) {
|
|
725
|
+
if (typeof targetImplementation.update !== "function") {
|
|
726
|
+
throw new InterpreterError(`Cannot call ${ast.func_name}: target object has no update method`);
|
|
727
|
+
}
|
|
728
|
+
await targetImplementation.update();
|
|
729
|
+
}
|
|
730
|
+
return {
|
|
731
|
+
type: "array",
|
|
732
|
+
value: (await targetImplementation[ast.func_name](matchedParameters)).map((v) => {
|
|
733
|
+
return {
|
|
734
|
+
type: "object",
|
|
735
|
+
value: v,
|
|
736
|
+
objectType: returnType.original_type,
|
|
737
|
+
};
|
|
738
|
+
}),
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
if (this.dry_run) {
|
|
744
|
+
return {
|
|
745
|
+
type: "object",
|
|
746
|
+
value: null,
|
|
747
|
+
objectType: returnType.original_type,
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
if (env.type === "object" && !this.dry_run) {
|
|
752
|
+
if (typeof targetImplementation.update !== "function") {
|
|
753
|
+
throw new InterpreterError(`Cannot call ${ast.func_name}: target object has no update method`);
|
|
754
|
+
}
|
|
755
|
+
await targetImplementation.update();
|
|
756
|
+
}
|
|
757
|
+
return {
|
|
758
|
+
type: "object",
|
|
759
|
+
value: await (targetImplementation[ast.func_name](matchedParameters)),
|
|
760
|
+
objectType: returnType.original_type,
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
exports.DslInterpreter = DslInterpreter;
|
|
767
|
+
//# sourceMappingURL=dsl-interpreter.js.map
|