refactor clang to use CompilerState

instead of passing data through returns.
Now consume returns code and produce returns None