I've decided to split the module parsing into two modules, one for the preprocessing stage which only deals with tokens and the parsing stage which generates bytecode.