👋
Welcome to go2ast
Transform Go code into it's AST
Usage
echo "a := 1" | go run main.go
Example output
[]ast.Stmt {
&ast.AssignStmt {
Lhs: []ast.Expr {
&ast.Ident {
Name: "a",
},
},
Tok: :=,
Rhs: []ast.Expr {
&ast.BasicLit {
ValuePos: 30,
Kind: INT,
Value: "1",
},
},
},
}
WASM Demo
Try this live: https://reflog.github.io/go2ast/