aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/couscous/interpreter/values/InternalCouscousInterpreterValue.java
blob: 023dec78d79828c91f7b15fa91b6e1258e448a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.zwobble.couscous.interpreter.values;

import org.zwobble.couscous.values.BooleanValue;
import org.zwobble.couscous.values.IntegerValue;
import org.zwobble.couscous.values.ObjectValues;

import static java.util.Arrays.asList;
import static org.zwobble.couscous.util.ExtraLists.list;

public class InternalCouscousInterpreterValue {
    public static final ConcreteType TYPE = ConcreteType.classBuilder("_couscous")
        .staticMethod("same", list(ObjectValues.OBJECT, ObjectValues.OBJECT),
            (environment, arguments) ->
                new BooleanInterpreterValue(arguments.get(0) == arguments.get(1)))

        .build();
}