parse conditional function instantiation properly