diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cuchaz/enigma/analysis/SourceIndex.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/analysis/SourceIndex.java b/src/cuchaz/enigma/analysis/SourceIndex.java index a5d1460..38d10da 100644 --- a/src/cuchaz/enigma/analysis/SourceIndex.java +++ b/src/cuchaz/enigma/analysis/SourceIndex.java | |||
| @@ -62,13 +62,20 @@ public class SourceIndex | |||
| 62 | Region region = node.getRegion(); | 62 | Region region = node.getRegion(); |
| 63 | if( region.getBeginLine() == 0 || region.getEndLine() == 0 ) | 63 | if( region.getBeginLine() == 0 || region.getEndLine() == 0 ) |
| 64 | { | 64 | { |
| 65 | System.err.println( "WARNING: " + node.getNodeType() + " node has invalid region: " + region ); | 65 | // DEBUG |
| 66 | //System.err.println( "WARNING: " + node.getNodeType() + " node has invalid region: " + region ); | ||
| 66 | return null; | 67 | return null; |
| 67 | } | 68 | } |
| 68 | Token token = new Token( | 69 | Token token = new Token( |
| 69 | toPos( region.getBeginLine(), region.getBeginColumn() ), | 70 | toPos( region.getBeginLine(), region.getBeginColumn() ), |
| 70 | toPos( region.getEndLine(), region.getEndColumn() ) | 71 | toPos( region.getEndLine(), region.getEndColumn() ) |
| 71 | ); | 72 | ); |
| 73 | if( token.start == 0 ) | ||
| 74 | { | ||
| 75 | // DEBUG | ||
| 76 | //System.err.println( "WARNING: " + node.getNodeType() + " node has invalid start: " + region ); | ||
| 77 | return null; | ||
| 78 | } | ||
| 72 | 79 | ||
| 73 | // for tokens representing inner classes, make sure we only get the simple name | 80 | // for tokens representing inner classes, make sure we only get the simple name |
| 74 | int pos = node.toString().lastIndexOf( '$' ); | 81 | int pos = node.toString().lastIndexOf( '$' ); |