-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nikunjy/operation_panic_remove
Removing panics from operations
- Loading branch information
Showing
8 changed files
with
164 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package parser | ||
|
||
import "errors" | ||
|
||
type Operand interface{} | ||
|
||
var ( | ||
ErrInvalidOperation = errors.New("Invalid operation on the type") | ||
) | ||
|
||
type Operation interface { | ||
EQ(left Operand, right Operand) bool | ||
NE(left Operand, right Operand) bool | ||
GT(left Operand, right Operand) bool | ||
LT(left Operand, right Operand) bool | ||
GE(left Operand, right Operand) bool | ||
LE(left Operand, right Operand) bool | ||
CO(left Operand, right Operand) bool | ||
SW(left Operand, right Operand) bool | ||
EW(left Operand, right Operand) bool | ||
IN(left Operand, right Operand) bool | ||
EQ(left Operand, right Operand) (bool, error) | ||
NE(left Operand, right Operand) (bool, error) | ||
GT(left Operand, right Operand) (bool, error) | ||
LT(left Operand, right Operand) (bool, error) | ||
GE(left Operand, right Operand) (bool, error) | ||
LE(left Operand, right Operand) (bool, error) | ||
CO(left Operand, right Operand) (bool, error) | ||
SW(left Operand, right Operand) (bool, error) | ||
EW(left Operand, right Operand) (bool, error) | ||
IN(left Operand, right Operand) (bool, error) | ||
} |
Oops, something went wrong.