Merge pull request #1761 from parrt/rollback-1740
rollback #1740. Useful stuff but breaks C++ unit tests.
This commit is contained in:
commit
4994ff540d
|
@ -10,6 +10,6 @@
|
|||
using namespace antlr4;
|
||||
|
||||
InputMismatchException::InputMismatchException(Parser *recognizer)
|
||||
: RecognitionException("Input mismatch", recognizer, recognizer->getInputStream(), recognizer->getContext(),
|
||||
: RecognitionException(recognizer, recognizer->getInputStream(), recognizer->getContext(),
|
||||
recognizer->getCurrentToken()) {
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "misc/IntervalSet.h"
|
||||
|
||||
#include "RecognitionException.h"
|
||||
#include "Token.h"
|
||||
|
||||
using namespace antlr4;
|
||||
|
||||
|
@ -21,8 +20,7 @@ RecognitionException::RecognitionException(Recognizer *recognizer, IntStream *in
|
|||
|
||||
RecognitionException::RecognitionException(const std::string &message, Recognizer *recognizer, IntStream *input,
|
||||
ParserRuleContext *ctx, Token *offendingToken)
|
||||
: RuntimeException(message + (offendingToken ? " near token " + offendingToken->getText() + " in line " + std::to_string(offendingToken->getLine()) : ""))
|
||||
, _recognizer(recognizer), _input(input), _ctx(ctx), _offendingToken(offendingToken) {
|
||||
: RuntimeException(message), _recognizer(recognizer), _input(input), _ctx(ctx), _offendingToken(offendingToken) {
|
||||
InitializeInstanceFields();
|
||||
if (recognizer != nullptr) {
|
||||
_offendingState = recognizer->getState();
|
||||
|
|
Loading…
Reference in New Issue