🥅 catch parser failure when indexing codebase
This commit is contained in:
parent
f6633fd157
commit
6391d243b0
1 changed files with 3 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
|
|||
return [];
|
||||
}
|
||||
const parser = await getParserForFile(filepath);
|
||||
if (!parser) {
|
||||
return [];
|
||||
}
|
||||
const ast = parser.parse(contents);
|
||||
const query = lang?.query(this.getQuerySource(filepath));
|
||||
const matches = query?.matches(ast.rootNode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue