This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query language support for child iteration & area
- Loading branch information
Showing
7 changed files
with
179 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package criteria | ||
|
||
// ChildExpression represents the negation operator | ||
type ChildExpression struct { | ||
binaryExpression | ||
} | ||
|
||
// Ensure ChildExpression implements the Expression interface | ||
var _ Expression = &ChildExpression{} | ||
var _ Expression = (*ChildExpression)(nil) | ||
|
||
// Accept implements ExpressionVisitor | ||
func (t *ChildExpression) Accept(visitor ExpressionVisitor) interface{} { | ||
return visitor.Child(t) | ||
} | ||
|
||
// Child constructs a ChildExpression | ||
func Child(left Expression, right Expression) Expression { | ||
return reparent(&ChildExpression{binaryExpression{expression{}, left, right}}) | ||
} |
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