Mark Recognizer.getTokenErrorDisplay as deprecated (fixes #480)

This commit is contained in:
Sam Harwell 2014-03-20 07:19:01 -05:00
parent c0dda79dff
commit 1dde17efea
1 changed files with 6 additions and 0 deletions

View File

@ -182,7 +182,13 @@ public abstract class Recognizer<Symbol, ATNInterpreter extends ATNSimulator> {
* the token). This is better than forcing you to override a method in
* your token objects because you don't have to go modify your lexer
* so that it creates a new Java type.
*
* @deprecated This method is not called by the ANTLR 4 Runtime. Specific
* implementations of {@link ANTLRErrorStrategy} may provide a similar
* feature when necessary. For example, see
* {@link DefaultErrorStrategy#getTokenErrorDisplay}.
*/
@Deprecated
public String getTokenErrorDisplay(Token t) {
if ( t==null ) return "<no token>";
String s = t.getText();