mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-04 10:35:08 +02:00
Merge branch 'master' into feature/#617-dispatch-event
This commit is contained in:
commit
e75379ee2b
86
.github/workflows/build.yml
vendored
86
.github/workflows/build.yml
vendored
@ -3,45 +3,21 @@ name: build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
analyze:
|
||||
name: Static Analysis
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goVer: [1.17, 1.18]
|
||||
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.goVer }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.goVer }}
|
||||
id: go
|
||||
|
||||
- name: Set up ANTLR
|
||||
env:
|
||||
ANTLR_VERSION: 4.9
|
||||
run: |
|
||||
sudo curl -o /usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar
|
||||
export CLASSPATH=".:/usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar:$CLASSPATH"
|
||||
mkdir $HOME/antlr-bin
|
||||
echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.9-complete.jar "$@"' > $HOME/antlr-bin/antlr
|
||||
echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/antlr-bin/grun
|
||||
chmod +x $HOME/antlr-bin/*
|
||||
export PATH=$PATH:$HOME/antlr-bin
|
||||
antlr
|
||||
|
||||
- name: Set up Lab
|
||||
run: |
|
||||
curl https://raw.githubusercontent.com/MontFerret/lab/master/install.sh -o install.sh
|
||||
sudo sh install.sh
|
||||
|
||||
- name: Set up linters
|
||||
run: go install github.com/mgechev/revive@latest
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get dependencies
|
||||
run: make install
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19'
|
||||
|
||||
- name: Set up linters
|
||||
run: make install-tools
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
@ -51,6 +27,44 @@ jobs:
|
||||
git diff
|
||||
if [[ $(git diff) != '' ]]; then echo 'Invalid formatting!' >&2; exit 1; fi
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goVer: [1.18, 1.19]
|
||||
steps:
|
||||
- name: Set up Go ${{ matrix.goVer }}
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.goVer }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up ANTLR
|
||||
env:
|
||||
ANTLR_VERSION: 4.11.1
|
||||
run: |
|
||||
sudo curl -o /usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar
|
||||
export CLASSPATH=".:/usr/local/lib/antlr-${ANTLR_VERSION}-complete.jar:$CLASSPATH"
|
||||
mkdir $HOME/antlr-bin
|
||||
echo -e '#!/bin/bash\njava -jar /usr/local/lib/antlr-4.11.1-complete.jar "$@"' > $HOME/antlr-bin/antlr
|
||||
echo -e '#!/bin/bash\njava org.antlr.v4.gui.TestRig "$@"' > $HOME/antlr-bin/grun
|
||||
chmod +x $HOME/antlr-bin/*
|
||||
export PATH=$PATH:$HOME/antlr-bin
|
||||
antlr
|
||||
|
||||
- name: Set up Lab
|
||||
run: |
|
||||
curl https://raw.githubusercontent.com/MontFerret/lab/master/install.sh -o install.sh
|
||||
chmod +x ./install.sh
|
||||
LOCATION=$PWD ./install.sh
|
||||
|
||||
- name: Get dependencies
|
||||
run: make install
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
export PATH=$PATH:$HOME/antlr-bin
|
||||
@ -65,5 +79,5 @@ jobs:
|
||||
- name: E2E tests
|
||||
run: |
|
||||
docker run -d -p 9222:9222 ghcr.io/montferret/chromium:92.0.4512.0
|
||||
make e2e
|
||||
LAB_BIN=$PWD/lab make e2e
|
||||
docker stop $(docker ps -q)
|
||||
|
52
.github/workflows/codeql-analysis.yml
vendored
52
.github/workflows/codeql-analysis.yml
vendored
@ -17,8 +17,6 @@ on:
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '44 5 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
@ -34,34 +32,34 @@ jobs:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
12
Makefile
12
Makefile
@ -1,6 +1,7 @@
|
||||
.PHONY: build install compile test e2e doc fmt lint vet release
|
||||
export CGO_ENABLED=0
|
||||
|
||||
LAB_BIN ?= lab
|
||||
DIR_BIN = ./bin
|
||||
DIR_PKG = ./pkg
|
||||
DIR_E2E = ./e2e
|
||||
@ -9,6 +10,11 @@ default: build
|
||||
|
||||
build: vet generate test compile
|
||||
|
||||
install-tools:
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest && \
|
||||
go install golang.org/x/tools/cmd/goimports@latest && \
|
||||
go install github.com/mgechev/revive@latest
|
||||
|
||||
install:
|
||||
go get
|
||||
|
||||
@ -24,7 +30,7 @@ cover:
|
||||
curl -s https://codecov.io/bash | bash
|
||||
|
||||
e2e:
|
||||
lab --timeout=120 --attempts=5 --concurrency=1 --wait=http://127.0.0.1:9222/json/version --runtime=bin://./bin/ferret --files=./e2e/tests --cdn=./e2e/pages/dynamic --cdn=./e2e/pages/static
|
||||
${LAB_BIN} --timeout=120 --attempts=5 --concurrency=1 --wait=http://127.0.0.1:9222/json/version --runtime=bin://./bin/ferret --files=./e2e/tests --cdn=./e2e/pages/dynamic --cdn=./e2e/pages/static
|
||||
|
||||
bench:
|
||||
go test -run=XXX -bench=. ${DIR_PKG}/...
|
||||
@ -37,11 +43,13 @@ doc:
|
||||
|
||||
# http://golang.org/cmd/go/#hdr-Run_gofmt_on_package_sources
|
||||
fmt:
|
||||
go fmt ${DIR_PKG}/...
|
||||
go fmt ${DIR_PKG}/... && \
|
||||
goimports -w -local github.com/MontFerret ./pkg ./e2e
|
||||
|
||||
# https://github.com/mgechev/revive
|
||||
# go get github.com/mgechev/revive
|
||||
lint:
|
||||
staticcheck ./pkg/compiler ./pkg/drivers ./pkg/runtime ./pkg/stdlib && \
|
||||
revive -config revive.toml -formatter stylish -exclude ./pkg/parser/fql/... -exclude ./vendor/... ./...
|
||||
|
||||
# http://godoc.org/code.google.com/p/go.tools/cmd/vet
|
||||
|
@ -7,6 +7,7 @@ import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/signal"
|
||||
@ -259,7 +260,7 @@ func main() {
|
||||
// check whether the app is getting a query via standard input
|
||||
std := bufio.NewReader(os.Stdin)
|
||||
|
||||
b, err := ioutil.ReadAll(std)
|
||||
b, err := io.ReadAll(std)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
39
go.mod
39
go.mod
@ -1,37 +1,42 @@
|
||||
module github.com/MontFerret/ferret
|
||||
|
||||
go 1.17
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/PuerkitoBio/goquery v1.8.0
|
||||
github.com/antchfx/htmlquery v1.2.5
|
||||
github.com/antchfx/xpath v1.2.1
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220722194653-14703f21b580
|
||||
github.com/corpix/uarand v0.1.1
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/antchfx/htmlquery v1.3.0
|
||||
github.com/antchfx/xpath v1.2.4
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1
|
||||
github.com/corpix/uarand v0.2.0
|
||||
github.com/gobwas/glob v0.2.3
|
||||
github.com/gorilla/css v1.0.0
|
||||
github.com/jarcoal/httpmock v1.2.0
|
||||
github.com/mafredri/cdp v0.32.0
|
||||
github.com/jarcoal/httpmock v1.3.0
|
||||
github.com/mafredri/cdp v0.34.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rs/zerolog v1.26.1
|
||||
github.com/sethgrid/pester v1.1.0
|
||||
github.com/rs/zerolog v1.29.0
|
||||
github.com/sethgrid/pester v1.2.0
|
||||
github.com/smartystreets/goconvey v1.7.2
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/wI2L/jettison v0.7.4
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
|
||||
golang.org/x/text v0.3.7
|
||||
golang.org/x/net v0.8.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/text v0.8.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/andybalholm/cascadia v1.3.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/jtolds/gls v4.20.0+incompatible // indirect
|
||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/smartystreets/assertions v1.2.0 // indirect
|
||||
github.com/stretchr/objx v0.1.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
152
go.sum
152
go.sum
@ -1,126 +1,165 @@
|
||||
github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=
|
||||
github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
|
||||
github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
|
||||
github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
|
||||
github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
|
||||
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
|
||||
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
|
||||
github.com/antchfx/htmlquery v1.2.5 h1:1lXnx46/1wtv1E/kzmH8vrfMuUKYgkdDBA9pIdMJnk4=
|
||||
github.com/antchfx/htmlquery v1.2.5/go.mod h1:2MCVBzYVafPBmKbrmwB9F5xdd+IEgRY61ci2oOsOQVw=
|
||||
github.com/antchfx/xpath v1.2.1 h1:qhp4EW6aCOVr5XIkT+l6LJ9ck/JsUH/yyauNgTQkBF8=
|
||||
github.com/antchfx/xpath v1.2.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220722194653-14703f21b580 h1:rfAZfq1LjIhVCFsBp2MoXxVvgtCyZUOtzsV8azhR1Jk=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220722194653-14703f21b580/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
|
||||
github.com/antchfx/htmlquery v1.3.0 h1:5I5yNFOVI+egyia5F2s/5Do2nFWxJz41Tr3DyfKD25E=
|
||||
github.com/antchfx/htmlquery v1.3.0/go.mod h1:zKPDVTMhfOmcwxheXUsx4rKJy8KEY/PU6eXr/2SebQ8=
|
||||
github.com/antchfx/xpath v1.2.3/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
||||
github.com/antchfx/xpath v1.2.4 h1:dW1HB/JxKvGtJ9WyVGJ0sIoEcqftV3SqIstujI+B9XY=
|
||||
github.com/antchfx/xpath v1.2.4/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1 h1:X8MJ0fnN5FPdcGF5Ij2/OW+HgiJrRg3AfHAx1PJtIzM=
|
||||
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/corpix/uarand v0.1.1 h1:RMr1TWc9F4n5jiPDzFHtmaUXLKLNUFK0SgCLo4BhX/U=
|
||||
github.com/corpix/uarand v0.1.1/go.mod h1:SFKZvkcRoLqVRFZ4u25xPmp6m9ktANfbpXZ7SJ0/FNU=
|
||||
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/corpix/uarand v0.2.0 h1:U98xXwud/AVuCpkpgfPF7J5TQgr7R5tqT8VZP5KWbzE=
|
||||
github.com/corpix/uarand v0.2.0/go.mod h1:/3Z1QIqWkDIhf6XWn/08/uMHoQ8JUoTIKc2iPchBOmM=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
|
||||
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
|
||||
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc=
|
||||
github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk=
|
||||
github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
|
||||
github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/mafredri/cdp v0.32.0 h1:JzW2F+zVK2y9ZhbNWyjrwafZLL9oNnl9Tf6JQ149Og8=
|
||||
github.com/mafredri/cdp v0.32.0/go.mod h1:YTCwLXkZSa18SGSIxCPMOGZcUJODZSNlAhiMqbyxWJg=
|
||||
github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=
|
||||
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/mafredri/cdp v0.34.1 h1:EeLNc+6pkDx2hrAm1arIjiofoH0fM5On1uAFzcuUn+o=
|
||||
github.com/mafredri/cdp v0.34.1/go.mod h1:Dbsh7eY/zhQlsddEDWzZGOztv9Jf2gzKq47M7a2P3C4=
|
||||
github.com/mafredri/go-lint v0.0.0-20180911205320-920981dfc79e/go.mod h1:k/zdyxI3q6dup24o8xpYjJKTCf2F7rfxLp6w/efTiWs=
|
||||
github.com/maxatome/go-testdeep v1.11.0 h1:Tgh5efyCYyJFGUYiT0qxBSIDeXw0F5zSoatlou685kk=
|
||||
github.com/maxatome/go-testdeep v1.11.0/go.mod h1:011SgQ6efzZYAen6fDn4BqQ+lUR72ysdyKe7Dyogw70=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/ngdinhtoan/glide-cleanup v0.2.0/go.mod h1:UQzsmiDOb8YV3nOsCxK/c9zPpCZVNoHScRE3EO9pVMM=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc=
|
||||
github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc=
|
||||
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w=
|
||||
github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0=
|
||||
github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc=
|
||||
github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg=
|
||||
github.com/segmentio/encoding v0.3.4 h1:WM4IBnxH8B9TakiM2QD5LyNl9JSndh88QbHqVC+Pauc=
|
||||
github.com/segmentio/encoding v0.3.4/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM=
|
||||
github.com/sethgrid/pester v1.1.0 h1:IyEAVvwSUPjs2ACFZkBe5N59BBUpSIkQ71Hr6cM5A+w=
|
||||
github.com/sethgrid/pester v1.1.0/go.mod h1:Ad7IjTpvzZO8Fl0vh9AzQ+j/jYZfyp2diGwI8m5q+ns=
|
||||
github.com/sethgrid/pester v1.2.0 h1:adC9RS29rRUef3rIKWPOuP1Jm3/MmB6ke+OhE5giENI=
|
||||
github.com/sethgrid/pester v1.2.0/go.mod h1:hEUINb4RqvDxtoCaU0BNT/HV4ig5kfgOasrf1xcvr0A=
|
||||
github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=
|
||||
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
||||
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
|
||||
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
|
||||
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/wI2L/jettison v0.7.4 h1:ptjriu75R/k5RAZO0DJzy2t55f7g+dPiBxBY38icaKg=
|
||||
github.com/wI2L/jettison v0.7.4/go.mod h1:O+F+T7X7ZN6kTsd167Qk4aZMC8jNrH48SMedNmkfPb0=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
|
||||
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 h1:saXMvIOKvRFwbOMicHXr0B1uwoxq9dGmLe5ExMES6c4=
|
||||
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
@ -129,5 +168,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
||||
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestArrayOperator(t *testing.T) {
|
||||
|
@ -6,6 +6,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/stdlib/arrays"
|
||||
|
||||
@ -57,7 +60,8 @@ func TestCases(t *testing.T) {
|
||||
"Mixed": func(s string) string {
|
||||
// Capitalize string.
|
||||
// Source: https://stackoverflow.com/questions/33696034/make-first-letter-of-words-uppercase-in-a-string
|
||||
return strings.Title(strings.ToLower(s))
|
||||
// return strings.Title(strings.ToLower(s))
|
||||
return cases.Title(language.English).String(strings.ToLower(s))
|
||||
},
|
||||
"Upper": strings.ToUpper,
|
||||
"Lower": strings.ToLower,
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAggregate(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCollectCount(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCollectInto(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCollect(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCollectWithCount(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEqualityOperators(t *testing.T) {
|
||||
|
@ -2,8 +2,9 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestWaitforEventWithinTernaryExpression(t *testing.T) {
|
||||
|
@ -2,16 +2,18 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values/types"
|
||||
"github.com/pkg/errors"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -2,11 +2,13 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestForFilter(t *testing.T) {
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestForTernaryExpression(t *testing.T) {
|
||||
|
@ -3,11 +3,13 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
)
|
||||
|
||||
func TestFor(t *testing.T) {
|
||||
|
@ -2,11 +2,13 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestForTernaryWhileExpression(t *testing.T) {
|
||||
|
@ -2,12 +2,14 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestForWhile(t *testing.T) {
|
||||
|
@ -3,13 +3,15 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/parser"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFunctionNSCall(t *testing.T) {
|
||||
@ -101,7 +103,7 @@ func TestFunctionNSCall(t *testing.T) {
|
||||
p := parser.New("RETURN TRUE")
|
||||
c := compiler.New()
|
||||
|
||||
r := regexp.MustCompile("\\w+")
|
||||
r := regexp.MustCompile(`\w+`)
|
||||
|
||||
for _, l := range p.GetLiteralNames() {
|
||||
if r.MatchString(l) {
|
||||
|
@ -2,12 +2,14 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/pkg/errors"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFunctionCall(t *testing.T) {
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestInOperator(t *testing.T) {
|
||||
|
@ -2,12 +2,14 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLet(t *testing.T) {
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestLikeOperator(t *testing.T) {
|
||||
|
@ -2,11 +2,13 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestForLimit(t *testing.T) {
|
||||
|
@ -3,11 +3,13 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLogicalOperators(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMathOperators(t *testing.T) {
|
||||
|
@ -3,15 +3,17 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/MontFerret/ferret/pkg/parser"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/parser"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestMember(t *testing.T) {
|
||||
@ -525,7 +527,7 @@ RETURN o1.first["second"][o2.prop].fourth["fifth"]["bottom"]
|
||||
Convey("Reserved words as property name", t, func() {
|
||||
p := parser.New("RETURN TRUE")
|
||||
|
||||
r := regexp.MustCompile("\\w+")
|
||||
r := regexp.MustCompile(`\w+`)
|
||||
|
||||
for idx, l := range p.GetLiteralNames() {
|
||||
if r.MatchString(l) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestParam(t *testing.T) {
|
||||
|
@ -2,9 +2,10 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"testing"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestRangeOperator(t *testing.T) {
|
||||
|
@ -3,12 +3,14 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"testing"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestRegexpOperator(t *testing.T) {
|
||||
|
@ -2,10 +2,12 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestReturn(t *testing.T) {
|
||||
|
@ -2,11 +2,13 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestForSort(t *testing.T) {
|
||||
|
@ -4,9 +4,11 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestString(t *testing.T) {
|
||||
|
@ -3,9 +3,11 @@ package compiler_test
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestTernaryOperator(t *testing.T) {
|
||||
|
@ -2,9 +2,11 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
)
|
||||
|
||||
func TestUnaryOperator(t *testing.T) {
|
||||
|
@ -4,11 +4,12 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/stdlib/strings"
|
||||
"github.com/MontFerret/ferret/pkg/stdlib/types"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestUseExpression(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package compiler
|
||||
|
||||
import (
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
var fnNameValidation = regexp.MustCompile("^[a-zA-Z]+[a-zA-Z0-9_]*(::[a-zA-Z]+[a-zA-Z0-9_]*)*$")
|
||||
@ -90,9 +91,7 @@ func (nc *NamespaceContainer) RegisteredFunctions() []string {
|
||||
|
||||
// root namespace, return all functions
|
||||
if nc.name == emptyNS {
|
||||
for _, k := range fnames {
|
||||
res = append(res, k)
|
||||
}
|
||||
res = append(res, fnames...)
|
||||
} else {
|
||||
nsPrefix := nc.name + separator
|
||||
for _, k := range fnames {
|
||||
|
@ -2,11 +2,13 @@ package compiler_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/compiler"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNamespaceBuilder(t *testing.T) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/parser/fql"
|
||||
@ -56,7 +56,8 @@ func (v *visitor) VisitProgram(ctx *fql.ProgramContext) interface{} {
|
||||
|
||||
gs := newGlobalScope()
|
||||
rs := newRootScope(gs)
|
||||
block, err := v.visitBody(ctx.Body().(fql.IBodyContext), rs)
|
||||
block, err := v.visitBody(ctx.Body(), rs)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -69,7 +70,7 @@ func (v *visitor) visitHeads(heads []fql.IHeadContext) error {
|
||||
namespaces := map[string]struct{}{}
|
||||
|
||||
for _, head := range heads {
|
||||
err := v.visitHead(head.(fql.IHeadContext), namespaces)
|
||||
err := v.visitHead(head, namespaces)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -142,7 +143,7 @@ func (v *visitor) visitBody(c fql.IBodyContext, scope *scope) (core.Expression,
|
||||
body := expressions.NewBodyExpression(len(statements) + 1)
|
||||
|
||||
for _, stmt := range statements {
|
||||
e, err := v.visitBodyStatement(stmt.(fql.IBodyStatementContext), scope)
|
||||
e, err := v.visitBodyStatement(stmt, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -153,7 +154,7 @@ func (v *visitor) visitBody(c fql.IBodyContext, scope *scope) (core.Expression,
|
||||
exp := ctx.BodyExpression()
|
||||
|
||||
if exp != nil {
|
||||
e, err := v.visitBodyExpression(exp.(fql.IBodyExpressionContext), scope)
|
||||
e, err := v.visitBodyExpression(exp, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -192,11 +193,11 @@ func (v *visitor) visitBodyExpression(c fql.IBodyExpressionContext, scope *scope
|
||||
ctx := c.(*fql.BodyExpressionContext)
|
||||
|
||||
if exp := ctx.ForExpression(); exp != nil {
|
||||
return v.visitForExpression(exp.(fql.IForExpressionContext), scope)
|
||||
return v.visitForExpression(exp, scope)
|
||||
}
|
||||
|
||||
if exp := ctx.ReturnExpression(); exp != nil {
|
||||
return v.visitReturnExpression(exp.(fql.IReturnExpressionContext), scope)
|
||||
return v.visitReturnExpression(exp, scope)
|
||||
}
|
||||
|
||||
return nil, v.unexpectedToken(ctx)
|
||||
@ -208,7 +209,7 @@ func (v *visitor) visitReturnExpression(c fql.IReturnExpressionContext, scope *s
|
||||
ctx := c.(*fql.ReturnExpressionContext)
|
||||
|
||||
if exp := ctx.Expression(); exp != nil {
|
||||
out, err = v.visitExpression(exp.(fql.IExpressionContext), scope)
|
||||
out, err = v.visitExpression(exp, scope)
|
||||
} else {
|
||||
return nil, v.unexpectedToken(ctx)
|
||||
}
|
||||
@ -258,7 +259,7 @@ func (v *visitor) visitForExpression(c fql.IForExpressionContext, scope *scope)
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
whileExpCtx := ctx.Expression().(fql.IExpressionContext)
|
||||
whileExpCtx := ctx.Expression()
|
||||
conditionExp, err := v.visitExpression(whileExpCtx, scope)
|
||||
|
||||
if err != nil {
|
||||
@ -305,7 +306,7 @@ func (v *visitor) visitForExpression(c fql.IForExpressionContext, scope *scope)
|
||||
|
||||
if clauseCtx != nil {
|
||||
setter, err := v.visitForExpressionClause(
|
||||
clauseCtx.(fql.IForExpressionClauseContext),
|
||||
clauseCtx,
|
||||
forInScope,
|
||||
valVarName,
|
||||
keyVarName,
|
||||
@ -318,7 +319,7 @@ func (v *visitor) visitForExpression(c fql.IForExpressionContext, scope *scope)
|
||||
parsedClauses = append(parsedClauses, setter)
|
||||
} else if statementCtx != nil {
|
||||
exp, err := v.visitForExpressionStatement(
|
||||
statementCtx.(fql.IForExpressionStatementContext),
|
||||
statementCtx,
|
||||
forInScope,
|
||||
)
|
||||
|
||||
@ -400,19 +401,19 @@ func (v *visitor) visitLimitClause(c fql.ILimitClauseContext, scope *scope) (cor
|
||||
clauseValues := ctx.AllLimitClauseValue()
|
||||
|
||||
if len(clauseValues) > 1 {
|
||||
offset, err = v.visitLimitClauseValue(clauseValues[0].(fql.ILimitClauseValueContext), scope)
|
||||
offset, err = v.visitLimitClauseValue(clauseValues[0], scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
count, err = v.visitLimitClauseValue(clauseValues[1].(fql.ILimitClauseValueContext), scope)
|
||||
count, err = v.visitLimitClauseValue(clauseValues[1], scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
} else {
|
||||
count, err = v.visitLimitClauseValue(clauseValues[0].(fql.ILimitClauseValueContext), scope)
|
||||
count, err = v.visitLimitClauseValue(clauseValues[0], scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@ -435,7 +436,7 @@ func (v *visitor) visitLimitClauseValue(c fql.ILimitClauseValueContext, scope *s
|
||||
|
||||
return literals.NewIntLiteral(i), nil
|
||||
} else if paramCtx := ctx.Param(); paramCtx != nil {
|
||||
return v.visitParam(paramCtx.(fql.IParamContext), scope)
|
||||
return v.visitParam(paramCtx, scope)
|
||||
} else if variableCtx := ctx.Variable(); variableCtx != nil {
|
||||
return v.visitVariable(variableCtx, scope)
|
||||
} else if funcCtx := ctx.FunctionCallExpression(); funcCtx != nil {
|
||||
@ -459,7 +460,7 @@ func (v *visitor) visitSortClause(c fql.ISortClauseContext, scope *scope) ([]*cl
|
||||
|
||||
for idx, sortExpCtx := range sortExpCtxs {
|
||||
sortExpCtx := sortExpCtx.(*fql.SortClauseExpressionContext)
|
||||
exp, err := v.visitExpression(sortExpCtx.Expression().(fql.IExpressionContext), scope)
|
||||
exp, err := v.visitExpression(sortExpCtx.Expression(), scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -505,7 +506,7 @@ func (v *visitor) visitCollectClause(c fql.ICollectClauseContext, scope *scope,
|
||||
selectors = make([]*clauses.CollectSelector, 0, len(collectSelectors))
|
||||
|
||||
for _, cs := range collectSelectors {
|
||||
selector, err := v.visitCollectSelector(cs.(fql.ICollectSelectorContext), scope)
|
||||
selector, err := v.visitCollectSelector(cs, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -524,7 +525,7 @@ func (v *visitor) visitCollectClause(c fql.ICollectClauseContext, scope *scope,
|
||||
|
||||
// if projection expression is defined like WITH group = { foo: i.bar }
|
||||
if projectionSelectorCtx != nil {
|
||||
selector, err := v.visitCollectSelector(projectionSelectorCtx.(fql.ICollectSelectorContext), scope)
|
||||
selector, err := v.visitCollectSelector(projectionSelectorCtx, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -596,7 +597,7 @@ func (v *visitor) visitCollectClause(c fql.ICollectClauseContext, scope *scope,
|
||||
selectors := make([]*clauses.CollectAggregateSelector, 0, len(selectorCtxs))
|
||||
|
||||
for _, sc := range selectorCtxs {
|
||||
selector, err := v.visitCollectAggregateSelector(sc.(fql.ICollectAggregateSelectorContext), scope)
|
||||
selector, err := v.visitCollectAggregateSelector(sc, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -627,7 +628,7 @@ func (v *visitor) visitCollectClause(c fql.ICollectClauseContext, scope *scope,
|
||||
func (v *visitor) visitCollectSelector(c fql.ICollectSelectorContext, scope *scope) (*clauses.CollectSelector, error) {
|
||||
ctx := c.(*fql.CollectSelectorContext)
|
||||
variable := ctx.Identifier().GetText()
|
||||
exp, err := v.visitExpression(ctx.Expression().(fql.IExpressionContext), scope)
|
||||
exp, err := v.visitExpression(ctx.Expression(), scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -642,7 +643,7 @@ func (v *visitor) visitCollectAggregateSelector(c fql.ICollectAggregateSelectorC
|
||||
fnCtx := ctx.FunctionCallExpression()
|
||||
|
||||
if fnCtx != nil {
|
||||
exp, err := v.visitFunctionCallExpression(fnCtx.(fql.IFunctionCallExpressionContext), scope)
|
||||
exp, err := v.visitFunctionCallExpression(fnCtx, scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -666,43 +667,43 @@ func (v *visitor) visitForExpressionSource(c fql.IForExpressionSourceContext, sc
|
||||
arr := ctx.ArrayLiteral()
|
||||
|
||||
if arr != nil {
|
||||
return v.visitArrayLiteral(arr.(fql.IArrayLiteralContext), scope)
|
||||
return v.visitArrayLiteral(arr, scope)
|
||||
}
|
||||
|
||||
obj := ctx.ObjectLiteral()
|
||||
|
||||
if obj != nil {
|
||||
return v.visitObjectLiteral(obj.(fql.IObjectLiteralContext), scope)
|
||||
return v.visitObjectLiteral(obj, scope)
|
||||
}
|
||||
|
||||
variable := ctx.Variable()
|
||||
|
||||
if variable != nil {
|
||||
return v.visitVariable(variable.(fql.IVariableContext), scope)
|
||||
return v.visitVariable(variable, scope)
|
||||
}
|
||||
|
||||
funcCall := ctx.FunctionCallExpression()
|
||||
|
||||
if funcCall != nil {
|
||||
return v.visitFunctionCallExpression(funcCall.(fql.IFunctionCallExpressionContext), scope)
|
||||
return v.visitFunctionCallExpression(funcCall, scope)
|
||||
}
|
||||
|
||||
memberExp := ctx.MemberExpression()
|
||||
|
||||
if memberExp != nil {
|
||||
return v.visitMemberExpression(memberExp.(fql.IMemberExpressionContext), scope)
|
||||
return v.visitMemberExpression(memberExp, scope)
|
||||
}
|
||||
|
||||
rangeOp := ctx.RangeOperator()
|
||||
|
||||
if rangeOp != nil {
|
||||
return v.visitRangeOperator(rangeOp.(fql.IRangeOperatorContext), scope)
|
||||
return v.visitRangeOperator(rangeOp, scope)
|
||||
}
|
||||
|
||||
param := ctx.Param()
|
||||
|
||||
if param != nil {
|
||||
return v.visitParam(param.(fql.IParamContext), scope)
|
||||
return v.visitParam(param, scope)
|
||||
}
|
||||
|
||||
return nil, core.Error(ErrInvalidDataSource, ctx.GetText())
|
||||
@ -714,7 +715,7 @@ func (v *visitor) visitForExpressionClause(c fql.IForExpressionClauseContext, sc
|
||||
limitCtx := ctx.LimitClause()
|
||||
|
||||
if limitCtx != nil {
|
||||
limit, offset, err := v.visitLimitClause(limitCtx.(fql.ILimitClauseContext), scope)
|
||||
limit, offset, err := v.visitLimitClause(limitCtx, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -727,7 +728,7 @@ func (v *visitor) visitForExpressionClause(c fql.IForExpressionClauseContext, sc
|
||||
filterCtx := ctx.FilterClause()
|
||||
|
||||
if filterCtx != nil {
|
||||
filterExp, err := v.visitFilterClause(filterCtx.(fql.IFilterClauseContext), scope)
|
||||
filterExp, err := v.visitFilterClause(filterCtx, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -740,7 +741,6 @@ func (v *visitor) visitForExpressionClause(c fql.IForExpressionClauseContext, sc
|
||||
sortCtx := ctx.SortClause()
|
||||
|
||||
if sortCtx != nil {
|
||||
sortCtx := sortCtx.(fql.ISortClauseContext)
|
||||
sortExps, err := v.visitSortClause(sortCtx, scope)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -754,7 +754,6 @@ func (v *visitor) visitForExpressionClause(c fql.IForExpressionClauseContext, sc
|
||||
collectCtx := ctx.CollectClause()
|
||||
|
||||
if collectCtx != nil {
|
||||
collectCtx := collectCtx.(fql.ICollectClauseContext)
|
||||
params, err := v.visitCollectClause(collectCtx, scope, valVarName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -775,7 +774,7 @@ func (v *visitor) visitForExpressionStatement(c fql.IForExpressionStatementConte
|
||||
|
||||
if variableCtx != nil {
|
||||
variableExp, err := v.visitVariableDeclaration(
|
||||
variableCtx.(fql.IVariableDeclarationContext),
|
||||
variableCtx,
|
||||
scope,
|
||||
)
|
||||
if err != nil {
|
||||
@ -791,7 +790,7 @@ func (v *visitor) visitForExpressionStatement(c fql.IForExpressionStatementConte
|
||||
|
||||
if fnCallCtx != nil {
|
||||
fnCallExp, err := v.visitFunctionCallExpression(
|
||||
fnCallCtx.(fql.IFunctionCallExpressionContext),
|
||||
fnCallCtx,
|
||||
scope,
|
||||
)
|
||||
if err != nil {
|
||||
@ -1230,7 +1229,7 @@ func (v *visitor) visitArrayLiteral(c fql.IArrayLiteralContext, scope *scope) (c
|
||||
list := ctx.ArgumentList()
|
||||
|
||||
if list == nil {
|
||||
return literals.NewArrayLiteralWith(make([]core.Expression, 0, 0)), nil
|
||||
return literals.NewArrayLiteralWith(make([]core.Expression, 0)), nil
|
||||
}
|
||||
|
||||
elements, err := v.visitArgumentList(list, scope)
|
||||
@ -1352,7 +1351,7 @@ func (v *visitor) visitVariableDeclaration(c fql.IVariableDeclarationContext, sc
|
||||
}
|
||||
|
||||
if exp := ctx.Expression(); exp != nil {
|
||||
init, err = v.visitExpression(ctx.Expression().(fql.IExpressionContext), scope)
|
||||
init, err = v.visitExpression(ctx.Expression(), scope)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@ -1467,7 +1466,7 @@ func (v *visitor) visitArgumentList(c fql.IArgumentListContext, scope *scope) ([
|
||||
args := make([]core.Expression, 0, len(exps))
|
||||
|
||||
for _, arg := range exps {
|
||||
exp, err := v.visitExpression(arg.(fql.IExpressionContext), scope)
|
||||
exp, err := v.visitExpression(arg, scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -1548,7 +1547,7 @@ func (v *visitor) visitExpression(c fql.IExpressionContext, scope *scope) (core.
|
||||
}
|
||||
|
||||
if ctx.GetTernaryOperator() != nil {
|
||||
cond, err := v.visitExpression(ctx.GetCondition().(fql.IExpressionContext), scope)
|
||||
cond, err := v.visitExpression(ctx.GetCondition(), scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -1557,7 +1556,7 @@ func (v *visitor) visitExpression(c fql.IExpressionContext, scope *scope) (core.
|
||||
var consequent core.Expression
|
||||
|
||||
if onTrue := ctx.GetOnTrue(); onTrue != nil {
|
||||
exp, err := v.visitExpression(onTrue.(fql.IExpressionContext), scope)
|
||||
exp, err := v.visitExpression(onTrue, scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -1566,7 +1565,7 @@ func (v *visitor) visitExpression(c fql.IExpressionContext, scope *scope) (core.
|
||||
consequent = exp
|
||||
}
|
||||
|
||||
alternate, err := v.visitExpression(ctx.GetOnFalse().(fql.IExpressionContext), scope)
|
||||
alternate, err := v.visitExpression(ctx.GetOnFalse(), scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -3,10 +3,11 @@ package dom
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/mafredri/cdp/protocol/page"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
type NodeLoader struct {
|
||||
|
@ -1,12 +1,14 @@
|
||||
package eval
|
||||
|
||||
import (
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
"github.com/wI2L/jettison"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
type Function struct {
|
||||
|
@ -2,13 +2,15 @@ package events_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/events"
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/events"
|
||||
)
|
||||
|
||||
type TestEventStream struct {
|
||||
|
@ -2,6 +2,7 @@ package events
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
)
|
||||
|
||||
|
@ -2,10 +2,12 @@ package events
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -2,15 +2,17 @@ package events_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/mock"
|
||||
|
||||
events2 "github.com/MontFerret/ferret/pkg/drivers/cdp/events"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/rpcc"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
@ -2,6 +2,9 @@ package cdp
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/dom"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
|
||||
"github.com/mafredri/cdp"
|
||||
@ -65,7 +68,7 @@ func enableFeatures(ctx context.Context, client *cdp.Client, params drivers.Para
|
||||
},
|
||||
|
||||
func() error {
|
||||
return client.DOM.Enable(ctx)
|
||||
return client.DOM.Enable(ctx, dom.NewEnableArgs().SetIncludeWhitespace("all"))
|
||||
},
|
||||
|
||||
func() error {
|
||||
|
@ -2,10 +2,12 @@ package network
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/dom"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/page"
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/dom"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
@ -392,7 +392,6 @@ func (p *HTMLPage) PrintToPDF(ctx context.Context, params drivers.PDFParams) (va
|
||||
SetLandscape(bool(params.Landscape)).
|
||||
SetDisplayHeaderFooter(bool(params.DisplayHeaderFooter)).
|
||||
SetPrintBackground(bool(params.PrintBackground)).
|
||||
SetIgnoreInvalidPageRanges(bool(params.IgnoreInvalidPageRanges)).
|
||||
SetPreferCSSPageSize(bool(params.PreferCSSPageSize))
|
||||
|
||||
if params.Scale > 0 {
|
||||
|
@ -2,9 +2,11 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const getAttribute = `(el, name) => {
|
||||
|
@ -3,9 +3,10 @@ package templates
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const blur = `(el) => {
|
||||
|
@ -1,9 +1,10 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const getChildren = "(el) => Array.from(el.children)"
|
||||
|
@ -2,6 +2,7 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
)
|
||||
|
@ -2,10 +2,12 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const setInnerHTML = `(el, value) => {
|
||||
|
@ -2,10 +2,12 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const setInnerText = `(el, value) => {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
)
|
||||
|
||||
const getParent = "(el) => el.parentElement"
|
||||
|
@ -2,9 +2,11 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -2,10 +2,12 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const selectFragment = `
|
||||
|
@ -1,8 +1,9 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
)
|
||||
|
||||
const getPreviousElementSibling = "(el) => el.previousElementSibling"
|
||||
|
@ -1,9 +1,10 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const getStyles = `(el) => {
|
||||
|
@ -1,9 +1,10 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const getValue = `(el) => {
|
||||
|
@ -2,11 +2,13 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -2,9 +2,11 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/mafredri/cdp/protocol/runtime"
|
||||
)
|
||||
|
||||
const xpath = `(el, expression, resType) => {
|
||||
|
@ -3,8 +3,9 @@ package common
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/rs/zerolog"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -2,10 +2,11 @@ package common_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers/common"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
@ -2,6 +2,7 @@ package drivers
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
|
@ -136,7 +136,8 @@ func (c HTTPCookie) Hash() uint64 {
|
||||
}
|
||||
|
||||
func (c HTTPCookie) Copy() core.Value {
|
||||
return *(&c)
|
||||
cop := c
|
||||
return &cop
|
||||
}
|
||||
|
||||
func (c HTTPCookie) MarshalJSON() ([]byte, error) {
|
||||
|
@ -9,9 +9,10 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/wI2L/jettison"
|
||||
)
|
||||
|
||||
// HTTPHeaders HTTP header object
|
||||
|
@ -7,9 +7,10 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/gobwas/glob"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/logging"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/gobwas/glob"
|
||||
|
||||
"golang.org/x/net/html/charset"
|
||||
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"testing"
|
||||
@ -116,7 +115,7 @@ func TestDriver_convertToUTF8(t *testing.T) {
|
||||
|
||||
Convey(tt.name, t, func() {
|
||||
|
||||
data, err := ioutil.ReadAll(bytes.NewBufferString(tt.args.inputData))
|
||||
data, err := io.ReadAll(bytes.NewBufferString(tt.args.inputData))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -134,7 +133,7 @@ func TestDriver_convertToUTF8(t *testing.T) {
|
||||
gotData, err := drv.convertToUTF8(bytes.NewReader(encodedData), tt.args.srcCharset)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
outData, err := ioutil.ReadAll(gotData)
|
||||
outData, err := io.ReadAll(gotData)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
So(string(outData), ShouldEqual, tt.expected)
|
||||
|
@ -2,10 +2,11 @@ package http
|
||||
|
||||
import (
|
||||
"context"
|
||||
"golang.org/x/net/html"
|
||||
"hash/fnv"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/html"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
|
@ -3,13 +3,15 @@ package http_test
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
"github.com/MontFerret/ferret/pkg/drivers/http"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values/types"
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestElement(t *testing.T) {
|
||||
|
@ -2,9 +2,10 @@ package http
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
"hash/fnv"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/drivers"
|
||||
|
@ -26,8 +26,6 @@ type PDFParams struct {
|
||||
MarginRight values.Float
|
||||
// Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
|
||||
PageRanges values.String
|
||||
// Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
|
||||
IgnoreInvalidPageRanges values.Boolean
|
||||
// HTML template for the print values. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document
|
||||
// For example, `<span class=title></span>` would generate span containing the title.
|
||||
HeaderTemplate values.String
|
||||
|
@ -2,10 +2,12 @@ package drivers
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values/types"
|
||||
"github.com/wI2L/jettison"
|
||||
)
|
||||
|
||||
// HTTPRequest HTTP request object.
|
||||
@ -76,7 +78,8 @@ func (req *HTTPRequest) Hash() uint64 {
|
||||
}
|
||||
|
||||
func (req *HTTPRequest) Copy() core.Value {
|
||||
return *(&req)
|
||||
cop := *req
|
||||
return &cop
|
||||
}
|
||||
|
||||
func (req *HTTPRequest) GetIn(ctx context.Context, path []core.Value) (core.Value, core.PathError) {
|
||||
|
@ -66,7 +66,8 @@ func (resp *HTTPResponse) Unwrap() interface{} {
|
||||
}
|
||||
|
||||
func (resp *HTTPResponse) Copy() core.Value {
|
||||
return *(&resp)
|
||||
cop := *resp
|
||||
return &cop
|
||||
}
|
||||
|
||||
func (resp *HTTPResponse) Hash() uint64 {
|
||||
|
@ -28,20 +28,19 @@ func IsScreenshotFormatValid(format string) bool {
|
||||
|
||||
func NewDefaultHTMLPDFParams() PDFParams {
|
||||
return PDFParams{
|
||||
Landscape: values.False,
|
||||
DisplayHeaderFooter: values.False,
|
||||
PrintBackground: values.False,
|
||||
Scale: values.Float(1),
|
||||
PaperWidth: values.Float(8.5),
|
||||
PaperHeight: values.Float(11),
|
||||
MarginTop: values.Float(0.4),
|
||||
MarginBottom: values.Float(0.4),
|
||||
MarginLeft: values.Float(0.4),
|
||||
MarginRight: values.Float(0.4),
|
||||
PageRanges: values.EmptyString,
|
||||
IgnoreInvalidPageRanges: values.False,
|
||||
HeaderTemplate: values.EmptyString,
|
||||
FooterTemplate: values.EmptyString,
|
||||
PreferCSSPageSize: values.False,
|
||||
Landscape: values.False,
|
||||
DisplayHeaderFooter: values.False,
|
||||
PrintBackground: values.False,
|
||||
Scale: values.Float(1),
|
||||
PaperWidth: values.Float(8.5),
|
||||
PaperHeight: values.Float(11),
|
||||
MarginTop: values.Float(0.4),
|
||||
MarginBottom: values.Float(0.4),
|
||||
MarginLeft: values.Float(0.4),
|
||||
MarginRight: values.Float(0.4),
|
||||
PageRanges: values.EmptyString,
|
||||
HeaderTemplate: values.EmptyString,
|
||||
FooterTemplate: values.EmptyString,
|
||||
PreferCSSPageSize: values.False,
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
package drivers
|
||||
|
||||
import (
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/wI2L/jettison"
|
||||
"strings"
|
||||
|
||||
"github.com/wI2L/jettison"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
||||
// ScrollBehavior defines the transition animation.
|
||||
|
@ -2,9 +2,10 @@ package drivers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
"io"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/events"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/collections"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
|
@ -3,21 +3,20 @@ package parser
|
||||
import (
|
||||
"unicode"
|
||||
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
)
|
||||
|
||||
// CaseChangingStream wraps an existing CharStream, but upper cases, or
|
||||
// lower cases the input before it is tokenized.
|
||||
type CaseChangingStream struct {
|
||||
antlr.CharStream
|
||||
|
||||
upper bool
|
||||
}
|
||||
|
||||
// newCaseChangingStream returns a new CaseChangingStream that forces
|
||||
// all tokens read from the underlying stream to be either upper case
|
||||
// or lower case based on the upper argument.
|
||||
func newCaseChangingStream(in antlr.CharStream, upper bool) *CaseChangingStream {
|
||||
func newCaseChangingStream(in antlr.CharStream, upper bool) antlr.CharStream {
|
||||
return &CaseChangingStream{in, upper}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated from antlr/FqlLexer.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlLexer.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
"sync"
|
||||
"unicode"
|
||||
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
)
|
||||
|
||||
// Suppress unused import error
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql // FqlParser
|
||||
import (
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"sync"
|
||||
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
)
|
||||
|
||||
// Suppress unused import errors
|
||||
@ -582,6 +582,11 @@ type IProgramContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Body() IBodyContext
|
||||
AllHead() []IHeadContext
|
||||
Head(i int) IHeadContext
|
||||
|
||||
// IsProgramContext differentiates from other interfaces.
|
||||
IsProgramContext()
|
||||
}
|
||||
@ -757,6 +762,9 @@ type IHeadContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
UseExpression() IUseExpressionContext
|
||||
|
||||
// IsHeadContext differentiates from other interfaces.
|
||||
IsHeadContext()
|
||||
}
|
||||
@ -873,6 +881,9 @@ type IUseExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Use() IUseContext
|
||||
|
||||
// IsUseExpressionContext differentiates from other interfaces.
|
||||
IsUseExpressionContext()
|
||||
}
|
||||
@ -989,6 +1000,10 @@ type IUseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Use() antlr.TerminalNode
|
||||
NamespaceIdentifier() INamespaceIdentifierContext
|
||||
|
||||
// IsUseContext differentiates from other interfaces.
|
||||
IsUseContext()
|
||||
}
|
||||
@ -1113,6 +1128,11 @@ type IBodyContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
BodyExpression() IBodyExpressionContext
|
||||
AllBodyStatement() []IBodyStatementContext
|
||||
BodyStatement(i int) IBodyStatementContext
|
||||
|
||||
// IsBodyContext differentiates from other interfaces.
|
||||
IsBodyContext()
|
||||
}
|
||||
@ -1288,6 +1308,12 @@ type IBodyStatementContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
VariableDeclaration() IVariableDeclarationContext
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
WaitForExpression() IWaitForExpressionContext
|
||||
DispatchEventExpression() IDispatchEventExpressionContext
|
||||
|
||||
// IsBodyStatementContext differentiates from other interfaces.
|
||||
IsBodyStatementContext()
|
||||
}
|
||||
@ -1479,6 +1505,10 @@ type IBodyExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
ReturnExpression() IReturnExpressionContext
|
||||
ForExpression() IForExpressionContext
|
||||
|
||||
// IsBodyExpressionContext differentiates from other interfaces.
|
||||
IsBodyExpressionContext()
|
||||
}
|
||||
@ -1633,6 +1663,14 @@ type IVariableDeclarationContext interface {
|
||||
// SetId sets the id token.
|
||||
SetId(antlr.Token)
|
||||
|
||||
// Getter signatures
|
||||
Let() antlr.TerminalNode
|
||||
Assign() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
Identifier() antlr.TerminalNode
|
||||
IgnoreIdentifier() antlr.TerminalNode
|
||||
SafeReservedWord() ISafeReservedWordContext
|
||||
|
||||
// IsVariableDeclarationContext differentiates from other interfaces.
|
||||
IsVariableDeclarationContext()
|
||||
}
|
||||
@ -1838,6 +1876,11 @@ type IReturnExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Return() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
Distinct() antlr.TerminalNode
|
||||
|
||||
// IsReturnExpressionContext differentiates from other interfaces.
|
||||
IsReturnExpressionContext()
|
||||
}
|
||||
@ -1988,6 +2031,21 @@ type IForExpressionContext interface {
|
||||
// SetCounterVariable sets the counterVariable token.
|
||||
SetCounterVariable(antlr.Token)
|
||||
|
||||
// Getter signatures
|
||||
For() antlr.TerminalNode
|
||||
In() antlr.TerminalNode
|
||||
ForExpressionSource() IForExpressionSourceContext
|
||||
ForExpressionReturn() IForExpressionReturnContext
|
||||
AllIdentifier() []antlr.TerminalNode
|
||||
Identifier(i int) antlr.TerminalNode
|
||||
IgnoreIdentifier() antlr.TerminalNode
|
||||
Comma() antlr.TerminalNode
|
||||
AllForExpressionBody() []IForExpressionBodyContext
|
||||
ForExpressionBody(i int) IForExpressionBodyContext
|
||||
While() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
Do() antlr.TerminalNode
|
||||
|
||||
// IsForExpressionContext differentiates from other interfaces.
|
||||
IsForExpressionContext()
|
||||
}
|
||||
@ -2356,6 +2414,15 @@ type IForExpressionSourceContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
ArrayLiteral() IArrayLiteralContext
|
||||
ObjectLiteral() IObjectLiteralContext
|
||||
Variable() IVariableContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
RangeOperator() IRangeOperatorContext
|
||||
Param() IParamContext
|
||||
|
||||
// IsForExpressionSourceContext differentiates from other interfaces.
|
||||
IsForExpressionSourceContext()
|
||||
}
|
||||
@ -2616,6 +2683,12 @@ type IForExpressionClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
LimitClause() ILimitClauseContext
|
||||
SortClause() ISortClauseContext
|
||||
FilterClause() IFilterClauseContext
|
||||
CollectClause() ICollectClauseContext
|
||||
|
||||
// IsForExpressionClauseContext differentiates from other interfaces.
|
||||
IsForExpressionClauseContext()
|
||||
}
|
||||
@ -2810,6 +2883,10 @@ type IForExpressionStatementContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
VariableDeclaration() IVariableDeclarationContext
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
|
||||
// IsForExpressionStatementContext differentiates from other interfaces.
|
||||
IsForExpressionStatementContext()
|
||||
}
|
||||
@ -2955,6 +3032,10 @@ type IForExpressionBodyContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
ForExpressionStatement() IForExpressionStatementContext
|
||||
ForExpressionClause() IForExpressionClauseContext
|
||||
|
||||
// IsForExpressionBodyContext differentiates from other interfaces.
|
||||
IsForExpressionBodyContext()
|
||||
}
|
||||
@ -3100,6 +3181,10 @@ type IForExpressionReturnContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
ReturnExpression() IReturnExpressionContext
|
||||
ForExpression() IForExpressionContext
|
||||
|
||||
// IsForExpressionReturnContext differentiates from other interfaces.
|
||||
IsForExpressionReturnContext()
|
||||
}
|
||||
@ -3248,6 +3333,10 @@ type IFilterClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Filter() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
|
||||
// IsFilterClauseContext differentiates from other interfaces.
|
||||
IsFilterClauseContext()
|
||||
}
|
||||
@ -3372,6 +3461,12 @@ type ILimitClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Limit() antlr.TerminalNode
|
||||
AllLimitClauseValue() []ILimitClauseValueContext
|
||||
LimitClauseValue(i int) ILimitClauseValueContext
|
||||
Comma() antlr.TerminalNode
|
||||
|
||||
// IsLimitClauseContext differentiates from other interfaces.
|
||||
IsLimitClauseContext()
|
||||
}
|
||||
@ -3541,6 +3636,13 @@ type ILimitClauseValueContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
IntegerLiteral() IIntegerLiteralContext
|
||||
Param() IParamContext
|
||||
Variable() IVariableContext
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
|
||||
// IsLimitClauseValueContext differentiates from other interfaces.
|
||||
IsLimitClauseValueContext()
|
||||
}
|
||||
@ -3755,6 +3857,13 @@ type ISortClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Sort() antlr.TerminalNode
|
||||
AllSortClauseExpression() []ISortClauseExpressionContext
|
||||
SortClauseExpression(i int) ISortClauseExpressionContext
|
||||
AllComma() []antlr.TerminalNode
|
||||
Comma(i int) antlr.TerminalNode
|
||||
|
||||
// IsSortClauseContext differentiates from other interfaces.
|
||||
IsSortClauseContext()
|
||||
}
|
||||
@ -3931,6 +4040,10 @@ type ISortClauseExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Expression() IExpressionContext
|
||||
SortDirection() antlr.TerminalNode
|
||||
|
||||
// IsSortClauseExpressionContext differentiates from other interfaces.
|
||||
IsSortClauseExpressionContext()
|
||||
}
|
||||
@ -4061,6 +4174,13 @@ type ICollectClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Collect() antlr.TerminalNode
|
||||
CollectCounter() ICollectCounterContext
|
||||
CollectAggregator() ICollectAggregatorContext
|
||||
CollectGrouping() ICollectGroupingContext
|
||||
CollectGroupVariable() ICollectGroupVariableContext
|
||||
|
||||
// IsCollectClauseContext differentiates from other interfaces.
|
||||
IsCollectClauseContext()
|
||||
}
|
||||
@ -4306,6 +4426,11 @@ type ICollectSelectorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Identifier() antlr.TerminalNode
|
||||
Assign() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
|
||||
// IsCollectSelectorContext differentiates from other interfaces.
|
||||
IsCollectSelectorContext()
|
||||
}
|
||||
@ -4438,6 +4563,12 @@ type ICollectGroupingContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
AllCollectSelector() []ICollectSelectorContext
|
||||
CollectSelector(i int) ICollectSelectorContext
|
||||
AllComma() []antlr.TerminalNode
|
||||
Comma(i int) antlr.TerminalNode
|
||||
|
||||
// IsCollectGroupingContext differentiates from other interfaces.
|
||||
IsCollectGroupingContext()
|
||||
}
|
||||
@ -4606,6 +4737,13 @@ type ICollectAggregatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Aggregate() antlr.TerminalNode
|
||||
AllCollectAggregateSelector() []ICollectAggregateSelectorContext
|
||||
CollectAggregateSelector(i int) ICollectAggregateSelectorContext
|
||||
AllComma() []antlr.TerminalNode
|
||||
Comma(i int) antlr.TerminalNode
|
||||
|
||||
// IsCollectAggregatorContext differentiates from other interfaces.
|
||||
IsCollectAggregatorContext()
|
||||
}
|
||||
@ -4782,6 +4920,11 @@ type ICollectAggregateSelectorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Identifier() antlr.TerminalNode
|
||||
Assign() antlr.TerminalNode
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
|
||||
// IsCollectAggregateSelectorContext differentiates from other interfaces.
|
||||
IsCollectAggregateSelectorContext()
|
||||
}
|
||||
@ -4914,6 +5057,13 @@ type ICollectGroupVariableContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Into() antlr.TerminalNode
|
||||
CollectSelector() ICollectSelectorContext
|
||||
AllIdentifier() []antlr.TerminalNode
|
||||
Identifier(i int) antlr.TerminalNode
|
||||
Keep() antlr.TerminalNode
|
||||
|
||||
// IsCollectGroupVariableContext differentiates from other interfaces.
|
||||
IsCollectGroupVariableContext()
|
||||
}
|
||||
@ -5081,6 +5231,12 @@ type ICollectCounterContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
With() antlr.TerminalNode
|
||||
Count() antlr.TerminalNode
|
||||
Into() antlr.TerminalNode
|
||||
Identifier() antlr.TerminalNode
|
||||
|
||||
// IsCollectCounterContext differentiates from other interfaces.
|
||||
IsCollectCounterContext()
|
||||
}
|
||||
@ -5209,6 +5365,16 @@ type IWaitForExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Waitfor() antlr.TerminalNode
|
||||
Event() antlr.TerminalNode
|
||||
EventName() IEventNameContext
|
||||
In() antlr.TerminalNode
|
||||
EventSource() IEventSourceContext
|
||||
OptionsClause() IOptionsClauseContext
|
||||
FilterClause() IFilterClauseContext
|
||||
TimeoutClause() ITimeoutClauseContext
|
||||
|
||||
// IsWaitForExpressionContext differentiates from other interfaces.
|
||||
IsWaitForExpressionContext()
|
||||
}
|
||||
@ -5447,6 +5613,17 @@ type IDispatchEventExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Dispatch() antlr.TerminalNode
|
||||
EventName() IEventNameContext
|
||||
In() antlr.TerminalNode
|
||||
EventSource() IEventSourceContext
|
||||
With() antlr.TerminalNode
|
||||
EventArguments() IEventArgumentsContext
|
||||
OptionsClause() IOptionsClauseContext
|
||||
FilterClause() IFilterClauseContext
|
||||
TimeoutClause() ITimeoutClauseContext
|
||||
|
||||
// IsDispatchEventExpressionContext differentiates from other interfaces.
|
||||
IsDispatchEventExpressionContext()
|
||||
}
|
||||
@ -5711,6 +5888,13 @@ type IEventNameContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
StringLiteral() IStringLiteralContext
|
||||
Variable() IVariableContext
|
||||
Param() IParamContext
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
|
||||
// IsEventNameContext differentiates from other interfaces.
|
||||
IsEventNameContext()
|
||||
}
|
||||
@ -5928,6 +6112,11 @@ type IEventSourceContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
Variable() IVariableContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
|
||||
// IsEventSourceContext differentiates from other interfaces.
|
||||
IsEventSourceContext()
|
||||
}
|
||||
@ -6096,6 +6285,13 @@ type IEventArgumentsContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Literal() ILiteralContext
|
||||
Variable() IVariableContext
|
||||
Param() IParamContext
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
|
||||
// IsEventArgumentsContext differentiates from other interfaces.
|
||||
IsEventArgumentsContext()
|
||||
}
|
||||
@ -6310,6 +6506,10 @@ type IOptionsClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Options() antlr.TerminalNode
|
||||
ObjectLiteral() IObjectLiteralContext
|
||||
|
||||
// IsOptionsClauseContext differentiates from other interfaces.
|
||||
IsOptionsClauseContext()
|
||||
}
|
||||
@ -6434,6 +6634,14 @@ type ITimeoutClauseContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Timeout() antlr.TerminalNode
|
||||
IntegerLiteral() IIntegerLiteralContext
|
||||
Variable() IVariableContext
|
||||
Param() IParamContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
FunctionCall() IFunctionCallContext
|
||||
|
||||
// IsTimeoutClauseContext differentiates from other interfaces.
|
||||
IsTimeoutClauseContext()
|
||||
}
|
||||
@ -6652,6 +6860,11 @@ type IParamContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Param() antlr.TerminalNode
|
||||
Identifier() antlr.TerminalNode
|
||||
SafeReservedWord() ISafeReservedWordContext
|
||||
|
||||
// IsParamContext differentiates from other interfaces.
|
||||
IsParamContext()
|
||||
}
|
||||
@ -6797,6 +7010,10 @@ type IVariableContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Identifier() antlr.TerminalNode
|
||||
SafeReservedWord() ISafeReservedWordContext
|
||||
|
||||
// IsVariableContext differentiates from other interfaces.
|
||||
IsVariableContext()
|
||||
}
|
||||
@ -6933,6 +7150,15 @@ type ILiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
ArrayLiteral() IArrayLiteralContext
|
||||
ObjectLiteral() IObjectLiteralContext
|
||||
BooleanLiteral() IBooleanLiteralContext
|
||||
StringLiteral() IStringLiteralContext
|
||||
FloatLiteral() IFloatLiteralContext
|
||||
IntegerLiteral() IIntegerLiteralContext
|
||||
NoneLiteral() INoneLiteralContext
|
||||
|
||||
// IsLiteralContext differentiates from other interfaces.
|
||||
IsLiteralContext()
|
||||
}
|
||||
@ -7196,6 +7422,11 @@ type IArrayLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
OpenBracket() antlr.TerminalNode
|
||||
CloseBracket() antlr.TerminalNode
|
||||
ArgumentList() IArgumentListContext
|
||||
|
||||
// IsArrayLiteralContext differentiates from other interfaces.
|
||||
IsArrayLiteralContext()
|
||||
}
|
||||
@ -7314,7 +7545,7 @@ func (p *FqlParser) ArrayLiteral() (localctx IArrayLiteralContext) {
|
||||
p.GetErrorHandler().Sync(p)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDispatch-9))|(1<<(FqlParserOptions-9))|(1<<(FqlParserTimeout-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserDistinct-41))|(1<<(FqlParserFilter-41))|(1<<(FqlParserCurrent-41))|(1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserDo-41))|(1<<(FqlParserWhile-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
||||
if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&-576460752368861163) != 0 {
|
||||
{
|
||||
p.SetState(429)
|
||||
p.ArgumentList()
|
||||
@ -7336,6 +7567,14 @@ type IObjectLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
OpenBrace() antlr.TerminalNode
|
||||
CloseBrace() antlr.TerminalNode
|
||||
AllPropertyAssignment() []IPropertyAssignmentContext
|
||||
PropertyAssignment(i int) IPropertyAssignmentContext
|
||||
AllComma() []antlr.TerminalNode
|
||||
Comma(i int) antlr.TerminalNode
|
||||
|
||||
// IsObjectLiteralContext differentiates from other interfaces.
|
||||
IsObjectLiteralContext()
|
||||
}
|
||||
@ -7489,7 +7728,7 @@ func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) {
|
||||
p.GetErrorHandler().Sync(p)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDispatch-9))|(1<<(FqlParserOptions-9))|(1<<(FqlParserTimeout-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserDistinct-41))|(1<<(FqlParserFilter-41))|(1<<(FqlParserCurrent-41))|(1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserDo-41))|(1<<(FqlParserWhile-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41)))) != 0) {
|
||||
if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&1729382256844734465) != 0 {
|
||||
{
|
||||
p.SetState(435)
|
||||
p.PropertyAssignment()
|
||||
@ -7542,6 +7781,9 @@ type IBooleanLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
BooleanLiteral() antlr.TerminalNode
|
||||
|
||||
// IsBooleanLiteralContext differentiates from other interfaces.
|
||||
IsBooleanLiteralContext()
|
||||
}
|
||||
@ -7646,6 +7888,9 @@ type IStringLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
StringLiteral() antlr.TerminalNode
|
||||
|
||||
// IsStringLiteralContext differentiates from other interfaces.
|
||||
IsStringLiteralContext()
|
||||
}
|
||||
@ -7750,6 +7995,9 @@ type IFloatLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
FloatLiteral() antlr.TerminalNode
|
||||
|
||||
// IsFloatLiteralContext differentiates from other interfaces.
|
||||
IsFloatLiteralContext()
|
||||
}
|
||||
@ -7854,6 +8102,9 @@ type IIntegerLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
IntegerLiteral() antlr.TerminalNode
|
||||
|
||||
// IsIntegerLiteralContext differentiates from other interfaces.
|
||||
IsIntegerLiteralContext()
|
||||
}
|
||||
@ -7958,6 +8209,10 @@ type INoneLiteralContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Null() antlr.TerminalNode
|
||||
None() antlr.TerminalNode
|
||||
|
||||
// IsNoneLiteralContext differentiates from other interfaces.
|
||||
IsNoneLiteralContext()
|
||||
}
|
||||
@ -8074,6 +8329,13 @@ type IPropertyAssignmentContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
PropertyName() IPropertyNameContext
|
||||
Colon() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
ComputedPropertyName() IComputedPropertyNameContext
|
||||
Variable() IVariableContext
|
||||
|
||||
// IsPropertyAssignmentContext differentiates from other interfaces.
|
||||
IsPropertyAssignmentContext()
|
||||
}
|
||||
@ -8278,6 +8540,11 @@ type IComputedPropertyNameContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
OpenBracket() antlr.TerminalNode
|
||||
Expression() IExpressionContext
|
||||
CloseBracket() antlr.TerminalNode
|
||||
|
||||
// IsComputedPropertyNameContext differentiates from other interfaces.
|
||||
IsComputedPropertyNameContext()
|
||||
}
|
||||
@ -8410,6 +8677,13 @@ type IPropertyNameContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Identifier() antlr.TerminalNode
|
||||
StringLiteral() IStringLiteralContext
|
||||
Param() IParamContext
|
||||
SafeReservedWord() ISafeReservedWordContext
|
||||
UnsafeReservedWord() IUnsafeReservedWordContext
|
||||
|
||||
// IsPropertyNameContext differentiates from other interfaces.
|
||||
IsPropertyNameContext()
|
||||
}
|
||||
@ -8615,6 +8889,10 @@ type INamespaceIdentifierContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Namespace() INamespaceContext
|
||||
Identifier() antlr.TerminalNode
|
||||
|
||||
// IsNamespaceIdentifierContext differentiates from other interfaces.
|
||||
IsNamespaceIdentifierContext()
|
||||
}
|
||||
@ -8739,6 +9017,10 @@ type INamespaceContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
AllNamespaceSegment() []antlr.TerminalNode
|
||||
NamespaceSegment(i int) antlr.TerminalNode
|
||||
|
||||
// IsNamespaceContext differentiates from other interfaces.
|
||||
IsNamespaceContext()
|
||||
}
|
||||
@ -8858,6 +9140,11 @@ type IMemberExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
MemberExpressionSource() IMemberExpressionSourceContext
|
||||
AllMemberExpressionPath() []IMemberExpressionPathContext
|
||||
MemberExpressionPath(i int) IMemberExpressionPathContext
|
||||
|
||||
// IsMemberExpressionContext differentiates from other interfaces.
|
||||
IsMemberExpressionContext()
|
||||
}
|
||||
@ -9036,6 +9323,13 @@ type IMemberExpressionSourceContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Variable() IVariableContext
|
||||
Param() IParamContext
|
||||
ArrayLiteral() IArrayLiteralContext
|
||||
ObjectLiteral() IObjectLiteralContext
|
||||
FunctionCall() IFunctionCallContext
|
||||
|
||||
// IsMemberExpressionSourceContext differentiates from other interfaces.
|
||||
IsMemberExpressionSourceContext()
|
||||
}
|
||||
@ -9250,6 +9544,10 @@ type IFunctionCallExpressionContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
FunctionCall() IFunctionCallContext
|
||||
ErrorOperator() IErrorOperatorContext
|
||||
|
||||
// IsFunctionCallExpressionContext differentiates from other interfaces.
|
||||
IsFunctionCallExpressionContext()
|
||||
}
|
||||
@ -9392,6 +9690,13 @@ type IFunctionCallContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Namespace() INamespaceContext
|
||||
FunctionName() IFunctionNameContext
|
||||
OpenParen() antlr.TerminalNode
|
||||
CloseParen() antlr.TerminalNode
|
||||
ArgumentList() IArgumentListContext
|
||||
|
||||
// IsFunctionCallContext differentiates from other interfaces.
|
||||
IsFunctionCallContext()
|
||||
}
|
||||
@ -9550,7 +9855,7 @@ func (p *FqlParser) FunctionCall() (localctx IFunctionCallContext) {
|
||||
p.GetErrorHandler().Sync(p)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDispatch-9))|(1<<(FqlParserOptions-9))|(1<<(FqlParserTimeout-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserDistinct-41))|(1<<(FqlParserFilter-41))|(1<<(FqlParserCurrent-41))|(1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserDo-41))|(1<<(FqlParserWhile-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
||||
if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&-576460752368861163) != 0 {
|
||||
{
|
||||
p.SetState(511)
|
||||
p.ArgumentList()
|
||||
@ -9572,6 +9877,11 @@ type IFunctionNameContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Identifier() antlr.TerminalNode
|
||||
SafeReservedWord() ISafeReservedWordContext
|
||||
UnsafeReservedWord() IUnsafeReservedWordContext
|
||||
|
||||
// IsFunctionNameContext differentiates from other interfaces.
|
||||
IsFunctionNameContext()
|
||||
}
|
||||
@ -9731,6 +10041,12 @@ type IArgumentListContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
AllExpression() []IExpressionContext
|
||||
Expression(i int) IExpressionContext
|
||||
AllComma() []antlr.TerminalNode
|
||||
Comma(i int) antlr.TerminalNode
|
||||
|
||||
// IsArgumentListContext differentiates from other interfaces.
|
||||
IsArgumentListContext()
|
||||
}
|
||||
@ -9914,6 +10230,12 @@ type IMemberExpressionPathContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Dot() antlr.TerminalNode
|
||||
PropertyName() IPropertyNameContext
|
||||
ErrorOperator() IErrorOperatorContext
|
||||
ComputedPropertyName() IComputedPropertyNameContext
|
||||
|
||||
// IsMemberExpressionPathContext differentiates from other interfaces.
|
||||
IsMemberExpressionPathContext()
|
||||
}
|
||||
@ -10110,6 +10432,27 @@ type ISafeReservedWordContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
And() antlr.TerminalNode
|
||||
Or() antlr.TerminalNode
|
||||
Distinct() antlr.TerminalNode
|
||||
Filter() antlr.TerminalNode
|
||||
Sort() antlr.TerminalNode
|
||||
Limit() antlr.TerminalNode
|
||||
Collect() antlr.TerminalNode
|
||||
SortDirection() antlr.TerminalNode
|
||||
Into() antlr.TerminalNode
|
||||
Keep() antlr.TerminalNode
|
||||
With() antlr.TerminalNode
|
||||
Count() antlr.TerminalNode
|
||||
All() antlr.TerminalNode
|
||||
Any() antlr.TerminalNode
|
||||
Aggregate() antlr.TerminalNode
|
||||
Event() antlr.TerminalNode
|
||||
Timeout() antlr.TerminalNode
|
||||
Options() antlr.TerminalNode
|
||||
Current() antlr.TerminalNode
|
||||
|
||||
// IsSafeReservedWordContext differentiates from other interfaces.
|
||||
IsSafeReservedWordContext()
|
||||
}
|
||||
@ -10276,7 +10619,7 @@ func (p *FqlParser) SafeReservedWord() (localctx ISafeReservedWordContext) {
|
||||
p.SetState(545)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(_la == FqlParserAnd || _la == FqlParserOr || (((_la-39)&-(0x1f+1)) == 0 && ((1<<uint((_la-39)))&((1<<(FqlParserOptions-39))|(1<<(FqlParserTimeout-39))|(1<<(FqlParserDistinct-39))|(1<<(FqlParserFilter-39))|(1<<(FqlParserCurrent-39))|(1<<(FqlParserSort-39))|(1<<(FqlParserLimit-39))|(1<<(FqlParserCollect-39))|(1<<(FqlParserSortDirection-39))|(1<<(FqlParserInto-39))|(1<<(FqlParserKeep-39))|(1<<(FqlParserWith-39))|(1<<(FqlParserCount-39))|(1<<(FqlParserAll-39))|(1<<(FqlParserAny-39))|(1<<(FqlParserAggregate-39))|(1<<(FqlParserEvent-39)))) != 0)) {
|
||||
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2297327842217689088) != 0) {
|
||||
p.GetErrorHandler().RecoverInline(p)
|
||||
} else {
|
||||
p.GetErrorHandler().ReportMatch(p)
|
||||
@ -10294,6 +10637,22 @@ type IUnsafeReservedWordContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Return() antlr.TerminalNode
|
||||
None() antlr.TerminalNode
|
||||
Null() antlr.TerminalNode
|
||||
Let() antlr.TerminalNode
|
||||
Use() antlr.TerminalNode
|
||||
Waitfor() antlr.TerminalNode
|
||||
Dispatch() antlr.TerminalNode
|
||||
While() antlr.TerminalNode
|
||||
Do() antlr.TerminalNode
|
||||
In() antlr.TerminalNode
|
||||
Like() antlr.TerminalNode
|
||||
Not() antlr.TerminalNode
|
||||
For() antlr.TerminalNode
|
||||
BooleanLiteral() antlr.TerminalNode
|
||||
|
||||
// IsUnsafeReservedWordContext differentiates from other interfaces.
|
||||
IsUnsafeReservedWordContext()
|
||||
}
|
||||
@ -10440,7 +10799,7 @@ func (p *FqlParser) UnsafeReservedWord() (localctx IUnsafeReservedWordContext) {
|
||||
p.SetState(547)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(((_la-35)&-(0x1f+1)) == 0 && ((1<<uint((_la-35)))&((1<<(FqlParserFor-35))|(1<<(FqlParserReturn-35))|(1<<(FqlParserWaitfor-35))|(1<<(FqlParserDispatch-35))|(1<<(FqlParserLet-35))|(1<<(FqlParserNone-35))|(1<<(FqlParserNull-35))|(1<<(FqlParserBooleanLiteral-35))|(1<<(FqlParserUse-35))|(1<<(FqlParserLike-35))|(1<<(FqlParserNot-35))|(1<<(FqlParserIn-35))|(1<<(FqlParserDo-35))|(1<<(FqlParserWhile-35)))) != 0) {
|
||||
if !((int64((_la-35)) & ^0x3f) == 0 && ((int64(1)<<(_la-35))&2080622607) != 0) {
|
||||
p.GetErrorHandler().RecoverInline(p)
|
||||
} else {
|
||||
p.GetErrorHandler().ReportMatch(p)
|
||||
@ -10470,6 +10829,11 @@ type IRangeOperatorContext interface {
|
||||
// SetRight sets the right rule contexts.
|
||||
SetRight(IRangeOperandContext)
|
||||
|
||||
// Getter signatures
|
||||
Range() antlr.TerminalNode
|
||||
AllRangeOperand() []IRangeOperandContext
|
||||
RangeOperand(i int) IRangeOperandContext
|
||||
|
||||
// IsRangeOperatorContext differentiates from other interfaces.
|
||||
IsRangeOperatorContext()
|
||||
}
|
||||
@ -10639,6 +11003,11 @@ type IRangeOperandContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
IntegerLiteral() IIntegerLiteralContext
|
||||
Variable() IVariableContext
|
||||
Param() IParamContext
|
||||
|
||||
// IsRangeOperandContext differentiates from other interfaces.
|
||||
IsRangeOperandContext()
|
||||
}
|
||||
@ -10846,6 +11215,16 @@ type IExpressionContext interface {
|
||||
// SetOnFalse sets the onFalse rule contexts.
|
||||
SetOnFalse(IExpressionContext)
|
||||
|
||||
// Getter signatures
|
||||
UnaryOperator() IUnaryOperatorContext
|
||||
AllExpression() []IExpressionContext
|
||||
Expression(i int) IExpressionContext
|
||||
Predicate() IPredicateContext
|
||||
LogicalAndOperator() ILogicalAndOperatorContext
|
||||
LogicalOrOperator() ILogicalOrOperatorContext
|
||||
Colon() antlr.TerminalNode
|
||||
QuestionMark() antlr.TerminalNode
|
||||
|
||||
// IsExpressionContext differentiates from other interfaces.
|
||||
IsExpressionContext()
|
||||
}
|
||||
@ -11185,7 +11564,7 @@ func (p *FqlParser) expression(_p int) (localctx IExpressionContext) {
|
||||
p.GetErrorHandler().Sync(p)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if (((_la-9)&-(0x1f+1)) == 0 && ((1<<uint((_la-9)))&((1<<(FqlParserOpenBracket-9))|(1<<(FqlParserOpenParen-9))|(1<<(FqlParserOpenBrace-9))|(1<<(FqlParserPlus-9))|(1<<(FqlParserMinus-9))|(1<<(FqlParserAnd-9))|(1<<(FqlParserOr-9))|(1<<(FqlParserFor-9))|(1<<(FqlParserReturn-9))|(1<<(FqlParserWaitfor-9))|(1<<(FqlParserDispatch-9))|(1<<(FqlParserOptions-9))|(1<<(FqlParserTimeout-9)))) != 0) || (((_la-41)&-(0x1f+1)) == 0 && ((1<<uint((_la-41)))&((1<<(FqlParserDistinct-41))|(1<<(FqlParserFilter-41))|(1<<(FqlParserCurrent-41))|(1<<(FqlParserSort-41))|(1<<(FqlParserLimit-41))|(1<<(FqlParserLet-41))|(1<<(FqlParserCollect-41))|(1<<(FqlParserSortDirection-41))|(1<<(FqlParserNone-41))|(1<<(FqlParserNull-41))|(1<<(FqlParserBooleanLiteral-41))|(1<<(FqlParserUse-41))|(1<<(FqlParserInto-41))|(1<<(FqlParserKeep-41))|(1<<(FqlParserWith-41))|(1<<(FqlParserCount-41))|(1<<(FqlParserAll-41))|(1<<(FqlParserAny-41))|(1<<(FqlParserAggregate-41))|(1<<(FqlParserEvent-41))|(1<<(FqlParserLike-41))|(1<<(FqlParserNot-41))|(1<<(FqlParserIn-41))|(1<<(FqlParserDo-41))|(1<<(FqlParserWhile-41))|(1<<(FqlParserParam-41))|(1<<(FqlParserIdentifier-41))|(1<<(FqlParserStringLiteral-41))|(1<<(FqlParserIntegerLiteral-41))|(1<<(FqlParserFloatLiteral-41))|(1<<(FqlParserNamespaceSegment-41)))) != 0) {
|
||||
if (int64((_la-9)) & ^0x3f) == 0 && ((int64(1)<<(_la-9))&-576460752368861163) != 0 {
|
||||
{
|
||||
p.SetState(575)
|
||||
|
||||
@ -11237,6 +11616,15 @@ type IPredicateContext interface {
|
||||
// SetRight sets the right rule contexts.
|
||||
SetRight(IPredicateContext)
|
||||
|
||||
// Getter signatures
|
||||
ExpressionAtom() IExpressionAtomContext
|
||||
EqualityOperator() IEqualityOperatorContext
|
||||
AllPredicate() []IPredicateContext
|
||||
Predicate(i int) IPredicateContext
|
||||
ArrayOperator() IArrayOperatorContext
|
||||
InOperator() IInOperatorContext
|
||||
LikeOperator() ILikeOperatorContext
|
||||
|
||||
// IsPredicateContext differentiates from other interfaces.
|
||||
IsPredicateContext()
|
||||
}
|
||||
@ -11597,6 +11985,26 @@ type IExpressionAtomContext interface {
|
||||
// SetRight sets the right rule contexts.
|
||||
SetRight(IExpressionAtomContext)
|
||||
|
||||
// Getter signatures
|
||||
FunctionCallExpression() IFunctionCallExpressionContext
|
||||
RangeOperator() IRangeOperatorContext
|
||||
Literal() ILiteralContext
|
||||
Variable() IVariableContext
|
||||
MemberExpression() IMemberExpressionContext
|
||||
Param() IParamContext
|
||||
OpenParen() antlr.TerminalNode
|
||||
CloseParen() antlr.TerminalNode
|
||||
ForExpression() IForExpressionContext
|
||||
WaitForExpression() IWaitForExpressionContext
|
||||
DispatchEventExpression() IDispatchEventExpressionContext
|
||||
Expression() IExpressionContext
|
||||
ErrorOperator() IErrorOperatorContext
|
||||
MultiplicativeOperator() IMultiplicativeOperatorContext
|
||||
AllExpressionAtom() []IExpressionAtomContext
|
||||
ExpressionAtom(i int) IExpressionAtomContext
|
||||
AdditiveOperator() IAdditiveOperatorContext
|
||||
RegexpOperator() IRegexpOperatorContext
|
||||
|
||||
// IsExpressionAtomContext differentiates from other interfaces.
|
||||
IsExpressionAtomContext()
|
||||
}
|
||||
@ -12165,6 +12573,13 @@ type IArrayOperatorContext interface {
|
||||
// SetOperator sets the operator token.
|
||||
SetOperator(antlr.Token)
|
||||
|
||||
// Getter signatures
|
||||
All() antlr.TerminalNode
|
||||
Any() antlr.TerminalNode
|
||||
None() antlr.TerminalNode
|
||||
InOperator() IInOperatorContext
|
||||
EqualityOperator() IEqualityOperatorContext
|
||||
|
||||
// IsArrayOperatorContext differentiates from other interfaces.
|
||||
IsArrayOperatorContext()
|
||||
}
|
||||
@ -12309,7 +12724,7 @@ func (p *FqlParser) ArrayOperator() (localctx IArrayOperatorContext) {
|
||||
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(((_la-49)&-(0x1f+1)) == 0 && ((1<<uint((_la-49)))&((1<<(FqlParserNone-49))|(1<<(FqlParserAll-49))|(1<<(FqlParserAny-49)))) != 0) {
|
||||
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&432908514180988928) != 0) {
|
||||
var _ri = p.GetErrorHandler().RecoverInline(p)
|
||||
|
||||
localctx.(*ArrayOperatorContext).operator = _ri
|
||||
@ -12348,6 +12763,14 @@ type IEqualityOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Gt() antlr.TerminalNode
|
||||
Lt() antlr.TerminalNode
|
||||
Eq() antlr.TerminalNode
|
||||
Gte() antlr.TerminalNode
|
||||
Lte() antlr.TerminalNode
|
||||
Neq() antlr.TerminalNode
|
||||
|
||||
// IsEqualityOperatorContext differentiates from other interfaces.
|
||||
IsEqualityOperatorContext()
|
||||
}
|
||||
@ -12462,7 +12885,7 @@ func (p *FqlParser) EqualityOperator() (localctx IEqualityOperatorContext) {
|
||||
p.SetState(651)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserGt)|(1<<FqlParserLt)|(1<<FqlParserEq)|(1<<FqlParserGte)|(1<<FqlParserLte)|(1<<FqlParserNeq))) != 0) {
|
||||
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&2064384) != 0) {
|
||||
p.GetErrorHandler().RecoverInline(p)
|
||||
} else {
|
||||
p.GetErrorHandler().ReportMatch(p)
|
||||
@ -12480,6 +12903,10 @@ type IInOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
In() antlr.TerminalNode
|
||||
Not() antlr.TerminalNode
|
||||
|
||||
// IsInOperatorContext differentiates from other interfaces.
|
||||
IsInOperatorContext()
|
||||
}
|
||||
@ -12600,6 +13027,10 @@ type ILikeOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Like() antlr.TerminalNode
|
||||
Not() antlr.TerminalNode
|
||||
|
||||
// IsLikeOperatorContext differentiates from other interfaces.
|
||||
IsLikeOperatorContext()
|
||||
}
|
||||
@ -12720,6 +13151,11 @@ type IUnaryOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Not() antlr.TerminalNode
|
||||
Plus() antlr.TerminalNode
|
||||
Minus() antlr.TerminalNode
|
||||
|
||||
// IsUnaryOperatorContext differentiates from other interfaces.
|
||||
IsUnaryOperatorContext()
|
||||
}
|
||||
@ -12822,7 +13258,7 @@ func (p *FqlParser) UnaryOperator() (localctx IUnaryOperatorContext) {
|
||||
p.SetState(663)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(_la == FqlParserPlus || _la == FqlParserMinus || _la == FqlParserNot) {
|
||||
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&4611686018477719552) != 0) {
|
||||
p.GetErrorHandler().RecoverInline(p)
|
||||
} else {
|
||||
p.GetErrorHandler().ReportMatch(p)
|
||||
@ -12840,6 +13276,10 @@ type IRegexpOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
RegexMatch() antlr.TerminalNode
|
||||
RegexNotMatch() antlr.TerminalNode
|
||||
|
||||
// IsRegexpOperatorContext differentiates from other interfaces.
|
||||
IsRegexpOperatorContext()
|
||||
}
|
||||
@ -12956,6 +13396,9 @@ type ILogicalAndOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
And() antlr.TerminalNode
|
||||
|
||||
// IsLogicalAndOperatorContext differentiates from other interfaces.
|
||||
IsLogicalAndOperatorContext()
|
||||
}
|
||||
@ -13060,6 +13503,9 @@ type ILogicalOrOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Or() antlr.TerminalNode
|
||||
|
||||
// IsLogicalOrOperatorContext differentiates from other interfaces.
|
||||
IsLogicalOrOperatorContext()
|
||||
}
|
||||
@ -13164,6 +13610,11 @@ type IMultiplicativeOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Multi() antlr.TerminalNode
|
||||
Div() antlr.TerminalNode
|
||||
Mod() antlr.TerminalNode
|
||||
|
||||
// IsMultiplicativeOperatorContext differentiates from other interfaces.
|
||||
IsMultiplicativeOperatorContext()
|
||||
}
|
||||
@ -13266,7 +13717,7 @@ func (p *FqlParser) MultiplicativeOperator() (localctx IMultiplicativeOperatorCo
|
||||
p.SetState(671)
|
||||
_la = p.GetTokenStream().LA(1)
|
||||
|
||||
if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserMulti)|(1<<FqlParserDiv)|(1<<FqlParserMod))) != 0) {
|
||||
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&14680064) != 0) {
|
||||
p.GetErrorHandler().RecoverInline(p)
|
||||
} else {
|
||||
p.GetErrorHandler().ReportMatch(p)
|
||||
@ -13284,6 +13735,10 @@ type IAdditiveOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Plus() antlr.TerminalNode
|
||||
Minus() antlr.TerminalNode
|
||||
|
||||
// IsAdditiveOperatorContext differentiates from other interfaces.
|
||||
IsAdditiveOperatorContext()
|
||||
}
|
||||
@ -13400,6 +13855,9 @@ type IErrorOperatorContext interface {
|
||||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
QuestionMark() antlr.TerminalNode
|
||||
|
||||
// IsErrorOperatorContext differentiates from other interfaces.
|
||||
IsErrorOperatorContext()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql // FqlParser
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
// BaseFqlParserListener is a complete listener for a parse tree produced by FqlParser.
|
||||
type BaseFqlParserListener struct{}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql // FqlParser
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
type BaseFqlParserVisitor struct {
|
||||
*antlr.BaseParseTreeVisitor
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql // FqlParser
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
// FqlParserListener is a complete listener for a parse tree produced by FqlParser.
|
||||
type FqlParserListener interface {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.10.1. DO NOT EDIT.
|
||||
// Code generated from antlr/FqlParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package fql // FqlParser
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
// A complete Visitor for a parse tree produced by FqlParser.
|
||||
type FqlParserVisitor interface {
|
||||
|
@ -2,8 +2,9 @@
|
||||
package parser
|
||||
|
||||
import (
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/parser/fql"
|
||||
"github.com/antlr/antlr4/runtime/Go/antlr"
|
||||
)
|
||||
|
||||
type Parser struct {
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
|
@ -6,10 +6,11 @@ import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/collections"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestFilter(t *testing.T) {
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
@ -2,11 +2,13 @@ package collections_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/collections"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func arrayIterator(arr *values.Array) collections.Iterator {
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
@ -2,11 +2,13 @@ package collections_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/collections"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func objectIterator(obj *values.Object) collections.Iterator {
|
||||
|
@ -2,6 +2,7 @@ package collections
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user