()
| 72 | } |
| 73 | |
| 74 | @Override |
| 75 | public String toString() { |
| 76 | int line = 0; |
| 77 | int charPos = -1; |
| 78 | if ( token!=null ) { |
| 79 | line = token.getLine(); |
| 80 | charPos = token.getCharPositionInLine(); |
| 81 | // check the input streams - if different then token is embedded in templateToken and we need to adjust the offset |
| 82 | if ( templateToken!=null && |
| 83 | !templateToken.getInputStream().equals(token.getInputStream()) ) { |
| 84 | int templateDelimiterSize = 1; |
| 85 | if ( templateToken.getType()==GroupParser.BIGSTRING || |
| 86 | templateToken.getType()==GroupParser.BIGSTRING_NO_NL ) { |
| 87 | templateDelimiterSize = 2; |
| 88 | } |
| 89 | line += templateToken.getLine()-1; |
| 90 | charPos += templateToken.getCharPositionInLine()+templateDelimiterSize; |
| 91 | } |
| 92 | } |
| 93 | String filepos = line+":"+charPos; |
| 94 | if ( srcName!=null ) { |
| 95 | return srcName+" "+filepos+": "+String.format(error.message, arg, arg2); |
| 96 | } |
| 97 | |
| 98 | return filepos+": "+String.format(error.message, arg, arg2); |
| 99 | } |
| 100 | } |
nothing calls this directly
no test coverage detected