diff --git a/README.md b/README.md index ee040f5..b96aa66 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -> This is a fork of the [z7zmey](https://github.com/z7zmey) [parser](https://github.com/z7zmey/php-parser) that adds PHP 8 support. +> This is a fork of the [z7zmey](https://github.com/z7zmey) [parser](https://github.com/VKCOM/php-parser) that adds PHP 8 support. PHP Parser written in Go ======================== PHP Parser written in Go -[![GoDoc](https://godoc.org/github.com/z7zmey/php-parser?status.svg)](https://godoc.org/github.com/z7zmey/php-parser) +[![GoDoc](https://godoc.org/github.com/VKCOM/php-parser?status.svg)](https://godoc.org/github.com/VKCOM/php-parser) [![Build Status](https://travis-ci.org/z7zmey/php-parser.svg?branch=master)](https://travis-ci.org/z7zmey/php-parser) -[![Go Report Card](https://goreportcard.com/badge/github.com/z7zmey/php-parser)](https://goreportcard.com/report/github.com/z7zmey/php-parser) +[![Go Report Card](https://goreportcard.com/badge/github.com/VKCOM/php-parser)](https://goreportcard.com/report/github.com/VKCOM/php-parser) This project uses [goyacc](https://godoc.org/golang.org/x/tools/cmd/goyacc) and [ragel](https://www.colm.net/open-source/ragel/) tools to create PHP parser. It parses source code into [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree). It can be used to write static analysis, refactoring, metrics, code style formatting tools. @@ -38,11 +38,11 @@ import ( "log" "os" - "github.com/z7zmey/php-parser/pkg/cfg" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/dumper" + "github.com/VKCOM/php-parser/pkg/cfg" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/dumper" ) func main() { @@ -80,7 +80,7 @@ Install ------- ``` -go get github.com/z7zmey/php-parser/cmd/php-parser +go get github.com/VKCOM/php-parser/cmd/php-parser ``` CLI diff --git a/cmd/php-parser/main.go b/cmd/php-parser/main.go index f1f4224..5bfd945 100644 --- a/cmd/php-parser/main.go +++ b/cmd/php-parser/main.go @@ -17,15 +17,15 @@ import ( "github.com/pkg/profile" "github.com/yookoala/realpath" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/dumper" - "github.com/z7zmey/php-parser/pkg/visitor/nsresolver" - "github.com/z7zmey/php-parser/pkg/visitor/printer" - "github.com/z7zmey/php-parser/pkg/visitor/traverser" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/dumper" + "github.com/VKCOM/php-parser/pkg/visitor/nsresolver" + "github.com/VKCOM/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/pkg/visitor/traverser" ) var wg sync.WaitGroup diff --git a/go.mod b/go.mod index 79bd6f0..feda770 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/z7zmey/php-parser +module github.com/VKCOM/php-parser go 1.13 diff --git a/internal/php5/node.go b/internal/php5/node.go index 6a612ac..e0963fa 100644 --- a/internal/php5/node.go +++ b/internal/php5/node.go @@ -1,9 +1,9 @@ package php5 import ( - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) type ParserBrackets struct { diff --git a/internal/php5/parser.go b/internal/php5/parser.go index 318d873..8fd6578 100644 --- a/internal/php5/parser.go +++ b/internal/php5/parser.go @@ -1,12 +1,12 @@ package php5 import ( - "github.com/z7zmey/php-parser/internal/position" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/internal/position" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/token" ) // Parser structure diff --git a/internal/php5/parser_test.go b/internal/php5/parser_test.go index b25c2ec..dbab6a2 100644 --- a/internal/php5/parser_test.go +++ b/internal/php5/parser_test.go @@ -5,14 +5,14 @@ import ( "gotest.tools/assert" - "github.com/z7zmey/php-parser/internal/php5" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php5" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) func TestIdentifier(t *testing.T) { diff --git a/internal/php5/php5.go b/internal/php5/php5.go index b793bd6..8eaea63 100644 Binary files a/internal/php5/php5.go and b/internal/php5/php5.go differ diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 782337f..980f50a 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -4,9 +4,9 @@ package php5 import ( "strconv" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/token" ) %} diff --git a/internal/php5/php5_bench_test.go b/internal/php5/php5_bench_test.go index 0092415..42b6917 100644 --- a/internal/php5/php5_bench_test.go +++ b/internal/php5/php5_bench_test.go @@ -4,10 +4,10 @@ import ( "io/ioutil" "testing" - "github.com/z7zmey/php-parser/internal/php5" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php5" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" ) func BenchmarkPhp5(b *testing.B) { diff --git a/internal/php7/node.go b/internal/php7/node.go index dfb0236..4870266 100644 --- a/internal/php7/node.go +++ b/internal/php7/node.go @@ -1,9 +1,9 @@ package php7 import ( - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) type ParserBrackets struct { diff --git a/internal/php7/parser.go b/internal/php7/parser.go index 88e283f..f0c3e50 100644 --- a/internal/php7/parser.go +++ b/internal/php7/parser.go @@ -1,12 +1,12 @@ package php7 import ( - "github.com/z7zmey/php-parser/internal/position" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/internal/position" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/token" ) // Parser structure diff --git a/internal/php7/parser_test.go b/internal/php7/parser_test.go index a49aa4f..0124e9e 100644 --- a/internal/php7/parser_test.go +++ b/internal/php7/parser_test.go @@ -5,14 +5,14 @@ import ( "gotest.tools/assert" - "github.com/z7zmey/php-parser/internal/php7" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php7" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) func TestIdentifier(t *testing.T) { diff --git a/internal/php7/php7.go b/internal/php7/php7.go index 499cb1e..6665eb7 100644 Binary files a/internal/php7/php7.go and b/internal/php7/php7.go differ diff --git a/internal/php7/php7.y b/internal/php7/php7.y index 389d96b..68aebca 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -4,8 +4,8 @@ package php7 import ( "strconv" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/token" ) %} diff --git a/internal/php7/php7_bench_test.go b/internal/php7/php7_bench_test.go index 973265d..a22a6ab 100644 --- a/internal/php7/php7_bench_test.go +++ b/internal/php7/php7_bench_test.go @@ -4,10 +4,10 @@ import ( "io/ioutil" "testing" - "github.com/z7zmey/php-parser/internal/php7" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php7" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" ) func BenchmarkPhp7(b *testing.B) { diff --git a/internal/php8/builder.go b/internal/php8/builder.go index 6b855c3..6ad3786 100644 --- a/internal/php8/builder.go +++ b/internal/php8/builder.go @@ -3,10 +3,10 @@ package php8 import ( "bytes" - "github.com/z7zmey/php-parser/internal/position" - "github.com/z7zmey/php-parser/pkg/ast" - position2 "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/internal/position" + "github.com/VKCOM/php-parser/pkg/ast" + position2 "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) // Builder is responsible for creating nodes inside grammar rules. diff --git a/internal/php8/lexer.go b/internal/php8/lexer.go index f8a8b16..065cef9 100644 --- a/internal/php8/lexer.go +++ b/internal/php8/lexer.go @@ -4,11 +4,11 @@ import ( "bytes" "strings" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) type Lexer struct { diff --git a/internal/php8/node.go b/internal/php8/node.go index bc4b44c..31dedc5 100644 --- a/internal/php8/node.go +++ b/internal/php8/node.go @@ -1,9 +1,9 @@ package php8 import ( - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) type ParserBrackets struct { diff --git a/internal/php8/parser.go b/internal/php8/parser.go index 4ff6d8d..d7e445a 100644 --- a/internal/php8/parser.go +++ b/internal/php8/parser.go @@ -1,11 +1,11 @@ package php8 import ( - "github.com/z7zmey/php-parser/internal/position" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/internal/position" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/token" ) // Parser structure diff --git a/internal/php8/parser_php8_test.go b/internal/php8/parser_php8_test.go index ee6d1ce..80216a4 100644 --- a/internal/php8/parser_php8_test.go +++ b/internal/php8/parser_php8_test.go @@ -3,14 +3,14 @@ package php8_test import ( "testing" - "github.com/z7zmey/php-parser/internal/tester" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/tester" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/internal/php8/parser_test.go b/internal/php8/parser_test.go index a4a50c7..0dda678 100644 --- a/internal/php8/parser_test.go +++ b/internal/php8/parser_test.go @@ -3,15 +3,15 @@ package php8_test import ( "testing" - "github.com/z7zmey/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/php8" "gotest.tools/assert" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) func TestIdentifier(t *testing.T) { diff --git a/internal/php8/php8.go b/internal/php8/php8.go index 80d3199..e1faad2 100644 --- a/internal/php8/php8.go +++ b/internal/php8/php8.go @@ -11,8 +11,8 @@ import __yyfmt__ "fmt" import ( "strconv" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/token" ) // line internal/php8/php8.y:13 diff --git a/internal/php8/php8.y b/internal/php8/php8.y index 1fe8784..df3f43d 100644 --- a/internal/php8/php8.y +++ b/internal/php8/php8.y @@ -4,8 +4,8 @@ package php8 import ( "strconv" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/token" ) %} diff --git a/internal/php8/php8_bench_test.go b/internal/php8/php8_bench_test.go index 5a8eee7..caf2ca8 100644 --- a/internal/php8/php8_bench_test.go +++ b/internal/php8/php8_bench_test.go @@ -4,9 +4,9 @@ import ( "io/ioutil" "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" ) func BenchmarkPhp8(b *testing.B) { diff --git a/internal/php8/scanner.go b/internal/php8/scanner.go index 58642a4..698c02b 100644 --- a/internal/php8/scanner.go +++ b/internal/php8/scanner.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/token" ) // line internal/php8/scanner.go:15 diff --git a/internal/php8/scanner.rl b/internal/php8/scanner.rl index 8fc88ce..197eaca 100644 --- a/internal/php8/scanner.rl +++ b/internal/php8/scanner.rl @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/token" ) %%{ diff --git a/internal/php8/scanner_php8_test.go b/internal/php8/scanner_php8_test.go index 2a4f0d8..5b62db4 100644 --- a/internal/php8/scanner_php8_test.go +++ b/internal/php8/scanner_php8_test.go @@ -3,10 +3,10 @@ package php8_test import ( "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/tester" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/tester" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/token" "gotest.tools/assert" ) diff --git a/internal/php8/scanner_test.go b/internal/php8/scanner_test.go index 70add3c..16603cb 100644 --- a/internal/php8/scanner_test.go +++ b/internal/php8/scanner_test.go @@ -5,11 +5,11 @@ import ( "gotest.tools/assert" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) func TestTokens(t *testing.T) { diff --git a/internal/position/position.go b/internal/position/position.go index e6be89a..052428c 100644 --- a/internal/position/position.go +++ b/internal/position/position.go @@ -1,9 +1,9 @@ package position import ( - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) type startPos struct { diff --git a/internal/position/position_test.go b/internal/position/position_test.go index 4609179..e378bec 100644 --- a/internal/position/position_test.go +++ b/internal/position/position_test.go @@ -4,10 +4,10 @@ import ( "gotest.tools/assert" "testing" - builder "github.com/z7zmey/php-parser/internal/position" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + builder "github.com/VKCOM/php-parser/internal/position" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) func TestNewTokenPosition(t *testing.T) { diff --git a/internal/scanner/lexer.go b/internal/scanner/lexer.go index 163bdc3..17a0f4f 100644 --- a/internal/scanner/lexer.go +++ b/internal/scanner/lexer.go @@ -4,11 +4,11 @@ import ( "bytes" "strings" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) type Lexer struct { diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index 7fd94d1..f11a2b1 100644 Binary files a/internal/scanner/scanner.go and b/internal/scanner/scanner.go differ diff --git a/internal/scanner/scanner.rl b/internal/scanner/scanner.rl index 812c742..86232bc 100644 --- a/internal/scanner/scanner.rl +++ b/internal/scanner/scanner.rl @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/token" ) %%{ diff --git a/internal/scanner/scanner_test.go b/internal/scanner/scanner_test.go index c082854..2bdfa94 100644 --- a/internal/scanner/scanner_test.go +++ b/internal/scanner/scanner_test.go @@ -4,11 +4,11 @@ import ( "gotest.tools/assert" "testing" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" ) func TestTokens(t *testing.T) { diff --git a/internal/tester/lexer_token_freefloating.go b/internal/tester/lexer_token_freefloating.go index 7f0097c..6dabcdc 100644 --- a/internal/tester/lexer_token_freefloating.go +++ b/internal/tester/lexer_token_freefloating.go @@ -3,11 +3,11 @@ package tester import ( "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/internal/tester/lexer_token_string.go b/internal/tester/lexer_token_string.go index 8a403fa..a41c154 100644 --- a/internal/tester/lexer_token_string.go +++ b/internal/tester/lexer_token_string.go @@ -3,10 +3,10 @@ package tester import ( "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/internal/tester/lexer_token_struct.go b/internal/tester/lexer_token_struct.go index 423fcac..453864f 100644 --- a/internal/tester/lexer_token_struct.go +++ b/internal/tester/lexer_token_struct.go @@ -3,11 +3,11 @@ package tester import ( "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/internal/tester/parse_print.go b/internal/tester/parse_print.go index 5659de1..09a918e 100644 --- a/internal/tester/parse_print.go +++ b/internal/tester/parse_print.go @@ -4,11 +4,11 @@ import ( "bytes" "testing" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/printer" "gotest.tools/assert" ) diff --git a/internal/tester/parser.go b/internal/tester/parser.go index f536574..77e76e2 100644 --- a/internal/tester/parser.go +++ b/internal/tester/parser.go @@ -3,10 +3,10 @@ package tester import ( "testing" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/internal/tester/parser_dump.go b/internal/tester/parser_dump.go index fdda399..55825e2 100644 --- a/internal/tester/parser_dump.go +++ b/internal/tester/parser_dump.go @@ -4,10 +4,10 @@ import ( "bytes" "testing" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/dumper" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/dumper" "gotest.tools/assert" ) diff --git a/internal/tester/parser_error.go b/internal/tester/parser_error.go index b6a02c4..6707ea3 100644 --- a/internal/tester/parser_error.go +++ b/internal/tester/parser_error.go @@ -3,10 +3,10 @@ package tester import ( "testing" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" "gotest.tools/assert" ) diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index c07a189..1f6e21a 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -1,6 +1,6 @@ package ast -import "github.com/z7zmey/php-parser/pkg/position" +import "github.com/VKCOM/php-parser/pkg/position" type Vertex interface { Accept(v Visitor) diff --git a/pkg/ast/node.go b/pkg/ast/node.go index 5c285b3..d6f49cb 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -1,8 +1,8 @@ package ast import ( - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" ) // Root node diff --git a/pkg/conf/conf.go b/pkg/conf/conf.go index b6744ca..f086d00 100644 --- a/pkg/conf/conf.go +++ b/pkg/conf/conf.go @@ -1,8 +1,8 @@ package conf import ( - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/version" ) type Config struct { diff --git a/pkg/errors/error.go b/pkg/errors/error.go index 623dc07..49d3f72 100644 --- a/pkg/errors/error.go +++ b/pkg/errors/error.go @@ -3,7 +3,7 @@ package errors import ( "fmt" - "github.com/z7zmey/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/position" ) // Error parsing error diff --git a/pkg/errors/error_test.go b/pkg/errors/error_test.go index 3fcac4c..8179396 100644 --- a/pkg/errors/error_test.go +++ b/pkg/errors/error_test.go @@ -5,8 +5,8 @@ import ( "gotest.tools/assert" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/position" ) func TestConstructor(t *testing.T) { diff --git a/pkg/parser/doc.go b/pkg/parser/doc.go index ea157e3..2047c66 100644 --- a/pkg/parser/doc.go +++ b/pkg/parser/doc.go @@ -10,11 +10,11 @@ Package usage example: "log" "os" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/errors" - "github.com/z7zmey/php-parser/pkg/parser" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/dumper" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/errors" + "github.com/VKCOM/php-parser/pkg/parser" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/dumper" ) func main() { diff --git a/pkg/parser/parser.go b/pkg/parser/parser.go index 04a3378..0000eab 100644 --- a/pkg/parser/parser.go +++ b/pkg/parser/parser.go @@ -3,13 +3,13 @@ package parser import ( "errors" - "github.com/z7zmey/php-parser/internal/php5" - "github.com/z7zmey/php-parser/internal/php7" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/internal/php5" + "github.com/VKCOM/php-parser/internal/php7" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" ) var ( diff --git a/pkg/token/token.go b/pkg/token/token.go index 08f322f..fd2cd3a 100644 --- a/pkg/token/token.go +++ b/pkg/token/token.go @@ -1,6 +1,6 @@ package token -import "github.com/z7zmey/php-parser/pkg/position" +import "github.com/VKCOM/php-parser/pkg/position" //go:generate stringer -type=ID -output ./token_string.go type ID int diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index c66ea06..de2b43a 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -5,7 +5,7 @@ import ( "gotest.tools/assert" - "github.com/z7zmey/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/version" ) func Test(t *testing.T) { diff --git a/pkg/visitor/dumper/dumper.go b/pkg/visitor/dumper/dumper.go index 74469d1..df56da0 100644 --- a/pkg/visitor/dumper/dumper.go +++ b/pkg/visitor/dumper/dumper.go @@ -5,10 +5,10 @@ import ( "strconv" "strings" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) type Dumper struct { diff --git a/pkg/visitor/dumper/dumper_test.go b/pkg/visitor/dumper/dumper_test.go index 2a9ec04..df28339 100644 --- a/pkg/visitor/dumper/dumper_test.go +++ b/pkg/visitor/dumper/dumper_test.go @@ -2,12 +2,12 @@ package dumper_test import ( "bytes" - "github.com/z7zmey/php-parser/pkg/position" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/visitor/dumper" + "github.com/VKCOM/php-parser/pkg/position" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/visitor/dumper" "testing" - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) func TestDumper_root(t *testing.T) { diff --git a/pkg/visitor/formatter/formatter.go b/pkg/visitor/formatter/formatter.go index 1a8b003..0f6d887 100644 --- a/pkg/visitor/formatter/formatter.go +++ b/pkg/visitor/formatter/formatter.go @@ -3,8 +3,8 @@ package formatter import ( "bytes" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/token" ) type formatterState int diff --git a/pkg/visitor/formatter/formatter_test.go b/pkg/visitor/formatter/formatter_test.go index b78ad38..dc825f4 100644 --- a/pkg/visitor/formatter/formatter_test.go +++ b/pkg/visitor/formatter/formatter_test.go @@ -2,12 +2,12 @@ package formatter_test import ( "bytes" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/visitor/formatter" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/visitor/formatter" + "github.com/VKCOM/php-parser/pkg/visitor/printer" "testing" - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) func TestFormatter_Root(t *testing.T) { diff --git a/pkg/visitor/nsresolver/namespace_resolver.go b/pkg/visitor/nsresolver/namespace_resolver.go index 86ef054..c83298f 100644 --- a/pkg/visitor/nsresolver/namespace_resolver.go +++ b/pkg/visitor/nsresolver/namespace_resolver.go @@ -5,8 +5,8 @@ import ( "errors" "strings" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/visitor" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/visitor" ) // NamespaceResolver visitor diff --git a/pkg/visitor/nsresolver/namespace_resolver_test.go b/pkg/visitor/nsresolver/namespace_resolver_test.go index 324ba0d..b4c26a2 100644 --- a/pkg/visitor/nsresolver/namespace_resolver_test.go +++ b/pkg/visitor/nsresolver/namespace_resolver_test.go @@ -1,13 +1,13 @@ package nsresolver_test import ( - "github.com/z7zmey/php-parser/pkg/visitor/nsresolver" - "github.com/z7zmey/php-parser/pkg/visitor/traverser" + "github.com/VKCOM/php-parser/pkg/visitor/nsresolver" + "github.com/VKCOM/php-parser/pkg/visitor/traverser" "testing" "gotest.tools/assert" - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) func TestResolveStaticCall(t *testing.T) { diff --git a/pkg/visitor/null.go b/pkg/visitor/null.go index 238af60..010092c 100644 --- a/pkg/visitor/null.go +++ b/pkg/visitor/null.go @@ -1,7 +1,7 @@ package visitor import ( - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) type Null struct { diff --git a/pkg/visitor/printer/printer.go b/pkg/visitor/printer/printer.go index a288028..3f4ad5b 100644 --- a/pkg/visitor/printer/printer.go +++ b/pkg/visitor/printer/printer.go @@ -4,8 +4,8 @@ import ( "bytes" "io" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/token" ) type printerState int diff --git a/pkg/visitor/printer/printer_php5_test.go b/pkg/visitor/printer/printer_php5_test.go index 5889d8d..7fffe23 100644 --- a/pkg/visitor/printer/printer_php5_test.go +++ b/pkg/visitor/printer/printer_php5_test.go @@ -4,12 +4,12 @@ import ( "bytes" "testing" - "github.com/z7zmey/php-parser/internal/php5" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/internal/php5" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/printer" ) func parsePhp5(src string) ast.Vertex { diff --git a/pkg/visitor/printer/printer_php7_test.go b/pkg/visitor/printer/printer_php7_test.go index ab03d75..03b97ac 100644 --- a/pkg/visitor/printer/printer_php7_test.go +++ b/pkg/visitor/printer/printer_php7_test.go @@ -5,12 +5,12 @@ import ( "os" "testing" - "github.com/z7zmey/php-parser/internal/php7" - "github.com/z7zmey/php-parser/internal/scanner" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/internal/php7" + "github.com/VKCOM/php-parser/internal/scanner" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/printer" ) func ExamplePrinter() { diff --git a/pkg/visitor/printer/printer_php8_test.go b/pkg/visitor/printer/printer_php8_test.go index d4edbc7..04eed71 100644 --- a/pkg/visitor/printer/printer_php8_test.go +++ b/pkg/visitor/printer/printer_php8_test.go @@ -5,12 +5,12 @@ import ( "os" "testing" - "github.com/z7zmey/php-parser/internal/php8" - "github.com/z7zmey/php-parser/internal/tester" - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/conf" - "github.com/z7zmey/php-parser/pkg/version" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/internal/php8" + "github.com/VKCOM/php-parser/internal/tester" + "github.com/VKCOM/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/conf" + "github.com/VKCOM/php-parser/pkg/version" + "github.com/VKCOM/php-parser/pkg/visitor/printer" "gotest.tools/assert" ) diff --git a/pkg/visitor/printer/printer_test.go b/pkg/visitor/printer/printer_test.go index 83a1adf..677c530 100644 --- a/pkg/visitor/printer/printer_test.go +++ b/pkg/visitor/printer/printer_test.go @@ -2,11 +2,11 @@ package printer_test import ( "bytes" - "github.com/z7zmey/php-parser/pkg/token" - "github.com/z7zmey/php-parser/pkg/visitor/printer" + "github.com/VKCOM/php-parser/pkg/token" + "github.com/VKCOM/php-parser/pkg/visitor/printer" "testing" - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) func TestPrinterPrintFile(t *testing.T) { diff --git a/pkg/visitor/traverser/traverser.go b/pkg/visitor/traverser/traverser.go index 276dd0a..442ebf0 100644 --- a/pkg/visitor/traverser/traverser.go +++ b/pkg/visitor/traverser/traverser.go @@ -1,7 +1,7 @@ package traverser import ( - "github.com/z7zmey/php-parser/pkg/ast" + "github.com/VKCOM/php-parser/pkg/ast" ) type Traverser struct {