> For the complete documentation index, see [llms.txt](https://mashplant.gitbook.io/decaf-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mashplant.gitbook.io/decaf-doc/pa1a/wen-jian-jie-gou.md).

# 文件结构

```
.
├── Cargo.lock
├── Cargo.toml
├── common
│   ├── Cargo.toml
│   └── src
│       ├── errors.rs # 各种错误，本阶段不需要修改
│       ├── ignore_result.rs # 工具
│       ├── indent_printer.rs # 用于格式化输出，不需要修改
│       ├── lib.rs
│       ├── loc.rs # 定义位置(行号，列号)
│       ├── op.rs # 定义操作符，可以添加新的操作符
│       └── ref.rs # 工具
├── driver
│   ├── Cargo.toml
│   └── src
│       ├── cli.rs # 提供command line interface
│       ├── lib.rs
│       ├── test.rs # 执行测试的程序
│       └── test_util.rs # 测试框架
├── print
│   ├── Cargo.toml
│   └── src
│       ├── ast.rs # 实现输出ast，你需要在这里输出新增的ast节点，以及可能需要修改老的ast节点的输出
│       └── lib.rs
└── syntax
    ├── Cargo.toml
    └── src
        ├── ast.rs # 定义ast节点，你需要在这里新增ast节点类型
        ├── lib.rs
        ├── parser.rs # 基于lalr(1)文法的parser，你需要在这里新增ast节点对应的产生式和语法动作
        ├── symbol.rs # 定义符号，不需要修改
        └── ty.rs # 定义SynTy和Ty，可以添加新的类型
```
