scala: initial code generator