MCPcopy Index your code
hub / github.com/antlr/codebuff / toString

Method toString

output/java8/1.4.12/STLexer.java:75–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 @Override
76 public String toString() {
77 String channelStr = "";
78 if ( channel>0) {
79 channelStr = ",channel="+channel;
80 }
81 String txt = getText();
82 if ( txt!=null ) txt = Misc.replaceEscapes(txt);
83 else txt = "<no text>";
84 String tokenName;
85 if ( type==EOF_TYPE ) tokenName = "EOF";
86 else tokenName = STParser.tokenNames[type];
87 return "[@"+getTokenIndex()+","+start+":"+stop+"='"+txt+"',<"+tokenName+">"+channelStr+","+line+":"+getCharPositionInLine()+"]";
88 }
89 }
90
91 public static final Token SKIP = new STToken(-1, "<skip>");

Callers

nothing calls this directly

Calls 4

replaceEscapesMethod · 0.95
getTokenIndexMethod · 0.80
getCharPositionInLineMethod · 0.80
getTextMethod · 0.65

Tested by

no test coverage detected