Package: TermVisitorIR

TermVisitorIR

nameinstructionbranchcomplexitylinemethod
TermVisitorIR()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
caseATraceDefinitionTerm(ATraceDefinitionTerm, IRInfo)
M: 2 C: 33
94%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 7
88%
M: 0 C: 1
100%

Coverage

1: package org.overture.codegen.traces;
2:
3: import org.overture.ast.analysis.AnalysisException;
4: import org.overture.ast.definitions.traces.ATraceDefinitionTerm;
5: import org.overture.ast.definitions.traces.PTraceDefinition;
6: import org.overture.codegen.ir.IRInfo;
7: import org.overture.codegen.ir.STermIR;
8: import org.overture.codegen.ir.STraceDeclIR;
9: import org.overture.codegen.ir.traces.ATraceDeclTermIR;
10: import org.overture.codegen.visitor.AbstractVisitorIR;
11:
12: public class TermVisitorIR extends AbstractVisitorIR<IRInfo, STermIR>
13: {
14:         @Override
15:         public STermIR caseATraceDefinitionTerm(ATraceDefinitionTerm node,
16:                         IRInfo question) throws AnalysisException
17:         {
18:                 ATraceDeclTermIR termCg = new ATraceDeclTermIR();
19:
20:•                for (PTraceDefinition traceDef : node.getList())
21:                 {
22:                         STraceDeclIR traceDefCg = traceDef.apply(question.getTraceDeclVisitor(), question);
23:
24:•                        if (traceDefCg != null)
25:                         {
26:                                 termCg.getTraceDecls().add(traceDefCg);
27:                         } else
28:                         {
29:                                 return null;
30:                         }
31:                 }
32:
33:                 return termCg;
34:         }
35: }