Module uvls::core::ast

source ·
Expand description

Easy to work with AST parsing and util.

The AST is stored as an ECS like structure This allows fast queries over all features groups etc. Features, Attributes, Imports and Directories are stored in a typed radix tree. The radix tree is represented via a map (sym0,name,ty) -> sym1 where ty is the type of sym1. Using this representation lowers total memory consumption by a nice 20%

Re-exports§

Modules§

  • Transform a tree-sitter tree into the Ast ECS via recursive decent While parsing we keep a mutable state to store entities and errors
  • def 🔒
    Basic Ast components
  • Transform a tree-sitter tree into the Ast ECS via recursive decent While parsing we keep a mutable state to store entities and errors
  • transform 🔒
    Transform a tree-sitter tree into the Ast ECS via recursive decent While parsing we keep a mutable state to store entities and errors
  • visitor 🔒
    This trait makes the tree-sitter cursor api easier to use. Util functions and traits for the transformer

Structs§

  • Ast 🔒
    Ast container each symbol kind lives in its own vector
  • Combines the AST with metadata, this is also a public interface to the AST.
  • TreeMap 🔒
    1->N parent child relation

Functions§