Mercurial > hg > truffle
changeset 22397:27cf58ec97ae
SourceSection: include more information in SourceSection.toString()
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Thu, 19 Nov 2015 16:37:34 +0100 |
parents | 78f014d57b4b |
children | 07c98b5a9496 |
files | truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java Thu Nov 19 16:02:48 2015 +0100 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/SourceSection.java Thu Nov 19 16:37:34 2015 +0100 @@ -201,7 +201,12 @@ */ @Override public String toString() { - return getShortDescription(); + if (source == null) { + return kind + ": " + identifier; + } else { + return "source=" + source.getShortName() + " pos=" + charIndex + " len=" + charLength + " line=" + startLine + " col=" + startColumn + + (identifier != null ? " identifier=" + identifier : "") + " code=" + getCode(); + } } @Override