UNPKG

@bitloops/bl-transpiler

Version:
21 lines 699 B
import { isParserErrors } from '../../../parser/core/guards/index.js'; import { ValidationError } from '../types.js'; const isOriginalParserOrIntermediateASTError = (value) => { if (isParserErrors(value) || isIntermediateASTValidationErrors(value)) { return true; } return false; }; const isIntermediateASTValidationErrors = (value) => { if (Array.isArray(value)) { for (const err of value) { if (!(err instanceof ValidationError)) { return false; } } return true; } return false; }; export { isOriginalParserOrIntermediateASTError, isIntermediateASTValidationErrors }; //# sourceMappingURL=index.js.map