🐛 catch parsing errors for unsupported languages

This commit is contained in:
Nate Sesti 2024-03-16 01:32:48 -07:00
parent 640195e3e7
commit de2442e0fc

View file

@ -12,8 +12,12 @@ export async function getAst(
return undefined;
}
const ast = parser.parse(fileContents);
return ast;
try {
const ast = parser.parse(fileContents);
return ast;
} catch (e) {
return undefined;
}
}
export async function getTreePathAtCursor(