当前位置: 首页 > 知识库问答 >
问题:

javascript - 请问一下GitHub上的代码展示区域,右侧有代码的方法和属性和类(任何语言都可以提取出)的罗列展示,这个是基于什么库做的呢?

白泽语
2024-07-06

请问一下GitHub上的代码展示区域,右侧有代码的方法和属性和类(任何语言都可以提取出)的罗列展示:

请问一下,这个是基于什么库做的呢?
311e8fd601b015fc163e9335b10c650e.png

共有1个答案

裴硕
2024-07-06

这部分是有文档的 �� Navigating code on GitHub - GitHub Docs

  • tree-sitter/tree-sitter: An incremental parsing system for programming tools
  • github/stack-graphs: Rust implementation of stack graphs

About navigating code on GitHub

Code navigation helps you to read, navigate, and understand code by showing
and linking definitions of a named entity corresponding to a reference
to that entity, as well as references corresponding to an entity's
definition.
code-navigation-popover
Code navigation uses the open source tree-sitter library. The following languages and navigation strategies are supported.


GitHub has developed two code navigation approaches based on the open source tree-sitter and stack-graphs library:
Search-based - searches all definitions and references across a repository to find entities with a given name

  • Precise - resolves definitions and references based on the set of classes, functions, and imported definitions at a given point in your code
  • To learn more about these approaches, see "Precise and search-based navigation."
 类似资料: