Skip to main content

Module common

Module common 

Source
Expand description

Shared language parser implementation. Common language parser implementation shared by all tree-sitter-based parsers.

Since the generic AstWalker handles all languages uniformly (the node kind IS the vertex kind, the field name IS the edge kind), per-language parsers are thin wrappers that provide:

  1. The tree-sitter Language object
  2. The embedded NODE_TYPES JSON
  3. Language-specific WalkerConfig overrides
  4. File extension mapping

Structsยง

LanguageParser
A generic language parser built from a tree-sitter grammar.