Scala 中的 Scala AST [英] Scala AST in Scala

查看:25
本文介绍了Scala 中的 Scala AST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个 Scala 库可以解析 Scala 并创建一个抽象语法树(AST)?

Is there a Scala library that parses Scala and creates an Abstract Syntax Tree (AST)?

理想情况下,我对 Scala 库感兴趣.计划 B 将是一个 Java 库.

Ideally I am interested in a Scala library. Plan B would be a Java library.

(我知道我可以利用 Scala 语法摘要.)

(I know I could leverage the EBNF from the Scala Syntax Summary.)

推荐答案

我认为访问 AST 的最佳方式是使用编译器插件.你应该在 深潜.

I would think the best way to access the AST is with a compiler plugin. You should read a soft introduction before diving in deep.

这篇关于Scala 中的 Scala AST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆