@bitloops/bl-transpiler
Version:
The one and only Bitloops Language transpiler
21 lines • 699 B
JavaScript
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