《Go语言定制指南》(原名:Go语法树入门)
- 凹语言(专为 WebAssembly 设计): https://github.com/wa-lang/wa
- KCL 配置语言(Rust): https://github.com/kcl-lang/kcl
Go语法树是Go语言源文件的另一种语义等价的表现形式。而Go语言自带的go fmt
和go doc
等命令都是在Go语法树的基础之上分析工具。因此将Go语言程序作为输入数据,让我们语法树这个维度重新审视Go语言程序,我们将得到创建Go语言本身的技术。Go语法树由标准库的go/ast
包定义,它是在go/token
包定义的词法基础之上抽象的语法树结构。本书简单介绍语法树相关包的使用。如果想从头实现一个玩具Go语言可以参考《从头实现µGo语言》。

- 作者:柴树杉,Github @chai2010,Twitter @chaishushan
- 作者:史斌,Github @benshi001
- 作者:丁尔男,Github @3dgen
- 主页:https://github.com/chai2010/go-ast-book
- 阅读:https://chai2010.cn/go-ast-book
购买链接:
- 京东:https://item.jd.com/13698866.html
- 当当:https://product.dangdang.com/29388202.html
- 异步:https://www.epubit.com/bookDetails?id=UBc86f749c1eb7
如果你喜欢本书,欢迎到豆瓣评论:
MdBook 构建
增加了基于 Github 的 留言功能 和 mermaid 绘图功能,需要安装以下工具:
然后执行 mdbook serve
本地打开服务,或者 mdbook build
构建。
微信公众号

版权
相关图书
Pro Git, Second Edition
The entire Pro Git book, written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0 license. Print versions of the book are available on Amazon.com.
Nginx开发从入门到精通
Nginx开发从入门到精通
现代 C++ 教程:高速上手 C++ 11/14/17/20
现代 C++ (本书中均指 C++11/14/17/20) 为传统 C++ 注入的大量特性使得整个 C++ 变得更加像一门现代化的语言。
暂无评论...