/** * Creates a new tree field only constructor {@code AIdentifierObjectDesignatorIR TAG=identifier} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR(SExpIR exp_) { super(null,null,null); this.setExp(exp_); }
/** * Creates a new complete constructor {@code AIdentifierObjectDesignatorIR} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AIdentifierObjectDesignatorIR} node */ public AIdentifierObjectDesignatorIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR exp_) { super(sourceNode_,tag_,metaData_); this.setExp(exp_); }
@Override public SObjectDesignatorIR caseAIdentifierObjectDesignator( AIdentifierObjectDesignator node, IRInfo question) throws AnalysisException { AVariableExp exp = node.getExpression(); SExpIR expCg = exp.apply(question.getExpVisitor(), question); AIdentifierObjectDesignatorIR idObjDesignator = new AIdentifierObjectDesignatorIR(); if (!(expCg instanceof SVarExpIR)) { question.addUnsupportedNode(node, "Expected variable expression for identifier object designator. Got: " + expCg); return null; } idObjDesignator.setExp((SVarExpIR) expCg); return idObjDesignator; }