BoxLang AST
Access BoxLang's Abstract Syntax Tree (AST) for building code analysis tools, linters, formatters, and migration utilities
🌳 What is an AST?
📋 Table of Contents
📋 BoxAST() BIF
Syntax
Parameters
Parameter
Type
Required
Default
Description
Return Types
struct (default)
json
text
Source Types
script (default)
template
cfscript
cftemplate
💡 Usage Examples
Basic AST Generation
Using String Member Method
Parsing Files
JSON Export for External Tools
Text Visualization
🎯 Use Cases
Code Analysis Tools
Code Formatters
Documentation Generators
Migration Tools
Refactoring Tools
IDE Tooling
🔍 AST Structure
Node Properties
Example AST Structure
📊 Best Practices
🔗 Related Resources
🛠️ Building Tools with BoxAST()
Example: Simple Linter
Example: Function Extractor
Last updated
Was this helpful?
