Code Monkey home page Code Monkey logo

go-ast-book's Introduction

Go语法树入门——开启自制编程语言和编译器之旅!


蚂蚁招聘(联系方式 [email protected], [email protected]):

  • PaaS平台开发专家-杭州/上海/成都
  • 编程语言方向岗位(杭州/P7):云原生方向要求熟悉k8s配套工具,如kubectl、kustomize、kubebuilder,operator;编程语言方向要求对语言对语言解释器(如py/js/lua/wasm等)、工具链、配套SDK有一定兴趣和实践经验。

Go语法树是Go语言源文件的另一种语义等价的表现形式。而Go语言自带的go fmtgo doc等命令都是在Go语法树的基础之上分析工具。因此将Go语言程序作为输入数据,让我们语法树这个维度重新审视Go语言程序,我们将得到创建Go语言本身的技术。Go语法树由标准库的go/ast包定义,它是在go/token包定义的词法基础只是抽象的语法树结构。本书简单介绍语法树相关包的使用(出版社已经约稿出版本书,并在开源版本的基础之上增加了语义信息、SSA形式、LLVM和凹语言等内容,因为出版社版权问题不方便全部公开新增内容)。

在线阅读

版权

版权 柴树杉史斌丁尔男,保留相关权力。针对Github注册用户提供以下的优惠权利:

  1. Github平台免费在线阅读。
  2. 关注本书项目(Star),同时关注任意一个作者的 Github 或 推特账号,自动获得下载的权利。

禁止非 Github 平台转载,作者保留相关法律权利。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.