diff options
Diffstat (limited to 'src/cuchaz/enigma/analysis/SourceIndexVisitor.java')
| -rw-r--r-- | src/cuchaz/enigma/analysis/SourceIndexVisitor.java | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/cuchaz/enigma/analysis/SourceIndexVisitor.java b/src/cuchaz/enigma/analysis/SourceIndexVisitor.java index f31eb1a..841d176 100644 --- a/src/cuchaz/enigma/analysis/SourceIndexVisitor.java +++ b/src/cuchaz/enigma/analysis/SourceIndexVisitor.java | |||
| @@ -213,6 +213,20 @@ public class SourceIndexVisitor implements IAstVisitor<SourceIndex, Void> | |||
| 213 | return recurse( node, index ); | 213 | return recurse( node, index ); |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | @Override | ||
| 217 | public Void visitIdentifierExpression( IdentifierExpression node, SourceIndex index ) | ||
| 218 | { | ||
| 219 | MemberReference ref = node.getUserData( Keys.MEMBER_REFERENCE ); | ||
| 220 | if( ref != null ) | ||
| 221 | { | ||
| 222 | ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() ); | ||
| 223 | FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() ); | ||
| 224 | index.add( node.getIdentifierToken(), fieldEntry ); | ||
| 225 | } | ||
| 226 | |||
| 227 | return recurse( node, index ); | ||
| 228 | } | ||
| 229 | |||
| 216 | private Void recurse( AstNode node, SourceIndex index ) | 230 | private Void recurse( AstNode node, SourceIndex index ) |
| 217 | { | 231 | { |
| 218 | for( final AstNode child : node.getChildren() ) | 232 | for( final AstNode child : node.getChildren() ) |
| @@ -477,12 +491,6 @@ public class SourceIndexVisitor implements IAstVisitor<SourceIndex, Void> | |||
| 477 | } | 491 | } |
| 478 | 492 | ||
| 479 | @Override | 493 | @Override |
| 480 | public Void visitIdentifierExpression( IdentifierExpression node, SourceIndex index ) | ||
| 481 | { | ||
| 482 | return recurse( node, index ); | ||
| 483 | } | ||
| 484 | |||
| 485 | @Override | ||
| 486 | public Void visitUnaryOperatorExpression( UnaryOperatorExpression node, SourceIndex index ) | 494 | public Void visitUnaryOperatorExpression( UnaryOperatorExpression node, SourceIndex index ) |
| 487 | { | 495 | { |
| 488 | return recurse( node, index ); | 496 | return recurse( node, index ); |