Golang AST visualizer.
You just need to run a http server and open your browser to index.html
To install, use go get
and make install
.
$ go get -d github.com/yuroyoro/goast-viewer
$ cd $GOPATH/src/github.com/yuroyoro/goast-viewer
$ make build
Golang AST visualizer
License: MIT License
Golang AST visualizer.
You just need to run a http server and open your browser to index.html
To install, use go get
and make install
.
$ go get -d github.com/yuroyoro/goast-viewer
$ cd $GOPATH/src/github.com/yuroyoro/goast-viewer
$ make build
$ go get github.com/yuroyoro/goast-viewer
# github.com/yuroyoro/goast-viewer
go/src/github.com/yuroyoro/goast-viewer/server.go:28: undefined: Asset
hi,
at first ๐ for this great tool.
i refactored the code a bit and now the ast parser run at the browser. the go code is compiled to wasm and some small changes at the angular conde need to be done to make the serverless version.
if you like the idea, let me know and i prepare a PR.
Hello @yuroyoro!
Now, you server create AST from Go source.
Is possible add parsing string to Go AST expression?
Result of next example is AST of expression d*6*integer(r*8+ff,12,3)
:
package main
import (
"go/ast"
"go/parser"
"go/token"
)
func main() {
a, _ := parser.ParseExpr("d*6*integer(r*8+ff,12,3)")
ast.Print(token.NewFileSet(), a)
}
> go get -d github.com/yuroyoro/goast-viewer
package syscall/js: unrecognized import path "syscall/js" (import path does not begin with hostname)
go version go1.10.8 darwin/amd64
OS: macOS Mojave 10.14.6 18G1012 x86_64
Host: MacBookPro15,1
Kernel: 18.7.0
Uptime: 7 days, 8 hours, 50 mins
Packages: 135 (brew)
Shell: bash 5.0.11
Resolution: 1680x1050, 1920x1080
DE: Aqua
WM: Spectacle
Terminal: iTerm2
Terminal Font: HackNerdFontComplete-Regular 12
CPU: Intel i7-9750H (12) @ 2.60GHz
GPU: Intel UHD Graphics 630, Radeon Pro 555X
Memory: 10353MiB / 16384MiB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.