Adapt bf and chef to error handling

This commit is contained in:
Nilay Majorwar
2022-01-22 15:44:05 +05:30
parent 0efd4c79ef
commit 22ee70948a
8 changed files with 46 additions and 42 deletions

View File

@ -7,7 +7,6 @@ const formatParseError = (error: WorkerParseError): string => {
const line = error.range.line + 1;
const start = error.range.charRange?.start;
const end = error.range.charRange?.end;
console.log(line, start, end);
let cols: string | null = null;
if (start != null && end != null) cols = `col ${start + 1}-${end + 1}`;
else if (start != null) cols = `col ${start + 1}`;