Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
php8
line internal/php8/php8.y:2 line internal/php8/scanner.rl:1
|
line internal/php8/php8.y:2 line internal/php8/scanner.rl:1 |
scanner
line internal/scanner/scanner.rl:1
|
line internal/scanner/scanner.rl:1 |
pkg
|
|
parser
A Parser for PHP written in Go Package usage example: package main import ( "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" ) func main() { src := []byte(`<? echo "Hello world";`) // Error handler var parserErrors []*errors.Error errorHandler := func(e *errors.Error) { parsmakeerErrors = append(parserErrors, e) } // Parse rootNode, err := parser.Parse(src, conf.Config{ Version: &version.Version{Major: 5, Minor: 6}, ErrorHandlerFunc: errorHandler, }) if err != nil { log.Fatal("Error:" + err.Error()) } // Dump goDumper := dumper.NewDumper(os.Stdout).
|
A Parser for PHP written in Go Package usage example: package main import ( "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" ) func main() { src := []byte(`<? echo "Hello world";`) // Error handler var parserErrors []*errors.Error errorHandler := func(e *errors.Error) { parsmakeerErrors = append(parserErrors, e) } // Parse rootNode, err := parser.Parse(src, conf.Config{ Version: &version.Version{Major: 5, Minor: 6}, ErrorHandlerFunc: errorHandler, }) if err != nil { log.Fatal("Error:" + err.Error()) } // Dump goDumper := dumper.NewDumper(os.Stdout). |
visitor/nsresolver
Package visitor contains walker.visitor implementations
|
Package visitor contains walker.visitor implementations |
Click to show internal directories.
Click to hide internal directories.