@Override public void caseAQuotePatternIR(AQuotePatternIR node, STypeIR question) throws AnalysisException { AQuoteTypeIR quoteTypeCg = new AQuoteTypeIR(); quoteTypeCg.setValue(node.getValue()); storeType(node, quoteTypeCg); }
/** * Returns a deep clone of this {@link AQuoteTypeIR} node. * @return a deep clone of this {@link AQuoteTypeIR} node */ public AQuoteTypeIR clone() { return new AQuoteTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType), _value ); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AQuoteTypeIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link AQuoteTypeIR} node from {@link AQuoteTypeIR#apply(IAnalysis)}. * @param node the calling {@link AQuoteTypeIR} node */ public void caseAQuoteTypeIR(AQuoteTypeIR node) throws AnalysisException { _visitedNodes.add(node); inAQuoteTypeIR(node); if(node.getNamedInvType() != null && !_visitedNodes.contains(node.getNamedInvType())) { node.getNamedInvType().apply(this); } outAQuoteTypeIR(node); }
if (type instanceof AQuoteTypeIR) String qouteValue = ((AQuoteTypeIR) type).getValue(); String quoteType = JavaQuoteValueCreator.fullyQualifiedQuoteName(javaRootPackage, qouteValue); call = consSubjectCheckForType(methodName, arg, quoteType);
/** * Creates a new tree field only constructor {@code AQuoteTypeIR TAG=quote} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param value_ the {@link String} node for the {@code value} child of this {@link AQuoteTypeIR} node */ public AQuoteTypeIR(Boolean optional_, ANamedTypeDeclIR namedInvType_, String value_) { super(null,null,null,optional_,namedInvType_); this.setValue(value_); }
/** * Called by the {@link AQuoteTypeIR} node from {@link AQuoteTypeIR#apply(IIsaAnalysis)}. * @param node the calling {@link AQuoteTypeIR} node */ public void caseAQuoteTypeIR(AQuoteTypeIR node) throws AnalysisException { _visitedNodes.add(node); inAQuoteTypeIR(node); if(node.getNamedInvType() != null && !_visitedNodes.contains(node.getNamedInvType())) { node.getNamedInvType().apply(this); } outAQuoteTypeIR(node); }
public static SExpIR consIsExpQuoteType(SExpIR exp, AQuoteTypeIR quoteType) { AQuoteLiteralExpIR lit = new AQuoteLiteralExpIR(); lit.setType(quoteType); lit.setValue(quoteType.getValue()); AEqualsBinaryExpIR equals = new AEqualsBinaryExpIR(); equals.setType(new ABoolBasicTypeIR()); equals.setLeft(exp); equals.setRight(lit); return equals; }
/** * Creates a new complete constructor {@code AQuoteTypeIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param value_ the {@link String} node for the {@code value} child of this {@link AQuoteTypeIR} node */ public AQuoteTypeIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Boolean optional_, ANamedTypeDeclIR namedInvType_, String value_) { super(sourceNode_,tag_,metaData_,optional_,namedInvType_); this.setValue(value_); }
@Override public STypeIR caseAQuoteType(AQuoteType node, IRInfo question) throws AnalysisException { String value = node.getValue().getValue(); AQuoteTypeIR quoteTypeCg = new AQuoteTypeIR(); quoteTypeCg.setValue(value); question.registerQuoteValue(value); return quoteTypeCg; }
/** * Called by the {@link AQuoteTypeIR} node from {@link AQuoteTypeIR#apply(IAnalysis)}. * @param node the calling {@link AQuoteTypeIR} node */ public void caseAQuoteTypeIR(AQuoteTypeIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAQuoteTypeIR(node, question); if(node.getNamedInvType() != null && !_visitedNodes.contains(node.getNamedInvType())) { node.getNamedInvType().apply(this, question); } outAQuoteTypeIR(node, question); }
/** * Creates a deep clone of this {@link AQuoteTypeIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AQuoteTypeIR} node */ public AQuoteTypeIR clone(Map<INode,INode> oldToNewMap) { AQuoteTypeIR node = new AQuoteTypeIR( _sourceNode, _tag, _metaData, _optional, cloneNode(_namedInvType, oldToNewMap), _value ); oldToNewMap.put(this, node); return node; }
public AQuoteLiteralExpIR consQuoteLiteral(String value) { AQuoteLiteralExpIR quoteLiteral = new AQuoteLiteralExpIR(); AQuoteTypeIR type = new AQuoteTypeIR(); type.setValue(value); quoteLiteral.setType(type); quoteLiteral.setValue(value); return quoteLiteral; }
/** * Called by the {@link AQuoteTypeIR} node from {@link AQuoteTypeIR#apply(IAnalysis)}. * @param node the calling {@link AQuoteTypeIR} node */ public A caseAQuoteTypeIR(AQuoteTypeIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAQuoteTypeIR(node, question)); if(node.getNamedInvType() != null && !_visitedNodes.contains(node.getNamedInvType())) { mergeReturns(retVal,node.getNamedInvType().apply(this, question)); } mergeReturns(retVal,outAQuoteTypeIR(node, question)); return retVal; }
} else if (pat instanceof AQuotePatternIR) AQuoteTypeIR qt = new AQuoteTypeIR(); qt.setValue(((AQuotePatternIR) pat).getValue()); return qt; } else if (pat instanceof ARealPatternIR)
/** * Called by the {@link AQuoteTypeIR} node from {@link AQuoteTypeIR#apply(IAnalysis)}. * @param node the calling {@link AQuoteTypeIR} node */ public A caseAQuoteTypeIR(AQuoteTypeIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAQuoteTypeIR(node)); if(node.getNamedInvType() != null && !_visitedNodes.contains(node.getNamedInvType())) { mergeReturns(retVal,node.getNamedInvType().apply(this)); } mergeReturns(retVal,outAQuoteTypeIR(node)); return retVal; }