view core/src/luan/LuanFunction.java @ 422:af82b266fe89

add Io.repr()
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 May 2015 16:13:52 -0600
parents 8fbb961aabd5
children 1eafb11a150d
line wrap: on
line source

package luan;


public abstract class LuanFunction implements LuanRepr {

	public abstract Object call(LuanState luan,Object[] args) throws LuanException;

	public static final Object[] NOTHING = new Object[0];

	@Override public String toString() {
		return "function: " + Integer.toHexString(hashCode());
	}

	@Override public String repr(LuanState luan) {
		return "<" + toString() + ">";
	}

}