39 lines
2.8 KiB
JavaScript
39 lines
2.8 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.run = exports.resultMap = exports.parse = exports.SqFrame = exports.SqError = exports.defaultEnvironment = exports.SqValueTag = exports.SqProject = exports.SqLambda = exports.SqRecord = exports.SqDistributionError = exports.SqDistributionTag = exports.SqValueLocation = void 0;
|
|
const SqProject_1 = require("./SqProject");
|
|
Object.defineProperty(exports, "SqProject", { enumerable: true, get: function () { return SqProject_1.SqProject; } });
|
|
const SqValue_1 = require("./SqValue");
|
|
Object.defineProperty(exports, "SqValueTag", { enumerable: true, get: function () { return SqValue_1.SqValueTag; } });
|
|
var SqValueLocation_1 = require("./SqValueLocation");
|
|
Object.defineProperty(exports, "SqValueLocation", { enumerable: true, get: function () { return SqValueLocation_1.SqValueLocation; } });
|
|
var SqDistribution_1 = require("./SqDistribution");
|
|
Object.defineProperty(exports, "SqDistributionTag", { enumerable: true, get: function () { return SqDistribution_1.SqDistributionTag; } });
|
|
var SqDistributionError_1 = require("./SqDistributionError");
|
|
Object.defineProperty(exports, "SqDistributionError", { enumerable: true, get: function () { return SqDistributionError_1.SqDistributionError; } });
|
|
var SqRecord_1 = require("./SqRecord");
|
|
Object.defineProperty(exports, "SqRecord", { enumerable: true, get: function () { return SqRecord_1.SqRecord; } });
|
|
var SqLambda_1 = require("./SqLambda");
|
|
Object.defineProperty(exports, "SqLambda", { enumerable: true, get: function () { return SqLambda_1.SqLambda; } });
|
|
var ForTS_Distribution_gen_1 = require("../rescript/ForTS/ForTS_Distribution/ForTS_Distribution.gen");
|
|
Object.defineProperty(exports, "defaultEnvironment", { enumerable: true, get: function () { return ForTS_Distribution_gen_1.defaultEnvironment; } });
|
|
var SqError_1 = require("./SqError");
|
|
Object.defineProperty(exports, "SqError", { enumerable: true, get: function () { return SqError_1.SqError; } });
|
|
Object.defineProperty(exports, "SqFrame", { enumerable: true, get: function () { return SqError_1.SqFrame; } });
|
|
var parse_1 = require("./parse");
|
|
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_1.parse; } });
|
|
var types_1 = require("./types");
|
|
Object.defineProperty(exports, "resultMap", { enumerable: true, get: function () { return types_1.resultMap; } });
|
|
const run = (code, options) => {
|
|
const project = SqProject_1.SqProject.create();
|
|
project.setSource("main", code);
|
|
if (options === null || options === void 0 ? void 0 : options.environment) {
|
|
project.setEnvironment(options.environment);
|
|
}
|
|
project.run("main");
|
|
const result = project.getResult("main");
|
|
const bindings = project.getBindings("main");
|
|
return { result, bindings };
|
|
};
|
|
exports.run = run;
|
|
//# sourceMappingURL=index.js.map
|