Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(sql) {
var result = p.parse(sql);
if (result.status === false) result.error = Parsimmon.formatError(sql, result);
return result;
};
var CharRegex = function(pattern) {
this.pattern = pattern;
this.parseResults = parser.parse(pattern);
if (!this.parseResults.status) {
var error = Parsimmon.formatError(pattern, this.parseResults)
throw new SyntaxError("Could not parse: " + error);
}
this.expression = this.parseResults.value;
};
module.exports = function(sql) {
var result = p.parse(sql);
if (result.status === false) result.error = Parsimmon.formatError(sql, result);
return result;
};
module.exports = function(input) {
var result = whitespace.then(expr).parse(input);
if (!result.status) {
result.error = Parsimmon.formatError(input, result);
}
return result;
};
export default function parse(src: string): Array | AitFault {
const result = final.parse(src);
if (result.status) {
return (result.value: Array).reverse();
}
return aitFault(formatError(src, result));
}
module.exports = function(sql) {
var result = p.parse(sql);
if (result.status === false) result.error = Parsimmon.formatError(sql, result);
return result;
};