xgo/objects/break.go

30 lines
457 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package objects
2019-01-11 13:27:28 +03:00
import "github.com/d5/tengo/compiler/token"
2019-01-09 10:17:42 +03:00
type Break struct{}
func (o *Break) TypeName() string {
return "break"
}
func (o *Break) String() string {
return "<break>"
}
func (o *Break) BinaryOp(op token.Token, rhs Object) (Object, error) {
return nil, ErrInvalidOperator
}
func (o *Break) Copy() Object {
return &Break{}
}
func (o *Break) IsFalsy() bool {
return false
}
func (o *Break) Equals(x Object) bool {
return false
}