DEV Community

Discussion on: Abstract Syntax Trees for fun and profit

Collapse
 
simonhaisz profile image
simonhaisz

Interesting...my exposure to ASTs has been either custom parsers or using ANTLR to analyze source code. Though now that I think about it, that's likely because when I'm doing this sort of stuff it's either a custom language or something less popular than JS so I haven't had babel or tsc to lean on.

Since this is 'Part One' and the first example replaced var with const is this series going to go in a linting/static-analysis direction?

Collapse
 
mlennox profile image
Mark Lennox

Hi Simon, thanks for the comment. I plan on looking at static analysis alright, probably by showing how cyclomatic complexity might be measured. I'm also going to look at codemods with relation to changing individual files and also refactoring a codebase. I'd also like look at how codemods can help reduce the amount of boilerplate that sometimes needs to be written. Finally, I'll eventually look at aspect oriented programming. I'm going to working on part two from this week - the others might be a while! :)