forked from chuckpreslar/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunlike.go
More file actions
30 lines (25 loc) · 807 Bytes
/
Copy pathunlike.go
File metadata and controls
30 lines (25 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package codex
// UnlikeNode is a BinaryNode struct
type UnlikeNode BinaryNode
// Returns a Grouping node with an expression containing a
// reference to an Or node of the Unlike and other.
func (self *UnlikeNode) Or(other interface{}) *GroupingNode {
return Grouping(Or(self, other))
}
// Returns a Grouping node with an expression containing a
// reference to an And node of the Unlike and other.
func (self *UnlikeNode) And(other interface{}) *GroupingNode {
return Grouping(And(self, other))
}
// Returns an Not node with and expression containing the
// Unlike node.
func (self *UnlikeNode) Not() *NotNode {
return Not(self)
}
// UnlikeNode factory method.
func Unlike(left, right interface{}) (unlike *UnlikeNode) {
unlike = new(UnlikeNode)
unlike.Left = left
unlike.Right = right
return
}