ifc-expressions
Version:
Parsing and evaluation of IFC expressions
28 lines (27 loc) • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IfcExpressionErrorListener = void 0;
const antlr4_1 = require("antlr4");
const IfcExpressionUtils_js_1 = require("./util/IfcExpressionUtils.js");
const SyntaxErrorException_js_1 = require("./error/SyntaxErrorException.js");
class IfcExpressionErrorListener extends antlr4_1.ErrorListener {
validationException(validationException) {
this.exception = validationException;
}
syntaxError(recognizer, offendingSymbol, line, column, msg, e) {
if (typeof offendingSymbol === "number") {
this.exception = new SyntaxErrorException_js_1.SyntaxErrorException(offendingSymbol, line, column, msg);
}
else {
this.exception = new SyntaxErrorException_js_1.SyntaxErrorException((0, IfcExpressionUtils_js_1.isNullish)(offendingSymbol) ? "[no symbol]" : offendingSymbol.text, line, column, msg);
}
}
isErrorOccurred() {
return (0, IfcExpressionUtils_js_1.isPresent)(this.exception);
}
getException() {
return this.exception;
}
}
exports.IfcExpressionErrorListener = IfcExpressionErrorListener;
//# sourceMappingURL=IfcExpressionErrorListener.js.map