@bitloops/bl-transpiler
Version:
The one and only Bitloops Language transpiler
15 lines • 657 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.argumentError = void 0;
const validationErrors_js_1 = require("./validationErrors.js");
const argumentError = (node, thisSymbolTable) => {
const errors = [];
const expressionNode = node.getExpression();
const identifierNode = expressionNode.getFirstChild();
if (!thisSymbolTable.has(identifierNode.getIdentifierName())) {
errors.push(new validationErrors_js_1.identifierValidationError(identifierNode.getIdentifierName(), identifierNode));
}
return errors;
};
exports.argumentError = argumentError;
//# sourceMappingURL=argumentError.js.map