Make types work in placeholder parser

This requires the parser to take an option object.
Ok, I guess what you are up to here is using the global as a default argument value while replacing the global accesses.