clone git repo go build main.go ./ast-dumper example.go2 ast write into example.go2.ast ----- folder syntax should ln -s from $GOROOT_OR_SOURCE_PATH/src/cmd/compile/internal/syntax , or copy.