Skip to main content

Module walker

Module walker 

Source
Expand description

Generic tree-sitter AST walker. Generic tree-sitter AST walker that converts parse trees to panproto schemas.

Because theories are auto-derived from the grammar, the walker is fully generic: one implementation works for all languages. The node’s kind() IS the panproto vertex kind; the field name IS the edge kind.

Named-scope detection (functions, classes, methods, modules, types) is driven by the grammar’s queries/tags.scm file via ScopeDetector, not by a hardcoded node-kind list. This makes scope detection uniformly correct across every tree-sitter grammar that ships a tags query. See the scope_detector module for the full rationale.

Structs§

AstWalker
Generic AST walker that converts a tree-sitter parse tree to a panproto Schema.
WalkerConfig
Configuration for the walker, allowing per-language customization.