Skip to content

Commit

Permalink
implement bitfield/script (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokostik authored Apr 21, 2024
1 parent ffd3642 commit a57e412
Show file tree
Hide file tree
Showing 4 changed files with 674 additions and 15 deletions.
6 changes: 6 additions & 0 deletions evaldo/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ func MakeArgError(env1 *env.ProgramState, N int, typ []env.Type, fn string) *env
return env.NewError("Function " + fn + " requires argument " + strconv.Itoa(N) + " to be of : " + types + ".")
}

func MakeNativeArgError(env1 *env.ProgramState, N int, knd []string, fn string) *env.Error {
env1.FailureFlag = true
kinds := strings.Join(knd, ", ")
return env.NewError("Function " + fn + " requires native argument " + strconv.Itoa(N) + " to be of kind : " + kinds + ".")
}

func MakeRyeError(env1 *env.ProgramState, val env.Object, er *env.Error) *env.Error {
switch val := val.(type) {
case env.String: // todo .. make Error type .. make error construction micro dialect, return the error wrapping error that caused it
Expand Down
Loading

0 comments on commit a57e412

Please sign in to comment.