parser: correct api for types