Expand description
Utility functions for working with the ForgeScript AST
Structs§
- AstStats
- Calculate statistics about the AST
Functions§
- calculate_
stats - contains_
javascript - Check if the AST contains any JavaScript expressions
- count_
nodes - Count the number of nodes in the AST
- extract_
function_ names - Extract all function names from the AST
- extract_
text_ nodes - Get all text nodes from the AST
- flatten_
ast - Flatten the AST into a linear sequence of nodes (depth-first)
- format_
ast - Pretty-print the AST to a string
- get_
source_ slice - Get a slice of the source code for a given span
- max_
nesting_ depth - Find the deepest nesting level in the AST