1 个仓库
Tools that serialize abstract syntax trees back into JavaScript source code.
Distinct from JavaScript Source Parsers: Focuses on the printing/serialization phase, whereas the sibling focuses on the parsing phase.
Explore 1 awesome GitHub repository matching programming languages & runtimes · JavaScript AST Printers. Refine with filters or upvote what's useful.
Recast 是一个 JavaScript AST 解析器和打印机,专为自动化代码重构而设计。它将源代码转换为抽象语法树,这些树可以被修改,然后打印回源代码。 该项目专注于保持格式的转换,在语法树节点中存储原始空格和缩进元数据,以在不丢失原始布局的情况下重构代码。它还生成字符级源映射,以保持原始输入和转换输出之间的精确对应关系。 该工具包包括使用访问者模式(visitor pattern)进行语法树操作的实用程序,以及用于通用样式美化打印的选项。它提供了一个命令行界面,用于在目标文件上执行这些转换函数并将结果写入磁盘。
Provides a complete system for parsing JavaScript into ASTs and printing them back to source code.