Fixes #802. Trigger events for alt labels in parser listeners.
This commit is contained in:
parent
1374896a16
commit
3674d45476
|
@ -632,7 +632,7 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
|||
public void exitRule() {
|
||||
_ctx.stop = _input.LT(-1);
|
||||
// trigger event on _ctx, before it reverts to parent
|
||||
if ( _parseListeners != null) triggerExitRuleEvent();
|
||||
if ( _parseListeners != null ) triggerExitRuleEvent();
|
||||
setState(_ctx.invokingState);
|
||||
_ctx = (ParserRuleContext)_ctx.parent;
|
||||
}
|
||||
|
@ -648,6 +648,9 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
|||
}
|
||||
}
|
||||
_ctx = localctx;
|
||||
if ( _parseListeners != null ) {
|
||||
triggerEnterRuleEvent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue