HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/nodejs/acorn-export-ns-from/index.js
"use strict"

const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g

module.exports = function(Parser) {
  const tt = (Parser.acorn || require("acorn")).tokTypes

  return class extends Parser {
    parseExport(node, exports) {
      skipWhiteSpace.lastIndex = this.pos
      const skip = skipWhiteSpace.exec(this.input)
      const next = this.input.charAt(this.pos + skip[0].length)
      if (next !== "*") return super.parseExport(node, exports)

      this.next()
      this.expect(tt.star)
      if (this.eatContextual("as")) {
        node.exported = this.parseIdent(true)
        this.checkExport(exports, node.exported.name, node.exported.start)
      } else node.exported = null
      this.expectContextual("from")
      if (this.type !== tt.string) this.unexpected()
      node.source = this.parseExprAtom()
      this.semicolon()
      return this.finishNode(node, "ExportAllDeclaration")
    }
  }
}