Skip to content
Snippets Groups Projects
Commit 7aba77eb authored by Michael Leuschel's avatar Michael Leuschel
Browse files

fix typo in used definitions finder


operator override table was not visited;
constant override table was visited twice

Signed-off-by: default avatarMichael Leuschel <leuschel@uni-duesseldorf.de>
parent dfefc916
No related branches found
No related tags found
No related merge requests found
Pipeline #148072 passed
......@@ -20,6 +20,9 @@ public class UsedDefinitionsFinder extends AbstractASTVisitor implements ASTCons
private final HashSet<OpDefNode> usedDefinitions = new HashSet<>();
public UsedDefinitionsFinder(SpecAnalyser specAnalyser) {
DebugUtils.printMsg("Finding used definitions");
// some definition are not yet supported, like recursive definitions
// hence it is important not to try and translate all of them and only the used ones
if (specAnalyser.getConfigFileEvaluator() != null) {
Collection<OpDefNode> cons = specAnalyser.getConfigFileEvaluator().getConstantOverrideTable().values();
......@@ -27,7 +30,7 @@ public class UsedDefinitionsFinder extends AbstractASTVisitor implements ASTCons
visitExprNode(def.getBody());
}
Collection<OpDefNode> ops = specAnalyser.getConfigFileEvaluator().getOperatorOverrideTable().values();
for (OpDefNode def : cons) {
for (OpDefNode def : ops) {
visitExprNode(def.getBody());
}
usedDefinitions.addAll(cons);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment