Update module github.com/alecthomas/participle/v2 to v2.0.0-alpha8

This commit is contained in:
Peter 2022-04-11 11:40:50 +00:00
parent 90857b50cc
commit 9052ce50c4
3 changed files with 16 additions and 17 deletions

2
go.mod
View file

@ -3,7 +3,7 @@ module gitlab.com/inetmock/inetmock
go 1.17 go 1.17
require ( require (
github.com/alecthomas/participle/v2 v2.0.0-alpha7 github.com/alecthomas/participle/v2 v2.0.0-alpha8
github.com/bwmarrin/snowflake v0.3.0 github.com/bwmarrin/snowflake v0.3.0
github.com/dgraph-io/badger/v3 v3.2103.2 github.com/dgraph-io/badger/v3 v3.2103.2
github.com/docker/go-connections v0.4.0 github.com/docker/go-connections v0.4.0

4
go.sum
View file

@ -73,8 +73,8 @@ github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/participle/v2 v2.0.0-alpha8 h1:X6nuChfgfQXNTE+ZdjTFSfnSNr8E07LSVLAqIIjtsGI=
github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= github.com/alecthomas/participle/v2 v2.0.0-alpha8/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA=
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E=
github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=

View file

@ -16,21 +16,20 @@ var (
parsers map[reflect.Type]*participle.Parser parsers map[reflect.Type]*participle.Parser
) )
// nolint:lll
func init() { func init() {
ruleLexer := lexer.Must(lexer.NewSimple([]lexer.Rule{ ruleLexer := lexer.Must(lexer.NewSimple([]lexer.SimpleRule{
{Name: "Comment", Pattern: `(?:#|//)[^\n]*\n?`, Action: nil}, {Name: "Comment", Pattern: `(?:#|//)[^\n]*\n?`},
{Name: `Module`, Pattern: `[a-z]{1}[A-z0-9]+`, Action: nil}, {Name: `Module`, Pattern: `[a-z]{1}[A-z0-9]+`},
{Name: `Ident`, Pattern: `[A-Z][a-zA-Z0-9_]*`, Action: nil}, {Name: `Ident`, Pattern: `[A-Z][a-zA-Z0-9_]*`},
{Name: `CIDR`, Pattern: `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/(3[0-2]|[1-2][0-9]|[1-9])`, Action: nil}, {Name: `CIDR`, Pattern: `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/(3[0-2]|[1-2][0-9]|[1-9])`},
{Name: `IP`, Pattern: `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}`, Action: nil}, {Name: `IP`, Pattern: `(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}`},
{Name: `Float`, Pattern: `\d+\.\d+`, Action: nil}, {Name: `Float`, Pattern: `\d+\.\d+`},
{Name: `Int`, Pattern: `[-]?\d+`, Action: nil}, {Name: `Int`, Pattern: `[-]?\d+`},
{Name: `RawString`, Pattern: "`[^`]*`", Action: nil}, {Name: `RawString`, Pattern: "`[^`]*`"},
{Name: `String`, Pattern: `'[^']*'|"[^"]*"`, Action: nil}, {Name: `String`, Pattern: `'[^']*'|"[^"]*"`},
{Name: `Arrows`, Pattern: `(->|=>)`, Action: nil}, {Name: `Arrows`, Pattern: `(->|=>)`},
{Name: "whitespace", Pattern: `\s+`, Action: nil}, {Name: "whitespace", Pattern: `\s+`},
{Name: "Punct", Pattern: `[-[!@#$%^&*()+_={}\|:;\."'<,>?/]|]`, Action: nil}, {Name: "Punct", Pattern: `[-[!@#$%^&*()+_={}\|:;\."'<,>?/]|]`},
})) }))
parsers = map[reflect.Type]*participle.Parser{ parsers = map[reflect.Type]*participle.Parser{