Or to use the appropriate terminology, how a parser can produce a custom element... in this case our AST objects.
用适当的术语来说就是解析器如何才能产生一个定制的元素(在这里,就是AST对象)。
The analysis API eliminates most of the challenges associated with visiting AST nodes by providing a common visitor class and abstracting the query mechanism.
分析API通过提供一个公用的访问者类和抽象查询机制,消除了和访问AST节点相关联的大部分挑战。
Tools, based on ParseTree, already exist, such as Ruby2Ruby which can turn an AST back into Ruby source code; useful if a tool wants to modify an AST and then output it as Ruby source.
已有的基于分析树的工具,比如Ruby2Ruby可以把AST转换成Ruby源代码;如果某工具想修改AST并输出为Ruby源代码,这很有用。
应用推荐