/** * Returns a deep clone of this {@link APostOpExp} node. * @return a deep clone of this {@link APostOpExp} node */ public APostOpExp clone() { return new APostOpExp( _type, _location, cloneNode(_opname), _preexpression, _postexpression, _errors, _state, _errorLocation ); }
/** * Creates a deep clone of this {@link APostOpExp} 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 APostOpExp} node */ public APostOpExp clone(Map<INode,INode> oldToNewMap) { APostOpExp node = new APostOpExp( _type, _location, cloneNode(_opname, oldToNewMap), _preexpression, _postexpression, _errors, _state, _errorLocation ); oldToNewMap.put(this, node); return node; }
public static APostOpExp newAPostOpExp(ILexNameToken opname, PExp preexpression, PExp postexpression, List<AErrorCase> errors, AStateDefinition state) { APostOpExp result = new APostOpExp(); initExpression(result, postexpression.getLocation()); result.setOpname(opname); result.setPreexpression(preexpression); result.setPostexpression(postexpression); result.setErrors(errors); result.setState(state); return result; }