/** * Called by the {@link AMapDomainUnaryExp} node from {@link AMapDomainUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapDomainUnaryExp} node */ public void caseAMapDomainUnaryExp(AMapDomainUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inAMapDomainUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAMapDomainUnaryExp(node); }
/** * Called by the {@link AMapDomainUnaryExp} node from {@link AMapDomainUnaryExp#apply(IPOFAnalysis)}. * @param node the calling {@link AMapDomainUnaryExp} node */ public void caseAMapDomainUnaryExp(AMapDomainUnaryExp node) throws AnalysisException { _visitedNodes.add(node); inAMapDomainUnaryExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } outAMapDomainUnaryExp(node); }
/** * Called by the {@link AMapDomainUnaryExp} node from {@link AMapDomainUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapDomainUnaryExp} node */ public void caseAMapDomainUnaryExp(AMapDomainUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inAMapDomainUnaryExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } outAMapDomainUnaryExp(node, question); }
/** * Called by the {@link AMapDomainUnaryExp} node from {@link AMapDomainUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapDomainUnaryExp} node */ public A caseAMapDomainUnaryExp(AMapDomainUnaryExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAMapDomainUnaryExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } mergeReturns(retVal,outAMapDomainUnaryExp(node)); return retVal; }
/** * Called by the {@link AMapDomainUnaryExp} node from {@link AMapDomainUnaryExp#apply(IAnalysis)}. * @param node the calling {@link AMapDomainUnaryExp} node */ public A caseAMapDomainUnaryExp(AMapDomainUnaryExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAMapDomainUnaryExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } mergeReturns(retVal,outAMapDomainUnaryExp(node, question)); return retVal; }
@Override public PType caseAMapDomainUnaryExp(AMapDomainUnaryExp node, TypeCheckInfo question) throws AnalysisException { PExp exp = node.getExp(); question.qualifiers = null; PType etype = exp.apply(THIS, question.newConstraint(null)); if (!question.assistantFactory.createPTypeAssistant().isMap(etype)) { TypeCheckerErrors.report(3120, "Argument to 'dom' is not a map", node.getLocation(), node); node.setType(AstFactory.newAUnknownType(node.getLocation())); return node.getType(); } SMapType mt = question.assistantFactory.createPTypeAssistant().getMap(etype); node.setType(AstFactory.newASetSetType(node.getLocation(), mt.getFrom())); return node.getType(); }