"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const cross_spawn_1 = __importDefault(require("cross-spawn"));
const path_1 = __importDefault(require("path"));
function parse(query) {
    const binaryTarget = path_1.default.resolve(__dirname, `../../sql-parser-${process.platform}`);
    const program = cross_spawn_1.default.sync(binaryTarget, ['--query', query, 'parse']);
    const result = program.stdout.toString();
    return JSON.parse(result);
}
exports.parse = parse;
//# sourceMappingURL=index.js.map