Skip to main content

Module types

Module types 

Source
Expand description

§Service Layer Types - Abstraction Glue for Thread

This module provides language-agnostic types that abstract over ast-grep functionality while preserving all its powerful capabilities. The service layer acts as glue between file-level ast-grep operations and codebase-level graph intelligence.

§Core Philosophy

  • Preserve Power: All ast-grep capabilities (Matcher, Replacer, Position) remain accessible
  • Bridge Levels: Connect file-level AST operations to codebase-level relational intelligence
  • Enable Execution: Abstract over different execution environments (rayon, cloud workers)
  • Commercial Ready: Clear boundaries for commercial extensions

§Key Types

  • ParsedDocument - Wraps ast-grep Root while enabling cross-file intelligence
  • CodeMatch - Extends NodeMatch with codebase-level context
  • ExecutionScope - Defines execution boundaries (file, module, codebase)
  • AnalysisContext - Carries execution and analysis context across service boundaries

Structs§

AnalysisContext
Execution context that carries state across service boundaries
CallInfo
Information about a function call
CodeMatch
A pattern match that extends ast-grep NodeMatch with codebase-level context.
CrossFileRelationship
Cross-file relationships for graph intelligence
DocumentMetadata
Metadata about a parsed document for codebase-level analysis
ExecutionConfig
Configuration for execution environments
ExportInfo
Information about an export
ImportInfo
Information about an import
MatchContext
Context for pattern matches
Node
NodeMatch
ParsedDocument
A parsed document that wraps ast-grep Root with additional codebase-level metadata.
PinnedNodeData
Position
Range
Range representing a span of text in source code
Root
SupportLangErr
SymbolInfo
Information about a symbol definition
TypeInfo
Information about type usage

Enums§

AnalysisDepth
Depth of analysis to perform
ExecutionScope
Execution scope for analysis operations
ExecutionStrategy
Execution strategy for different environments
ExportKind
ImportKind
RelationshipKind
SupportLang
SymbolKind
TypeKind
Visibility

Traits§

MatcherExt

Type Aliases§

PinnedNodeResult

Trait Aliases§

Doc