MCPcopy Create free account
hub / github.com/antlr/codebuff / toString

Method toString

output/java/1.4.15/STLexer.java:76–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 @Override
77 public String toString() {
78 String channelStr = "";
79 if ( channel>0) {
80 channelStr = ",channel="+channel;
81 }
82 String txt = getText();
83 if ( txt!=null ) txt = Misc.replaceEscapes(txt);
84 else txt = "<no text>";
85 String tokenName;
86 if ( type==EOF_TYPE ) tokenName = "EOF";
87 else tokenName = STParser.tokenNames[type];
88 return "[@"+getTokenIndex()+","+start+":"+stop+"='"+txt+"',<"+tokenName+">" +
89 channelStr +
90 "," +
91 line +
92 ":" +
93 getCharPositionInLine() +
94 "]";
95 }
96 }
97
98 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