Sha256: 6643b0dc13af30086875bb6927e2a17024c34402260095a0056aa50c30b7e7e4
Contents?: true
Size: 294 Bytes
Versions: 4
Compression:
Stored size: 294 Bytes
Contents
import CompileError from './CompileError.js'; export default function checkConst(identifier, scope) { const declaration = scope.findDeclaration(identifier.name); if (declaration && declaration.kind === 'const') { throw new CompileError(`${identifier.name} is read-only`, identifier); } }
Version data entries
4 entries across 4 versions & 1 rubygems