@Override public PType caseAQuotePattern(AQuotePattern pattern) throws AnalysisException { return AstFactory.newAQuoteType(((AQuotePattern) pattern).getValue().clone()); }
/** * Called by the {@link AQuotePattern} node from {@link AQuotePattern#apply(IAnalysis)}. * @param node the calling {@link AQuotePattern} node */ public void caseAQuotePattern(AQuotePattern node) throws AnalysisException { _visitedNodes.add(node); inAQuotePattern(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getValue() != null ) { node.getValue().apply(this); } outAQuotePattern(node); }
/** * Called by the {@link AQuotePattern} node from {@link AQuotePattern#apply(IPOFAnalysis)}. * @param node the calling {@link AQuotePattern} node */ public void caseAQuotePattern(AQuotePattern node) throws AnalysisException { _visitedNodes.add(node); inAQuotePattern(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getValue() != null ) { node.getValue().apply(this); } outAQuotePattern(node); }
/** * Called by the {@link AQuotePattern} node from {@link AQuotePattern#apply(IAnalysis)}. * @param node the calling {@link AQuotePattern} node */ public void caseAQuotePattern(AQuotePattern node, Q question) throws AnalysisException { _visitedNodes.add(node); inAQuotePattern(node, question); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getValue() != null ) { node.getValue().apply(this, question); } outAQuotePattern(node, question); }
@Override public SPatternIR caseAQuotePattern(AQuotePattern node, IRInfo question) throws AnalysisException { String value = node.getValue().getValue(); AQuotePatternIR quotePatternCg = new AQuotePatternIR(); quotePatternCg.setValue(value); question.registerQuoteValue(value); return quotePatternCg; }
public PExp caseAQuotePattern(AQuotePattern node) throws AnalysisException { AQuoteLiteralExp quote = new AQuoteLiteralExp(); quote.setValue(node.getValue().clone()); addPossibleType(quote, node); return quote; }
@Override public List<NameValuePairList> caseAQuotePattern(AQuotePattern pattern, Newquestion question) throws AnalysisException { List<NameValuePairList> result = new Vector<NameValuePairList>(); try { if (!question.expval.quoteValue(question.ctxt).equals(pattern.getValue().getValue())) { VdmRuntimeError.patternFail(4112, "Quote pattern match failed", pattern.getLocation()); } } catch (ValueException e) { VdmRuntimeError.patternFail(e, pattern.getLocation()); } result.add(new NameValuePairList()); return result; }
/** * Called by the {@link AQuotePattern} node from {@link AQuotePattern#apply(IAnalysis)}. * @param node the calling {@link AQuotePattern} node */ public A caseAQuotePattern(AQuotePattern node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAQuotePattern(node)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this)); } mergeReturns(retVal,outAQuotePattern(node)); return retVal; }
/** * Called by the {@link AQuotePattern} node from {@link AQuotePattern#apply(IAnalysis)}. * @param node the calling {@link AQuotePattern} node */ public A caseAQuotePattern(AQuotePattern node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAQuotePattern(node, question)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this, question)); } mergeReturns(retVal,outAQuotePattern(node, question)); return retVal; }