package x2x.translator.xcodeml.xelement;

import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

/**
 * The XfctCall represents the functionCall (7.5.1) element in XcodeML
 * intermediate representation.
 *
 * Elements:
 * - Required:
 *   - name (Xname)
 * - Optional:
 *   - arguments (XexprModel) // TODO
 * Attribute:
 * - Optional: type (text), is_intrinsic (bool) // TODO
 */

public class XfctCall extends Xfct {

  private XargumentsTable _arguments = null;

  public XfctCall(Element fctCallElement){
    super(fctCallElement);
    Element arguments = XelementHelper.findFirstElement(baseElement,
      XelementName.ARGUMENTS);
    _arguments = new XargumentsTable(arguments);
  }

  public XargumentsTable getArgumentsTable(){
    return _arguments;
  }
}

@@ -365,24 +365,16 @@
 c (bool)
- // TODO
 %0A */%0A%0Apu
@@ -455,16 +455,89 @@
  null;%0A%0A
+  private boolean _isInstrinsic = false;%0A  private String _type = null;%0A%0A
   public
@@ -554,23 +554,20 @@
 Element 
-fctCall
+base
 Element)
@@ -582,25 +582,225 @@
 per(
-fctCallElement
+baseElement);%0A%0A    _isInstrinsic = XelementHelper.getBooleanAttributeValue(baseElement,%0A      XelementName.ATTR_IS_INTRINSIC);%0A    _type = XelementHelper.getAttributeValue(baseElement,%0A      XelementName.ATTR_TYPE
 );%0A
+%0A
     
@@ -944,16 +944,131 @@
 ments);%0A
+%0A%0A  %7D%0A%0A  public boolean isIntrinsic()%7B%0A    return _isInstrinsic;%0A  %7D%0A%0A  public String getType()%7B%0A    return _type;%0A
   %7D%0A%0A  p

Implement optional attributes