[refactoring] remove scanner token

This commit is contained in:
Vadym Slizov
2020-08-17 20:31:04 +03:00
parent 394092269a
commit 97747c5ac0
36 changed files with 6591 additions and 9813 deletions

View File

@@ -12,7 +12,7 @@ import (
)
func parsePhp5(src string) ast.Vertex {
lexer := scanner.NewLexer([]byte(src), "5.6", true, nil)
lexer := scanner.NewLexer([]byte(src), "5.6", nil)
php5parser := php5.NewParser(lexer, nil)
php5parser.Parse()

View File

@@ -29,7 +29,7 @@ abstract class Bar extends Baz
// parse
lexer := scanner.NewLexer([]byte(src), "7.4", true, nil)
lexer := scanner.NewLexer([]byte(src), "7.4", nil)
php7parser := php7.NewParser(lexer, nil)
php7parser.Parse()
@@ -61,7 +61,7 @@ abstract class Bar extends Baz
}
func parse(src string) ast.Vertex {
lexer := scanner.NewLexer([]byte(src), "7.4", true, nil)
lexer := scanner.NewLexer([]byte(src), "7.4", nil)
php7parser := php7.NewParser(lexer, nil)
php7parser.Parse()

View File

@@ -75,7 +75,7 @@ func TestPrinterPrintFileInlineHtml(t *testing.T) {
Expr: &ast.ExprVariable{
Node: ast.Node{
Tokens: token.Collection{
token.Start: []token.Token{
token.Start: []*token.Token{
{
ID: token.ID('$'),
Value: []byte("$"),
@@ -93,7 +93,7 @@ func TestPrinterPrintFileInlineHtml(t *testing.T) {
Expr: &ast.ExprVariable{
Node: ast.Node{
Tokens: token.Collection{
token.Start: []token.Token{
token.Start: []*token.Token{
{
ID: token.ID('$'),
Value: []byte("$"),