java.lang.Object
org.kink_lang.kink.internal.intrinsicsupport.NewValSupport

public class NewValSupport extends Object
Funs for new_val error.
  • Method Details

    • traitError

      public static FunVal traitError(Vm vm, TraitError error, int arityDelta)
      Returns a nullary fun to raise an exception of an error of new_val.
      Parameters:
      vm - the vm.
      error - the error of invocation of new_val.
      arityDelta - number to add to the arity stored in error.
      Returns:
      a nullary fun to raise an exception.
    • symNotStr

      public static FunVal symNotStr(Vm vm, int index, Val val)
      Returns a nullary fun to raise sym-not-str error.
      Parameters:
      vm - the vm.
      index - the index of the error.
      val - the val at the index.
      Returns:
      a nullary fun to raise an exception.
    • oddNumbefOfArgs

      public static FunVal oddNumbefOfArgs(Vm vm, int argCount)
      Returns a nullary fun to raise odd-number-of-args error.
      Parameters:
      vm - the vm.
      argCount - the count of args.
      Returns:
      a nullary fun to raise an exception.