1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-08-15 20:02:56 +02:00
* Renamed DOCUMENT to PAGE

* Added PageLoadParams

* Added PageLoadParams

* Renamed LoadPageParams -> PageLoadParams

* Added support for context.Done() (#201)

* Bug/#189 operators precedence (#202)

* Fixed math operators precedence

* Fixed logical operators precedence

* Fixed array operator

* Added support for parentheses to enforce a different operator evaluation order

* Feature/#200 drivers (#209)

* Added new interfaces

* Renamed dynamic to cdp driver

* Renamed drivers

* Added ELEMENT_EXISTS function (#210)

* Renamed back PAGE to DOCUMENT (#211)

* Added Getter and Setter interfaces
This commit is contained in:
Tim Voronov
2018-12-21 23:14:41 -05:00
committed by GitHub
parent 6bc4b3e0e3
commit 5620be211c
92 changed files with 2953 additions and 1656 deletions

View File

@@ -8,8 +8,10 @@ import (
type (
MathOperatorType string
MathOperator struct {
MathOperator struct {
*baseOperator
opType MathOperatorType
fn OperatorFunc
leftOnly bool
}
@@ -55,11 +57,16 @@ func NewMathOperator(
return &MathOperator{
&baseOperator{src, left, right},
operator,
fn,
leftOnly,
}, nil
}
func (operator *MathOperator) Type() MathOperatorType {
return operator.opType
}
func (operator *MathOperator) Exec(ctx context.Context, scope *core.Scope) (core.Value, error) {
left, err := operator.left.Exec(ctx, scope)