⚡Quickstart
🛠 Installation
Install go-fAST using Go modules:
go get github.com/t14raptor/go-fastEnsure you are using Go 1.18 or higher.
📦 Imports
Typical packages you'll interact with include:
import (
"fmt"
"os"
"github.com/t14raptor/go-fast/parser"
"github.com/t14raptor/go-fast/generator"
"github.com/t14raptor/go-fast/transform/simplifier"
)🚀 Basic Usage
Parse a JavaScript file and generate the output:
This code:
Reads
input.jsParses it into an AST
Applies simplification (constant folding, dead code removal, etc.)
Generates optimized JavaScript back
✅ What's Next
🔍 Parsing JavaScript Files – deeper look at parsing
🧠 Simplifier Module – explore AST optimization
🧭 Built-In Visitors – learn about AST traversal and manipulation tools
Last updated