Implement parsing and code generation of heap-allocated string