@bitloops/bl-transpiler
Version:
The one and only Bitloops Language transpiler
11 lines • 497 B
JavaScript
import { identifierValidationError } from './validationErrors.js';
export const argumentError = (node, thisSymbolTable) => {
const errors = [];
const expressionNode = node.getExpression();
const identifierNode = expressionNode.getFirstChild();
if (!thisSymbolTable.has(identifierNode.getIdentifierName())) {
errors.push(new identifierValidationError(identifierNode.getIdentifierName(), identifierNode));
}
return errors;
};
//# sourceMappingURL=argumentError.js.map