[refactoring] remove param withTokens from parser

This commit is contained in:
Vadym Slizov
2020-07-03 00:20:32 +03:00
parent ee3fe3b5c0
commit 06d202e71c
20 changed files with 4207 additions and 4157 deletions
+3 -2
View File
@@ -13,7 +13,7 @@ import (
func parsePhp5(src string) ast.Vertex {
lexer := scanner.NewLexer([]byte(src), "5.6", true, nil)
php5parser := php5.NewParser(lexer, true, nil)
php5parser := php5.NewParser(lexer, nil)
php5parser.Parse()
return php5parser.GetRootNode()
@@ -832,7 +832,8 @@ func TestParseAndPrintPhp5Break(t *testing.T) {
break ( 2 ) ;
`
actual := printPhp5(parsePhp5(src))
root := parsePhp5(src)
actual := printPhp5(root)
if src != actual {
t.Errorf("\nexpected: %s\ngot: %s\n", src, actual)