mirror of https://github.com/ethereum/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
495 B
31 lines
495 B
10 years ago
|
package otto
|
||
|
|
||
|
import ()
|
||
|
|
||
|
type _resultKind int
|
||
|
|
||
|
const (
|
||
|
resultNormal _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 {
|
||
10 years ago
|
return _result{resultContinue, emptyValue, target}
|
||
10 years ago
|
}
|
||
|
|
||
|
func newBreakResult(target string) _result {
|
||
10 years ago
|
return _result{resultBreak, emptyValue, target}
|
||
10 years ago
|
}
|