diff --git a/internal/php5/parser.go b/internal/php5/parser.go index 02bc113..04a37f3 100644 --- a/internal/php5/parser.go +++ b/internal/php5/parser.go @@ -14,14 +14,12 @@ type Parser struct { Lexer *scanner.Lexer currentToken *scanner.Token rootNode ast.Vertex - withTokens bool errHandlerFunc func(*errors.Error) } // NewParser creates and returns new Parser -func NewParser(lexer *scanner.Lexer, withTokens bool, errHandlerFunc func(*errors.Error)) *Parser { +func NewParser(lexer *scanner.Lexer, errHandlerFunc func(*errors.Error)) *Parser { return &Parser{ - withTokens: withTokens, Lexer: lexer, errHandlerFunc: errHandlerFunc, } @@ -63,7 +61,7 @@ func lastNode(nn []ast.Vertex) ast.Vertex { } func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { - if p.withTokens == false { + if _, ok := src.GetNode().Tokens[token.Start]; !ok { return } @@ -71,42 +69,64 @@ func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { return } - p.setFreeFloating(dst, token.Start, src.GetNode().Tokens[token.Start]) - delete(src.GetNode().Tokens, token.Start) -} - -func (p *Parser) setFreeFloating(dst ast.Vertex, pos token.Position, strings []token.Token) { - if p.withTokens == false { - return - } - - if len(strings) == 0 { - return - } - dstCollection := &dst.GetNode().Tokens if *dstCollection == nil { *dstCollection = make(token.Collection) } - (*dstCollection)[pos] = strings + (*dstCollection)[token.Start] = src.GetNode().Tokens[token.Start] + delete(src.GetNode().Tokens, token.Start) } -func (p *Parser) GetFreeFloatingToken(t *scanner.Token) []token.Token { - if p.withTokens == false { - return []token.Token{} +func (p *Parser) setFreeFloating(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return } - return []token.Token{ - { - ID: token.ID(t.ID), - Value: t.Value, - }, + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) } + + l := len(tokens) + for _, v := range tokens[0 : l-1] { + (*dstCollection)[pos] = append((*dstCollection)[pos], v) + } +} + +func (p *Parser) setFreeFloatingTokens(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return + } + + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) + } + + (*dstCollection)[pos] = make([]token.Token, 0) + + for _, v := range tokens { + (*dstCollection)[pos] = append((*dstCollection)[pos], v) + } +} + +func (p *Parser) setToken(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return + } + + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) + } + + l := len(tokens) + (*dstCollection)[pos] = append((*dstCollection)[pos], tokens[l-1]) } func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast.Vertex) { - if p.withTokens == false { + if _, ok := prevNode.GetNode().Tokens[token.SemiColon]; !ok { return } @@ -117,7 +137,7 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. } if semiColon[0].Value[0] == ';' { - p.setFreeFloating(prevNode, token.SemiColon, []token.Token{ + p.setFreeFloatingTokens(prevNode, token.SemiColon, []token.Token{ { ID: token.ID(';'), Value: semiColon[0].Value[0:1], @@ -126,7 +146,6 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. } vlen := len(semiColon[0].Value) - tlen := 2 if bytes.HasSuffix(semiColon[0].Value, []byte("?>\n")) { tlen = 3 @@ -145,7 +164,7 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. Value: semiColon[0].Value[vlen-tlen:], }) - p.setFreeFloating(htmlNode, token.Start, append(phpCloseTag, htmlNode.GetNode().Tokens[token.Start]...)) + p.setFreeFloatingTokens(htmlNode, token.Start, append(phpCloseTag, htmlNode.GetNode().Tokens[token.Start]...)) } func (p *Parser) returnTokenToPool(yyDollar []yySymType, yyVAL *yySymType) { diff --git a/internal/php5/parser_test.go b/internal/php5/parser_test.go index 223eb2b..2102e1c 100644 --- a/internal/php5/parser_test.go +++ b/internal/php5/parser_test.go @@ -59,7 +59,7 @@ func TestIdentifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -842,7 +842,7 @@ func TestPhp5ArgumentNode(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1596,7 +1596,7 @@ func TestPhp5ParameterNode(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1618,7 +1618,7 @@ func TestCommentEndFile(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1696,7 +1696,7 @@ func TestName(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1772,7 +1772,7 @@ func TestFullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1848,7 +1848,7 @@ func TestRelative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1927,7 +1927,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2004,7 +2004,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2092,7 +2092,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2190,7 +2190,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2299,7 +2299,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2376,7 +2376,7 @@ func TestScalarEncapsed_DollarOpenCurlyBraces(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2474,7 +2474,7 @@ func TestScalarEncapsed_DollarOpenCurlyBracesDimNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2582,7 +2582,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2674,7 +2674,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2766,7 +2766,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2826,7 +2826,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2872,7 +2872,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2932,7 +2932,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2977,7 +2977,7 @@ func TestScalarMagicConstant(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3021,7 +3021,7 @@ func TestScalarNumber_LNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3065,7 +3065,7 @@ func TestScalarNumber_DNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3109,7 +3109,7 @@ func TestScalarNumber_Float(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3153,7 +3153,7 @@ func TestScalarNumber_BinaryLNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3197,7 +3197,7 @@ func TestScalarNumber_BinaryDNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3241,7 +3241,7 @@ func TestScalarNumber_HLNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3285,7 +3285,7 @@ func TestScalarNumber_HDNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3329,7 +3329,7 @@ func TestScalarString_DoubleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3373,7 +3373,7 @@ func TestScalarString_DoubleQuotedScalarStringWithEscapedVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3419,7 +3419,7 @@ func TestScalarString_MultilineDoubleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3463,7 +3463,7 @@ func TestScalarString_SingleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3509,7 +3509,7 @@ func TestScalarString_MultilineSingleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3579,7 +3579,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3692,7 +3692,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3782,7 +3782,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3960,7 +3960,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4082,7 +4082,7 @@ func TestStmtClassConstList_WithoutModifiers(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4161,7 +4161,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4310,7 +4310,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4413,7 +4413,7 @@ func TestStmtClassMethod_Php5ClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4528,7 +4528,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4573,7 +4573,7 @@ func TestStmtClass_SimpleClass(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4631,7 +4631,7 @@ func TestStmtClass_AbstractClass(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4722,7 +4722,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4815,7 +4815,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4931,7 +4931,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5030,7 +5030,7 @@ func TestStmtConstList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5096,7 +5096,7 @@ func TestStmtContinue_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5173,7 +5173,7 @@ func TestStmtContinue_Light(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5250,7 +5250,7 @@ func TestStmtContinue(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5327,7 +5327,7 @@ func TestStmtDeclare(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5437,7 +5437,7 @@ func TestStmtDeclare_Stmts(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5516,7 +5516,7 @@ func TestStmtDeclare_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5571,7 +5571,7 @@ func TestStmtDo(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5638,7 +5638,7 @@ func TestStmtEcho(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5694,7 +5694,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5738,7 +5738,7 @@ func TestStmtExpression(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5934,7 +5934,7 @@ func TestStmtFor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6055,7 +6055,7 @@ func TestStmtFor_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6141,7 +6141,7 @@ func TestStmtForeach(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6217,7 +6217,7 @@ func TestStmtForeach_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6303,7 +6303,7 @@ func TestStmtForeach_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6410,7 +6410,7 @@ func TestStmtForeach_WithKey(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6507,7 +6507,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6624,7 +6624,7 @@ func TestStmtForeach_WithRef(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6753,7 +6753,7 @@ func TestStmtForeach_WithList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6799,7 +6799,7 @@ func TestStmtFunction(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6856,7 +6856,7 @@ func TestStmtFunction_Return(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7024,7 +7024,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7092,7 +7092,7 @@ func TestStmtFunction_Ref(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7148,7 +7148,7 @@ func TestStmtGlobal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7309,7 +7309,7 @@ func TestStmtGlobal_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7374,7 +7374,7 @@ func TestStmtGotoLabel(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7407,7 +7407,7 @@ func TestStmtHaltCompiler(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7472,7 +7472,7 @@ func TestStmtIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7581,7 +7581,7 @@ func TestStmtIf_ElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7667,7 +7667,7 @@ func TestStmtIf_Else(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7839,7 +7839,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8021,7 +8021,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8065,7 +8065,7 @@ func TestStmtInlineHtml(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8110,7 +8110,7 @@ func TestStmtInterface(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8190,7 +8190,7 @@ func TestStmtInterface_Extend(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8293,7 +8293,7 @@ func TestStmtInterface_Extends(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8349,7 +8349,7 @@ func TestStmtNamespace(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8406,7 +8406,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8440,7 +8440,7 @@ func TestStmtNamespace_Anonymous(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8542,7 +8542,7 @@ func TestStmtProperty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8697,7 +8697,7 @@ func TestStmtProperty_Properties(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8852,7 +8852,7 @@ func TestStmtProperty_Properties2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8918,7 +8918,7 @@ func TestStmtStaticVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9026,7 +9026,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9134,7 +9134,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9261,7 +9261,7 @@ func TestStmtSwitch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9388,7 +9388,7 @@ func TestStmtSwitch_Semicolon(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9505,7 +9505,7 @@ func TestStmtSwitch_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9610,7 +9610,7 @@ func TestStmtSwitch_AltSemicolon(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9664,7 +9664,7 @@ func TestStmtThrow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9709,7 +9709,7 @@ func TestStmtTrait(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9800,7 +9800,7 @@ func TestStmtTraitUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9914,7 +9914,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10028,7 +10028,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10186,7 +10186,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10355,7 +10355,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10638,7 +10638,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10675,7 +10675,7 @@ func TestStmtTry_Try(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10770,7 +10770,7 @@ func TestStmtTry_TryCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10922,7 +10922,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11028,7 +11028,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11235,7 +11235,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11291,7 +11291,7 @@ func TestStmtUnset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11368,7 +11368,7 @@ func TestStmtUnset_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11436,7 +11436,7 @@ func TestStmtUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11504,7 +11504,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11583,7 +11583,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11684,7 +11684,7 @@ func TestStmtUse_List(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11796,7 +11796,7 @@ func TestStmtUse_ListAlias(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11908,7 +11908,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12042,7 +12042,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12154,7 +12154,7 @@ func TestStmtUse_ListConstType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12288,7 +12288,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12354,7 +12354,7 @@ func TestStmtBreak_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12431,7 +12431,7 @@ func TestStmtBreak_Light(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12508,7 +12508,7 @@ func TestStmtBreak(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12585,7 +12585,7 @@ func TestExprArrayDimFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12681,7 +12681,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12725,7 +12725,7 @@ func TestExprArray(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12791,7 +12791,7 @@ func TestExprArray_Item(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12910,7 +12910,7 @@ func TestExprArray_Items(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12974,7 +12974,7 @@ func TestExprBitwiseNot(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13038,7 +13038,7 @@ func TestExprBooleanNot(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13115,7 +13115,7 @@ func TestExprClassConstFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13180,7 +13180,7 @@ func TestExprClassConstFetch_Static(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13244,7 +13244,7 @@ func TestExprClone_Brackets(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13308,7 +13308,7 @@ func TestExprClone(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13354,7 +13354,7 @@ func TestExprClosure(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13532,7 +13532,7 @@ func TestExprClosure_Use(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13710,7 +13710,7 @@ func TestExprClosure_Use2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13776,7 +13776,7 @@ func TestExprConstFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13842,7 +13842,7 @@ func TestExprConstFetch_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13908,7 +13908,7 @@ func TestExprConstFetch_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13972,7 +13972,7 @@ func TestExprEmpty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14036,7 +14036,7 @@ func TestExprErrorSuppress(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14100,7 +14100,7 @@ func TestExprEval(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14144,7 +14144,7 @@ func TestExprExit(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14188,7 +14188,7 @@ func TestExprExit_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14253,7 +14253,7 @@ func TestExprExit_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14297,7 +14297,7 @@ func TestExprDie(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14341,7 +14341,7 @@ func TestExprDie_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14406,7 +14406,7 @@ func TestExprDie_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14482,7 +14482,7 @@ func TestExprFunctionCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14558,7 +14558,7 @@ func TestExprFunctionCall_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14659,7 +14659,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14778,7 +14778,7 @@ func TestExprFunctionCall_Var(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14910,7 +14910,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14974,7 +14974,7 @@ func TestExprPostDec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15038,7 +15038,7 @@ func TestExprPostInc(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15102,7 +15102,7 @@ func TestExprPreDec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15166,7 +15166,7 @@ func TestExprPreInc(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15230,7 +15230,7 @@ func TestExprInclude(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15294,7 +15294,7 @@ func TestExprInclude_Once(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15358,7 +15358,7 @@ func TestExprRequire(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15422,7 +15422,7 @@ func TestExprRequire_Once(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15509,7 +15509,7 @@ func TestExprInstanceOf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15596,7 +15596,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15683,7 +15683,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15749,7 +15749,7 @@ func TestExprIsset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15836,7 +15836,7 @@ func TestExprIsset_Variables(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15911,7 +15911,7 @@ func TestExprList_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16018,7 +16018,7 @@ func TestExprList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16135,7 +16135,7 @@ func TestExprList_ArrayIndex(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16264,7 +16264,7 @@ func TestExprList_List(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16372,7 +16372,7 @@ func TestExprList_EmptyItem(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16482,7 +16482,7 @@ func TestExprList_EmptyItems(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16567,7 +16567,7 @@ func TestExprMethodCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16633,7 +16633,7 @@ func TestExprNew(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16709,7 +16709,7 @@ func TestExprNew_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16785,7 +16785,7 @@ func TestExprNew_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16849,7 +16849,7 @@ func TestExprPrint(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16924,7 +16924,7 @@ func TestExprPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17042,7 +17042,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17119,7 +17119,7 @@ func TestExprShellExec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17163,7 +17163,7 @@ func TestExprShortArray(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17229,7 +17229,7 @@ func TestExprShortArray_Item(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17348,7 +17348,7 @@ func TestExprShortArray_Items(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17435,7 +17435,7 @@ func TestExprStaticCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17522,7 +17522,7 @@ func TestExprStaticCall_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17609,7 +17609,7 @@ func TestExprStaticCall_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17706,7 +17706,7 @@ func TestExprStaticCall_Var(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17801,7 +17801,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17888,7 +17888,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17975,7 +17975,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18062,7 +18062,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18168,7 +18168,7 @@ func TestExprTernary(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18253,7 +18253,7 @@ func TestExprTernary_Simple(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18411,7 +18411,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18569,7 +18569,7 @@ func TestExprTernary_NestedCond(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18633,7 +18633,7 @@ func TestExprUnaryMinus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18697,7 +18697,7 @@ func TestExprUnaryPlus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18751,7 +18751,7 @@ func TestExprVariable(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18815,7 +18815,7 @@ func TestExprVariable_Variable(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18858,7 +18858,7 @@ func TestExprYield(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18922,7 +18922,7 @@ func TestExprYield_Val(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19007,7 +19007,7 @@ func TestExprYield_KeyVal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19061,7 +19061,7 @@ func TestExprYield_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19136,7 +19136,7 @@ func TestExprYield_KeyExpr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19223,7 +19223,7 @@ func TestExprAssign_Assign(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19308,7 +19308,7 @@ func TestExprAssign_Reference(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19405,7 +19405,7 @@ func TestExprAssign_ReferenceNew(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19547,7 +19547,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19632,7 +19632,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19717,7 +19717,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19802,7 +19802,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19887,7 +19887,7 @@ func TestExprAssign_Concat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19972,7 +19972,7 @@ func TestExprAssign_Div(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20057,7 +20057,7 @@ func TestExprAssign_Minus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20142,7 +20142,7 @@ func TestExprAssign_Mod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20227,7 +20227,7 @@ func TestExprAssign_Mul(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20312,7 +20312,7 @@ func TestExprAssign_Plus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20397,7 +20397,7 @@ func TestExprAssign_Pow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20482,7 +20482,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20567,7 +20567,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20654,7 +20654,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20739,7 +20739,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20824,7 +20824,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20909,7 +20909,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20994,7 +20994,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21079,7 +21079,7 @@ func TestExprBinary_Concat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21164,7 +21164,7 @@ func TestExprBinary_Div(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21249,7 +21249,7 @@ func TestExprBinary_Equal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21334,7 +21334,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21419,7 +21419,7 @@ func TestExprBinary_Greater(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21504,7 +21504,7 @@ func TestExprBinary_Identical(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21589,7 +21589,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21674,7 +21674,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21759,7 +21759,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21844,7 +21844,7 @@ func TestExprBinary_Minus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21929,7 +21929,7 @@ func TestExprBinary_Mod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22014,7 +22014,7 @@ func TestExprBinary_Mul(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22099,7 +22099,7 @@ func TestExprBinary_NotEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22184,7 +22184,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22269,7 +22269,7 @@ func TestExprBinary_Plus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22354,7 +22354,7 @@ func TestExprBinary_Pow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22439,7 +22439,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22524,7 +22524,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22609,7 +22609,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22694,7 +22694,7 @@ func TestExprBinary_Smaller(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22760,7 +22760,7 @@ func TestExprCast_Array(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22824,7 +22824,7 @@ func TestExprCast_Bool(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22888,7 +22888,7 @@ func TestExprCast_BoolShort(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22952,7 +22952,7 @@ func TestExprCast_Double(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23016,7 +23016,7 @@ func TestExprCast_CastFloat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23080,7 +23080,7 @@ func TestExprCast_Int(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23144,7 +23144,7 @@ func TestExprCast_IntShort(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23208,7 +23208,7 @@ func TestExprCast_Object(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23272,7 +23272,7 @@ func TestExprCast_String(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23336,7 +23336,7 @@ func TestExprCast_BinaryString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23400,7 +23400,7 @@ func TestExprCast_Unset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) diff --git a/internal/php5/php5.go b/internal/php5/php5.go index 01c6d9d..3e69543 100644 Binary files a/internal/php5/php5.go and b/internal/php5/php5.go differ diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 07a2c3b..bd08ea1 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -278,7 +278,7 @@ start: yylex.(*Parser).rootNode = &ast.Root{ast.Node{}, $1} yylex.(*Parser).rootNode.GetNode().Position = position.NewNodeListPosition($1) - yylex.(*Parser).setFreeFloating(yylex.(*Parser).rootNode, token.End, yylex.(*Parser).currentToken.Hidden) + yylex.(*Parser).setFreeFloating(yylex.(*Parser).rootNode, token.End, yylex.(*Parser).currentToken.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -316,7 +316,7 @@ namespace_name: namePart.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(namePart, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(namePart, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -329,8 +329,8 @@ namespace_name: namePart.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(namePart, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(namePart, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -370,11 +370,11 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -388,10 +388,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -405,10 +405,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -420,9 +420,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -434,9 +434,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -450,10 +450,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(useType, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(useType, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -467,10 +467,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(useType, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(useType, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -482,8 +482,8 @@ top_statement: $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Stmts, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -495,7 +495,7 @@ use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -535,8 +535,8 @@ use_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -550,8 +550,8 @@ use_declaration: $$.GetNode().Position = position.NewNodeListPosition($2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -568,11 +568,11 @@ use_declaration: $$.GetNode().Position = position.NewNodeListTokenPosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -584,7 +584,7 @@ use_function_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -624,8 +624,8 @@ use_function_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -639,8 +639,8 @@ use_function_declaration: $$.GetNode().Position = position.NewNodeListPosition($2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -657,11 +657,11 @@ use_function_declaration: $$.GetNode().Position = position.NewNodeListTokenPosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -673,7 +673,7 @@ use_const_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -713,8 +713,8 @@ use_const_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -728,8 +728,8 @@ use_const_declaration: $$.GetNode().Position = position.NewNodeListPosition($2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -746,11 +746,11 @@ use_const_declaration: $$.GetNode().Position = position.NewNodeListTokenPosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -772,9 +772,9 @@ constant_declaration: $$.GetNode().Position = position.NewNodeNodeListPosition($1, constList.Consts) // save comments - yylex.(*Parser).setFreeFloating(lastConst, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastConst, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -791,9 +791,9 @@ constant_declaration: $$.GetNode().Position = position.NewTokenNodeListPosition($1, constList) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -856,11 +856,11 @@ inner_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -884,8 +884,8 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Label, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Label, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -900,8 +900,8 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -919,12 +919,12 @@ unticked_statement: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if len($2.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.If, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.If, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) } if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -939,17 +939,17 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if len($2.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.If, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.If, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) } if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) } - yylex.(*Parser).setFreeFloating($$, token.Cond, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $8.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($8)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $8.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -968,12 +968,12 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if len($2.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.While, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.While, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) } if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -986,16 +986,16 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) if len($4.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.While, $4.GetNode().Tokens[token.OpenParenthesisToken][:len($4.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($4.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.While, $4.GetNode().Tokens[token.OpenParenthesisToken][:len($4.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($4.GetNode().Tokens, token.OpenParenthesisToken) } if len($4.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.GetNode().Tokens[token.CloseParenthesisToken][:len($4.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($4.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.GetNode().Tokens[token.CloseParenthesisToken][:len($4.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($4.GetNode().Tokens, token.CloseParenthesisToken) } - yylex.(*Parser).setFreeFloating($$, token.Cond, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($5)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $5.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1018,11 +1018,11 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $9) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.For, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.InitExpr, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CondExpr, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.IncExpr, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.For, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.InitExpr, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CondExpr, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.IncExpr, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1043,12 +1043,12 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if len($2.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Switch, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Switch, $2.GetNode().Tokens[token.OpenParenthesisToken][:len($2.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($2.GetNode().Tokens, token.OpenParenthesisToken) } if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $2.GetNode().Tokens[token.CloseParenthesisToken][:len($2.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($2.GetNode().Tokens, token.CloseParenthesisToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -1061,9 +1061,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1075,9 +1075,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1089,9 +1089,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1103,9 +1103,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1117,9 +1117,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1131,9 +1131,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1145,9 +1145,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1160,8 +1160,8 @@ unticked_statement: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1173,9 +1173,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1187,9 +1187,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1201,10 +1201,10 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Echo, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Echo, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1216,7 +1216,7 @@ unticked_statement: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1229,8 +1229,8 @@ unticked_statement: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1242,11 +1242,11 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Unset, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($5)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Unset, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $5.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1280,13 +1280,13 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) if $6 != nil { - yylex.(*Parser).setFreeFloating($$, token.Key, $6.GetNode().Tokens[token.Key]); delete($6.GetNode().Tokens, token.Key) + yylex.(*Parser).setFreeFloatingTokens($$, token.Key, $6.GetNode().Tokens[token.Key]); delete($6.GetNode().Tokens, token.Key) } - yylex.(*Parser).setFreeFloating($$, token.Var, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1320,13 +1320,13 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) if $6 != nil { - yylex.(*Parser).setFreeFloating($$, token.Key, $6.GetNode().Tokens[token.Key]); delete($6.GetNode().Tokens, token.Key) + yylex.(*Parser).setFreeFloatingTokens($$, token.Key, $6.GetNode().Tokens[token.Key]); delete($6.GetNode().Tokens, token.Key) } - yylex.(*Parser).setFreeFloating($$, token.Var, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1339,9 +1339,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Declare, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Declare, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1353,8 +1353,8 @@ unticked_statement: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1370,9 +1370,9 @@ unticked_statement: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Try, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Try, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1384,9 +1384,9 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1400,10 +1400,10 @@ unticked_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(label, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Label, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(label, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Label, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1429,12 +1429,12 @@ catch_statement: catchNode.GetNode().Position = position.NewTokensPosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating(catchNode, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(catchNode, token.Catch, $2.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Hidden) - yylex.(*Parser).setFreeFloating(catchNode, token.Var, $5.Hidden) - yylex.(*Parser).setFreeFloating(catchNode, token.Cond, $6.Hidden) - yylex.(*Parser).setFreeFloating(catchNode, token.Stmts, $8.Hidden) + yylex.(*Parser).setFreeFloating(catchNode, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(catchNode, token.Catch, $2.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Tokens) + yylex.(*Parser).setFreeFloating(catchNode, token.Var, $5.Tokens) + yylex.(*Parser).setFreeFloating(catchNode, token.Cond, $6.Tokens) + yylex.(*Parser).setFreeFloating(catchNode, token.Stmts, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1455,9 +1455,9 @@ finally_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Finally, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Finally, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1506,12 +1506,12 @@ additional_catch: $$.GetNode().Position = position.NewTokensPosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Catch, $2.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cond, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Catch, $2.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Cond, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1529,7 +1529,7 @@ unset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1595,17 +1595,17 @@ unticked_function_declaration_statement: $$.GetNode().Position = position.NewTokensPosition($1, $9) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $2.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $2.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $3.Tokens) } else { - yylex.(*Parser).setFreeFloating(name, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.Start, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Name, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ParamList, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Params, $7.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ParamList, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Params, $7.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1634,9 +1634,9 @@ unticked_class_declaration_statement: $$.GetNode().Position = position.NewNodeTokenPosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating(name, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Hidden) + yylex.(*Parser).setFreeFloating(name, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1650,10 +1650,10 @@ unticked_class_declaration_statement: $$.GetNode().Position = position.NewTokensPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1669,7 +1669,7 @@ class_entry_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1683,8 +1683,8 @@ class_entry_type: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1696,7 +1696,7 @@ class_entry_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1710,8 +1710,8 @@ class_entry_type: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1732,7 +1732,7 @@ extends_from: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1760,7 +1760,7 @@ interface_extends_list: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1781,7 +1781,7 @@ implements_list: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1799,7 +1799,7 @@ interface_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1817,7 +1817,7 @@ foreach_optional_arg: $$ = $2 // save comments - yylex.(*Parser).setFreeFloating($$, token.Key, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Key, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1838,7 +1838,7 @@ foreach_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1850,9 +1850,9 @@ foreach_variable: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1878,10 +1878,10 @@ for_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1907,10 +1907,10 @@ foreach_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1937,10 +1937,10 @@ declare_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1959,8 +1959,8 @@ declare_list: constant.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(constant, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating(constant, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1975,9 +1975,9 @@ declare_list: constant.GetNode().Position = position.NewTokenNodePosition($3, $5) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1995,8 +1995,8 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Hidden) + yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2010,9 +2010,9 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListStart, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Hidden) + yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens(caseList, token.CaseListStart, $2.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2026,10 +2026,10 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2044,11 +2044,11 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListStart, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($5)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens(caseList, token.CaseListStart, $2.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $5.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2071,9 +2071,9 @@ case_list: _case.GetNode().Position = position.NewTokenNodeListPosition($2, $5) // save comments - yylex.(*Parser).setFreeFloating(_case, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_case, token.Expr, $4.Hidden) - yylex.(*Parser).setFreeFloating(_case, token.CaseSeparator, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating(_case, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_case, token.Expr, $4.Tokens) + yylex.(*Parser).setToken(_case, token.CaseSeparator, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2086,9 +2086,9 @@ case_list: _default.GetNode().Position = position.NewTokenNodeListPosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating(_default, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_default, token.Default, $3.Hidden) - yylex.(*Parser).setFreeFloating(_default, token.CaseSeparator, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating(_default, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_default, token.Default, $3.Tokens) + yylex.(*Parser).setToken(_default, token.CaseSeparator, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2127,10 +2127,10 @@ while_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2154,12 +2154,12 @@ elseif_list: _elseIf.GetNode().Position = position.NewTokenNodePosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Tokens) if len($3.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.GetNode().Tokens[token.OpenParenthesisToken][:len($3.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($3.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens(_elseIf, token.ElseIf, $3.GetNode().Tokens[token.OpenParenthesisToken][:len($3.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($3.GetNode().Tokens, token.OpenParenthesisToken) } if len($3.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $3.GetNode().Tokens[token.CloseParenthesisToken][:len($3.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($3.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens(_elseIf, token.Expr, $3.GetNode().Tokens[token.CloseParenthesisToken][:len($3.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($3.GetNode().Tokens, token.CloseParenthesisToken) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2185,14 +2185,14 @@ new_elseif_list: _elseIf.GetNode().Position = position.NewTokenNodeListPosition($2, $5) // save comments - yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Tokens) if len($3.GetNode().Tokens[token.OpenParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.GetNode().Tokens[token.OpenParenthesisToken][:len($3.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($3.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens(_elseIf, token.ElseIf, $3.GetNode().Tokens[token.OpenParenthesisToken][:len($3.GetNode().Tokens[token.OpenParenthesisToken])-1]); delete($3.GetNode().Tokens, token.OpenParenthesisToken) } if len($3.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { - yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $3.GetNode().Tokens[token.CloseParenthesisToken][:len($3.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($3.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens(_elseIf, token.Expr, $3.GetNode().Tokens[token.CloseParenthesisToken][:len($3.GetNode().Tokens[token.CloseParenthesisToken])-1]); delete($3.GetNode().Tokens, token.CloseParenthesisToken) } - yylex.(*Parser).setFreeFloating(_elseIf, token.Cond, $4.Hidden) + yylex.(*Parser).setFreeFloating(_elseIf, token.Cond, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2214,7 +2214,7 @@ else_single: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2238,8 +2238,8 @@ new_else_single: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Else, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Else, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2273,7 +2273,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2304,22 +2304,22 @@ parameter: yylex.(*Parser).MoveFreeFloating($1, $$) } if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Tokens) } if $3 != nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Tokens) // normalize if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) + yylex.(*Parser).setFreeFloatingTokens($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) } if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) + yylex.(*Parser).setFreeFloatingTokens($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) } if $1 == nil { - yylex.(*Parser).setFreeFloating($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2348,23 +2348,23 @@ parameter: yylex.(*Parser).MoveFreeFloating($1, $$) } if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Tokens) } if $3 != nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $5.Tokens) // normalize if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) + yylex.(*Parser).setFreeFloatingTokens($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) } if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) + yylex.(*Parser).setFreeFloatingTokens($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) } if $1 == nil { - yylex.(*Parser).setFreeFloating($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2387,7 +2387,7 @@ optional_class_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2399,7 +2399,7 @@ optional_class_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2421,8 +2421,8 @@ function_call_parameter_list: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2434,8 +2434,8 @@ function_call_parameter_list: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2449,8 +2449,8 @@ function_call_parameter_list: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2469,7 +2469,7 @@ non_empty_function_call_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2508,7 +2508,7 @@ function_call_parameter: $$.GetNode().Position = position.NewNodePosition($2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2520,7 +2520,7 @@ function_call_parameter: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2532,7 +2532,7 @@ global_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2556,7 +2556,7 @@ global_var: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2568,7 +2568,7 @@ global_var: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2580,9 +2580,9 @@ global_var: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($3, token.Start, append($2.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($2), $3.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($3, token.End, append($3.GetNode().Tokens[token.End], append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)...)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($3, token.Start, append($2.Tokens, $3.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($3, token.End, append($3.GetNode().Tokens[token.End], $4.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2603,8 +2603,8 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2621,9 +2621,9 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenNodePosition($3, $5) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(staticVar, token.Var, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(staticVar, token.Var, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2640,7 +2640,7 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2657,8 +2657,8 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(staticVar, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(staticVar, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2691,8 +2691,8 @@ class_statement: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.PropertyList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.PropertyList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2704,8 +2704,8 @@ class_statement: $$.GetNode().Position = position.NewNodeTokenPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.ConstList, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.ConstList, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2731,18 +2731,18 @@ class_statement: // save comments if len($1) > 0 { yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $2.Tokens) } if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $4.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Name, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2757,7 +2757,7 @@ trait_use_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2775,7 +2775,7 @@ trait_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2789,8 +2789,8 @@ trait_adaptations: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2801,8 +2801,8 @@ trait_adaptations: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2844,8 +2844,8 @@ trait_adaptation_statement: $$ = $1; // save comments - yylex.(*Parser).setFreeFloating($$, token.NameList, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.NameList, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2854,8 +2854,8 @@ trait_adaptation_statement: $$ = $1; // save comments - yylex.(*Parser).setFreeFloating($$, token.Alias, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Alias, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2871,7 +2871,7 @@ trait_precedence: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2889,7 +2889,7 @@ trait_reference_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2906,7 +2906,7 @@ trait_method_reference: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2930,8 +2930,8 @@ trait_method_reference_fully_qualified: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2949,8 +2949,8 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2963,7 +2963,7 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2993,8 +2993,8 @@ method_body: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3006,8 +3006,8 @@ method_body: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3029,7 +3029,7 @@ variable_modifiers: modifier.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(modifier, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(modifier, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3074,7 +3074,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3086,7 +3086,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3098,7 +3098,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3110,7 +3110,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3122,7 +3122,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3134,7 +3134,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3154,8 +3154,8 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(property, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(property, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3172,9 +3172,9 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenNodePosition($3, $5) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(property, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(property, token.Var, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(property, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(property, token.Var, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3191,7 +3191,7 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(property, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(property, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3208,8 +3208,8 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(property, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(property, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating(property, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(property, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3231,9 +3231,9 @@ class_constant_declaration: $1.GetNode().Position = position.NewNodesPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating(lastConst, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastConst, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3249,9 +3249,9 @@ class_constant_declaration: $$.GetNode().Position = position.NewTokenNodePosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(constant, token.Name, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(constant, token.Name, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3263,7 +3263,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3297,7 +3297,7 @@ non_empty_for_expr: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3334,8 +3334,8 @@ chaining_dereference: fetch.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3348,8 +3348,8 @@ chaining_dereference: fetch.GetNode().Position = position.NewNodePosition($2) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3404,7 +3404,7 @@ new_expr: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3421,10 +3421,10 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3437,7 +3437,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3450,8 +3450,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3476,9 +3476,9 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Hidden) - yylex.(*Parser).setFreeFloating(_new, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Tokens) + yylex.(*Parser).setFreeFloating(_new, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3490,7 +3490,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3502,7 +3502,7 @@ expr_without_variable: $$.GetNode().Position = position.NewNodesPosition($1, $3) yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3515,7 +3515,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3528,7 +3528,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3541,7 +3541,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3554,7 +3554,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3567,7 +3567,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3580,7 +3580,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3593,7 +3593,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3606,7 +3606,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3619,7 +3619,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3632,7 +3632,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3645,7 +3645,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3658,7 +3658,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3670,7 +3670,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3683,7 +3683,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3695,7 +3695,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3708,7 +3708,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3721,7 +3721,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3734,7 +3734,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3747,7 +3747,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3760,7 +3760,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3773,7 +3773,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3786,7 +3786,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3799,7 +3799,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3812,7 +3812,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3825,7 +3825,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3838,7 +3838,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3851,7 +3851,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3864,7 +3864,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3877,7 +3877,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3890,7 +3890,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3903,7 +3903,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3916,7 +3916,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3928,7 +3928,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3940,7 +3940,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3952,7 +3952,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3964,7 +3964,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3977,7 +3977,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3990,7 +3990,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4003,7 +4003,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4016,8 +4016,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.Equal, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4030,7 +4030,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4043,7 +4043,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4056,7 +4056,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4069,7 +4069,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4082,7 +4082,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4092,8 +4092,8 @@ expr_without_variable: yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) - yylex.(*Parser).setFreeFloating($1, token.Start, append($1.GetNode().Tokens[token.OpenParenthesisToken], $1.GetNode().Tokens[token.Start]...)); delete($1.GetNode().Tokens, token.OpenParenthesisToken) - yylex.(*Parser).setFreeFloating($1, token.End, append($1.GetNode().Tokens[token.End], $1.GetNode().Tokens[token.CloseParenthesisToken]...)); delete($1.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($1, token.Start, append($1.GetNode().Tokens[token.OpenParenthesisToken], $1.GetNode().Tokens[token.Start]...)); delete($1.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($1, token.End, append($1.GetNode().Tokens[token.End], $1.GetNode().Tokens[token.CloseParenthesisToken]...)); delete($1.GetNode().Tokens, token.CloseParenthesisToken) } | new_expr { @@ -4106,8 +4106,8 @@ expr_without_variable: $$ = $2 // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) for _, n := range($4) { switch nn := n.(type) { @@ -4142,8 +4142,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4156,8 +4156,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4175,8 +4175,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4188,8 +4188,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4201,8 +4201,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4214,8 +4214,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4227,8 +4227,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4240,8 +4240,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4253,8 +4253,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4275,7 +4275,7 @@ expr_without_variable: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4287,7 +4287,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4317,7 +4317,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4329,7 +4329,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4341,7 +4341,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4353,20 +4353,20 @@ expr_without_variable: $$.GetNode().Position = position.NewTokensPosition($1, $9) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $3.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $7.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $7.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Tokens) // normalize if $6 == nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $$.GetNode().Tokens[token.LexicalVars]); delete($$.GetNode().Tokens, token.LexicalVars) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $$.GetNode().Tokens[token.LexicalVars]); delete($$.GetNode().Tokens, token.LexicalVars) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -4379,21 +4379,21 @@ expr_without_variable: $$.GetNode().Position = position.NewTokensPosition($1, $10) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Static, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Static, $2.Tokens) if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $4.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $8.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $10.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $8.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $10.Tokens) // normalize if $7 == nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $$.GetNode().Tokens[token.LexicalVars]); delete($$.GetNode().Tokens, token.LexicalVars) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $$.GetNode().Tokens[token.LexicalVars]); delete($$.GetNode().Tokens, token.LexicalVars) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -4409,7 +4409,7 @@ yield_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4421,7 +4421,7 @@ yield_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4433,8 +4433,8 @@ yield_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4446,8 +4446,8 @@ yield_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4463,8 +4463,8 @@ combined_scalar_offset: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4477,8 +4477,8 @@ combined_scalar_offset: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4492,9 +4492,9 @@ combined_scalar_offset: $$.GetNode().Position = position.NewNodeTokenPosition(str, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4507,8 +4507,8 @@ combined_scalar_offset: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4523,9 +4523,9 @@ combined_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Array, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Array, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4537,8 +4537,8 @@ combined_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4566,9 +4566,9 @@ lexical_vars: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Use, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.LexicalVarList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Use, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.LexicalVarList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4586,8 +4586,8 @@ lexical_var_list: variable.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4604,9 +4604,9 @@ lexical_var_list: reference.GetNode().Position = position.NewTokensPosition($3, $4) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4621,7 +4621,7 @@ lexical_var_list: variable.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(variable, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(variable, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4638,8 +4638,8 @@ lexical_var_list: reference.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating(reference, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(reference, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4670,8 +4670,8 @@ function_call: $$.GetNode().Position = position.NewNodesPosition(funcName, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(funcName, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(funcName, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4685,7 +4685,7 @@ function_call: $$.GetNode().Position = position.NewNodesPosition(funcName, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4698,7 +4698,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4711,7 +4711,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4724,7 +4724,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4737,7 +4737,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4764,7 +4764,7 @@ class_name: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4788,8 +4788,8 @@ class_name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4801,7 +4801,7 @@ class_name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4828,8 +4828,8 @@ fully_qualified_class_name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4841,7 +4841,7 @@ fully_qualified_class_name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4868,7 +4868,7 @@ dynamic_class_name_reference: $$ = $1 // save comments - yylex.(*Parser).setFreeFloating($3[0], token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($3[0], token.Var, $2.Tokens) for _, n := range($3) { switch nn := n.(type) { @@ -4935,7 +4935,7 @@ dynamic_class_name_variable_property: $$ = $2 // save comments - yylex.(*Parser).setFreeFloating($2[0], token.Var, $1.Hidden) + yylex.(*Parser).setFreeFloating($2[0], token.Var, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4956,8 +4956,8 @@ exit_expr: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Exit, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Exit, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4975,8 +4975,8 @@ exit_expr: yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) // save comments - yylex.(*Parser).setFreeFloating($$, token.Exit, $1.GetNode().Tokens[token.OpenParenthesisToken]); delete($1.GetNode().Tokens, token.OpenParenthesisToken) - yylex.(*Parser).setFreeFloating($$, token.Expr, $1.GetNode().Tokens[token.CloseParenthesisToken]); delete($1.GetNode().Tokens, token.CloseParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Exit, $1.GetNode().Tokens[token.OpenParenthesisToken]); delete($1.GetNode().Tokens, token.OpenParenthesisToken) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $1.GetNode().Tokens[token.CloseParenthesisToken]); delete($1.GetNode().Tokens, token.CloseParenthesisToken) } ; @@ -5029,7 +5029,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5041,7 +5041,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5053,7 +5053,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5065,7 +5065,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5077,7 +5077,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5089,7 +5089,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5101,7 +5101,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5113,7 +5113,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5125,7 +5125,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5137,7 +5137,7 @@ common_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5151,7 +5151,7 @@ common_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5163,7 +5163,7 @@ common_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5181,8 +5181,8 @@ static_class_constant: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5234,8 +5234,8 @@ static_scalar_value: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5249,7 +5249,7 @@ static_scalar_value: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5261,9 +5261,9 @@ static_scalar_value: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Array, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Array, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5275,8 +5275,8 @@ static_scalar_value: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5294,7 +5294,7 @@ static_scalar_value: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5316,8 +5316,8 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5330,7 +5330,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5343,7 +5343,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5356,7 +5356,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5369,7 +5369,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5382,7 +5382,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5395,7 +5395,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5407,7 +5407,7 @@ static_operation: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5419,7 +5419,7 @@ static_operation: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5432,7 +5432,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5445,7 +5445,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5458,7 +5458,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5471,7 +5471,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5484,7 +5484,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5497,7 +5497,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5510,7 +5510,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5523,7 +5523,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5536,7 +5536,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5549,7 +5549,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5562,7 +5562,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5575,7 +5575,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5588,7 +5588,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5601,7 +5601,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5614,8 +5614,8 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.Equal, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5628,7 +5628,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5641,7 +5641,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5654,7 +5654,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5667,7 +5667,7 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5680,8 +5680,8 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5694,8 +5694,8 @@ static_operation: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5707,7 +5707,7 @@ static_operation: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5719,7 +5719,7 @@ static_operation: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5728,8 +5728,8 @@ static_operation: $$ = $2 // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5766,8 +5766,8 @@ general_constant: $$.GetNode().Position = position.NewNodePosition(name) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5781,7 +5781,7 @@ general_constant: $$.GetNode().Position = position.NewNodePosition(name) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5798,7 +5798,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5828,7 +5828,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5840,7 +5840,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5852,7 +5852,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5871,7 +5871,7 @@ static_array_pair_list: // save comments if $2 != nil { - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5899,9 +5899,9 @@ non_empty_static_array_pair_list: arrayItem.GetNode().Position = position.NewNodesPosition($3, $5) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).MoveFreeFloating($3, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5914,7 +5914,7 @@ non_empty_static_array_pair_list: arrayItem.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).MoveFreeFloating($3, arrayItem) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5929,7 +5929,7 @@ non_empty_static_array_pair_list: // save comments yylex.(*Parser).MoveFreeFloating($1, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5975,8 +5975,8 @@ parenthesis_expr: if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { yylex.(*Parser).setFreeFloating($2, token.End, append($2.GetNode().Tokens[token.End], $2.GetNode().Tokens[token.CloseParenthesisToken]...)) } - yylex.(*Parser).setFreeFloating($2, token.OpenParenthesisToken, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) - yylex.(*Parser).setFreeFloating($2, token.CloseParenthesisToken, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setFreeFloatingTokens($2, token.OpenParenthesisToken, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($2, token.CloseParenthesisToken, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5991,8 +5991,8 @@ parenthesis_expr: if len($2.GetNode().Tokens[token.CloseParenthesisToken]) > 0 { yylex.(*Parser).setFreeFloating($2, token.End, append($2.GetNode().Tokens[token.End], $2.GetNode().Tokens[token.CloseParenthesisToken]...)) } - yylex.(*Parser).setFreeFloating($2, token.OpenParenthesisToken, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) - yylex.(*Parser).setFreeFloating($2, token.CloseParenthesisToken, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setFreeFloatingTokens($2, token.OpenParenthesisToken, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($2, token.CloseParenthesisToken, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6038,7 +6038,7 @@ variable: } // save comments - yylex.(*Parser).setFreeFloating($3[0], token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($3[0], token.Var, $2.Tokens) for _, n := range($3) { switch nn := n.(type) { @@ -6121,7 +6121,7 @@ variable_property: $$ = $2 // save comments - yylex.(*Parser).setFreeFloating($2[0], token.Var, $1.Hidden) + yylex.(*Parser).setFreeFloating($2[0], token.Var, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6137,8 +6137,8 @@ array_method_dereference: fetch.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6151,8 +6151,8 @@ array_method_dereference: fetch.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6222,7 +6222,7 @@ static_member: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6235,7 +6235,7 @@ static_member: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6260,8 +6260,8 @@ array_function_dereference: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6274,8 +6274,8 @@ array_function_dereference: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6340,8 +6340,8 @@ reference_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6354,8 +6354,8 @@ reference_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6379,7 +6379,7 @@ compound_variable: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6391,9 +6391,9 @@ compound_variable: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($3, token.Start, append($2.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($2), $3.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($3, token.End, append($3.GetNode().Tokens[token.End], append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)...)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($3, token.Start, append($2.Tokens, $3.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($3, token.End, append($3.GetNode().Tokens[token.End], $4.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6444,8 +6444,8 @@ object_dim_list: fetch.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6458,8 +6458,8 @@ object_dim_list: fetch.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(fetch, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(fetch, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens(fetch, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6484,7 +6484,7 @@ variable_name: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6496,8 +6496,8 @@ variable_name: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6513,7 +6513,7 @@ simple_indirect_reference: n.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(n, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(n, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6530,9 +6530,9 @@ simple_indirect_reference: n.GetNode().Position = position.NewTokenPosition($2) // save comments - yylex.(*Parser).setFreeFloating(n, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(n, token.Start, $2.Tokens) - yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) + yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } ; @@ -6546,7 +6546,7 @@ assignment_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6586,9 +6586,9 @@ assignment_list_element: $$.GetNode().Position = position.NewNodePosition(listNode) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6618,7 +6618,7 @@ array_pair_list: // save comments if $2 != nil { - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -6635,9 +6635,9 @@ non_empty_array_pair_list: arrayItem.GetNode().Position = position.NewNodesPosition($3, $5) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).MoveFreeFloating($3, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6650,7 +6650,7 @@ non_empty_array_pair_list: arrayItem.GetNode().Position = position.NewNodePosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).MoveFreeFloating($3, arrayItem) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -6665,7 +6665,7 @@ non_empty_array_pair_list: // save comments yylex.(*Parser).MoveFreeFloating($1, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6693,10 +6693,10 @@ non_empty_array_pair_list: arrayItem.GetNode().Position = position.NewNodesPosition($3, $6) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).MoveFreeFloating($3, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Hidden) - yylex.(*Parser).setFreeFloating(reference, token.Start, $5.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $4.Tokens) + yylex.(*Parser).setFreeFloating(reference, token.Start, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6711,8 +6711,8 @@ non_empty_array_pair_list: arrayItem.GetNode().Position = position.NewTokenNodePosition($3, $4) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(arrayItem, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(arrayItem, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6728,8 +6728,8 @@ non_empty_array_pair_list: // save comments yylex.(*Parser).MoveFreeFloating($1, arrayItem) - yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Expr, $2.Tokens) + yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6744,7 +6744,7 @@ non_empty_array_pair_list: arrayItem.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating(arrayItem, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(arrayItem, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6766,7 +6766,7 @@ encaps_list: encapsed.GetNode().Position = position.NewTokenPosition($2) // save comments - yylex.(*Parser).setFreeFloating(encapsed, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(encapsed, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6785,7 +6785,7 @@ encaps_list: encapsed.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(encapsed, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(encapsed, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6802,7 +6802,7 @@ encaps_var: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6818,8 +6818,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6837,8 +6837,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) - yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6852,8 +6852,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6869,8 +6869,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6886,10 +6886,10 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.Var, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($5.Hidden, yylex.(*Parser).GetFreeFloatingToken($5)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($6.Hidden, yylex.(*Parser).GetFreeFloatingToken($6)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $3.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $5.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6898,8 +6898,8 @@ encaps_var: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6914,7 +6914,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6931,7 +6931,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6945,7 +6945,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6960,9 +6960,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Isset, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Isset, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6974,9 +6974,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6988,9 +6988,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7002,7 +7002,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7014,7 +7014,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7026,9 +7026,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Eval, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Eval, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7040,7 +7040,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7052,7 +7052,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7070,7 +7070,7 @@ isset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7103,8 +7103,8 @@ class_constant: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7119,8 +7119,8 @@ class_constant: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7138,8 +7138,8 @@ static_class_name_scalar: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -7157,8 +7157,8 @@ class_name_scalar: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/internal/php5/php5_bench_test.go b/internal/php5/php5_bench_test.go index 4ce4b1e..49efe90 100644 --- a/internal/php5/php5_bench_test.go +++ b/internal/php5/php5_bench_test.go @@ -415,7 +415,7 @@ CAD; for n := 0; n < b.N; n++ { lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() } } diff --git a/internal/php5/php5_test.go b/internal/php5/php5_test.go index 6f4d199..e3b98ab 100644 --- a/internal/php5/php5_test.go +++ b/internal/php5/php5_test.go @@ -22458,7 +22458,7 @@ func TestPhp5(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22596,7 +22596,7 @@ func TestPhp5Strings(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22823,7 +22823,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "5.6", false, nil) - php5parser := php5.NewParser(lexer, false, nil) + php5parser := php5.NewParser(lexer, nil) php5parser.Parse() actual := php5parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22849,7 +22849,7 @@ func TestPhp5ControlCharsErrors(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "5.6", false, errorHandlerFunc) - php5parser := php5.NewParser(lexer, false, errorHandlerFunc) + php5parser := php5.NewParser(lexer, errorHandlerFunc) php5parser.Parse() assert.DeepEqual(t, expected, parserErrors) } diff --git a/internal/php7/parser.go b/internal/php7/parser.go index 7426278..e7aa50e 100644 --- a/internal/php7/parser.go +++ b/internal/php7/parser.go @@ -14,14 +14,12 @@ type Parser struct { Lexer *scanner.Lexer currentToken *scanner.Token rootNode ast.Vertex - withTokens bool errHandlerFunc func(*errors.Error) } // NewParser creates and returns new Parser -func NewParser(lexer *scanner.Lexer, withTokens bool, errHandlerFunc func(*errors.Error)) *Parser { +func NewParser(lexer *scanner.Lexer, errHandlerFunc func(*errors.Error)) *Parser { return &Parser{ - withTokens: withTokens, Lexer: lexer, errHandlerFunc: errHandlerFunc, } @@ -63,7 +61,7 @@ func lastNode(nn []ast.Vertex) ast.Vertex { } func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { - if p.withTokens == false { + if _, ok := src.GetNode().Tokens[token.Start]; !ok { return } @@ -71,42 +69,64 @@ func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { return } - p.setFreeFloating(dst, token.Start, src.GetNode().Tokens[token.Start]) - delete(src.GetNode().Tokens, token.Start) -} - -func (p *Parser) setFreeFloating(dst ast.Vertex, pos token.Position, strings []token.Token) { - if p.withTokens == false { - return - } - - if len(strings) == 0 { - return - } - dstCollection := &dst.GetNode().Tokens if *dstCollection == nil { *dstCollection = make(token.Collection) } - (*dstCollection)[pos] = strings + (*dstCollection)[token.Start] = src.GetNode().Tokens[token.Start] + delete(src.GetNode().Tokens, token.Start) } -func (p *Parser) GetFreeFloatingToken(t *scanner.Token) []token.Token { - if p.withTokens == false { - return []token.Token{} +func (p *Parser) setFreeFloating(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return } - return []token.Token{ - { - ID: token.ID(t.ID), - Value: t.Value, - }, + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) } + + l := len(tokens) + for _, v := range tokens[0 : l-1] { + (*dstCollection)[pos] = append((*dstCollection)[pos], v) + } +} + +func (p *Parser) setFreeFloatingTokens(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return + } + + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) + } + + (*dstCollection)[pos] = make([]token.Token, 0) + + for _, v := range tokens { + (*dstCollection)[pos] = append((*dstCollection)[pos], v) + } +} + +func (p *Parser) setToken(dst ast.Vertex, pos token.Position, tokens []token.Token) { + if len(tokens) == 0 { + return + } + + dstCollection := &dst.GetNode().Tokens + if *dstCollection == nil { + *dstCollection = make(token.Collection) + } + + l := len(tokens) + (*dstCollection)[pos] = append((*dstCollection)[pos], tokens[l-1]) } func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast.Vertex) { - if p.withTokens == false { + if _, ok := prevNode.GetNode().Tokens[token.SemiColon]; !ok { return } @@ -117,7 +137,7 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. } if semiColon[0].Value[0] == ';' { - p.setFreeFloating(prevNode, token.SemiColon, []token.Token{ + p.setFreeFloatingTokens(prevNode, token.SemiColon, []token.Token{ { ID: token.ID(';'), Value: semiColon[0].Value[0:1], @@ -144,7 +164,7 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. Value: semiColon[0].Value[vlen-tlen:], }) - p.setFreeFloating(htmlNode, token.Start, append(phpCloseTag, htmlNode.GetNode().Tokens[token.Start]...)) + p.setFreeFloatingTokens(htmlNode, token.Start, append(phpCloseTag, htmlNode.GetNode().Tokens[token.Start]...)) } func (p *Parser) returnTokenToPool(yyDollar []yySymType, yyVAL *yySymType) { diff --git a/internal/php7/parser_test.go b/internal/php7/parser_test.go index 05cdefc..60e0289 100644 --- a/internal/php7/parser_test.go +++ b/internal/php7/parser_test.go @@ -59,7 +59,7 @@ func TestIdentifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -953,7 +953,7 @@ func TestPhp7ArgumentNode(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1747,7 +1747,7 @@ func TestPhp7ParameterNode(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1769,7 +1769,7 @@ func TestCommentEndFile(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1847,7 +1847,7 @@ func TestName(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1923,7 +1923,7 @@ func TestFullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -1999,7 +1999,7 @@ func TestRelative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2078,7 +2078,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2155,7 +2155,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2243,7 +2243,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2341,7 +2341,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2450,7 +2450,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2527,7 +2527,7 @@ func TestScalarEncapsed_DollarOpenCurlyBraces(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2625,7 +2625,7 @@ func TestScalarEncapsed_DollarOpenCurlyBracesDimNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2733,7 +2733,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2825,7 +2825,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2917,7 +2917,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -2977,7 +2977,7 @@ LBL; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3023,7 +3023,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3083,7 +3083,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3128,7 +3128,7 @@ func TestScalarMagicConstant(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3172,7 +3172,7 @@ func TestScalarNumber_LNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3216,7 +3216,7 @@ func TestScalarNumber_DNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3260,7 +3260,7 @@ func TestScalarNumber_Float(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3304,7 +3304,7 @@ func TestScalarNumber_BinaryLNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3348,7 +3348,7 @@ func TestScalarNumber_BinaryDNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3392,7 +3392,7 @@ func TestScalarNumber_HLNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3436,7 +3436,7 @@ func TestScalarNumber_HDNumber(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3480,7 +3480,7 @@ func TestScalarString_DoubleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3524,7 +3524,7 @@ func TestScalarString_DoubleQuotedScalarStringWithEscapedVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3570,7 +3570,7 @@ func TestScalarString_MultilineDoubleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3614,7 +3614,7 @@ func TestScalarString_SingleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3660,7 +3660,7 @@ func TestScalarString_MultilineSingleQuotedScalarString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3730,7 +3730,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3843,7 +3843,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -3933,7 +3933,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4111,7 +4111,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4246,7 +4246,7 @@ func TestStmtClassConstList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4368,7 +4368,7 @@ func TestStmtClassConstList_WithoutModifiers(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4447,7 +4447,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4596,7 +4596,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4722,7 +4722,7 @@ func TestStmtClassMethod_Php7ClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4837,7 +4837,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -4964,7 +4964,7 @@ func TestStmtClassMethod_Php7AbstractClassMethod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5009,7 +5009,7 @@ func TestStmtClass_SimpleClass(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5067,7 +5067,7 @@ func TestStmtClass_AbstractClass(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5158,7 +5158,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5251,7 +5251,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5367,7 +5367,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5522,7 +5522,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5621,7 +5621,7 @@ func TestStmtConstList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5687,7 +5687,7 @@ func TestStmtContinue_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5764,7 +5764,7 @@ func TestStmtContinue_Light(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5841,7 +5841,7 @@ func TestStmtContinue(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -5918,7 +5918,7 @@ func TestStmtDeclare(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6028,7 +6028,7 @@ func TestStmtDeclare_Stmts(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6107,7 +6107,7 @@ func TestStmtDeclare_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6162,7 +6162,7 @@ func TestStmtDo(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6229,7 +6229,7 @@ func TestStmtEcho(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6285,7 +6285,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6329,7 +6329,7 @@ func TestStmtExpression(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6525,7 +6525,7 @@ func TestStmtFor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6646,7 +6646,7 @@ func TestStmtFor_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6732,7 +6732,7 @@ func TestStmtForeach(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6808,7 +6808,7 @@ func TestStmtForeach_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -6894,7 +6894,7 @@ func TestStmtForeach_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7001,7 +7001,7 @@ func TestStmtForeach_WithKey(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7098,7 +7098,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7215,7 +7215,7 @@ func TestStmtForeach_WithRef(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7344,7 +7344,7 @@ func TestStmtForeach_WithList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7390,7 +7390,7 @@ func TestStmtFunction(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7447,7 +7447,7 @@ func TestStmtFunction_Return(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7615,7 +7615,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7683,7 +7683,7 @@ func TestStmtFunction_Ref(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7752,7 +7752,7 @@ func TestStmtFunction_ReturnType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7808,7 +7808,7 @@ func TestStmtGlobal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -7969,7 +7969,7 @@ func TestStmtGlobal_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8034,7 +8034,7 @@ func TestStmtGotoLabel(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8067,7 +8067,7 @@ func TestStmtHaltCompiler(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8132,7 +8132,7 @@ func TestStmtIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8241,7 +8241,7 @@ func TestStmtIf_ElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8327,7 +8327,7 @@ func TestStmtIf_Else(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8499,7 +8499,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8681,7 +8681,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8725,7 +8725,7 @@ func TestStmtInlineHtml(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8770,7 +8770,7 @@ func TestStmtInterface(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8850,7 +8850,7 @@ func TestStmtInterface_Extend(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -8953,7 +8953,7 @@ func TestStmtInterface_Extends(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9009,7 +9009,7 @@ func TestStmtNamespace(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9066,7 +9066,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9100,7 +9100,7 @@ func TestStmtNamespace_Anonymous(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9202,7 +9202,7 @@ func TestStmtProperty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9357,7 +9357,7 @@ func TestStmtProperty_Properties(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9512,7 +9512,7 @@ func TestStmtProperty_Properties2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9637,7 +9637,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9703,7 +9703,7 @@ func TestStmtStaticVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9811,7 +9811,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -9919,7 +9919,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10046,7 +10046,7 @@ func TestStmtSwitch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10173,7 +10173,7 @@ func TestStmtSwitch_Semicolon(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10290,7 +10290,7 @@ func TestStmtSwitch_Alt(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10395,7 +10395,7 @@ func TestStmtSwitch_AltSemicolon(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10449,7 +10449,7 @@ func TestStmtThrow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10494,7 +10494,7 @@ func TestStmtTrait(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10585,7 +10585,7 @@ func TestStmtTraitUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10699,7 +10699,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10813,7 +10813,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -10971,7 +10971,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11140,7 +11140,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11423,7 +11423,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11460,7 +11460,7 @@ func TestStmtTry_Try(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11555,7 +11555,7 @@ func TestStmtTry_TryCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11673,7 +11673,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11825,7 +11825,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -11931,7 +11931,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12138,7 +12138,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12194,7 +12194,7 @@ func TestStmtUnset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12271,7 +12271,7 @@ func TestStmtUnset_Vars(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12348,7 +12348,7 @@ func TestStmtUnset_TrailingComma(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12416,7 +12416,7 @@ func TestStmtUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12484,7 +12484,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12563,7 +12563,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12664,7 +12664,7 @@ func TestStmtUse_List(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12776,7 +12776,7 @@ func TestStmtUse_ListAlias(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -12888,7 +12888,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13022,7 +13022,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13134,7 +13134,7 @@ func TestStmtUse_ListConstType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13268,7 +13268,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13392,7 +13392,7 @@ func TestStmtUse_GroupUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13527,7 +13527,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13662,7 +13662,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13797,7 +13797,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -13943,7 +13943,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14009,7 +14009,7 @@ func TestStmtBreak_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14086,7 +14086,7 @@ func TestStmtBreak_Light(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14163,7 +14163,7 @@ func TestStmtBreak(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14240,7 +14240,7 @@ func TestExprArrayDimFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14336,7 +14336,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14380,7 +14380,7 @@ func TestExprArray(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14446,7 +14446,7 @@ func TestExprArray_Item(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14565,7 +14565,7 @@ func TestExprArray_Items(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14642,7 +14642,7 @@ func TestExprArray_ItemUnpack(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14708,7 +14708,7 @@ func TestExprArrowFunction(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14797,7 +14797,7 @@ func TestExprArrowFunction_ReturnType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14861,7 +14861,7 @@ func TestExprBitwiseNot(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -14925,7 +14925,7 @@ func TestExprBooleanNot(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15002,7 +15002,7 @@ func TestExprClassConstFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15067,7 +15067,7 @@ func TestExprClassConstFetch_Static(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15131,7 +15131,7 @@ func TestExprClone_Brackets(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15195,7 +15195,7 @@ func TestExprClone(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15241,7 +15241,7 @@ func TestExprClosure(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15419,7 +15419,7 @@ func TestExprClosure_Use(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15597,7 +15597,7 @@ func TestExprClosure_Use2(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15666,7 +15666,7 @@ func TestExprClosure_ReturnType(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15732,7 +15732,7 @@ func TestExprConstFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15798,7 +15798,7 @@ func TestExprConstFetch_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15864,7 +15864,7 @@ func TestExprConstFetch_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15928,7 +15928,7 @@ func TestExprEmpty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -15992,7 +15992,7 @@ func TestExprErrorSuppress(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16056,7 +16056,7 @@ func TestExprEval(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16100,7 +16100,7 @@ func TestExprExit(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16144,7 +16144,7 @@ func TestExprExit_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16209,7 +16209,7 @@ func TestExprExit_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16253,7 +16253,7 @@ func TestExprDie(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16297,7 +16297,7 @@ func TestExprDie_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16362,7 +16362,7 @@ func TestExprDie_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16438,7 +16438,7 @@ func TestExprFunctionCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16514,7 +16514,7 @@ func TestExprFunctionCall_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16615,7 +16615,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16734,7 +16734,7 @@ func TestExprFunctionCall_Var(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16866,7 +16866,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16930,7 +16930,7 @@ func TestExprPostDec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -16994,7 +16994,7 @@ func TestExprPostInc(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17058,7 +17058,7 @@ func TestExprPreDec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17122,7 +17122,7 @@ func TestExprPreInc(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17186,7 +17186,7 @@ func TestExprInclude(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17250,7 +17250,7 @@ func TestExprInclude_Once(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17314,7 +17314,7 @@ func TestExprRequire(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17378,7 +17378,7 @@ func TestExprRequire_Once(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17465,7 +17465,7 @@ func TestExprInstanceOf(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17552,7 +17552,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17639,7 +17639,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17705,7 +17705,7 @@ func TestExprIsset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17792,7 +17792,7 @@ func TestExprIsset_Variables(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17867,7 +17867,7 @@ func TestExprList_Empty(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -17974,7 +17974,7 @@ func TestExprList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18091,7 +18091,7 @@ func TestExprList_ArrayIndex(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18220,7 +18220,7 @@ func TestExprList_List(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18328,7 +18328,7 @@ func TestExprList_EmptyItem(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18438,7 +18438,7 @@ func TestExprList_EmptyItems(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18523,7 +18523,7 @@ func TestExprMethodCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18589,7 +18589,7 @@ func TestExprNew(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18665,7 +18665,7 @@ func TestExprNew_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18741,7 +18741,7 @@ func TestExprNew_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18873,7 +18873,7 @@ func TestExprNew_Anonymous(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -18937,7 +18937,7 @@ func TestExprPrint(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19012,7 +19012,7 @@ func TestExprPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19130,7 +19130,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19207,7 +19207,7 @@ func TestExprShellExec(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19251,7 +19251,7 @@ func TestExprShortArray(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19317,7 +19317,7 @@ func TestExprShortArray_Item(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19436,7 +19436,7 @@ func TestExprShortArray_Items(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19543,7 +19543,7 @@ func TestExprShortList(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19660,7 +19660,7 @@ func TestExprShortList_ArrayIndex(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19789,7 +19789,7 @@ func TestExprShortList_List(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19876,7 +19876,7 @@ func TestExprStaticCall(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19963,7 +19963,7 @@ func TestExprStaticCall_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20050,7 +20050,7 @@ func TestExprStaticCall_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20147,7 +20147,7 @@ func TestExprStaticCall_Var(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20242,7 +20242,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20329,7 +20329,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20416,7 +20416,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20503,7 +20503,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20609,7 +20609,7 @@ func TestExprTernary(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20694,7 +20694,7 @@ func TestExprTernary_Simple(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20852,7 +20852,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21010,7 +21010,7 @@ func TestExprTernary_NestedCond(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21074,7 +21074,7 @@ func TestExprUnaryMinus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21138,7 +21138,7 @@ func TestExprUnaryPlus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21192,7 +21192,7 @@ func TestExprVariable(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21256,7 +21256,7 @@ func TestExprVariable_Variable(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21299,7 +21299,7 @@ func TestExprYield(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21363,7 +21363,7 @@ func TestExprYield_Val(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21448,7 +21448,7 @@ func TestExprYield_KeyVal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21502,7 +21502,7 @@ func TestExprYield_Expr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21577,7 +21577,7 @@ func TestExprYield_KeyExpr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21641,7 +21641,7 @@ func TestExprYieldFrom(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21728,7 +21728,7 @@ func TestExprAssign_Assign(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21813,7 +21813,7 @@ func TestExprAssign_Reference(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -21910,7 +21910,7 @@ func TestExprAssign_ReferenceNew(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22052,7 +22052,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22137,7 +22137,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22222,7 +22222,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22307,7 +22307,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22392,7 +22392,7 @@ func TestExprAssign_Concat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22477,7 +22477,7 @@ func TestExprAssign_Div(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22562,7 +22562,7 @@ func TestExprAssign_Minus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22647,7 +22647,7 @@ func TestExprAssign_Mod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22732,7 +22732,7 @@ func TestExprAssign_Mul(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22817,7 +22817,7 @@ func TestExprAssign_Plus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22902,7 +22902,7 @@ func TestExprAssign_Pow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -22987,7 +22987,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23072,7 +23072,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23157,7 +23157,7 @@ func TestExprAssign_Coalesce(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23244,7 +23244,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23329,7 +23329,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23414,7 +23414,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23499,7 +23499,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23584,7 +23584,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23669,7 +23669,7 @@ func TestExprBinary_Coalesce(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23754,7 +23754,7 @@ func TestExprBinary_Concat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23839,7 +23839,7 @@ func TestExprBinary_Div(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -23924,7 +23924,7 @@ func TestExprBinary_Equal(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24009,7 +24009,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24094,7 +24094,7 @@ func TestExprBinary_Greater(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24179,7 +24179,7 @@ func TestExprBinary_Identical(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24264,7 +24264,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24349,7 +24349,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24434,7 +24434,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24519,7 +24519,7 @@ func TestExprBinary_Minus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24604,7 +24604,7 @@ func TestExprBinary_Mod(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24689,7 +24689,7 @@ func TestExprBinary_Mul(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24774,7 +24774,7 @@ func TestExprBinary_NotEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24859,7 +24859,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -24944,7 +24944,7 @@ func TestExprBinary_Plus(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25029,7 +25029,7 @@ func TestExprBinary_Pow(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25114,7 +25114,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25199,7 +25199,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25284,7 +25284,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25369,7 +25369,7 @@ func TestExprBinary_Smaller(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25454,7 +25454,7 @@ func TestExprBinary_Spaceship(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25520,7 +25520,7 @@ func TestExprCast_Array(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25584,7 +25584,7 @@ func TestExprCast_Bool(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25648,7 +25648,7 @@ func TestExprCast_BoolShort(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25712,7 +25712,7 @@ func TestExprCast_Double(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25776,7 +25776,7 @@ func TestExprCast_CastFloat(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25840,7 +25840,7 @@ func TestExprCast_Int(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25904,7 +25904,7 @@ func TestExprCast_IntShort(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -25968,7 +25968,7 @@ func TestExprCast_Object(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -26032,7 +26032,7 @@ func TestExprCast_String(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -26096,7 +26096,7 @@ func TestExprCast_BinaryString(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -26160,7 +26160,7 @@ func TestExprCast_Unset(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) diff --git a/internal/php7/php7.go b/internal/php7/php7.go index 90532bc..b805993 100644 Binary files a/internal/php7/php7.go and b/internal/php7/php7.go differ diff --git a/internal/php7/php7.y b/internal/php7/php7.y index 29a4a8b..6002670 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -297,7 +297,7 @@ start: // save position yylex.(*Parser).rootNode.GetNode().Position = position.NewNodeListPosition($1) - yylex.(*Parser).setFreeFloating(yylex.(*Parser).rootNode, token.End, yylex.(*Parser).currentToken.Hidden) + yylex.(*Parser).setFreeFloating(yylex.(*Parser).rootNode, token.End, yylex.(*Parser).currentToken.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -364,7 +364,7 @@ namespace_name: namePart.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(namePart, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(namePart, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -377,8 +377,8 @@ namespace_name: namePart.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(namePart, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(namePart, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -405,8 +405,8 @@ name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -418,7 +418,7 @@ name: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -470,11 +470,11 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -488,10 +488,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -505,10 +505,10 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -520,9 +520,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Namespace, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -534,9 +534,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -549,9 +549,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -563,9 +563,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -577,9 +577,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.UseDeclarationList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -591,9 +591,9 @@ top_statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -608,7 +608,7 @@ use_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -620,7 +620,7 @@ use_type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -638,12 +638,12 @@ group_use_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Slash, $3.Tokens) if $5 != nil { - yylex.(*Parser).setFreeFloating($$, token.Stmts, append($5.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($5), $6.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, append($5.Tokens, $6.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -658,14 +658,14 @@ group_use_declaration: $$.GetNode().Position = position.NewTokensPosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating($$, token.UseType, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.UseType, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, $4.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Slash, $4.Tokens) if $6 != nil { - yylex.(*Parser).setFreeFloating($$, token.Stmts, append($6.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($6), $7.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, append($6.Tokens, $7.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -684,12 +684,12 @@ mixed_group_use_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Slash, $3.Tokens) if $5 != nil { - yylex.(*Parser).setFreeFloating($$, token.Stmts, append($5.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($5), $6.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, append($5.Tokens, $6.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -704,14 +704,14 @@ mixed_group_use_declaration: $$.GetNode().Position = position.NewTokensPosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating($$, token.Use, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Use, $1.Tokens) yylex.(*Parser).MoveFreeFloating($2[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, $4.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Slash, $4.Tokens) if $6 != nil { - yylex.(*Parser).setFreeFloating($$, token.Stmts, append($6.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($6), $7.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, append($6.Tokens, $7.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -735,7 +735,7 @@ inline_use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -753,7 +753,7 @@ unprefixed_use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -771,7 +771,7 @@ use_declarations: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -827,8 +827,8 @@ unprefixed_use_declaration: // save comments yylex.(*Parser).MoveFreeFloating($1[0], name) - yylex.(*Parser).setFreeFloating(name, token.End, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.End, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -849,11 +849,8 @@ use_declaration: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) - - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Slash, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Slash, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -865,7 +862,7 @@ const_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -945,11 +942,11 @@ inner_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.HaltCompiller, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.OpenParenthesisToken, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -963,8 +960,8 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -995,9 +992,9 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.While, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.While, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1009,12 +1006,12 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.While, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cond, $7.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($7)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.While, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Cond, $7.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1037,11 +1034,11 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $9) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.For, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.InitExpr, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.CondExpr, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.IncExpr, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.For, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.InitExpr, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.CondExpr, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.IncExpr, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1062,9 +1059,9 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Switch, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Switch, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1076,9 +1073,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1090,9 +1087,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1104,9 +1101,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1118,9 +1115,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1132,9 +1129,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.VarList, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1146,10 +1143,10 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Echo, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Echo, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1161,7 +1158,7 @@ statement: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1174,12 +1171,12 @@ statement: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } - | T_UNSET '(' unset_variables possible_comma ')' ';' + | T_UNSET '(' unset_variables possible_comma ')' ';' { $$ = &ast.StmtUnset{ast.Node{}, $3} @@ -1187,15 +1184,15 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Unset, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Unset, $2.Tokens) if $4 != nil { - yylex.(*Parser).setFreeFloating($$, token.VarList, append($4.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($4), $5.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.VarList, append($4.Tokens, $5.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.VarList, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.VarList, $5.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($6)) + yylex.(*Parser).setFreeFloating($$, token.CloseParenthesisToken, $6.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1216,10 +1213,10 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -1243,11 +1240,11 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $9) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Key, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Foreach, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Key, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1260,9 +1257,9 @@ statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Declare, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Declare, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1274,8 +1271,8 @@ statement: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1290,9 +1287,9 @@ statement: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Try, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Try, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1304,9 +1301,9 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1320,10 +1317,10 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(label, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Label, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(label, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Label, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1337,8 +1334,8 @@ statement: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Label, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Label, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1363,12 +1360,12 @@ catch_list: catch.GetNode().Position = position.NewTokensPosition($2, $9) // save comments - yylex.(*Parser).setFreeFloating(catch, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(catch, token.Catch, $3.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $5.Hidden) - yylex.(*Parser).setFreeFloating(catch, token.Var, $6.Hidden) - yylex.(*Parser).setFreeFloating(catch, token.Cond, $7.Hidden) - yylex.(*Parser).setFreeFloating(catch, token.Stmts, $9.Hidden) + yylex.(*Parser).setFreeFloating(catch, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(catch, token.Catch, $3.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $5.Tokens) + yylex.(*Parser).setFreeFloating(catch, token.Var, $6.Tokens) + yylex.(*Parser).setFreeFloating(catch, token.Cond, $7.Tokens) + yylex.(*Parser).setFreeFloating(catch, token.Stmts, $9.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1385,7 +1382,7 @@ catch_name_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1406,9 +1403,9 @@ finally_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Finally, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Finally, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1426,7 +1423,7 @@ unset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1453,24 +1450,24 @@ function_declaration_statement: // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $2.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $2.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $3.Tokens) } else { - yylex.(*Parser).setFreeFloating(name, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating(name, token.Start, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Name, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ParamList, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ParamList, $7.Tokens) if $8 != nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) } - yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Tokens) // normalize if $8 == nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -1511,10 +1508,10 @@ class_declaration_statement: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $7.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $7.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $9.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1528,10 +1525,10 @@ class_declaration_statement: $$.GetNode().Position = position.NewTokensPosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1561,7 +1558,7 @@ class_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1573,7 +1570,7 @@ class_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1590,10 +1587,10 @@ trait_declaration_statement: $$.GetNode().Position = position.NewTokensPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1610,10 +1607,10 @@ interface_declaration_statement: $$.GetNode().Position = position.NewTokensPosition($1, $7) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(name, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(name, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $7.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1634,7 +1631,7 @@ extends_from: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1655,7 +1652,7 @@ interface_extends_list: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1676,7 +1673,7 @@ implements_list: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1697,7 +1694,7 @@ foreach_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1709,9 +1706,9 @@ foreach_variable: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1723,8 +1720,8 @@ foreach_variable: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save commentsc - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1750,10 +1747,10 @@ for_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1779,10 +1776,10 @@ foreach_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1808,10 +1805,10 @@ declare_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1828,8 +1825,8 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Hidden) + yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1843,9 +1840,9 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListStart, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Hidden) + yylex.(*Parser).setFreeFloating(caseList, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens(caseList, token.CaseListStart, $2.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1859,10 +1856,10 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1877,11 +1874,11 @@ switch_case_list: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListStart, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($5)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens(caseList, token.CaseListStart, $2.Tokens) + yylex.(*Parser).setFreeFloating(caseList, token.CaseListEnd, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $5.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1903,9 +1900,9 @@ case_list: _case.GetNode().Position = position.NewTokenNodeListPosition($2, $5) // save comments - yylex.(*Parser).setFreeFloating(_case, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_case, token.Expr, append($4.Hidden)) - yylex.(*Parser).setFreeFloating(_case, token.CaseSeparator, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating(_case, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_case, token.Expr, append($4.Tokens)) + yylex.(*Parser).setToken(_case, token.CaseSeparator, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1918,9 +1915,9 @@ case_list: _default.GetNode().Position = position.NewTokenNodeListPosition($2, $4) // save comments - yylex.(*Parser).setFreeFloating(_default, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_default, token.Default, $3.Hidden) - yylex.(*Parser).setFreeFloating(_default, token.CaseSeparator, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating(_default, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_default, token.Default, $3.Tokens) + yylex.(*Parser).setToken(_default, token.CaseSeparator, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1957,10 +1954,10 @@ while_statement: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.Cond, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1975,9 +1972,9 @@ if_stmt_without_else: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.If, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.If, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -1993,9 +1990,9 @@ if_stmt_without_else: $$.GetNode().Position = position.NewNodesPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.Hidden) - yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $5.Hidden) + yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.Tokens) + yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2020,7 +2017,7 @@ if_stmt: $$.GetNode().Position = position.NewNodesPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating(_else, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(_else, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2037,10 +2034,10 @@ alt_if_stmt_without_else: $$.GetNode().Position = position.NewTokenNodeListPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.If, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cond, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.If, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Cond, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2057,10 +2054,10 @@ alt_if_stmt_without_else: _elseIf.GetNode().Position = position.NewTokenNodeListPosition($2, $7) // save comments - yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.Hidden) - yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $5.Hidden) - yylex.(*Parser).setFreeFloating(_elseIf, token.Cond, $6.Hidden) + yylex.(*Parser).setFreeFloating(_elseIf, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_elseIf, token.ElseIf, $3.Tokens) + yylex.(*Parser).setFreeFloating(_elseIf, token.Expr, $5.Tokens) + yylex.(*Parser).setFreeFloating(_elseIf, token.Cond, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2075,9 +2072,9 @@ alt_if_stmt: $$.GetNode().Position = position.NewNodeTokenPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Stmts, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($3)) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $3.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2095,11 +2092,11 @@ alt_if_stmt: $$.GetNode().Position = position.NewNodeTokenPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating(_else, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(_else, token.Else, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AltEnd, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($6)) + yylex.(*Parser).setFreeFloating(_else, token.Start, $2.Tokens) + yylex.(*Parser).setFreeFloating(_else, token.Else, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $5.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AltEnd, $6.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2132,7 +2129,7 @@ non_empty_parameter_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2163,23 +2160,23 @@ parameter: yylex.(*Parser).MoveFreeFloating($1, $$) } if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Tokens) } if $3 != nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Tokens) // normalize if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) + yylex.(*Parser).setFreeFloatingTokens($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) } if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) + yylex.(*Parser).setFreeFloatingTokens($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) } if $1 == nil { - yylex.(*Parser).setFreeFloating($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2208,24 +2205,24 @@ parameter: yylex.(*Parser).MoveFreeFloating($1, $$) } if $2 != nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.OptionalType, $2.Tokens) } if $3 != nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $5.Tokens) // normalize if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) + yylex.(*Parser).setFreeFloatingTokens($$, token.Ampersand, $$.GetNode().Tokens[token.Variadic]); delete($$.GetNode().Tokens, token.Variadic) } if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) + yylex.(*Parser).setFreeFloatingTokens($$, token.OptionalType, $$.GetNode().Tokens[token.Ampersand]); delete($$.GetNode().Tokens, token.Ampersand) } if $1 == nil { - yylex.(*Parser).setFreeFloating($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, $$.GetNode().Tokens[token.OptionalType]); delete($$.GetNode().Tokens, token.OptionalType) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2262,7 +2259,7 @@ type_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2277,7 +2274,7 @@ type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2289,7 +2286,7 @@ type: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2313,7 +2310,7 @@ return_type: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Colon, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Colon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2328,8 +2325,8 @@ argument_list: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2341,11 +2338,11 @@ argument_list: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $3 != nil { - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, append($3.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($3), $4.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, append($3.Tokens, $4.Tokens...)) } else { - yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ArgumentList, $4.Tokens) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2364,7 +2361,7 @@ non_empty_argument_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2391,7 +2388,7 @@ argument: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2403,7 +2400,7 @@ global_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2430,7 +2427,7 @@ static_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2455,7 +2452,7 @@ static_var: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2471,8 +2468,8 @@ static_var: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2503,8 +2500,8 @@ class_statement: // save comments yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.PropertyList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.PropertyList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2518,12 +2515,12 @@ class_statement: // save comments if len($1) > 0 { yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $2.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($4)) + yylex.(*Parser).setFreeFloating($$, token.ConstList, $4.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2535,7 +2532,7 @@ class_statement: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2555,20 +2552,20 @@ class_statement: // save comments if len($1) > 0 { yylex.(*Parser).MoveFreeFloating($1[0], $$) - yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ModifierList, $2.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $2.Tokens) } if $3 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $4.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.Name, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $8.Tokens) if $9 != nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $9.GetNode().Tokens[token.Colon]); delete($9.GetNode().Tokens, token.Colon) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $9.GetNode().Tokens[token.Colon]); delete($9.GetNode().Tokens, token.Colon) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2587,7 +2584,7 @@ name_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2601,8 +2598,8 @@ trait_adaptations: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2614,8 +2611,8 @@ trait_adaptations: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2626,8 +2623,8 @@ trait_adaptations: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.AdaptationList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2654,8 +2651,8 @@ trait_adaptation: $$ = $1; // save comments - yylex.(*Parser).setFreeFloating($$, token.NameList, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.NameList, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2664,8 +2661,8 @@ trait_adaptation: $$ = $1; // save comments - yylex.(*Parser).setFreeFloating($$, token.Alias, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Alias, $2.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2681,7 +2678,7 @@ trait_precedence: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2699,8 +2696,8 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2715,8 +2712,8 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2731,8 +2728,8 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) - yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) + yylex.(*Parser).setFreeFloating(alias, token.Start, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2745,7 +2742,7 @@ trait_alias: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Ref, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2762,7 +2759,7 @@ trait_method_reference: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2786,15 +2783,15 @@ absolute_trait_method_reference: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } ; method_body: - ';' /* abstract method */ + ';' /* abstract method */ { $$ = &ast.StmtNop{ast.Node{}, } @@ -2802,8 +2799,8 @@ method_body: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.SemiColon, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.SemiColon, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2815,8 +2812,8 @@ method_body: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2838,7 +2835,7 @@ variable_modifiers: modifier.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(modifier, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(modifier, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2883,7 +2880,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2895,7 +2892,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2907,7 +2904,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2919,7 +2916,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2931,7 +2928,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2943,7 +2940,7 @@ member_modifier: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2955,7 +2952,7 @@ property_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2980,7 +2977,7 @@ property: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2996,8 +2993,8 @@ property: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3009,7 +3006,7 @@ class_const_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3032,8 +3029,8 @@ class_const_decl: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3050,8 +3047,8 @@ const_decl: $$.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3063,7 +3060,7 @@ echo_expr_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3105,7 +3102,7 @@ non_empty_for_exprs: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3130,9 +3127,9 @@ anonymous_class: $$.GetNode().Position = position.NewTokensPosition($1, $8) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Name, $6.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Name, $6.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3150,7 +3147,7 @@ new_expr: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3162,7 +3159,7 @@ new_expr: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3179,10 +3176,10 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $5.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3196,9 +3193,9 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(shortList, token.ArrayPairList, $3.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Var, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(shortList, token.ArrayPairList, $3.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Var, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3211,7 +3208,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3224,8 +3221,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Equal, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3237,7 +3234,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3250,7 +3247,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3263,7 +3260,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3276,7 +3273,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3289,7 +3286,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3302,7 +3299,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3315,7 +3312,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3328,7 +3325,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3341,7 +3338,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3354,7 +3351,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3367,7 +3364,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3380,7 +3377,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3393,7 +3390,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3406,7 +3403,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3419,7 +3416,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3431,7 +3428,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3444,7 +3441,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3456,7 +3453,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3469,7 +3466,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3482,7 +3479,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3495,7 +3492,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3508,7 +3505,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3521,7 +3518,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3534,7 +3531,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3547,7 +3544,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3560,7 +3557,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3573,7 +3570,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3586,7 +3583,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3599,7 +3596,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3612,7 +3609,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3625,7 +3622,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3638,7 +3635,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3651,7 +3648,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3664,7 +3661,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3677,7 +3674,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3689,7 +3686,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3701,7 +3698,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3713,7 +3710,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3725,7 +3722,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3738,7 +3735,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3751,7 +3748,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3764,7 +3761,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3777,8 +3774,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Equal, yylex.(*Parser).GetFreeFloatingToken($2)) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setToken($$, token.Equal, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3791,7 +3788,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3804,7 +3801,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3817,7 +3814,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3830,7 +3827,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3843,7 +3840,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3856,7 +3853,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3865,8 +3862,8 @@ expr_without_variable: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3885,8 +3882,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3899,8 +3896,8 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.True, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Cond, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.True, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3913,7 +3910,7 @@ expr_without_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3931,8 +3928,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3944,8 +3941,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3957,8 +3954,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3970,8 +3967,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3983,8 +3980,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -3996,8 +3993,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4009,8 +4006,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Cast, yylex.(*Parser).GetFreeFloatingToken($1)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setToken($$, token.Cast, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4037,7 +4034,7 @@ expr_without_variable: } // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4049,7 +4046,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4067,7 +4064,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4079,7 +4076,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4091,7 +4088,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4103,7 +4100,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4115,8 +4112,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4128,7 +4125,7 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4153,8 +4150,8 @@ expr_without_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Static, $$.GetNode().Tokens[token.Start]); delete($$.GetNode().Tokens, token.Start) - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden); + yylex.(*Parser).setFreeFloatingTokens($$, token.Static, $$.GetNode().Tokens[token.Start]); delete($$.GetNode().Tokens, token.Start) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens); yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4167,28 +4164,28 @@ inline_function: // save position $$.GetNode().Position = position.NewTokensPosition($1, $11) - + // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $4.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $4.Tokens) } - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $6.Tokens) if $8 != nil { - yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) + yylex.(*Parser).setFreeFloatingTokens($$, token.LexicalVars, $8.GetNode().Tokens[token.Colon]); delete($8.GetNode().Tokens, token.Colon) } - yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ReturnType, $9.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Stmts, $11.Tokens) // normalize if $8 == nil { - yylex.(*Parser).setFreeFloating($$, token.LexicalVars, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) + yylex.(*Parser).setFreeFloatingTokens($$, token.LexicalVars, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) } if $7 == nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $$.GetNode().Tokens[token.LexicalVarList]); delete($$.GetNode().Tokens, token.LexicalVarList) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $$.GetNode().Tokens[token.LexicalVarList]); delete($$.GetNode().Tokens, token.LexicalVarList) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -4199,24 +4196,24 @@ inline_function: // save position $$.GetNode().Position = position.NewTokenNodePosition($1, $9) - + // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) if $2 == nil { - yylex.(*Parser).setFreeFloating($$, token.Function, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $3.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.Function, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Function, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Tokens) }; - yylex.(*Parser).setFreeFloating($$, token.ParameterList, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ParameterList, $5.Tokens) if $6 != nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $6.GetNode().Tokens[token.Colon]); delete($6.GetNode().Tokens, token.Colon) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $6.GetNode().Tokens[token.Colon]); delete($6.GetNode().Tokens, token.Colon) }; - yylex.(*Parser).setFreeFloating($$, token.ReturnType, $8.Hidden) + yylex.(*Parser).setFreeFloating($$, token.ReturnType, $8.Tokens) // normalize if $6 == nil { - yylex.(*Parser).setFreeFloating($$, token.Params, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) + yylex.(*Parser).setFreeFloatingTokens($$, token.Params, $$.GetNode().Tokens[token.ReturnType]); delete($$.GetNode().Tokens, token.ReturnType) }; yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -4253,9 +4250,9 @@ lexical_vars: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Use, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.LexicalVarList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Use, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.LexicalVarList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4267,7 +4264,7 @@ lexical_var_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4290,7 +4287,7 @@ lexical_var: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4306,8 +4303,8 @@ lexical_var: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4335,7 +4332,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4348,7 +4345,7 @@ function_call: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4375,7 +4372,7 @@ class_name: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4417,8 +4414,8 @@ exit_expr: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Exit, append($1.Hidden, yylex.(*Parser).GetFreeFloatingToken($1)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Exit, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4473,9 +4470,9 @@ dereferencable_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Array, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Array, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4487,8 +4484,8 @@ dereferencable_scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.ArrayPairList, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4500,7 +4497,7 @@ dereferencable_scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4515,7 +4512,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4527,7 +4524,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4539,7 +4536,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4551,7 +4548,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4563,7 +4560,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4575,7 +4572,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4587,7 +4584,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4599,7 +4596,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4611,7 +4608,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4623,7 +4620,7 @@ scalar: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4637,7 +4634,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4649,7 +4646,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4661,7 +4658,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4673,7 +4670,7 @@ scalar: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4715,8 +4712,8 @@ constant: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4731,8 +4728,8 @@ constant: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) - yylex.(*Parser).setFreeFloating(target, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) + yylex.(*Parser).setFreeFloating(target, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4789,8 +4786,8 @@ dereferencable: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4814,8 +4811,8 @@ callable_expr: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4843,8 +4840,8 @@ callable_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4857,8 +4854,8 @@ callable_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4871,8 +4868,8 @@ callable_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4885,7 +4882,7 @@ callable_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4919,7 +4916,7 @@ variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4936,7 +4933,7 @@ simple_variable: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4948,9 +4945,9 @@ simple_variable: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($3, token.Start, append($2.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($2), $3.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($3, token.End, append($3.GetNode().Tokens[token.End], append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)...)) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($3, token.Start, append($2.Tokens, $3.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($3, token.End, append($3.GetNode().Tokens[token.End], $4.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4962,7 +4959,7 @@ simple_variable: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4978,7 +4975,7 @@ static_member: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4991,7 +4988,7 @@ static_member: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Name, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Name, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5013,8 +5010,8 @@ new_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5027,8 +5024,8 @@ new_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5041,7 +5038,7 @@ new_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5054,7 +5051,7 @@ new_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5067,7 +5064,7 @@ new_variable: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5082,7 +5079,7 @@ member_name: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5091,8 +5088,8 @@ member_name: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5113,17 +5110,17 @@ property_name: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | '{' expr '}' { $$ = $2; - + // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, append($1.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($1), $$.GetNode().Tokens[token.Start]...)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($$.GetNode().Tokens[token.End], append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Start, append($1.Tokens, $$.GetNode().Tokens[token.Start]...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, append($$.GetNode().Tokens[token.End], $3.Tokens...)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5169,7 +5166,7 @@ non_empty_array_pair_list: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5195,7 +5192,7 @@ array_pair: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5222,8 +5219,8 @@ array_pair: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setFreeFloating(reference, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5237,7 +5234,7 @@ array_pair: reference.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5249,7 +5246,7 @@ array_pair: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5265,10 +5262,10 @@ array_pair: // save comments yylex.(*Parser).MoveFreeFloating($1, $$) - yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.Start, $3.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.List, $4.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $6.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Expr, $2.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.Start, $3.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.List, $4.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5281,11 +5278,11 @@ array_pair: // save position listNode.GetNode().Position = position.NewTokensPosition($1, $4) $$.GetNode().Position = position.NewTokensPosition($1, $4) - + // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Hidden) - yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.List, $2.Tokens) + yylex.(*Parser).setFreeFloating(listNode, token.ArrayPairList, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5307,7 +5304,7 @@ encaps_list: encapsed.GetNode().Position = position.NewTokenPosition($2) // save comments - yylex.(*Parser).setFreeFloating(encapsed, token.Start, $2.Hidden) + yylex.(*Parser).setFreeFloating(encapsed, token.Start, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5326,7 +5323,7 @@ encaps_list: encapsed.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating(encapsed, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating(encapsed, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5343,7 +5340,7 @@ encaps_var: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5359,8 +5356,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5378,8 +5375,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) - yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Var, $2.Tokens) + yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5393,8 +5390,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5410,8 +5407,8 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5427,10 +5424,10 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $6) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.Var, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) - yylex.(*Parser).setFreeFloating($$, token.Expr, append($5.Hidden, yylex.(*Parser).GetFreeFloatingToken($5)...)) - yylex.(*Parser).setFreeFloating($$, token.End, append($6.Hidden, yylex.(*Parser).GetFreeFloatingToken($6)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Var, $3.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.Expr, $5.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $6.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5439,8 +5436,8 @@ encaps_var: $$ = $2; // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, yylex.(*Parser).GetFreeFloatingToken($1)) - yylex.(*Parser).setFreeFloating($$, token.End, append($3.Hidden, yylex.(*Parser).GetFreeFloatingToken($3)...)) + yylex.(*Parser).setToken($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloatingTokens($$, token.End, $3.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5455,7 +5452,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5472,7 +5469,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5498,7 +5495,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokensPosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5512,7 +5509,7 @@ encaps_var_offset: $$.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5527,12 +5524,12 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $5) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Isset, $2.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Isset, $2.Tokens) if $4 == nil { - yylex.(*Parser).setFreeFloating($$, token.VarList, $5.Hidden) + yylex.(*Parser).setFreeFloating($$, token.VarList, $5.Tokens) } else { - yylex.(*Parser).setFreeFloating($$, token.VarList, append($4.Hidden, append(yylex.(*Parser).GetFreeFloatingToken($4), $5.Hidden...)...)) + yylex.(*Parser).setFreeFloating($$, token.VarList, append($4.Tokens, $5.Tokens...)) } yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -5545,9 +5542,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Empty, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5559,7 +5556,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5571,7 +5568,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5583,9 +5580,9 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Eval, $2.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Eval, $2.Tokens) + yylex.(*Parser).setFreeFloating($$, token.Expr, $4.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5597,7 +5594,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5609,7 +5606,7 @@ internal_functions_in_yacc: $$.GetNode().Position = position.NewTokenNodePosition($1, $2) // save comments - yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) + yylex.(*Parser).setFreeFloating($$, token.Start, $1.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5627,7 +5624,7 @@ isset_variables: $$ = append($1, $3) // save comments - yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) + yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Tokens) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/internal/php7/php7_bench_test.go b/internal/php7/php7_bench_test.go index 61045b0..558c54b 100644 --- a/internal/php7/php7_bench_test.go +++ b/internal/php7/php7_bench_test.go @@ -383,7 +383,7 @@ CAD; for n := 0; n < b.N; n++ { lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() } } diff --git a/internal/php7/php7_test.go b/internal/php7/php7_test.go index 169e62c..6d214a7 100644 --- a/internal/php7/php7_test.go +++ b/internal/php7/php7_test.go @@ -19635,7 +19635,7 @@ func TestPhp7(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -19773,7 +19773,7 @@ func TestPhp5Strings(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20000,7 +20000,7 @@ CAD; } lexer := scanner.NewLexer([]byte(src), "7.4", false, nil) - php7parser := php7.NewParser(lexer, false, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() actual := php7parser.GetRootNode() assert.DeepEqual(t, expected, actual) @@ -20026,7 +20026,7 @@ func TestPhp7ControlCharsErrors(t *testing.T) { } lexer := scanner.NewLexer([]byte(src), "7.4", false, errorHandlerFunc) - php7parser := php7.NewParser(lexer, false, errorHandlerFunc) + php7parser := php7.NewParser(lexer, errorHandlerFunc) php7parser.Parse() assert.DeepEqual(t, expected, parserErrors) } diff --git a/internal/scanner/lexer.go b/internal/scanner/lexer.go index e20e701..7456961 100644 --- a/internal/scanner/lexer.go +++ b/internal/scanner/lexer.go @@ -11,10 +11,10 @@ import ( ) type Lexer struct { - data []byte - phpVersion string - withHiddenTokens bool - errHandlerFunc func(*errors.Error) + data []byte + phpVersion string + withTokens bool + errHandlerFunc func(*errors.Error) p, pe, cs int ts, te, act int @@ -23,16 +23,15 @@ type Lexer struct { heredocLabel []byte tokenPool *TokenPool - hiddenTokens []token.Token newLines NewLines } -func NewLexer(data []byte, phpVersion string, withHiddenTokens bool, errHandlerFunc func(*errors.Error)) *Lexer { +func NewLexer(data []byte, phpVersion string, withTokens bool, errHandlerFunc func(*errors.Error)) *Lexer { lex := &Lexer{ - data: data, - phpVersion: phpVersion, - withHiddenTokens: withHiddenTokens, - errHandlerFunc: errHandlerFunc, + data: data, + phpVersion: phpVersion, + withTokens: withTokens, + errHandlerFunc: errHandlerFunc, pe: len(data), stack: make([]int, 0), @@ -57,12 +56,12 @@ func (lex *Lexer) setTokenPosition(token *Token) { token.Position.EndPos = lex.te } -func (lex *Lexer) addHiddenToken(id TokenID, ps, pe int) { - if !lex.withHiddenTokens { +func (lex *Lexer) addHiddenToken(t *Token, id TokenID, ps, pe int) { + if !lex.withTokens { return } - lex.hiddenTokens = append(lex.hiddenTokens, token.Token{ + t.Tokens = append(t.Tokens, token.Token{ ID: token.ID(id), Value: lex.data[ps:pe], }) @@ -236,9 +235,9 @@ func (lex *Lexer) error(msg string) { } func isValidVarNameStart(r byte) bool { - return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || r == '_' || (r >= 0x80 && r <= 0xff) + return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || r == '_' || r >= 0x80 } func isValidVarName(r byte) bool { - return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || (r >= 0x80 && r <= 0xff) + return (r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '_' || r >= 0x80 } diff --git a/internal/scanner/scanner.go b/internal/scanner/scanner.go index c4b5ae5..86a2eb1 100644 Binary files a/internal/scanner/scanner.go and b/internal/scanner/scanner.go differ diff --git a/internal/scanner/scanner.rl b/internal/scanner/scanner.rl index 0dc87ad..a45c164 100644 --- a/internal/scanner/scanner.rl +++ b/internal/scanner/scanner.rl @@ -19,12 +19,11 @@ func initLexer(lex *Lexer) { } func (lex *Lexer) Lex() *Token { - lex.hiddenTokens = nil eof := lex.pe var tok TokenID token := lex.tokenPool.Get() - token.Hidden = nil + token.Tokens = token.Tokens[:0] token.Value = lex.data[0:0] lblStart := 0 @@ -125,7 +124,7 @@ func (lex *Lexer) Lex() *Token { main := |* "#!" any* :>> newline => { - lex.addHiddenToken(T_COMMENT, lex.ts, lex.te) + lex.addHiddenToken(token, T_COMMENT, lex.ts, lex.te) }; any => { fnext html; @@ -141,12 +140,12 @@ func (lex *Lexer) Lex() *Token { fbreak; }; ' { - lex.addHiddenToken(T_OPEN_TAG, lex.ts, lex.te) + lex.addHiddenToken(token, T_OPEN_TAG, lex.ts, lex.te) fnext php; }; ' { lex.ungetCnt(lex.te - lex.ts - 5) - lex.addHiddenToken(T_OPEN_TAG, lex.ts, lex.ts+5) + lex.addHiddenToken(token, T_OPEN_TAG, lex.ts, lex.ts+5) fnext php; }; ' { @@ -158,7 +157,7 @@ func (lex *Lexer) Lex() *Token { *|; php := |* - whitespace_line* => {lex.addHiddenToken(T_WHITESPACE, lex.ts, lex.te)}; + whitespace_line* => {lex.addHiddenToken(token, T_WHITESPACE, lex.ts, lex.te)}; '?>' newline? => {lex.setTokenPosition(token); tok = TokenID(int(';')); fnext html; fbreak;}; ';' whitespace_line* '?>' newline? => {lex.setTokenPosition(token); tok = TokenID(int(';')); fnext html; fbreak;}; @@ -318,7 +317,7 @@ func (lex *Lexer) Lex() *Token { ('#' | '//') any_line* when is_not_comment_end => { lex.ungetStr("?>") - lex.addHiddenToken(T_COMMENT, lex.ts, lex.te) + lex.addHiddenToken(token, T_COMMENT, lex.ts, lex.te) }; '/*' any_line* :>> '*/' { isDocComment := false; @@ -327,9 +326,9 @@ func (lex *Lexer) Lex() *Token { } if isDocComment { - lex.addHiddenToken(T_DOC_COMMENT, lex.ts, lex.te) + lex.addHiddenToken(token, T_DOC_COMMENT, lex.ts, lex.te) } else { - lex.addHiddenToken(T_COMMENT, lex.ts, lex.te) + lex.addHiddenToken(token, T_COMMENT, lex.ts, lex.te) } }; @@ -378,7 +377,7 @@ func (lex *Lexer) Lex() *Token { *|; property := |* - whitespace_line* => {lex.addHiddenToken(T_WHITESPACE, lex.ts, lex.te)}; + whitespace_line* => {lex.addHiddenToken(token, T_WHITESPACE, lex.ts, lex.te)}; "->" => {lex.setTokenPosition(token); tok = T_OBJECT_OPERATOR; fbreak;}; varname => {lex.setTokenPosition(token); tok = T_STRING; fnext php; fbreak;}; any => {lex.ungetCnt(1); fgoto php;}; @@ -474,33 +473,33 @@ func (lex *Lexer) Lex() *Token { *|; halt_compiller_open_parenthesis := |* - whitespace_line* => {lex.addHiddenToken(T_WHITESPACE, lex.ts, lex.te)}; + whitespace_line* => {lex.addHiddenToken(token, T_WHITESPACE, lex.ts, lex.te)}; "(" => {lex.setTokenPosition(token); tok = TokenID(int('(')); fnext halt_compiller_close_parenthesis; fbreak;}; any => {lex.ungetCnt(1); fnext php;}; *|; halt_compiller_close_parenthesis := |* - whitespace_line* => {lex.addHiddenToken(T_WHITESPACE, lex.ts, lex.te)}; + whitespace_line* => {lex.addHiddenToken(token, T_WHITESPACE, lex.ts, lex.te)}; ")" => {lex.setTokenPosition(token); tok = TokenID(int(')')); fnext halt_compiller_close_semicolon; fbreak;}; any => {lex.ungetCnt(1); fnext php;}; *|; halt_compiller_close_semicolon := |* - whitespace_line* => {lex.addHiddenToken(T_WHITESPACE, lex.ts, lex.te)}; + whitespace_line* => {lex.addHiddenToken(token, T_WHITESPACE, lex.ts, lex.te)}; ";" => {lex.setTokenPosition(token); tok = TokenID(int(';')); fnext halt_compiller_end; fbreak;}; any => {lex.ungetCnt(1); fnext php;}; *|; halt_compiller_end := |* - any_line* => { lex.addHiddenToken(T_HALT_COMPILER, lex.ts, lex.te); }; + any_line* => { lex.addHiddenToken(token, T_HALT_COMPILER, lex.ts, lex.te); }; *|; write exec; }%% - token.Hidden = lex.hiddenTokens token.Value = lex.data[lex.ts:lex.te] token.ID = tok + lex.addHiddenToken(token, tok, lex.ts, lex.te); return token } \ No newline at end of file diff --git a/internal/scanner/scanner_test.go b/internal/scanner/scanner_test.go index 7399c08..c05a527 100644 --- a/internal/scanner/scanner_test.go +++ b/internal/scanner/scanner_test.go @@ -354,7 +354,7 @@ func TestTokens(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -382,13 +382,14 @@ func TestShebang(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} tkn := lexer.Lex() assert.Equal(t, tkn.ID, T_DNUMBER) - for _, tt := range tkn.Hidden { + l := len(tkn.Tokens) + for _, tt := range tkn.Tokens[:l-1] { actual = append(actual, string(tt.Value)) } @@ -402,11 +403,11 @@ func TestShebangHtml(t *testing.T) { ` lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() assert.Equal(t, tkn.ID, T_INLINE_HTML) - assert.Equal(t, string(tkn.Hidden[0].Value), "#!/usr/bin/env php\n") + assert.Equal(t, string(tkn.Tokens[0].Value), "#!/usr/bin/env php\n") tkn = lexer.Lex() assert.Equal(t, tkn.ID, T_DNUMBER) @@ -452,7 +453,7 @@ func TestNumberTokens(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -509,7 +510,7 @@ func TestConstantStrings(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -643,7 +644,7 @@ func TestTeplateStringTokens(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -728,7 +729,7 @@ func TestBackquoteStringTokens(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -822,7 +823,7 @@ CAT; } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -895,7 +896,7 @@ CAT } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -934,7 +935,7 @@ CAT; } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -965,7 +966,7 @@ func TestHereDocTokens73(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -996,7 +997,7 @@ CAT;` lexer := NewLexer([]byte(src), "7.4", false, nil) lexer.phpVersion = "7.2" - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -1028,7 +1029,7 @@ func TestInlineHtmlNopTokens(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true actual := []string{} for { @@ -1133,11 +1134,12 @@ func TestCommentEnd(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true - lexer.Lex() + tkn := lexer.Lex() - actual := lexer.hiddenTokens + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1162,11 +1164,12 @@ func TestCommentNewLine(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1191,11 +1194,12 @@ func TestCommentNewLine1(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1220,11 +1224,12 @@ func TestCommentNewLine2(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1250,11 +1255,12 @@ func TestCommentWithPhpEndTag(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1280,11 +1286,12 @@ func TestInlineComment(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1310,11 +1317,12 @@ func TestInlineComment2(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true - lexer.Lex() + tkn := lexer.Lex() - actual := lexer.hiddenTokens + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1344,11 +1352,12 @@ func TestEmptyInlineComment(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true - lexer.Lex() + tkn := lexer.Lex() - actual := lexer.hiddenTokens + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1374,11 +1383,12 @@ func TestEmptyInlineComment2(t *testing.T) { } lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1388,7 +1398,7 @@ func TestMethodCallTokens(t *testing.T) { $a -> bar ( '' ) ;` lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true expected := []token.Token{ { @@ -1401,7 +1411,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1411,7 +1422,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1421,7 +1433,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1431,7 +1444,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1441,7 +1455,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1451,7 +1466,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1461,7 +1477,8 @@ func TestMethodCallTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } @@ -1470,7 +1487,7 @@ func TestYieldFromTokens(t *testing.T) { yield from $a` lexer := NewLexer([]byte(src), "7.4", false, nil) - lexer.withHiddenTokens = true + lexer.withTokens = true expected := []token.Token{ { @@ -1483,7 +1500,8 @@ func TestYieldFromTokens(t *testing.T) { }, } tkn := lexer.Lex() - actual := tkn.Hidden + l := len(tkn.Tokens) + actual := tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) expected = []token.Token{ @@ -1493,7 +1511,8 @@ func TestYieldFromTokens(t *testing.T) { }, } tkn = lexer.Lex() - actual = tkn.Hidden + l = len(tkn.Tokens) + actual = tkn.Tokens[:l-1] assert.DeepEqual(t, expected, actual) } diff --git a/internal/scanner/token.go b/internal/scanner/token.go index b46b340..793958c 100644 --- a/internal/scanner/token.go +++ b/internal/scanner/token.go @@ -9,6 +9,6 @@ import ( type Token struct { ID TokenID Value []byte - Hidden []token.Token + Tokens []token.Token Position position.Position } diff --git a/pkg/parser/parser.go b/pkg/parser/parser.go index 0ee65f5..67974fd 100644 --- a/pkg/parser/parser.go +++ b/pkg/parser/parser.go @@ -32,9 +32,9 @@ func Parse(src []byte, ver string, cfg Config) (ast.Vertex, error) { lexer := scanner.NewLexer(src, ver, cfg.WithTokens, cfg.ErrorHandlerFunc) if r == -1 { - parser = php5.NewParser(lexer, cfg.WithTokens, cfg.ErrorHandlerFunc) + parser = php5.NewParser(lexer, cfg.ErrorHandlerFunc) } else { - parser = php7.NewParser(lexer, cfg.WithTokens, cfg.ErrorHandlerFunc) + parser = php7.NewParser(lexer, cfg.ErrorHandlerFunc) } parser.Parse() diff --git a/pkg/printer/printer_parsed_php5_test.go b/pkg/printer/printer_parsed_php5_test.go index 2257614..24b5acd 100644 --- a/pkg/printer/printer_parsed_php5_test.go +++ b/pkg/printer/printer_parsed_php5_test.go @@ -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) diff --git a/pkg/printer/printer_parsed_php7_test.go b/pkg/printer/printer_parsed_php7_test.go index 7b634a4..900ae22 100644 --- a/pkg/printer/printer_parsed_php7_test.go +++ b/pkg/printer/printer_parsed_php7_test.go @@ -30,7 +30,7 @@ abstract class Bar extends Baz // parse lexer := scanner.NewLexer([]byte(src), "7.4", true, nil) - php7parser := php7.NewParser(lexer, true, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() rootNode := php7parser.GetRootNode() @@ -62,7 +62,7 @@ abstract class Bar extends Baz func parse(src string) ast.Vertex { lexer := scanner.NewLexer([]byte(src), "7.4", true, nil) - php7parser := php7.NewParser(lexer, true, nil) + php7parser := php7.NewParser(lexer, nil) php7parser.Parse() return php7parser.GetRootNode()