public static Parser newInstance(Query.Type type, ParserEnvironment environment) {
        return newInstance(QueryType.from(type), environment);
    }
Implements a factory for {@link Parser}.

@author Simon Thoresen Hult
container-search/src/main/java/com/yahoo/search/query/parser/ParserFactory.java