修复: read_symbol 搜不到 const 声明的符号
- 新增 variable_declarator 到 DEFINITION_KINDS
- Vue 3 + TS 大量使用 const fn = () => {} 箭头函数
AST 节点是 variable_declarator,原本不在列表中
导致 read_symbol 对 Vue 文件频繁 fallback 回 read_file
This commit is contained in:
@@ -39,6 +39,8 @@ const DEFINITION_KINDS: &[&str] = &[
|
|||||||
"interface_declaration",
|
"interface_declaration",
|
||||||
"enum_declaration",
|
"enum_declaration",
|
||||||
"method_definition",
|
"method_definition",
|
||||||
|
// TS/JS const/let/var 声明(如 const fn = () => {})
|
||||||
|
"variable_declarator",
|
||||||
// Go
|
// Go
|
||||||
"method_declaration", // Go method(receiver func)
|
"method_declaration", // Go method(receiver func)
|
||||||
"type_declaration", // Go type Xxx struct/interface/func
|
"type_declaration", // Go type Xxx struct/interface/func
|
||||||
|
|||||||
Reference in New Issue
Block a user