diff --git a/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java b/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java index 4636e7e31a7..91638d7d228 100644 --- a/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java +++ b/src/org/rascalmpl/library/lang/java/m3/internal/ASTConverter.java @@ -120,14 +120,17 @@ public void postVisit(ASTNode node) { return; } setKeywordParameter("src", getSourceLocation(node)); - ISourceLocation decl = resolveBinding(node); - if (!decl.getScheme().equals("unknown")) { - setKeywordParameter("decl", decl); - } - if (getAdtType() != DATATYPE_RASCAL_AST_STATEMENT_NODE_TYPE) { - IValue type = resolveType(node); - setKeywordParameter("typ", type); + if (collectBindings) { + ISourceLocation decl = resolveBinding(node); + if (!decl.getScheme().equals("unknown")) { + setKeywordParameter("decl", decl); + } + if (getAdtType() != DATATYPE_RASCAL_AST_STATEMENT_NODE_TYPE) { + IValue type = resolveType(node); + + setKeywordParameter("typ", type); + } } }