/** * Returns a deep clone of this {@link ACharPatternIR} node. * @return a deep clone of this {@link ACharPatternIR} node */ public ACharPatternIR clone() { return new ACharPatternIR( _sourceNode, _tag, _metaData, _value ); }
/** * Creates a new complete constructor {@code ACharPatternIR} 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 Character} node for the {@code value} child of this {@link ACharPatternIR} node */ public ACharPatternIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Character value_) { super(sourceNode_,tag_,metaData_); this.setValue(value_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ACharPatternIR) { return toString().equals(o.toString()); } return false; }
@Override public SPatternIR caseACharacterPattern(ACharacterPattern node, IRInfo question) throws AnalysisException { char value = node.getValue().getValue(); ACharPatternIR charPatternCg = new ACharPatternIR(); charPatternCg.setValue(value); return charPatternCg; }
Character value = charPattern.getValue(); ACharLiteralExpIR charLiteral = transAssistant.getInfo().getExpAssistant().consCharLiteral(value);
/** * Creates a new tree field only constructor {@code ACharPatternIR TAG=char} 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 Character} node for the {@code value} child of this {@link ACharPatternIR} node */ public ACharPatternIR(Character value_) { super(null,null,null); this.setValue(value_); }
/** * Creates a deep clone of this {@link ACharPatternIR} 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 ACharPatternIR} node */ public ACharPatternIR clone(Map<INode,INode> oldToNewMap) { ACharPatternIR node = new ACharPatternIR( _sourceNode, _tag, _metaData, _value ); oldToNewMap.put(this, node); return node; }