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

import org.zwobble.couscous.interpreter.types.InterpreterType;
import org.zwobble.couscous.interpreter.types.IntrinsicInterpreterType;
import org.zwobble.couscous.types.Types;

import static org.zwobble.couscous.util.ExtraLists.list;

public class InternalCouscousInterpreterValue {
    public static final InterpreterType TYPE = IntrinsicInterpreterType.classBuilder("_couscous")
        .staticMethod("same", list(Types.OBJECT, Types.OBJECT), Types.BOOLEAN,
            (environment, arguments) ->
                BooleanInterpreterValue.of(arguments.get(0) == arguments.get(1)))

        .build();
}