Added string constructor for entity.Operator
This commit is contained in:
parent
0bed97da02
commit
d7d2d90b20
|
@ -1,7 +1,6 @@
|
|||
package entity
|
||||
|
||||
import "fmt"
|
||||
import "strings"
|
||||
import "git.tebibyte.media/sashakoshka/fspl/errors"
|
||||
|
||||
// Signature is a function or method signature that is used in functions,
|
||||
|
@ -131,9 +130,8 @@ func init () {
|
|||
}
|
||||
}
|
||||
|
||||
func (this *Operator) Capture (str []string) error {
|
||||
*this = stringToOperator[strings.Join(str, "")]
|
||||
return nil
|
||||
func OperatorFromString (str string) Operator {
|
||||
return stringToOperator[str]
|
||||
}
|
||||
|
||||
func (this Operator) String () string {
|
||||
|
|
Loading…
Reference in New Issue