WIP factor ast.js out of compiler.js
Implement pattern matcher