/** * Called by the {@link ABooleanConstExp} node from {@link ABooleanConstExp#apply(IAnalysis)}. * @param node the calling {@link ABooleanConstExp} node */ public void caseABooleanConstExp(ABooleanConstExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inABooleanConstExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getValue() != null ) { node.getValue().apply(this, question); } outABooleanConstExp(node, question); }
/** * Called by the {@link ABooleanConstExp} node from {@link ABooleanConstExp#apply(IPOFAnalysis)}. * @param node the calling {@link ABooleanConstExp} node */ public void caseABooleanConstExp(ABooleanConstExp node) throws AnalysisException { _visitedNodes.add(node); inABooleanConstExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getValue() != null ) { node.getValue().apply(this); } outABooleanConstExp(node); }
/** * Called by the {@link ABooleanConstExp} node from {@link ABooleanConstExp#apply(IAnalysis)}. * @param node the calling {@link ABooleanConstExp} node */ public void caseABooleanConstExp(ABooleanConstExp node) throws AnalysisException { _visitedNodes.add(node); inABooleanConstExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getValue() != null ) { node.getValue().apply(this); } outABooleanConstExp(node); }
/** * Called by the {@link ABooleanConstExp} node from {@link ABooleanConstExp#apply(IAnalysis)}. * @param node the calling {@link ABooleanConstExp} node */ public A caseABooleanConstExp(ABooleanConstExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inABooleanConstExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this)); } mergeReturns(retVal,outABooleanConstExp(node)); return retVal; }
/** * Called by the {@link ABooleanConstExp} node from {@link ABooleanConstExp#apply(IAnalysis)}. * @param node the calling {@link ABooleanConstExp} node */ public A caseABooleanConstExp(ABooleanConstExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inABooleanConstExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this, question)); } mergeReturns(retVal,outABooleanConstExp(node, question)); return retVal; }
@Override public PType caseABooleanConstExp(ABooleanConstExp node, TypeCheckInfo question) { node.setType(AstFactory.newABooleanBasicType(node.getLocation())); return question.assistantFactory.createPTypeAssistant().checkConstraint(question.constraint, node.getType(), node.getLocation()); }
@Override public SExpIR caseABooleanConstExp(ABooleanConstExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); boolean value = node.getValue().getValue(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); ABoolLiteralExpIR boolLitCg = new ABoolLiteralExpIR(); boolLitCg.setType(typeCg); boolLitCg.setValue(value); return boolLitCg; }