first commit

This commit is contained in:
s2
2024-12-13 08:53:01 +01:00
commit 2746dc9c4e
5477 changed files with 682458 additions and 0 deletions

37
node_modules/acorn-logical-assignment/index.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
"use strict"
module.exports = function(Parser) {
const acorn = Parser.acorn || require("acorn")
const tt = acorn.tokTypes
return class extends Parser {
// eslint-disable-next-line camelcase
readToken_pipe_amp(code) { // '|&'
let next = this.input.charCodeAt(this.pos + 1)
if (next === code) {
next = this.input.charCodeAt(this.pos + 2)
if (next === 61) return this.finishOp(tt.assign, 3)
return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
}
if (next === 61) return this.finishOp(tt.assign, 2)
return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
}
getTokenFromCode(code) {
return code == 63 ? this.readToken_question() : super.getTokenFromCode(code)
}
// eslint-disable-next-line camelcase
readToken_question() { // '?'
if (this.options.ecmaVersion >= 11) {
let next = this.input.charCodeAt(this.pos + 1)
if (next === 63) {
next = this.input.charCodeAt(this.pos + 2)
if (next === 61) return this.finishOp(tt.assign, 3)
// Check if acorn has nullish coalescing support
if (tt.coalesce) return this.finishOp(tt.coalesce, 2)
}
}
return this.finishOp(tt.question, 1)
}
}
}