The idea is to create a coAST (Abstract Syntax Tree) with the given programming language and then have various algorithms that operate on coAST and do cool code analysis. That way we need to write the algorithms once for all the languages. Moving ahead, It would be nice to be able to set some kind of rules. Those are language independent and they operate on an AST that has a unified spec.
Classes needed:
- An AST class that contains nodes.
- A Bear class that allows to write some kind of rules in an easy manner that operate on the AST.