Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package yql_test
import (
"fmt"

"github.com/caibirdme/yql"
"github.com/zcs-seu/yql"
)

func ExampleMatch() {
Expand Down
2 changes: 1 addition & 1 deletion lambda/instruct.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

grammar "github.com/caibirdme/yql/internal/lambda"
grammar "github.com/zcs-seu/yql/internal/lambda"
)

type action uint8
Expand Down
2 changes: 1 addition & 1 deletion lambda/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"

"github.com/antlr/antlr4/runtime/Go/antlr"
grammar "github.com/caibirdme/yql/internal/lambda"
grammar "github.com/zcs-seu/yql/internal/lambda"
)

type bailLexer struct {
Expand Down
15 changes: 13 additions & 2 deletions yql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package yql
import (
"fmt"
"strconv"
"encoding/json"

"github.com/antlr/antlr4/runtime/Go/antlr"
"github.com/caibirdme/yql/internal/grammar"
"github.com/caibirdme/yql/internal/stack"
"github.com/zcs-seu/yql/internal/grammar"
"github.com/zcs-seu/yql/internal/stack"
)

type boolStack interface {
Expand Down Expand Up @@ -194,6 +195,16 @@ func compare(actualValue interface{}, expectValue []string, op string) bool {
return false
}
return cmpInt(actual, expect, op)
case json.Number:
actualValue, err := strconv.ParseInt(actualValue.(json.Number).String(), 10, 64)
if nil != err {
return false
}
expect, err := strconv.ParseInt(e, 10, 64)
if nil != err {
return false
}
return cmpInt(actualValue, expect, op)
case float64:
expect, err := strconv.ParseFloat(e, 64)
if nil != err {
Expand Down