UNPKG

adaptive-expressions

Version:
31 lines 1.24 kB
"use strict"; /** * @module adaptive-expressions */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RegexErrorListener = void 0; /** * 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.'); } } exports.RegexErrorListener = RegexErrorListener; RegexErrorListener.Instance = new RegexErrorListener(); //# sourceMappingURL=regexErrorListener.js.map