transcendental-lisp/src/function/builtin/special/QUOTE.java

22 lines
480 B
Java

package function.builtin.special;
import function.*;
import sexpression.*;
public class QUOTE extends LispSpecialFunction {
private ArgumentValidator argumentValidator;
public QUOTE() {
this.argumentValidator = new ArgumentValidator("QUOTE");
this.argumentValidator.setExactNumberOfArguments(1);
}
public SExpression call(Cons argumentList) {
argumentValidator.validate(argumentList);
return argumentList.getFirst();
}
}