From 966682546c6f61c43e5174181d1a139c228a405e Mon Sep 17 00:00:00 2001 From: maride Date: Sat, 9 Dec 2023 22:36:19 +0100 Subject: [PATCH] go mod tidy --- cmd/php-parser/main.go | 18 ++-- go.mod | 12 ++- go.sum | 81 +++++++----------- internal/php7/lexer.go | 12 +-- internal/php7/node.go | 6 +- internal/php7/parser.go | 10 +-- internal/php7/parser_test.go | 14 +-- internal/php7/php7.go | Bin 221381 -> 221387 bytes internal/php7/php7_bench_test.go | 6 +- internal/php7/scanner.go | 2 +- internal/php7/scanner_test.go | 10 +-- internal/php8/builder.go | 8 +- internal/php8/lexer.go | 12 +-- internal/php8/node.go | 6 +- internal/php8/parser.go | 10 +-- internal/php8/parser_php8_1_test.go | 2 +- internal/php8/parser_php8_2_test.go | 2 +- internal/php8/parser_php8_test.go | 16 ++-- internal/php8/parser_test.go | 14 +-- internal/php8/php8.go | 4 +- internal/php8/php8_bench_test.go | 6 +- internal/php8/scanner.go | 2 +- internal/php8/scanner_php8_1_test.go | 4 +- internal/php8/scanner_php8_test.go | 10 +-- internal/php8/scanner_test.go | 10 +-- internal/position/newline_test.go | 2 +- internal/position/position.go | 6 +- internal/position/position_test.go | 8 +- internal/tester/lexer_token_freefloating.go | 10 +-- internal/tester/lexer_token_string.go | 8 +- internal/tester/lexer_token_struct.go | 10 +-- internal/tester/parse_print.go | 10 +-- internal/tester/parser.go | 8 +- internal/tester/parser_dump.go | 8 +- internal/tester/parser_error.go | 8 +- pkg/ast/ast.go | 2 +- pkg/ast/node.go | 4 +- pkg/ast/node_funcs.go | 2 +- pkg/ast/node_funcs_gen.go | 4 +- pkg/conf/conf.go | 4 +- pkg/errors/error.go | 2 +- pkg/errors/error_test.go | 4 +- pkg/lexer/lexer.go | 8 +- pkg/parser/doc.go | 10 +-- pkg/parser/parser.go | 10 +-- pkg/token/token.go | 2 +- pkg/version/version_test.go | 2 +- pkg/visitor/dumper/dumper.go | 6 +- pkg/visitor/dumper/dumper_test.go | 8 +- pkg/visitor/formatter/formatter.go | 4 +- pkg/visitor/formatter/formatter_test.go | 8 +- pkg/visitor/nsresolver/namespace_resolver.go | 4 +- .../nsresolver/namespace_resolver_test.go | 6 +- pkg/visitor/null.go | 2 +- pkg/visitor/printer/printer.go | 4 +- pkg/visitor/printer/printer_php7_test.go | 10 +-- pkg/visitor/printer/printer_php8_1_test.go | 2 +- pkg/visitor/printer/printer_php8_test.go | 12 +-- pkg/visitor/printer/printer_test.go | 6 +- pkg/visitor/traverser/traverser.go | 2 +- pkg/visitor/traverser/traverser_gen.go | 4 +- pkg/visitor/traverser/traverser_impl.go | 2 +- pkg/visitor/traverser/traverser_test.go | 6 +- 63 files changed, 242 insertions(+), 253 deletions(-) diff --git a/cmd/php-parser/main.go b/cmd/php-parser/main.go index c5f2756..e9f4c9c 100644 --- a/cmd/php-parser/main.go +++ b/cmd/php-parser/main.go @@ -16,15 +16,15 @@ import ( "github.com/pkg/profile" "github.com/yookoala/realpath" - "github.com/laytan/php-parser/pkg/ast" - "github.com/laytan/php-parser/pkg/conf" - "github.com/laytan/php-parser/pkg/errors" - "github.com/laytan/php-parser/pkg/parser" - "github.com/laytan/php-parser/pkg/version" - "github.com/laytan/php-parser/pkg/visitor/dumper" - "github.com/laytan/php-parser/pkg/visitor/nsresolver" - "github.com/laytan/php-parser/pkg/visitor/printer" - "github.com/laytan/php-parser/pkg/visitor/traverser" + "git.maride.cc/maride/php-parser/pkg/ast" + "git.maride.cc/maride/php-parser/pkg/conf" + "git.maride.cc/maride/php-parser/pkg/errors" + "git.maride.cc/maride/php-parser/pkg/parser" + "git.maride.cc/maride/php-parser/pkg/version" + "git.maride.cc/maride/php-parser/pkg/visitor/dumper" + "git.maride.cc/maride/php-parser/pkg/visitor/nsresolver" + "git.maride.cc/maride/php-parser/pkg/visitor/printer" + "git.maride.cc/maride/php-parser/pkg/visitor/traverser" ) var ( diff --git a/go.mod b/go.mod index 1d5d22c..fce0268 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,18 @@ module git.maride.cc/maride/php-parser -go 1.13 +go 1.21.1 require ( - github.com/pkg/profile v1.4.0 + github.com/pkg/profile v1.7.0 github.com/yookoala/realpath v1.0.0 + golang.org/x/tools v0.16.0 gotest.tools v2.2.0+incompatible ) require ( - github.com/laytan/php-parser v0.10.0 - golang.org/x/tools v0.7.0 + github.com/felixge/fgprof v0.9.3 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/mod v0.14.0 // indirect ) diff --git a/go.sum b/go.sum index 08fab7e..c978924 100644 --- a/go.sum +++ b/go.sum @@ -1,54 +1,39 @@ -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/laytan/php-parser v0.10.0 h1:Vpf4AdrK5uIvBLtEKbh41mnHYzT06e6yu/Kd2mJN2q0= -github.com/laytan/php-parser v0.10.0/go.mod h1:crDMdef5HZkk8JsREDMA6wgTXdip/8mJa4asmjt3ogM= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +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/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= +github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y= +github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= +github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.4.0 h1:uCmaf4vVbWAOZz36k1hrQD7ijGRzLwaME8Am/7a4jZI= -github.com/pkg/profile v1.4.0/go.mod h1:NWz/XGvpEW1FyYQ7fCx4dqYBLlfTcE+A9FLAkNKqjFE= +github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= +github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= +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/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/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/yookoala/realpath v1.0.0 h1:7OA9pj4FZd+oZDsyvXWQvjn5oBdcHRTV44PpdMSuImQ= github.com/yookoala/realpath v1.0.0/go.mod h1:gJJMA9wuX7AcqLy1+ffPatSCySA1FQ2S8Ya9AIoYBpE= -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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -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-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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/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.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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +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= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/internal/php7/lexer.go b/internal/php7/lexer.go index d5be020..7c9ec5f 100644 --- a/internal/php7/lexer.go +++ b/internal/php7/lexer.go @@ -4,12 +4,12 @@ import ( "bytes" "strings" - pos "github.com/laytan/php-parser/internal/position" - "github.com/laytan/php-parser/pkg/conf" - "github.com/laytan/php-parser/pkg/errors" - "github.com/laytan/php-parser/pkg/position" - "github.com/laytan/php-parser/pkg/token" - "github.com/laytan/php-parser/pkg/version" + pos "git.maride.cc/maride/php-parser/internal/position" + "git.maride.cc/maride/php-parser/pkg/conf" + "git.maride.cc/maride/php-parser/pkg/errors" + "git.maride.cc/maride/php-parser/pkg/position" + "git.maride.cc/maride/php-parser/pkg/token" + "git.maride.cc/maride/php-parser/pkg/version" ) type Lexer struct { diff --git a/internal/php7/node.go b/internal/php7/node.go index cc63598..6987e4f 100644 --- a/internal/php7/node.go +++ b/internal/php7/node.go @@ -1,9 +1,9 @@ package php7 import ( - "github.com/laytan/php-parser/pkg/ast" - "github.com/laytan/php-parser/pkg/position" - "github.com/laytan/php-parser/pkg/token" + "git.maride.cc/maride/php-parser/pkg/ast" + "git.maride.cc/maride/php-parser/pkg/position" + "git.maride.cc/maride/php-parser/pkg/token" ) type ParserBrackets struct { diff --git a/internal/php7/parser.go b/internal/php7/parser.go index 8f7a0b4..62eee71 100644 --- a/internal/php7/parser.go +++ b/internal/php7/parser.go @@ -1,11 +1,11 @@ package php7 import ( - "github.com/laytan/php-parser/internal/position" - "github.com/laytan/php-parser/pkg/ast" - "github.com/laytan/php-parser/pkg/conf" - "github.com/laytan/php-parser/pkg/errors" - "github.com/laytan/php-parser/pkg/token" + "git.maride.cc/maride/php-parser/internal/position" + "git.maride.cc/maride/php-parser/pkg/ast" + "git.maride.cc/maride/php-parser/pkg/conf" + "git.maride.cc/maride/php-parser/pkg/errors" + "git.maride.cc/maride/php-parser/pkg/token" ) // Parser structure diff --git a/internal/php7/parser_test.go b/internal/php7/parser_test.go index 1d59455..281c781 100644 --- a/internal/php7/parser_test.go +++ b/internal/php7/parser_test.go @@ -5,13 +5,13 @@ import ( "gotest.tools/assert" - "github.com/laytan/php-parser/internal/php7" - "github.com/laytan/php-parser/pkg/ast" - "github.com/laytan/php-parser/pkg/conf" - "github.com/laytan/php-parser/pkg/errors" - "github.com/laytan/php-parser/pkg/position" - "github.com/laytan/php-parser/pkg/token" - "github.com/laytan/php-parser/pkg/version" + "git.maride.cc/maride/php-parser/internal/php7" + "git.maride.cc/maride/php-parser/pkg/ast" + "git.maride.cc/maride/php-parser/pkg/conf" + "git.maride.cc/maride/php-parser/pkg/errors" + "git.maride.cc/maride/php-parser/pkg/position" + "git.maride.cc/maride/php-parser/pkg/token" + "git.maride.cc/maride/php-parser/pkg/version" ) func TestMain(m *testing.M) { diff --git a/internal/php7/php7.go b/internal/php7/php7.go index dc62a974319281a1a2550cb8cabe3d561fa75037..1e19de7d89620d71b3be88b6519f9bf9078ad2b3 100644 GIT binary patch delta 86 zcmX?lkoWXK-U&Bt^l}r6GE-9Zl9TlzEd7Fv0^NedqT