move emitter out of parser