Add Parser.isTrace() (fixes #701)

This commit is contained in:
Sam Harwell 2014-09-25 22:11:14 -05:00
parent 7f577d9209
commit 4f56bb7ab0
1 changed files with 10 additions and 0 deletions

View File

@ -921,4 +921,14 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
addParseListener(_tracer);
}
}
/**
* Gets whether a {@link TraceListener} is registered as a parse listener
* for the parser.
*
* @see #setTrace(boolean)
*/
public boolean isTrace() {
return _tracer != null;
}
}