Fork me on GitHub

Early days, but I've been working on a reader based on tools.reader. Still brainstorming what to use it for related to type checking, but some interplay with the analyzer could give more precise error messages


@ambrosebs I've also been doing something like this in edamame (also based on tools.reader), which is powering sci. Although it doesn't output an AST, it can include the original source string, so you can match on this in grasp: It's basically read+string but also for all the inner nodes


I've been considering outputting an AST, which could be useful for sci, but currently it doesn't need one really. And whitespace hasn't really been a concern.


Someone commented at the sci repo that with a tools.analyzer-like AST there could be some optimizations but I currently don't see how an AST instead of sexpr adds more information to do optimizations. I'll be keeping an eye on this to learn more. Thanks!


Currently you can output as AST-like thing with edamame using the :postprocess hook which allows you to wrap the node (and source string and location) into a container to preserve more info (like saving locations for keywords)


Another interesting rewrite-clj alternative is which is based on ANTLR