build: replace VKCOM import with laytan import
This commit is contained in:
parent
92d341cbb5
commit
68ac672368
@ -16,15 +16,15 @@ import (
|
||||
"github.com/pkg/profile"
|
||||
"github.com/yookoala/realpath"
|
||||
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
var (
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/VKCOM/php-parser
|
||||
module github.com/laytan/php-parser
|
||||
|
||||
go 1.13
|
||||
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"bytes"
|
||||
"strings"
|
||||
|
||||
pos "github.com/VKCOM/php-parser/internal/position"
|
||||
"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"
|
||||
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"
|
||||
)
|
||||
|
||||
type Lexer struct {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package php7
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
type ParserBrackets struct {
|
||||
|
@ -1,11 +1,11 @@
|
||||
package php7
|
||||
|
||||
import (
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
// Parser structure
|
||||
|
@ -5,13 +5,13 @@ import (
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
BIN
internal/php7/php7.go
generated
BIN
internal/php7/php7.go
generated
Binary file not shown.
@ -5,9 +5,9 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php7"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
)
|
||||
|
||||
func BenchmarkPhp7(b *testing.B) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
// line internal/php7/scanner.go:15
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"gotest.tools/assert"
|
||||
"testing"
|
||||
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
func TestTokens(t *testing.T) {
|
||||
|
@ -3,10 +3,10 @@ package php8
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"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"
|
||||
"github.com/laytan/php-parser/internal/position"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
position2 "github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
// Builder is responsible for creating nodes inside grammar rules.
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"bytes"
|
||||
"strings"
|
||||
|
||||
pos "github.com/VKCOM/php-parser/internal/position"
|
||||
"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"
|
||||
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"
|
||||
)
|
||||
|
||||
type Lexer struct {
|
||||
|
@ -1,9 +1,9 @@
|
||||
package php8
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
type ParserBrackets struct {
|
||||
|
@ -1,11 +1,11 @@
|
||||
package php8
|
||||
|
||||
import (
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
// Parser structure
|
||||
|
@ -3,7 +3,7 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
)
|
||||
|
||||
func TestReadonlyModifier(t *testing.T) {
|
||||
|
@ -3,7 +3,7 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
)
|
||||
|
||||
func TestClassReadonlyModifier(t *testing.T) {
|
||||
|
@ -3,14 +3,14 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"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"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
"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/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -3,15 +3,15 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"gotest.tools/assert"
|
||||
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
@ -10,8 +10,8 @@ import __yyfmt__ "fmt"
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
// line internal/php8/php8.y:13
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
)
|
||||
|
||||
func BenchmarkPhp8(b *testing.B) {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
// line internal/php8/scanner.go:15
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ragel_subtype=go
|
||||
package php8
|
||||
|
||||
import (
|
||||
|
@ -3,8 +3,8 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/tester"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
func TestReadonlyTokens(t *testing.T) {
|
||||
|
@ -3,11 +3,11 @@ package php8_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"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/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
"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"
|
||||
"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"
|
||||
)
|
||||
|
||||
func TestTokens(t *testing.T) {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/position"
|
||||
"github.com/laytan/php-parser/internal/position"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package position
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
type startPos struct {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
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"
|
||||
builder "github.com/laytan/php-parser/internal/position"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
func TestNewTokenPosition(t *testing.T) {
|
||||
|
@ -3,11 +3,11 @@ package tester
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php7"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -3,10 +3,10 @@ package tester
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php7"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -3,11 +3,11 @@ package tester
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php7"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"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"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/parser"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/pkg/visitor/printer"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -3,10 +3,10 @@ package tester
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"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/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/parser"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -4,10 +4,10 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"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"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/parser"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/pkg/visitor/dumper"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -3,10 +3,10 @@ package tester
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"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/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"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package ast
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/position"
|
||||
import "github.com/laytan/php-parser/pkg/position"
|
||||
|
||||
// The edge-case/overwrites, from node type name to their visitor function name.
|
||||
var TypeToVisitorNameMap = map[string]string{
|
||||
|
@ -1,8 +1,8 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
//go:generate go run node_funcs_gen.go
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package ast
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/position"
|
||||
import "github.com/laytan/php-parser/pkg/position"
|
||||
|
||||
type Type int
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"regexp"
|
||||
"text/template"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
type templData struct {
|
||||
@ -27,7 +27,7 @@ var fileTempl = template.Must(
|
||||
|
||||
package ast
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/position"
|
||||
import "github.com/laytan/php-parser/pkg/position"
|
||||
|
||||
type Type int
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/errors"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/pkg/errors"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
|
@ -3,7 +3,7 @@ package errors
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
)
|
||||
|
||||
// Error parsing error
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/errors"
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/errors"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
)
|
||||
|
||||
func TestConstructor(t *testing.T) {
|
||||
|
@ -9,11 +9,11 @@ Package usage example:
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"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/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"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -3,11 +3,11 @@ package parser
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"github.com/VKCOM/php-parser/internal/php8"
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/conf"
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/internal/php7"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -1,6 +1,6 @@
|
||||
package token
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/position"
|
||||
import "github.com/laytan/php-parser/pkg/position"
|
||||
|
||||
//go:generate stringer -type=ID -output ./token_string.go
|
||||
type ID int
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
type Dumper struct {
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/position"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/dumper"
|
||||
"github.com/laytan/php-parser/pkg/position"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/visitor/dumper"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
func TestDumper_root(t *testing.T) {
|
||||
|
@ -3,8 +3,8 @@ package formatter
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
type formatterState int
|
||||
|
@ -2,12 +2,12 @@ package formatter_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/formatter"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/printer"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/visitor/formatter"
|
||||
"github.com/laytan/php-parser/pkg/visitor/printer"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
func TestFormatter_Root(t *testing.T) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/visitor"
|
||||
)
|
||||
|
||||
// NamespaceResolver visitor
|
||||
|
@ -1,13 +1,13 @@
|
||||
package nsresolver_test
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/nsresolver"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/traverser"
|
||||
"github.com/laytan/php-parser/pkg/visitor/nsresolver"
|
||||
"github.com/laytan/php-parser/pkg/visitor/traverser"
|
||||
"testing"
|
||||
|
||||
"gotest.tools/assert"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
func TestResolveStaticCall(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package visitor
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
type Null struct{}
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
)
|
||||
|
||||
type printerState int
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/php7"
|
||||
"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"
|
||||
"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/version"
|
||||
"github.com/laytan/php-parser/pkg/visitor/printer"
|
||||
)
|
||||
|
||||
func ExamplePrinter() {
|
||||
|
@ -3,7 +3,7 @@ package printer_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
)
|
||||
|
||||
func TestParseAndPrintReadonlyModifierPHP81(t *testing.T) {
|
||||
|
@ -5,12 +5,12 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"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"
|
||||
"github.com/laytan/php-parser/internal/php8"
|
||||
"github.com/laytan/php-parser/internal/tester"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/conf"
|
||||
"github.com/laytan/php-parser/pkg/version"
|
||||
"github.com/laytan/php-parser/pkg/visitor/printer"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
|
@ -2,11 +2,11 @@ package printer_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/VKCOM/php-parser/pkg/token"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/printer"
|
||||
"github.com/laytan/php-parser/pkg/token"
|
||||
"github.com/laytan/php-parser/pkg/visitor/printer"
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
func TestPrinterPrintFile(t *testing.T) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package traverser
|
||||
|
||||
import (
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
)
|
||||
|
||||
//go:generate go run traverser_gen.go
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"text/template"
|
||||
|
||||
phpast "github.com/VKCOM/php-parser/pkg/ast"
|
||||
phpast "github.com/laytan/php-parser/pkg/ast"
|
||||
"golang.org/x/tools/go/packages"
|
||||
)
|
||||
|
||||
@ -32,7 +32,7 @@ var fileTempl = template.Must(
|
||||
|
||||
package traverser
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/ast"
|
||||
import "github.com/laytan/php-parser/pkg/ast"
|
||||
{{range $typ := .Types}}
|
||||
func (t *Traverser) {{$typ.FuncName}}(n *ast.{{$typ.Name}}) {
|
||||
if !t.checkEntrance(n) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
package traverser
|
||||
|
||||
import "github.com/VKCOM/php-parser/pkg/ast"
|
||||
import "github.com/laytan/php-parser/pkg/ast"
|
||||
|
||||
func (t *Traverser) Root(n *ast.Root) {
|
||||
if !t.checkEntrance(n) {
|
||||
|
@ -3,9 +3,9 @@ package traverser_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/VKCOM/php-parser/pkg/ast"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor"
|
||||
"github.com/VKCOM/php-parser/pkg/visitor/traverser"
|
||||
"github.com/laytan/php-parser/pkg/ast"
|
||||
"github.com/laytan/php-parser/pkg/visitor"
|
||||
"github.com/laytan/php-parser/pkg/visitor/traverser"
|
||||
)
|
||||
|
||||
// testCase is a traverser that does not go into any class statement or its children.
|
||||
|
Loading…
Reference in New Issue
Block a user