@Override
    public final QueryTree parse(Parsable query) {
        Item root = null;
        if (query != null) {
            root = parse(query.getQuery(),
                         query.getFilter(),
                         query.getExplicitLanguage().orElse(query.getLanguage()),
                         environment.getIndexFacts().newSession(query.getSources(), query.getRestrict()),
                         query.getDefaultIndexName(),
                         query);
        }
        if (root == null) {
            root = new NullItem();
        }
        return new QueryTree(root);
    }
Creates a new instance of this class, storing the given {@link ParserEnvironment} for parse-time access to the
environment.

@param environment the environment settings to attach to the Parser
container-search/src/main/java/com/yahoo/prelude/query/parser/AbstractParser.java