In StatementContext, you have the following new methods:

    /**
    * Cache list of all NEXT SEQUENCE nodes in statement. Will be resolved by server call prior to statement compilation.
    */
    public void setNextSequenceNodes(List< NextSequenceValueParseNode> nodes) {
    }
    /**
    * Get list of all NEXT SEQUENCE nodes in statement. 
    */
    public List< NextSequenceValueParseNode>  getNextSequenceNodes() {
    }


    /**
    * Set map of resolved NEXT SEQUENCE nodes in statement.
    */
    public void setResolvedSequenceMap(Map< NextSequenceValueParseNode, LiteralExpression>  resolvedSequenceMap) {
    }

    /**
    * Get map of resolved NEXT SEQUENCE nodes in statement.
    */
    public Map< NextSequenceValueParseNode, LiteralExpression> getResolvedSequenceMap() {
    }

The code in ConnectionQueryServicesImpl that does the server call will create and return the Map (creating a LiteralExpression for each now resolved sequence). The caller will then cache this map on the context using the above method.

Then you'll implement the visitor in ExpressionCompiler something like this:
 
		@Override
		public Expression visit(NextSequenceValueParseNode node) throws SQLException {			
			Expression resolvedSequence = context.getResolvedSequenceMap().get(node);
                        if (resolvedSequence == null) throw SQLException // something went wrong, as this should be there

                        return resolvedSequence;
		}