如何在ocaml源代码中找到desc的定义?
How to find the definition of desc in ocaml source code?
在 OCaml 源代码 4.07 中,在 typing/typemod.ml
,第 1452 行:
let type_str_item env srem {pstr_loc = loc; pstr_desc = desc} =
我找不到 desc
的定义位置。函数 type_str_item
定义在 type_structure
函数中,但 desc
不是 type_structure
的参数之一。
我到处都找不到它的定义,我要对它进行模式匹配,所以我不能忽略它。
如何导航 OCaml 源代码以查找定义?
这段代码没有使用变量,它是通过模式匹配绑定一个变量。这是一个将变量 desc
绑定到 pstr_desc
字段的记录模式。
为了导航 ocaml 源,有 merlin
代码辅助工具,它为一些常见的编辑器(以及各种其他功能)提供了跳转到定义的功能。但是,这在这里没有多大帮助,因为您已经在查看 desc
.
的定义
在 OCaml 源代码 4.07 中,在 typing/typemod.ml
,第 1452 行:
let type_str_item env srem {pstr_loc = loc; pstr_desc = desc} =
我找不到 desc
的定义位置。函数 type_str_item
定义在 type_structure
函数中,但 desc
不是 type_structure
的参数之一。
我到处都找不到它的定义,我要对它进行模式匹配,所以我不能忽略它。
如何导航 OCaml 源代码以查找定义?
这段代码没有使用变量,它是通过模式匹配绑定一个变量。这是一个将变量 desc
绑定到 pstr_desc
字段的记录模式。
为了导航 ocaml 源,有 merlin
代码辅助工具,它为一些常见的编辑器(以及各种其他功能)提供了跳转到定义的功能。但是,这在这里没有多大帮助,因为您已经在查看 desc
.