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

Method toString

output/java8/1.4.14/STLexerMessage.java:51–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }
50
51 @Override
52 public String toString() {
53 RecognitionException re = (RecognitionException)cause;
54 int line = re.line;
55 int charPos = re.charPositionInLine;
56 if ( templateToken!=null ) {
57 int templateDelimiterSize = 1;
58 if ( templateToken.getType()==GroupParser.BIGSTRING ) {
59 templateDelimiterSize = 2;
60 }
61 line += templateToken.getLine()-1;
62 charPos += templateToken.getCharPositionInLine() +templateDelimiterSize;
63 }
64
65 String filepos = line+":"+charPos;
66 if ( srcName!=null ) {
67 return srcName+" "+filepos+": "+String.format(error.message, msg);
68 }
69 return filepos+": "+String.format(error.message, msg);
70 }
71}

Callers

nothing calls this directly

Calls 4

getCharPositionInLineMethod · 0.80
getTypeMethod · 0.45
getLineMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected