News for hackers. Stuff that matters.
Re:From AST to Lossless Syntax Tree by chubot on Sunday February 12, 2017 @10:09PM (#13632854)
Cool, I didn't know about those projects. I have been using sed for a long time to refactor Python!

I think the goals are actually similar -- refactoring is a style-preserving transformation that is similar to changing the language. At Google there is a bunch of work on converting C++ 03 to 11 to 14 to 17, etc. and they're using similar techniques with Clang. That's an example of a refactoring that's also changing the language.

I think it would be nice to make a "LST-aware sed". Once you have the parsers, I don't think it's that hard to add something like that on top. The parsers are of course a lot of labor!

There are no comments on this comment yet.