Abstracting recursion over AST

Something that I think is realy useful when working with abstract syntax trees, is the possibility to do tree transformations. Trees transaformations can be used to add information to the AST from a semantic analysis, add positions, do optimizations, inline functions, etc. In this post I show what I learned after trying to achieve good tree transformations API in my code. First things first: I’m using a boolean language with variables as example here. I know that real world examples tend to be much more com

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论