Mercurial > hg > truffle
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeUtil.java @ 19010:3bf612703773
Truffle: print the line number in the source attribution tree.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Thu, 29 Jan 2015 00:12:30 +0000 |
parents | 0f462015296f |
children | f5b83e7b2b4c |
comparison
equal
deleted
inserted
replaced
19004:986e2e87eedd | 19010:3bf612703773 |
---|---|
1089 if (section != null) { | 1089 if (section != null) { |
1090 final String srcText = section.getCode(); | 1090 final String srcText = section.getCode(); |
1091 final StringBuilder sb = new StringBuilder(); | 1091 final StringBuilder sb = new StringBuilder(); |
1092 sb.append("source:"); | 1092 sb.append("source:"); |
1093 sb.append(" (" + section.getCharIndex() + "," + (section.getCharEndIndex() - 1) + ")"); | 1093 sb.append(" (" + section.getCharIndex() + "," + (section.getCharEndIndex() - 1) + ")"); |
1094 sb.append(" line=" + section.getLineLocation().getLineNumber()); | |
1094 sb.append(" len=" + srcText.length()); | 1095 sb.append(" len=" + srcText.length()); |
1095 sb.append(" text=\"" + srcText + "\""); | 1096 sb.append(" text=\"" + srcText + "\""); |
1096 return sb.toString(); | 1097 return sb.toString(); |
1097 } | 1098 } |
1098 return ""; | 1099 return ""; |