import java.util.List;
import java.util.ArrayList;

public class FunctionCallOperator extends Expression {
	private Expression function;
	private List<Expression> arguments;
	private DataType dataType;

	public FunctionCallOperator(Expression function, Expression arguments) {
		if (!(function.getDataType() instanceof FunctionType)) {
			throw new SyntaxException("tried to call something not a function");
		}
		this.function = function;
		this.dataType = ((FunctionType)function.getDataType()).getReturnType();
		this.arguments = new ArrayList<Expression>();
		if (arguments != null) {
			// 引数のリストを取得する
			while (arguments instanceof BinaryOperator &&
			((BinaryOperator)arguments).getKind() == BinaryOperator.Kind.OP_FUNCTION_ARGS_SEPARATOR) {
				this.arguments.add(((BinaryOperator)arguments).getLeft());
				arguments = ((BinaryOperator)arguments).getRight();
			}
			this.arguments.add(arguments);
		}
	}

	public Expression getFunction() {
		return function;
	}

	public int getArgumentsNum() {
		return arguments.size();
	}

	public Expression getArgument(int index) {
		return arguments.get(index);
	}

	public DataType getDataType() {
		return dataType;
	}

	public Expression evaluate() {
		return this;
	}
}

@@ -867,16 +867,220 @@
 );%0A%09%09%09%7D%0A
+%09%09%09// %E5%8D%98%E4%BD%93%E3%81%A0%E3%81%A8BinaryOperator%E3%81%A7%E3%81%AE%E5%A4%89%E6%8F%9B%E3%81%8C%E8%A1%8C%E3%82%8F%E3%82%8C%E3%81%AA%E3%81%84%E3%81%AE%E3%81%A7%E3%80%81%E9%85%8D%E5%88%97%E3%82%92%E5%85%88%E9%A0%AD%E8%A6%81%E7%B4%A0%E3%81%B8%E3%81%AE%E3%83%9D%E3%82%A4%E3%83%B3%E3%82%BF%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%99%E3%82%8B%0A%09%09%09if (arguments.getDataType() instanceof ArrayType) %7B%0A%09%09%09%09arguments = new UnaryOperator(UnaryOperator.Kind.UNARY_AUTO_TO_POINTER, arguments);%0A%09%09%09%7D%0A
 %09%09%09this.

convert arrays in function arguments into pointers