adaptive-expressions
Version:
Common Expression Language
30 lines • 1.21 kB
JavaScript
;
/**
* @module adaptive-expressions
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Error listener for Regex.
*/
class RegexErrorListener {
/**
* Upon syntax error, notify any interested parties.
*
* @param _recognizer What parser got the error. From this object, you can access the context as well as the input stream.
* @param _offendingSymbol Offending token in the input token stream, unless recognizer is a lexer, then it's null.
* @param _line Line number in the input where the error occurred.
* @param _charPositionInLine Character position within the line where the error occurred.
* @param _msg Message to emit.
* @param _e Exception generated by the parser that led to the reporting of an error.
*/
syntaxError(_recognizer, _offendingSymbol, _line, _charPositionInLine, _msg, _e) {
throw Error('Regular expression is invalid.');
}
}
RegexErrorListener.Instance = new RegexErrorListener();
exports.RegexErrorListener = RegexErrorListener;
//# sourceMappingURL=regexErrorListener.js.map