UNPKG

js-slang

Version:

Javascript-based implementations of Source, written in Typescript

23 lines 749 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NoAssignmentToForVariable = void 0; const constants_1 = require("../constants"); const types_1 = require("../types"); class NoAssignmentToForVariable { constructor(node) { this.node = node; this.type = types_1.ErrorType.SYNTAX; this.severity = types_1.ErrorSeverity.ERROR; } get location() { return this.node.loc ?? constants_1.UNKNOWN_LOCATION; } explain() { return 'Assignment to a for loop variable in the for loop is not allowed.'; } elaborate() { return this.explain(); } } exports.NoAssignmentToForVariable = NoAssignmentToForVariable; //# sourceMappingURL=validityErrors.js.map