rum-goggles/vendor/github.com/robertkrimen/otto/result.go
2024-02-23 11:39:16 -05:00

29 lines
463 B
Go

package otto
type resultKind int
const (
_ resultKind = iota
resultReturn
resultBreak
resultContinue
)
type result struct {
kind resultKind
value Value
target string
}
func newReturnResult(value Value) result {
return result{resultReturn, value, ""}
}
func newContinueResult(target string) result {
return result{resultContinue, emptyValue, target}
}
func newBreakResult(target string) result {
return result{resultBreak, emptyValue, target}
}