function buildExportList(deps, loader, reporter) {

  function doVisit(ctor) {
    for (let i = 0; i < deps.length; i++) {
      let visitor = new ctor(reporter, loader, deps[i]);
      visitor.visitAny(deps[i].tree);
    }
  }

  function reverseVisit(ctor) {
    for (let i = deps.length - 1; i >= 0; i--) {
      let visitor = new ctor(reporter, loader, deps[i]);
      visitor.visitAny(deps[i].tree);
    }
  }

  // Export star needs to be done in dependency order.
  reverseVisit(ExportVisitor);
  doVisit(ValidationVisitor);
}
Builds up all module symbols and validates them.
@param {Array.<ModuleSymbole>} deps
@param {Loader} loader
@param {ErrorReporter} reporter
@return {void}