🐛 catch parsing errors for unsupported languages
This commit is contained in:
parent
640195e3e7
commit
de2442e0fc
1 changed files with 6 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue