Files
NapCatQQ/.pnpm-store/v3/files/db/28cf99055090876669c5f0f1c62bcbb21fb3b265919543d71b2af8ebcedf7288330c3d03f4c238d1bf51304a0b3fa0dbf04c26eaf5cdb56983c02c4a4e5335
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

34 lines
651 B
Plaintext

'use strict'
function getSourceCode(context) {
if (context.sourceCode != null) {
return context.sourceCode
}
return context.getSourceCode()
}
function getAncestors(context, node) {
const sourceCode = getSourceCode(context)
if (typeof sourceCode.getAncestors === 'function') {
return sourceCode.getAncestors(node)
}
return context.getAncestors(node)
}
function getScope(context, node) {
const sourceCode = getSourceCode(context)
if (typeof sourceCode.getScope === 'function') {
return sourceCode.getScope(node)
}
return context.getScope(node)
}
module.exports = {
getSourceCode,
getAncestors,
getScope,
}