Skip to main content

Module ast

Module ast 

Source
Expand description

AST-Based Code Analysis Module

Provides syntax tree analysis for precise code structure understanding using native parsers.

§Syntax relationship edges

Use get_syntax_edges to extract explicit syntax relationships (parent-child, contains, imports) from an AstAnalysis. These edges complement execution flow (CFG) and data dependencies (DFG).

Structs§

AstAnalysis
AstNode
AstParser
Legacy AstParser struct for backward compatibility
AstSyntaxEdge
An edge representing a syntax relationship between two AST elements
ClassInfo
FunctionInfo
ImportInfo
VariableInfo

Enums§

SyntaxRelationshipType
Syntax relationship type for AST edges

Functions§

analyze_content
Analyze source code content and extract AST information
analyze_file
Analyze a file and extract AST information
get_syntax_edges
Extract syntax relationship edges from AST analysis.