Fixes bug in Compiler

- fixes regexp issue in InlineCode
- add getAttributeType in Compiler
Simplifies code using getAttributeType