rename package cfg to conf

This commit is contained in:
Vadym Slizov
2021-02-13 23:54:34 +02:00
parent 9d12f1d162
commit 367eff9de6
14 changed files with 503 additions and 503 deletions

View File

@@ -10,7 +10,7 @@ Package usage example:
"log"
"os"
"github.com/z7zmey/php-parser/pkg/cfg"
"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"
@@ -24,12 +24,12 @@ Package usage example:
var parserErrors []*errors.Error
errorHandler := func(e *errors.Error) {
parserErrors = append(parserErrors, e)
parsmakeerErrors = append(parserErrors, e)
}
// Parse
rootNode, err := parser.Parse(src, cfg.Config{
rootNode, err := parser.Parse(src, conf.Config{
Version: &version.Version{Major: 5, Minor: 6},
ErrorHandlerFunc: errorHandler,
})

View File

@@ -7,7 +7,7 @@ import (
"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/cfg"
"github.com/z7zmey/php-parser/pkg/conf"
"github.com/z7zmey/php-parser/pkg/version"
)
@@ -28,7 +28,7 @@ type Parser interface {
GetRootNode() ast.Vertex
}
func Parse(src []byte, config cfg.Config) (ast.Vertex, error) {
func Parse(src []byte, config conf.Config) (ast.Vertex, error) {
var parser Parser
if config.Version == nil {