# 使用 JavaScript 来实现解释器和编译器系列教程

该系列「icj, Writing Interpreters and Compilers in JavaScript」中，我们将一起使用 JavaScript 徒手实现编程语言解释器和编译器。因此整个系列分为「解释器篇」和「编译器篇」，[在线阅读](https://hsiaosiyuan0.gitbook.io/icj/)。

* [解释器篇](/icj/part1.md)

  我们将逐步实现我们的第一个编程语言「hi 语言」。我们会一起从零开始构建它，然后以解释器的形式来实验它的功能。
* [编译器篇](/icj/part2.md)

  我们将继续完善我们的「hi 语言」，使之可以直接编译为 JavaScript，并在浏览器和 node 环境中运行我们的编译结果。

本系列所有代码，都归纳在 [code](https://github.com/hsiaosiyuan0/icj/tree/master/code) 目录下。

**该系列文章属于原创，不可用于任何收费环节或者项目中。转载请注明出处。**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hsiaosiyuan0.gitbook.io/icj/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
