⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
node_modules
/
acorn-import-meta
/
Edit File: index.js
"use strict" const tt = require("acorn").tokTypes const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g const nextTokenIsDot = parser => { skipWhiteSpace.lastIndex = parser.pos let skip = skipWhiteSpace.exec(parser.input) let next = parser.pos + skip[0].length return parser.input.slice(next, next + 1) === "." } module.exports = function(Parser) { return class extends Parser { parseExprAtom(refDestructuringErrors) { if (this.type !== tt._import || !nextTokenIsDot(this)) return super.parseExprAtom(refDestructuringErrors) if (!this.options.allowImportExportEverywhere && !this.inModule) { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") } let node = this.startNode() if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword import") node.meta = this.parseIdent(true) this.expect(tt.dot) node.property = this.parseIdent(true) if (node.property.name !== "meta") { this.raiseRecoverable(node.property.start, "The only valid meta property for import is import.meta") } if (this.containsEsc) { this.raiseRecoverable(node.property.start, "\"meta\" in import.meta must not contain escape sequences") } return this.finishNode(node, "MetaProperty") } parseStatement(context, topLevel, exports) { if (this.type !== tt._import || !nextTokenIsDot(this)) { return super.parseStatement(context, topLevel, exports) } let node = this.startNode() let expr = this.parseExpression() return this.parseExpressionStatement(node, expr) } } }
Simpan