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

Method toString

output/java/1.4.19/STLexerMessage.java:50–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

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