From ee3fe3b5c0933501cc219e01f2e504bf823ce647 Mon Sep 17 00:00:00 2001 From: Vadym Slizov Date: Tue, 30 Jun 2020 00:45:15 +0300 Subject: [PATCH] [refactoring] keep $ in variable identifier --- internal/php5/parser.go | 19 - internal/php5/parser_test.go | 558 ++++++------ internal/php5/php5.go | 961 ++++++++++----------- internal/php5/php5.y | 73 +- internal/php5/php5_test.go | 666 +++++++-------- internal/php7/parser.go | 17 - internal/php7/parser_test.go | 606 ++++++------- internal/php7/php7.go | 1034 +++++++++++------------ internal/php7/php7.y | 44 +- internal/php7/php7_test.go | 580 ++++++------- pkg/printer/printer.go | 7 +- pkg/printer/printer_parsed_php5_test.go | 2 +- pkg/printer/printer_test.go | 533 ++++++------ 13 files changed, 2481 insertions(+), 2619 deletions(-) diff --git a/internal/php5/parser.go b/internal/php5/parser.go index f7c244f..02bc113 100644 --- a/internal/php5/parser.go +++ b/internal/php5/parser.go @@ -2,7 +2,6 @@ package php5 import ( "bytes" - "fmt" "github.com/z7zmey/php-parser/internal/scanner" "github.com/z7zmey/php-parser/pkg/ast" @@ -63,10 +62,6 @@ func lastNode(nn []ast.Vertex) ast.Vertex { return nn[len(nn)-1] } -func isDollar(r rune) bool { - return r == '$' -} - func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { if p.withTokens == false { return @@ -110,19 +105,6 @@ func (p *Parser) GetFreeFloatingToken(t *scanner.Token) []token.Token { } } -func (p *Parser) addDollarToken(v ast.Vertex) { - if p.withTokens == false { - return - } - - p.setFreeFloating(v, token.Dollar, []token.Token{ - { - ID: token.ID('$'), - Value: []byte("$"), - }, - }) -} - func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast.Vertex) { if p.withTokens == false { return @@ -144,7 +126,6 @@ func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast. } vlen := len(semiColon[0].Value) - fmt.Printf("vlen: %q\n", string(semiColon[0].Value)) tlen := 2 if bytes.HasSuffix(semiColon[0].Value, []byte("?>\n")) { diff --git a/internal/php5/parser_test.go b/internal/php5/parser_test.go index ec349e5..223eb2b 100644 --- a/internal/php5/parser_test.go +++ b/internal/php5/parser_test.go @@ -51,7 +51,7 @@ func TestIdentifier(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -165,7 +165,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -198,7 +198,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 19, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -242,7 +242,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 28, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -284,7 +284,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 31, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -317,7 +317,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 38, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -361,7 +361,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 47, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -414,7 +414,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 55, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -447,7 +447,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 62, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -546,7 +546,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 78, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -579,7 +579,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 85, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -623,7 +623,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 94, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.Identifier{ @@ -676,7 +676,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 102, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -709,7 +709,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 109, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -797,7 +797,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 124, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -830,7 +830,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 131, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -940,7 +940,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 27, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1029,7 +1029,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 46, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1144,7 +1144,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 92, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1233,7 +1233,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 111, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1325,7 +1325,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 136, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1414,7 +1414,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 155, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1495,7 +1495,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 187, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1584,7 +1584,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 206, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1917,7 +1917,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { EndPos: 13, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, }, @@ -1994,7 +1994,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -2071,7 +2071,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { EndPos: 13, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -2159,7 +2159,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -2180,7 +2180,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -2266,7 +2266,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { EndPos: 13, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.Identifier{ @@ -2550,7 +2550,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { EndPos: 14, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -2653,7 +2653,7 @@ LBL; EndPos: 19, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -2745,7 +2745,7 @@ LBL; EndPos: 21, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -3560,7 +3560,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3629,7 +3629,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3671,7 +3671,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { EndPos: 27, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3742,7 +3742,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3834,7 +3834,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3876,7 +3876,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 27, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3918,7 +3918,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 42, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -5618,7 +5618,7 @@ func TestStmtEcho(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ScalarLnumber{ @@ -5685,7 +5685,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -5794,7 +5794,7 @@ func TestStmtFor(t *testing.T) { EndPos: 9, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Expr: &ast.ScalarLnumber{ @@ -5838,7 +5838,7 @@ func TestStmtFor(t *testing.T) { EndPos: 17, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -5882,7 +5882,7 @@ func TestStmtFor(t *testing.T) { EndPos: 26, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5913,7 +5913,7 @@ func TestStmtFor(t *testing.T) { EndPos: 32, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5990,7 +5990,7 @@ func TestStmtFor_Alt(t *testing.T) { EndPos: 11, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -6034,7 +6034,7 @@ func TestStmtFor_Alt(t *testing.T) { EndPos: 20, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -6101,7 +6101,7 @@ func TestStmtForeach(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -6122,7 +6122,7 @@ func TestStmtForeach(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6198,7 +6198,7 @@ func TestStmtForeach_Expr(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6263,7 +6263,7 @@ func TestStmtForeach_Alt(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -6284,7 +6284,7 @@ func TestStmtForeach_Alt(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6349,7 +6349,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6370,7 +6370,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -6391,7 +6391,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 26, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6467,7 +6467,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -6488,7 +6488,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { EndPos: 26, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6553,7 +6553,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6574,7 +6574,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -6604,7 +6604,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 27, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -6670,7 +6670,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6691,7 +6691,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprList{ @@ -6731,7 +6731,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 31, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -6937,7 +6937,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 24, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -6981,7 +6981,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 37, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -7014,7 +7014,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 49, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7139,7 +7139,7 @@ func TestStmtGlobal(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7195,7 +7195,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -7216,7 +7216,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, &ast.ExprVariable{ @@ -7246,7 +7246,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 21, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -7453,7 +7453,7 @@ func TestStmtIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -7518,7 +7518,7 @@ func TestStmtIf_ElseIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -7560,7 +7560,7 @@ func TestStmtIf_ElseIf(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -7627,7 +7627,7 @@ func TestStmtIf_Else(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -7713,7 +7713,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -7755,7 +7755,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -7797,7 +7797,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 39, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -7885,7 +7885,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -7927,7 +7927,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -7979,7 +7979,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 40, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -8530,7 +8530,7 @@ func TestStmtProperty(t *testing.T) { EndPos: 20, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -8643,7 +8643,7 @@ func TestStmtProperty_Properties(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -8674,7 +8674,7 @@ func TestStmtProperty_Properties(t *testing.T) { EndPos: 34, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -8798,7 +8798,7 @@ func TestStmtProperty_Properties2(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -8840,7 +8840,7 @@ func TestStmtProperty_Properties2(t *testing.T) { EndPos: 38, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -8908,7 +8908,7 @@ func TestStmtStaticVar(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -8974,7 +8974,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9005,7 +9005,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -9082,7 +9082,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -9124,7 +9124,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { EndPos: 20, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -9656,7 +9656,7 @@ func TestStmtThrow(t *testing.T) { EndPos: 11, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -10759,7 +10759,7 @@ func TestStmtTry_TryCatch(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -10854,7 +10854,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -10911,7 +10911,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 63, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11006,7 +11006,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11110,7 +11110,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 29, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11167,7 +11167,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 61, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11224,7 +11224,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 103, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11282,7 +11282,7 @@ func TestStmtUnset(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11338,7 +11338,7 @@ func TestStmtUnset_Vars(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -11359,7 +11359,7 @@ func TestStmtUnset_Vars(t *testing.T) { EndPos: 15, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12565,7 +12565,7 @@ func TestExprArrayDimFetch(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -12649,7 +12649,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -12897,7 +12897,7 @@ func TestExprArray_Items(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12965,7 +12965,7 @@ func TestExprBitwiseNot(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13029,7 +13029,7 @@ func TestExprBooleanNot(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13235,7 +13235,7 @@ func TestExprClone_Brackets(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13299,7 +13299,7 @@ func TestExprClone(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13423,7 +13423,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13456,7 +13456,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13489,7 +13489,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 27, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, &ast.ExprReference{ @@ -13519,7 +13519,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 32, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -13601,7 +13601,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13634,7 +13634,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13676,7 +13676,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 28, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -13698,7 +13698,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 32, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -13963,7 +13963,7 @@ func TestExprEmpty(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14027,7 +14027,7 @@ func TestExprErrorSuppress(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14091,7 +14091,7 @@ func TestExprEval(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14244,7 +14244,7 @@ func TestExprExit_Expr(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14397,7 +14397,7 @@ func TestExprDie_Expr(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14714,7 +14714,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -14765,7 +14765,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 16, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14886,7 +14886,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 12, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Right: &ast.ScalarLnumber{ @@ -14965,7 +14965,7 @@ func TestExprPostDec(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15029,7 +15029,7 @@ func TestExprPostInc(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15093,7 +15093,7 @@ func TestExprPreDec(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15157,7 +15157,7 @@ func TestExprPreInc(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15221,7 +15221,7 @@ func TestExprInclude(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15285,7 +15285,7 @@ func TestExprInclude_Once(t *testing.T) { EndPos: 18, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15349,7 +15349,7 @@ func TestExprRequire(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15413,7 +15413,7 @@ func TestExprRequire_Once(t *testing.T) { EndPos: 18, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15477,7 +15477,7 @@ func TestExprInstanceOf(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameName{ @@ -15564,7 +15564,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameRelative{ @@ -15651,7 +15651,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameFullyQualified{ @@ -15739,7 +15739,7 @@ func TestExprIsset(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15805,7 +15805,7 @@ func TestExprIsset_Variables(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -15826,7 +15826,7 @@ func TestExprIsset_Variables(t *testing.T) { EndPos: 15, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15902,7 +15902,7 @@ func TestExprList_Empty(t *testing.T) { EndPos: 14, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15985,7 +15985,7 @@ func TestExprList(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16009,7 +16009,7 @@ func TestExprList(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16101,7 +16101,7 @@ func TestExprList_ArrayIndex(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16126,7 +16126,7 @@ func TestExprList_ArrayIndex(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16228,7 +16228,7 @@ func TestExprList_List(t *testing.T) { EndPos: 15, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16255,7 +16255,7 @@ func TestExprList_List(t *testing.T) { EndPos: 22, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16339,7 +16339,7 @@ func TestExprList_EmptyItem(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16363,7 +16363,7 @@ func TestExprList_EmptyItem(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16448,7 +16448,7 @@ func TestExprList_EmptyItems(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16473,7 +16473,7 @@ func TestExprList_EmptyItems(t *testing.T) { EndPos: 22, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16537,7 +16537,7 @@ func TestExprMethodCall(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Method: &ast.Identifier{ @@ -16840,7 +16840,7 @@ func TestExprPrint(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16904,7 +16904,7 @@ func TestExprPropertyFetch(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -16971,7 +16971,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -16992,7 +16992,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -17022,7 +17022,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 27, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -17109,7 +17109,7 @@ func TestExprShellExec(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17335,7 +17335,7 @@ func TestExprShortArray_Items(t *testing.T) { EndPos: 13, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17687,7 +17687,7 @@ func TestExprStaticCall_Var(t *testing.T) { EndPos: 12, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -17761,7 +17761,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.ExprVariable{ @@ -17782,7 +17782,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { EndPos: 13, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -17879,7 +17879,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 12, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -17966,7 +17966,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { EndPos: 22, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -18053,7 +18053,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { EndPos: 13, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -18117,7 +18117,7 @@ func TestExprTernary(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -18138,7 +18138,7 @@ func TestExprTernary(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -18159,7 +18159,7 @@ func TestExprTernary(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -18223,7 +18223,7 @@ func TestExprTernary_Simple(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfFalse: &ast.ExprVariable{ @@ -18244,7 +18244,7 @@ func TestExprTernary_Simple(t *testing.T) { EndPos: 12, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -18308,7 +18308,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprTernary{ @@ -18338,7 +18338,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfTrue: &ast.ExprVariable{ @@ -18359,7 +18359,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, IfFalse: &ast.ExprVariable{ @@ -18380,7 +18380,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 20, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -18402,7 +18402,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 25, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -18475,7 +18475,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -18496,7 +18496,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -18517,7 +18517,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -18539,7 +18539,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 20, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, IfFalse: &ast.ExprVariable{ @@ -18560,7 +18560,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 25, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -18624,7 +18624,7 @@ func TestExprUnaryMinus(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18688,7 +18688,7 @@ func TestExprUnaryPlus(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18743,7 +18743,7 @@ func TestExprVariable(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18806,7 +18806,7 @@ func TestExprVariable_Variable(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18913,7 +18913,7 @@ func TestExprYield_Val(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18977,7 +18977,7 @@ func TestExprYield_KeyVal(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ExprVariable{ @@ -18998,7 +18998,7 @@ func TestExprYield_KeyVal(t *testing.T) { EndPos: 17, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19116,7 +19116,7 @@ func TestExprYield_KeyExpr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ScalarLnumber{ @@ -19193,7 +19193,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19214,7 +19214,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19278,7 +19278,7 @@ func TestExprAssign_Reference(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19299,7 +19299,7 @@ func TestExprAssign_Reference(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19363,7 +19363,7 @@ func TestExprAssign_ReferenceNew(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -19460,7 +19460,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -19534,7 +19534,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { EndPos: 19, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19602,7 +19602,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19623,7 +19623,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19687,7 +19687,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19708,7 +19708,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19772,7 +19772,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19793,7 +19793,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19857,7 +19857,7 @@ func TestExprAssign_Concat(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19878,7 +19878,7 @@ func TestExprAssign_Concat(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19942,7 +19942,7 @@ func TestExprAssign_Div(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -19963,7 +19963,7 @@ func TestExprAssign_Div(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20027,7 +20027,7 @@ func TestExprAssign_Minus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20048,7 +20048,7 @@ func TestExprAssign_Minus(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20112,7 +20112,7 @@ func TestExprAssign_Mod(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20133,7 +20133,7 @@ func TestExprAssign_Mod(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20197,7 +20197,7 @@ func TestExprAssign_Mul(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20218,7 +20218,7 @@ func TestExprAssign_Mul(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20282,7 +20282,7 @@ func TestExprAssign_Plus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20303,7 +20303,7 @@ func TestExprAssign_Plus(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20367,7 +20367,7 @@ func TestExprAssign_Pow(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20388,7 +20388,7 @@ func TestExprAssign_Pow(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20452,7 +20452,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20473,7 +20473,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20537,7 +20537,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -20558,7 +20558,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20624,7 +20624,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -20645,7 +20645,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20709,7 +20709,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -20730,7 +20730,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20794,7 +20794,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -20815,7 +20815,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20879,7 +20879,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -20900,7 +20900,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20964,7 +20964,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -20985,7 +20985,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21049,7 +21049,7 @@ func TestExprBinary_Concat(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21070,7 +21070,7 @@ func TestExprBinary_Concat(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21134,7 +21134,7 @@ func TestExprBinary_Div(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21155,7 +21155,7 @@ func TestExprBinary_Div(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21219,7 +21219,7 @@ func TestExprBinary_Equal(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21240,7 +21240,7 @@ func TestExprBinary_Equal(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21304,7 +21304,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21325,7 +21325,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21389,7 +21389,7 @@ func TestExprBinary_Greater(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21410,7 +21410,7 @@ func TestExprBinary_Greater(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21474,7 +21474,7 @@ func TestExprBinary_Identical(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21495,7 +21495,7 @@ func TestExprBinary_Identical(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21559,7 +21559,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21580,7 +21580,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21644,7 +21644,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21665,7 +21665,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21729,7 +21729,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21750,7 +21750,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21814,7 +21814,7 @@ func TestExprBinary_Minus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21835,7 +21835,7 @@ func TestExprBinary_Minus(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21899,7 +21899,7 @@ func TestExprBinary_Mod(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -21920,7 +21920,7 @@ func TestExprBinary_Mod(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21984,7 +21984,7 @@ func TestExprBinary_Mul(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22005,7 +22005,7 @@ func TestExprBinary_Mul(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22069,7 +22069,7 @@ func TestExprBinary_NotEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22090,7 +22090,7 @@ func TestExprBinary_NotEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22154,7 +22154,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22175,7 +22175,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22239,7 +22239,7 @@ func TestExprBinary_Plus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22260,7 +22260,7 @@ func TestExprBinary_Plus(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22324,7 +22324,7 @@ func TestExprBinary_Pow(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22345,7 +22345,7 @@ func TestExprBinary_Pow(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22409,7 +22409,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22430,7 +22430,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22494,7 +22494,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22515,7 +22515,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22579,7 +22579,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22600,7 +22600,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22664,7 +22664,7 @@ func TestExprBinary_Smaller(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -22685,7 +22685,7 @@ func TestExprBinary_Smaller(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22751,7 +22751,7 @@ func TestExprCast_Array(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -22815,7 +22815,7 @@ func TestExprCast_Bool(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -22879,7 +22879,7 @@ func TestExprCast_BoolShort(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -22943,7 +22943,7 @@ func TestExprCast_Double(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23007,7 +23007,7 @@ func TestExprCast_CastFloat(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23071,7 +23071,7 @@ func TestExprCast_Int(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23135,7 +23135,7 @@ func TestExprCast_IntShort(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23199,7 +23199,7 @@ func TestExprCast_Object(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23263,7 +23263,7 @@ func TestExprCast_String(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23327,7 +23327,7 @@ func TestExprCast_BinaryString(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -23391,7 +23391,7 @@ func TestExprCast_Unset(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, diff --git a/internal/php5/php5.go b/internal/php5/php5.go index 22e8d54..01c6d9d 100644 --- a/internal/php5/php5.go +++ b/internal/php5/php5.go @@ -347,7 +347,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php5/php5.y:7194 +// line internal/php5/php5.y:7167 type simpleIndirectReference struct { all []*ast.ExprVariable @@ -3576,7 +3576,7 @@ yydefault: yyDollar = yyS[yypt-9 : yypt+1] // line internal/php5/php5.y:1420 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} catchNode := &ast.StmtCatch{ast.Node{}, []ast.Vertex{yyDollar[3].node}, variable, yyDollar[7].list} yyVAL.list = append([]ast.Vertex{catchNode}, yyDollar[9].list...) @@ -3590,7 +3590,6 @@ yydefault: yylex.(*Parser).setFreeFloating(catchNode, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).setFreeFloating(catchNode, token.Catch, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[4].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(catchNode, token.Var, yyDollar[5].token.Hidden) yylex.(*Parser).setFreeFloating(catchNode, token.Cond, yyDollar[6].token.Hidden) yylex.(*Parser).setFreeFloating(catchNode, token.Stmts, yyDollar[8].token.Hidden) @@ -3599,7 +3598,7 @@ yydefault: } case 77: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1446 + // line internal/php5/php5.y:1445 { yyVAL.node = nil @@ -3607,7 +3606,7 @@ yydefault: } case 78: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1452 + // line internal/php5/php5.y:1451 { yyVAL.node = &ast.StmtFinally{ast.Node{}, yyDollar[3].list} @@ -3623,7 +3622,7 @@ yydefault: } case 79: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1469 + // line internal/php5/php5.y:1468 { yyVAL.list = yyDollar[1].list @@ -3631,7 +3630,7 @@ yydefault: } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1475 + // line internal/php5/php5.y:1474 { yyVAL.list = []ast.Vertex{} @@ -3639,7 +3638,7 @@ yydefault: } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1484 + // line internal/php5/php5.y:1483 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3647,7 +3646,7 @@ yydefault: } case 82: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1490 + // line internal/php5/php5.y:1489 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -3655,9 +3654,9 @@ yydefault: } case 83: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:1499 + // line internal/php5/php5.y:1498 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.StmtCatch{ast.Node{}, []ast.Vertex{yyDollar[3].node}, variable, yyDollar[7].list} @@ -3670,7 +3669,6 @@ yydefault: yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Catch, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[4].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[5].token.Hidden) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Cond, yyDollar[6].token.Hidden) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Stmts, yyDollar[8].token.Hidden) @@ -3679,7 +3677,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1524 + // line internal/php5/php5.y:1522 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3687,7 +3685,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1530 + // line internal/php5/php5.y:1528 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3698,7 +3696,7 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1542 + // line internal/php5/php5.y:1540 { yyVAL.node = yyDollar[1].node @@ -3706,7 +3704,7 @@ yydefault: } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1551 + // line internal/php5/php5.y:1549 { yyVAL.node = yyDollar[1].node @@ -3714,7 +3712,7 @@ yydefault: } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1560 + // line internal/php5/php5.y:1558 { yyVAL.node = yyDollar[1].node @@ -3722,31 +3720,31 @@ yydefault: } case 89: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1569 + // line internal/php5/php5.y:1567 { yyVAL.token = nil } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1573 + // line internal/php5/php5.y:1571 { yyVAL.token = yyDollar[1].token } case 91: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1580 + // line internal/php5/php5.y:1578 { yyVAL.token = nil } case 92: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1584 + // line internal/php5/php5.y:1582 { yyVAL.token = yyDollar[1].token } case 93: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:1591 + // line internal/php5/php5.y:1589 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtFunction{ast.Node{}, yyDollar[2].token != nil, name, yyDollar[5].list, nil, yyDollar[8].list} @@ -3772,7 +3770,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php5/php5.y:1618 + // line internal/php5/php5.y:1616 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} switch n := yyDollar[1].node.(type) { @@ -3802,7 +3800,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:1646 + // line internal/php5/php5.y:1644 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtInterface{ast.Node{}, name, yyDollar[3].InterfaceExtends, yyDollar[5].list} @@ -3821,7 +3819,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1667 + // line internal/php5/php5.y:1665 { yyVAL.node = &ast.StmtClass{ast.Node{}, nil, nil, nil, nil, nil, nil} @@ -3835,7 +3833,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1679 + // line internal/php5/php5.y:1677 { classModifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, nil, []ast.Vertex{classModifier}, nil, nil, nil, nil} @@ -3852,7 +3850,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1694 + // line internal/php5/php5.y:1692 { yyVAL.node = &ast.StmtTrait{ast.Node{}, nil, nil} @@ -3866,7 +3864,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1706 + // line internal/php5/php5.y:1704 { classModifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, nil, []ast.Vertex{classModifier}, nil, nil, nil, nil} @@ -3883,7 +3881,7 @@ yydefault: } case 100: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1724 + // line internal/php5/php5.y:1722 { yyVAL.ClassExtends = nil @@ -3891,7 +3889,7 @@ yydefault: } case 101: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1730 + // line internal/php5/php5.y:1728 { yyVAL.ClassExtends = &ast.StmtClassExtends{ast.Node{}, yyDollar[2].node} @@ -3905,13 +3903,13 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1745 + // line internal/php5/php5.y:1743 { yyVAL.token = yyDollar[1].token } case 103: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1752 + // line internal/php5/php5.y:1750 { yyVAL.InterfaceExtends = nil @@ -3919,7 +3917,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1758 + // line internal/php5/php5.y:1756 { yyVAL.InterfaceExtends = &ast.StmtInterfaceExtends{ast.Node{}, yyDollar[2].list} @@ -3933,7 +3931,7 @@ yydefault: } case 105: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1773 + // line internal/php5/php5.y:1771 { yyVAL.ClassImplements = nil @@ -3941,7 +3939,7 @@ yydefault: } case 106: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1779 + // line internal/php5/php5.y:1777 { yyVAL.ClassImplements = &ast.StmtClassImplements{ast.Node{}, yyDollar[2].list} @@ -3955,7 +3953,7 @@ yydefault: } case 107: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1794 + // line internal/php5/php5.y:1792 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3963,7 +3961,7 @@ yydefault: } case 108: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1800 + // line internal/php5/php5.y:1798 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3974,7 +3972,7 @@ yydefault: } case 109: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:1812 + // line internal/php5/php5.y:1810 { yyVAL.node = nil @@ -3982,7 +3980,7 @@ yydefault: } case 110: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1818 + // line internal/php5/php5.y:1816 { yyVAL.node = yyDollar[2].node @@ -3993,7 +3991,7 @@ yydefault: } case 111: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1830 + // line internal/php5/php5.y:1828 { yyVAL.node = yyDollar[1].node @@ -4001,7 +3999,7 @@ yydefault: } case 112: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:1836 + // line internal/php5/php5.y:1834 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -4015,7 +4013,7 @@ yydefault: } case 113: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1848 + // line internal/php5/php5.y:1846 { yyVAL.node = &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -4031,7 +4029,7 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1865 + // line internal/php5/php5.y:1863 { yyVAL.node = &ast.StmtFor{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4042,7 +4040,7 @@ yydefault: } case 115: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1874 + // line internal/php5/php5.y:1872 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltFor{ast.Node{}, nil, nil, nil, stmtList} @@ -4061,7 +4059,7 @@ yydefault: } case 116: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1894 + // line internal/php5/php5.y:1892 { yyVAL.node = &ast.StmtForeach{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4072,7 +4070,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1903 + // line internal/php5/php5.y:1901 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltForeach{ast.Node{}, nil, nil, nil, stmtList} @@ -4091,7 +4089,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:1924 + // line internal/php5/php5.y:1922 { yyVAL.node = &ast.StmtDeclare{ast.Node{}, false, nil, yyDollar[1].node} @@ -4102,7 +4100,7 @@ yydefault: } case 119: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:1933 + // line internal/php5/php5.y:1931 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} @@ -4121,7 +4119,7 @@ yydefault: } case 120: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1954 + // line internal/php5/php5.y:1952 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} constant := &ast.StmtConstant{ast.Node{}, name, yyDollar[3].node} @@ -4139,7 +4137,7 @@ yydefault: } case 121: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:1970 + // line internal/php5/php5.y:1968 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} constant := &ast.StmtConstant{ast.Node{}, name, yyDollar[5].node} @@ -4158,7 +4156,7 @@ yydefault: } case 122: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:1991 + // line internal/php5/php5.y:1989 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4175,7 +4173,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2006 + // line internal/php5/php5.y:2004 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4193,7 +4191,7 @@ yydefault: } case 124: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2022 + // line internal/php5/php5.y:2020 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltSwitch{ast.Node{}, nil, caseList} @@ -4212,7 +4210,7 @@ yydefault: } case 125: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2039 + // line internal/php5/php5.y:2037 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} @@ -4233,7 +4231,7 @@ yydefault: } case 126: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2062 + // line internal/php5/php5.y:2060 { yyVAL.list = []ast.Vertex{} @@ -4241,7 +4239,7 @@ yydefault: } case 127: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2068 + // line internal/php5/php5.y:2066 { _case := &ast.StmtCase{ast.Node{}, yyDollar[3].node, yyDollar[5].list} yyVAL.list = append(yyDollar[1].list, _case) @@ -4258,7 +4256,7 @@ yydefault: } case 128: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2083 + // line internal/php5/php5.y:2081 { _default := &ast.StmtDefault{ast.Node{}, yyDollar[4].list} yyVAL.list = append(yyDollar[1].list, _default) @@ -4275,19 +4273,19 @@ yydefault: } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2102 + // line internal/php5/php5.y:2100 { yyVAL.token = yyDollar[1].token } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2106 + // line internal/php5/php5.y:2104 { yyVAL.token = yyDollar[1].token } case 131: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2114 + // line internal/php5/php5.y:2112 { yyVAL.node = &ast.StmtWhile{ast.Node{}, nil, yyDollar[1].node} @@ -4298,7 +4296,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2123 + // line internal/php5/php5.y:2121 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltWhile{ast.Node{}, nil, stmtList} @@ -4317,7 +4315,7 @@ yydefault: } case 133: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2145 + // line internal/php5/php5.y:2143 { yyVAL.list = nil @@ -4325,7 +4323,7 @@ yydefault: } case 134: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2151 + // line internal/php5/php5.y:2149 { _elseIf := &ast.StmtElseIf{ast.Node{}, yyDollar[3].node, yyDollar[4].node} yyVAL.list = append(yyDollar[1].list, _elseIf) @@ -4348,7 +4346,7 @@ yydefault: } case 135: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2174 + // line internal/php5/php5.y:2172 { yyVAL.list = nil @@ -4356,7 +4354,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2180 + // line internal/php5/php5.y:2178 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[5].list} _elseIf := &ast.StmtAltElseIf{ast.Node{}, yyDollar[3].node, stmts} @@ -4382,7 +4380,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2206 + // line internal/php5/php5.y:2204 { yyVAL.node = nil @@ -4390,7 +4388,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2212 + // line internal/php5/php5.y:2210 { yyVAL.node = &ast.StmtElse{ast.Node{}, yyDollar[2].node} @@ -4404,7 +4402,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2228 + // line internal/php5/php5.y:2226 { yyVAL.node = nil @@ -4412,7 +4410,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2234 + // line internal/php5/php5.y:2232 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.StmtAltElse{ast.Node{}, stmts} @@ -4429,7 +4427,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2253 + // line internal/php5/php5.y:2251 { yyVAL.list = yyDollar[1].list @@ -4437,7 +4435,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2259 + // line internal/php5/php5.y:2257 { yyVAL.list = nil @@ -4445,7 +4443,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2268 + // line internal/php5/php5.y:2266 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4453,7 +4451,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2274 + // line internal/php5/php5.y:2272 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4464,9 +4462,9 @@ yydefault: } case 145: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2286 + // line internal/php5/php5.y:2284 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.Parameter{ast.Node{}, yyDollar[2].token != nil, yyDollar[3].token != nil, yyDollar[1].node, variable, nil} @@ -4494,7 +4492,6 @@ yydefault: yylex.(*Parser).setFreeFloating(yyVAL.node, token.Ampersand, yyDollar[3].token.Hidden) } yylex.(*Parser).setFreeFloating(yyVAL.node, token.Variadic, yyDollar[4].token.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if yyDollar[3].token == nil { @@ -4514,9 +4511,9 @@ yydefault: } case 146: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:2331 + // line internal/php5/php5.y:2328 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.Parameter{ast.Node{}, yyDollar[2].token != nil, yyDollar[3].token != nil, yyDollar[1].node, variable, yyDollar[6].node} @@ -4545,7 +4542,6 @@ yydefault: } yylex.(*Parser).setFreeFloating(yyVAL.node, token.Variadic, yyDollar[4].token.Hidden) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[5].token.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if yyDollar[3].token == nil { @@ -4565,7 +4561,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2381 + // line internal/php5/php5.y:2377 { yyVAL.node = nil @@ -4573,7 +4569,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2387 + // line internal/php5/php5.y:2383 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4587,7 +4583,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2399 + // line internal/php5/php5.y:2395 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4601,7 +4597,7 @@ yydefault: } case 150: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2411 + // line internal/php5/php5.y:2407 { yyVAL.node = yyDollar[1].node @@ -4609,7 +4605,7 @@ yydefault: } case 151: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2421 + // line internal/php5/php5.y:2417 { yyVAL.node = &ast.ArgumentList{ast.Node{}, nil} @@ -4624,7 +4620,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2434 + // line internal/php5/php5.y:2430 { yyVAL.node = &ast.ArgumentList{ast.Node{}, yyDollar[2].list} @@ -4639,7 +4635,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2447 + // line internal/php5/php5.y:2443 { arg := &ast.Argument{ast.Node{}, false, false, yyDollar[2].node} yyVAL.node = &ast.ArgumentList{ast.Node{}, []ast.Vertex{arg}} @@ -4656,7 +4652,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2466 + // line internal/php5/php5.y:2462 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4664,7 +4660,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2472 + // line internal/php5/php5.y:2468 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4675,7 +4671,7 @@ yydefault: } case 156: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2484 + // line internal/php5/php5.y:2480 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4689,7 +4685,7 @@ yydefault: } case 157: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2496 + // line internal/php5/php5.y:2492 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4703,7 +4699,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2508 + // line internal/php5/php5.y:2504 { yyVAL.node = &ast.Argument{ast.Node{}, false, true, yyDollar[2].node} @@ -4717,7 +4713,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2520 + // line internal/php5/php5.y:2516 { yyVAL.node = &ast.Argument{ast.Node{}, true, false, yyDollar[2].node} @@ -4731,7 +4727,7 @@ yydefault: } case 160: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2535 + // line internal/php5/php5.y:2531 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4742,7 +4738,7 @@ yydefault: } case 161: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2544 + // line internal/php5/php5.y:2540 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4750,9 +4746,9 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2554 + // line internal/php5/php5.y:2550 { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} // save position @@ -4761,13 +4757,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 163: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2569 + // line internal/php5/php5.y:2564 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -4776,13 +4771,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 164: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2582 + // line internal/php5/php5.y:2576 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -4791,7 +4785,6 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.Start, append(yyDollar[2].token.Hidden, append(yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token), yyDollar[3].node.GetNode().Tokens[token.Start]...)...)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.End, append(yyDollar[3].node.GetNode().Tokens[token.End], append(yyDollar[4].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[4].token)...)...)) @@ -4799,9 +4792,9 @@ yydefault: } case 165: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2601 + // line internal/php5/php5.y:2594 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[3].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, nil} yyVAL.list = append(yyDollar[1].list, staticVar) @@ -4813,16 +4806,15 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, yyDollar[3].token.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 166: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:2620 + // line internal/php5/php5.y:2612 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[3].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, staticVar) @@ -4834,7 +4826,6 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, yyDollar[3].token.Hidden) yylex.(*Parser).setFreeFloating(staticVar, token.Var, yyDollar[4].token.Hidden) @@ -4842,9 +4833,9 @@ yydefault: } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2640 + // line internal/php5/php5.y:2631 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, nil} yyVAL.list = []ast.Vertex{staticVar} @@ -4855,16 +4846,15 @@ yydefault: staticVar.GetNode().Position = position.NewTokenPosition(yyDollar[1].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 168: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2658 + // line internal/php5/php5.y:2648 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, yyDollar[3].node} yyVAL.list = []ast.Vertex{staticVar} @@ -4875,7 +4865,6 @@ yydefault: staticVar.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).setFreeFloating(staticVar, token.Var, yyDollar[2].token.Hidden) @@ -4883,7 +4872,7 @@ yydefault: } case 169: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2681 + // line internal/php5/php5.y:2670 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -4891,7 +4880,7 @@ yydefault: } case 170: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2687 + // line internal/php5/php5.y:2676 { yyVAL.list = []ast.Vertex{} @@ -4899,7 +4888,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2697 + // line internal/php5/php5.y:2686 { yyVAL.node = &ast.StmtPropertyList{ast.Node{}, yyDollar[1].list, nil, yyDollar[2].list} @@ -4915,7 +4904,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2711 + // line internal/php5/php5.y:2700 { yyVAL.node = yyDollar[1].node @@ -4930,7 +4919,7 @@ yydefault: } case 173: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2724 + // line internal/php5/php5.y:2713 { yyVAL.node = yyDollar[1].node @@ -4938,7 +4927,7 @@ yydefault: } case 174: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php5/php5.y:2730 + // line internal/php5/php5.y:2719 { name := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtClassMethod{ast.Node{}, yyDollar[3].token != nil, name, yyDollar[1].list, yyDollar[6].list, nil, yyDollar[8].node} @@ -4971,7 +4960,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2764 + // line internal/php5/php5.y:2753 { yyVAL.node = &ast.StmtTraitUse{ast.Node{}, yyDollar[2].list, yyDollar[3].node} @@ -4985,7 +4974,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2779 + // line internal/php5/php5.y:2768 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4993,7 +4982,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2785 + // line internal/php5/php5.y:2774 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5004,7 +4993,7 @@ yydefault: } case 178: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2797 + // line internal/php5/php5.y:2786 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -5018,7 +5007,7 @@ yydefault: } case 179: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2809 + // line internal/php5/php5.y:2798 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, yyDollar[2].list} @@ -5032,7 +5021,7 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2824 + // line internal/php5/php5.y:2813 { yyVAL.list = nil @@ -5040,7 +5029,7 @@ yydefault: } case 181: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2830 + // line internal/php5/php5.y:2819 { yyVAL.list = yyDollar[1].list @@ -5048,7 +5037,7 @@ yydefault: } case 182: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2839 + // line internal/php5/php5.y:2828 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5056,7 +5045,7 @@ yydefault: } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2845 + // line internal/php5/php5.y:2834 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5064,7 +5053,7 @@ yydefault: } case 184: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2854 + // line internal/php5/php5.y:2843 { yyVAL.node = yyDollar[1].node @@ -5076,7 +5065,7 @@ yydefault: } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:2864 + // line internal/php5/php5.y:2853 { yyVAL.node = yyDollar[1].node @@ -5088,7 +5077,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2877 + // line internal/php5/php5.y:2866 { yyVAL.node = &ast.StmtTraitUsePrecedence{ast.Node{}, yyDollar[1].node, yyDollar[3].list} @@ -5103,7 +5092,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2893 + // line internal/php5/php5.y:2882 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5111,7 +5100,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2899 + // line internal/php5/php5.y:2888 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5122,7 +5111,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2911 + // line internal/php5/php5.y:2900 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, nil, name} @@ -5138,7 +5127,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2925 + // line internal/php5/php5.y:2914 { yyVAL.node = yyDollar[1].node @@ -5146,7 +5135,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2934 + // line internal/php5/php5.y:2923 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, yyDollar[1].node, target} @@ -5164,7 +5153,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:2953 + // line internal/php5/php5.y:2942 { alias := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, alias} @@ -5182,7 +5171,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:2969 + // line internal/php5/php5.y:2958 { yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, nil} @@ -5197,7 +5186,7 @@ yydefault: } case 194: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:2985 + // line internal/php5/php5.y:2974 { yyVAL.node = nil @@ -5205,7 +5194,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:2991 + // line internal/php5/php5.y:2980 { yyVAL.node = yyDollar[1].node @@ -5213,7 +5202,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3000 + // line internal/php5/php5.y:2989 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -5228,7 +5217,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3013 + // line internal/php5/php5.y:3002 { yyVAL.node = &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} @@ -5243,7 +5232,7 @@ yydefault: } case 198: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3029 + // line internal/php5/php5.y:3018 { yyVAL.list = yyDollar[1].list @@ -5251,7 +5240,7 @@ yydefault: } case 199: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3035 + // line internal/php5/php5.y:3024 { modifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{modifier} @@ -5266,7 +5255,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3051 + // line internal/php5/php5.y:3040 { yyVAL.list = nil @@ -5274,7 +5263,7 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3057 + // line internal/php5/php5.y:3046 { yyVAL.list = yyDollar[1].list @@ -5282,7 +5271,7 @@ yydefault: } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3066 + // line internal/php5/php5.y:3055 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5290,7 +5279,7 @@ yydefault: } case 203: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3072 + // line internal/php5/php5.y:3061 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5298,7 +5287,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3081 + // line internal/php5/php5.y:3070 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5312,7 +5301,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3093 + // line internal/php5/php5.y:3082 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5326,7 +5315,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3105 + // line internal/php5/php5.y:3094 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5340,7 +5329,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3117 + // line internal/php5/php5.y:3106 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5354,7 +5343,7 @@ yydefault: } case 208: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3129 + // line internal/php5/php5.y:3118 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5368,7 +5357,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3141 + // line internal/php5/php5.y:3130 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5382,9 +5371,9 @@ yydefault: } case 210: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3156 + // line internal/php5/php5.y:3145 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[3].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, nil} yyVAL.list = append(yyDollar[1].list, property) @@ -5395,7 +5384,6 @@ yydefault: property.GetNode().Position = position.NewTokenPosition(yyDollar[3].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(property, token.Start, yyDollar[3].token.Hidden) @@ -5403,9 +5391,9 @@ yydefault: } case 211: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:3175 + // line internal/php5/php5.y:3163 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[3].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, property) @@ -5417,7 +5405,6 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, yyDollar[3].token.Hidden) yylex.(*Parser).setFreeFloating(property, token.Var, yyDollar[4].token.Hidden) @@ -5425,9 +5412,9 @@ yydefault: } case 212: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3195 + // line internal/php5/php5.y:3182 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, nil} yyVAL.list = []ast.Vertex{property} @@ -5438,16 +5425,15 @@ yydefault: property.GetNode().Position = position.NewTokenPosition(yyDollar[1].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 213: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3213 + // line internal/php5/php5.y:3199 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, yyDollar[3].node} yyVAL.list = []ast.Vertex{property} @@ -5458,7 +5444,6 @@ yydefault: property.GetNode().Position = position.NewTokenNodePosition(yyDollar[1].token, yyDollar[3].node) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(property, token.Var, yyDollar[2].token.Hidden) @@ -5466,7 +5451,7 @@ yydefault: } case 214: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:3235 + // line internal/php5/php5.y:3220 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} constant := &ast.StmtConstant{ast.Node{}, name, yyDollar[5].node} @@ -5489,7 +5474,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3256 + // line internal/php5/php5.y:3241 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} constant := &ast.StmtConstant{ast.Node{}, name, yyDollar[4].node} @@ -5509,7 +5494,7 @@ yydefault: } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3277 + // line internal/php5/php5.y:3262 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5520,7 +5505,7 @@ yydefault: } case 217: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3286 + // line internal/php5/php5.y:3271 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5528,7 +5513,7 @@ yydefault: } case 218: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3296 + // line internal/php5/php5.y:3281 { yyVAL.list = nil @@ -5536,7 +5521,7 @@ yydefault: } case 219: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3302 + // line internal/php5/php5.y:3287 { yyVAL.list = yyDollar[1].list @@ -5544,7 +5529,7 @@ yydefault: } case 220: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3311 + // line internal/php5/php5.y:3296 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5555,7 +5540,7 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3320 + // line internal/php5/php5.y:3305 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5563,7 +5548,7 @@ yydefault: } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3329 + // line internal/php5/php5.y:3314 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -5571,7 +5556,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3335 + // line internal/php5/php5.y:3320 { yyVAL.list = yyDollar[1].list @@ -5579,7 +5564,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3344 + // line internal/php5/php5.y:3329 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -5595,7 +5580,7 @@ yydefault: } case 225: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3358 + // line internal/php5/php5.y:3343 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[2].node} yyVAL.list = []ast.Vertex{fetch} @@ -5611,7 +5596,7 @@ yydefault: } case 226: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3375 + // line internal/php5/php5.y:3360 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -5619,7 +5604,7 @@ yydefault: } case 227: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3381 + // line internal/php5/php5.y:3366 { yyVAL.list = yyDollar[1].list @@ -5627,7 +5612,7 @@ yydefault: } case 228: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3387 + // line internal/php5/php5.y:3372 { yyVAL.list = yyDollar[1].list @@ -5635,7 +5620,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:3396 + // line internal/php5/php5.y:3381 { yyVAL.list = nil @@ -5643,7 +5628,7 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:3402 + // line internal/php5/php5.y:3387 { yyVAL.list = yyDollar[1].list @@ -5651,7 +5636,7 @@ yydefault: } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3411 + // line internal/php5/php5.y:3396 { if yyDollar[3].node != nil { @@ -5669,7 +5654,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:3430 + // line internal/php5/php5.y:3415 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, listNode, yyDollar[6].node} @@ -5688,7 +5673,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3447 + // line internal/php5/php5.y:3432 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5703,7 +5688,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:3460 + // line internal/php5/php5.y:3445 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5719,7 +5704,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:3474 + // line internal/php5/php5.y:3459 { var _new *ast.ExprNew @@ -5748,7 +5733,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3501 + // line internal/php5/php5.y:3486 { yyVAL.node = &ast.ExprClone{ast.Node{}, yyDollar[2].node} @@ -5762,7 +5747,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3513 + // line internal/php5/php5.y:3498 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5776,7 +5761,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3525 + // line internal/php5/php5.y:3510 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5791,7 +5776,7 @@ yydefault: } case 239: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3538 + // line internal/php5/php5.y:3523 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5806,7 +5791,7 @@ yydefault: } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3551 + // line internal/php5/php5.y:3536 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5821,7 +5806,7 @@ yydefault: } case 241: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3564 + // line internal/php5/php5.y:3549 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5836,7 +5821,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3577 + // line internal/php5/php5.y:3562 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5851,7 +5836,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3590 + // line internal/php5/php5.y:3575 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5866,7 +5851,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3603 + // line internal/php5/php5.y:3588 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5881,7 +5866,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3616 + // line internal/php5/php5.y:3601 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5896,7 +5881,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3629 + // line internal/php5/php5.y:3614 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5911,7 +5896,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3642 + // line internal/php5/php5.y:3627 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5926,7 +5911,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3655 + // line internal/php5/php5.y:3640 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5941,7 +5926,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3668 + // line internal/php5/php5.y:3653 { yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} @@ -5956,7 +5941,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3681 + // line internal/php5/php5.y:3666 { yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} @@ -5970,7 +5955,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3693 + // line internal/php5/php5.y:3678 { yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} @@ -5985,7 +5970,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3706 + // line internal/php5/php5.y:3691 { yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} @@ -5999,7 +5984,7 @@ yydefault: } case 253: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3718 + // line internal/php5/php5.y:3703 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6014,7 +5999,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3731 + // line internal/php5/php5.y:3716 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6029,7 +6014,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3744 + // line internal/php5/php5.y:3729 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6044,7 +6029,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3757 + // line internal/php5/php5.y:3742 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6059,7 +6044,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3770 + // line internal/php5/php5.y:3755 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6074,7 +6059,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3783 + // line internal/php5/php5.y:3768 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6089,7 +6074,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3796 + // line internal/php5/php5.y:3781 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6104,7 +6089,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3809 + // line internal/php5/php5.y:3794 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6119,7 +6104,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3822 + // line internal/php5/php5.y:3807 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6134,7 +6119,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3835 + // line internal/php5/php5.y:3820 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6149,7 +6134,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3848 + // line internal/php5/php5.y:3833 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6164,7 +6149,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3861 + // line internal/php5/php5.y:3846 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6179,7 +6164,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3874 + // line internal/php5/php5.y:3859 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6194,7 +6179,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3887 + // line internal/php5/php5.y:3872 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6209,7 +6194,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3900 + // line internal/php5/php5.y:3885 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6224,7 +6209,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3913 + // line internal/php5/php5.y:3898 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6239,7 +6224,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3926 + // line internal/php5/php5.y:3911 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6254,7 +6239,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3939 + // line internal/php5/php5.y:3924 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -6268,7 +6253,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3951 + // line internal/php5/php5.y:3936 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -6282,7 +6267,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3963 + // line internal/php5/php5.y:3948 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -6296,7 +6281,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:3975 + // line internal/php5/php5.y:3960 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -6310,7 +6295,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:3987 + // line internal/php5/php5.y:3972 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6325,7 +6310,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4000 + // line internal/php5/php5.y:3985 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6340,7 +6325,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4013 + // line internal/php5/php5.y:3998 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6355,7 +6340,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4026 + // line internal/php5/php5.y:4011 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6371,7 +6356,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4040 + // line internal/php5/php5.y:4025 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6386,7 +6371,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4053 + // line internal/php5/php5.y:4038 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6401,7 +6386,7 @@ yydefault: } case 280: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4066 + // line internal/php5/php5.y:4051 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6416,7 +6401,7 @@ yydefault: } case 281: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4079 + // line internal/php5/php5.y:4064 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6431,7 +6416,7 @@ yydefault: } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4092 + // line internal/php5/php5.y:4077 { yyVAL.node = &ast.ExprInstanceOf{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6446,7 +6431,7 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4105 + // line internal/php5/php5.y:4090 { yyVAL.node = yyDollar[1].node @@ -6459,7 +6444,7 @@ yydefault: } case 284: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4114 + // line internal/php5/php5.y:4099 { yyVAL.node = yyDollar[1].node @@ -6467,7 +6452,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4120 + // line internal/php5/php5.y:4105 { yyVAL.node = yyDollar[2].node @@ -6501,7 +6486,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:4152 + // line internal/php5/php5.y:4137 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -6517,7 +6502,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4166 + // line internal/php5/php5.y:4151 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -6533,7 +6518,7 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4180 + // line internal/php5/php5.y:4165 { yyVAL.node = yyDollar[1].node @@ -6541,7 +6526,7 @@ yydefault: } case 289: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4186 + // line internal/php5/php5.y:4171 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -6556,7 +6541,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4199 + // line internal/php5/php5.y:4184 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -6571,7 +6556,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4212 + // line internal/php5/php5.y:4197 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -6586,7 +6571,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4225 + // line internal/php5/php5.y:4210 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -6601,7 +6586,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4238 + // line internal/php5/php5.y:4223 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -6616,7 +6601,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4251 + // line internal/php5/php5.y:4236 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6631,7 +6616,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4264 + // line internal/php5/php5.y:4249 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6646,7 +6631,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4277 + // line internal/php5/php5.y:4262 { e := yyDollar[2].node.(*ast.ExprExit) yyVAL.node = yyDollar[2].node @@ -6669,7 +6654,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4298 + // line internal/php5/php5.y:4283 { yyVAL.node = &ast.ExprErrorSuppress{ast.Node{}, yyDollar[2].node} @@ -6683,7 +6668,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4310 + // line internal/php5/php5.y:4295 { yyVAL.node = yyDollar[1].node @@ -6691,7 +6676,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4316 + // line internal/php5/php5.y:4301 { yyVAL.node = yyDollar[1].node @@ -6699,7 +6684,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4322 + // line internal/php5/php5.y:4307 { yyVAL.node = yyDollar[1].node @@ -6707,7 +6692,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4328 + // line internal/php5/php5.y:4313 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6721,7 +6706,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4340 + // line internal/php5/php5.y:4325 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6735,7 +6720,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4352 + // line internal/php5/php5.y:4337 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6749,7 +6734,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php5/php5.y:4364 + // line internal/php5/php5.y:4349 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[4].list, yyDollar[6].ClosureUse, nil, yyDollar[8].list} @@ -6778,7 +6763,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php5/php5.y:4390 + // line internal/php5/php5.y:4375 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[3].token != nil, true, yyDollar[5].list, yyDollar[7].ClosureUse, nil, yyDollar[9].list} @@ -6808,7 +6793,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4420 + // line internal/php5/php5.y:4405 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6822,7 +6807,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4432 + // line internal/php5/php5.y:4417 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6836,7 +6821,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4444 + // line internal/php5/php5.y:4429 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6851,7 +6836,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4457 + // line internal/php5/php5.y:4442 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6866,7 +6851,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4473 + // line internal/php5/php5.y:4458 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6882,7 +6867,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4487 + // line internal/php5/php5.y:4472 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6898,7 +6883,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4501 + // line internal/php5/php5.y:4486 { str := &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, str, yyDollar[3].node} @@ -6916,7 +6901,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4517 + // line internal/php5/php5.y:4502 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6932,7 +6917,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4534 + // line internal/php5/php5.y:4519 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -6948,7 +6933,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4548 + // line internal/php5/php5.y:4533 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -6963,13 +6948,13 @@ yydefault: } case 316: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4564 + // line internal/php5/php5.y:4549 { yyVAL.token = yyDollar[1].token } case 317: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4571 + // line internal/php5/php5.y:4556 { yyVAL.ClosureUse = nil @@ -6977,7 +6962,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4577 + // line internal/php5/php5.y:4562 { yyVAL.ClosureUse = &ast.ExprClosureUse{ast.Node{}, yyDollar[3].list} @@ -6993,9 +6978,9 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4594 + // line internal/php5/php5.y:4579 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[3].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.list = append(yyDollar[1].list, variable) @@ -7006,15 +6991,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[3].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 320: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4611 + // line internal/php5/php5.y:4595 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} reference := &ast.ExprReference{ast.Node{}, variable} yyVAL.list = append(yyDollar[1].list, reference) @@ -7028,15 +7012,14 @@ yydefault: yylex.(*Parser).setFreeFloating(lastNode(yyDollar[1].list), token.End, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(reference, token.Start, yyDollar[3].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[4].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 321: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4631 + // line internal/php5/php5.y:4614 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.list = []ast.Vertex{variable} @@ -7046,15 +7029,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 322: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4647 + // line internal/php5/php5.y:4629 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[2].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} reference := &ast.ExprReference{ast.Node{}, variable} yyVAL.list = []ast.Vertex{reference} @@ -7067,13 +7049,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(reference, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[2].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 323: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4669 + // line internal/php5/php5.y:4650 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, name, yyDollar[2].node.(*ast.ArgumentList)} @@ -7089,7 +7070,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4683 + // line internal/php5/php5.y:4664 { funcName := &ast.NameRelative{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, funcName, yyDollar[4].node.(*ast.ArgumentList)} @@ -7106,7 +7087,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4698 + // line internal/php5/php5.y:4679 { funcName := &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, funcName, yyDollar[3].node.(*ast.ArgumentList)} @@ -7122,7 +7103,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4712 + // line internal/php5/php5.y:4693 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7137,7 +7118,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4725 + // line internal/php5/php5.y:4706 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7152,7 +7133,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4738 + // line internal/php5/php5.y:4719 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7167,7 +7148,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4751 + // line internal/php5/php5.y:4732 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7182,7 +7163,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4764 + // line internal/php5/php5.y:4745 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -7196,7 +7177,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4779 + // line internal/php5/php5.y:4760 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7210,7 +7191,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4791 + // line internal/php5/php5.y:4772 { yyVAL.node = &ast.NameName{ast.Node{}, yyDollar[1].list} @@ -7224,7 +7205,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4803 + // line internal/php5/php5.y:4784 { yyVAL.node = &ast.NameRelative{ast.Node{}, yyDollar[3].list} @@ -7239,7 +7220,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4816 + // line internal/php5/php5.y:4797 { yyVAL.node = &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} @@ -7253,7 +7234,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4831 + // line internal/php5/php5.y:4812 { yyVAL.node = &ast.NameName{ast.Node{}, yyDollar[1].list} @@ -7267,7 +7248,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:4843 + // line internal/php5/php5.y:4824 { yyVAL.node = &ast.NameRelative{ast.Node{}, yyDollar[3].list} @@ -7282,7 +7263,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4856 + // line internal/php5/php5.y:4837 { yyVAL.node = &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} @@ -7296,7 +7277,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4871 + // line internal/php5/php5.y:4852 { yyVAL.node = yyDollar[1].node @@ -7304,7 +7285,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4877 + // line internal/php5/php5.y:4858 { yyVAL.node = yyDollar[1].node @@ -7312,7 +7293,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:4886 + // line internal/php5/php5.y:4867 { yyVAL.node = yyDollar[1].node @@ -7355,7 +7336,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4927 + // line internal/php5/php5.y:4908 { yyVAL.node = yyDollar[1].node @@ -7363,7 +7344,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4937 + // line internal/php5/php5.y:4918 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -7371,7 +7352,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4943 + // line internal/php5/php5.y:4924 { yyVAL.list = []ast.Vertex{} @@ -7379,7 +7360,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4953 + // line internal/php5/php5.y:4934 { yyVAL.list = yyDollar[2].list @@ -7390,7 +7371,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:4965 + // line internal/php5/php5.y:4946 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, nil} @@ -7398,7 +7379,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:4971 + // line internal/php5/php5.y:4952 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, nil} @@ -7413,7 +7394,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:4984 + // line internal/php5/php5.y:4965 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, yyDollar[1].node} @@ -7434,7 +7415,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5004 + // line internal/php5/php5.y:4985 { yyVAL.list = []ast.Vertex{} @@ -7442,7 +7423,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5010 + // line internal/php5/php5.y:4991 { part := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{part} @@ -7454,7 +7435,7 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5020 + // line internal/php5/php5.y:5001 { yyVAL.list = yyDollar[1].list @@ -7462,7 +7443,7 @@ yydefault: } case 351: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5029 + // line internal/php5/php5.y:5010 { yyVAL.node = nil @@ -7470,7 +7451,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5035 + // line internal/php5/php5.y:5016 { yyVAL.node = yyDollar[1].node @@ -7478,7 +7459,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5044 + // line internal/php5/php5.y:5025 { yyVAL.node = &ast.ScalarLnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7492,7 +7473,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5056 + // line internal/php5/php5.y:5037 { yyVAL.node = &ast.ScalarDnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7506,7 +7487,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5068 + // line internal/php5/php5.y:5049 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -7520,7 +7501,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5080 + // line internal/php5/php5.y:5061 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7534,7 +7515,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5092 + // line internal/php5/php5.y:5073 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7548,7 +7529,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5104 + // line internal/php5/php5.y:5085 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7562,7 +7543,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5116 + // line internal/php5/php5.y:5097 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7576,7 +7557,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5128 + // line internal/php5/php5.y:5109 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7590,7 +7571,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5140 + // line internal/php5/php5.y:5121 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7604,7 +7585,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5152 + // line internal/php5/php5.y:5133 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7618,7 +7599,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5164 + // line internal/php5/php5.y:5145 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, []ast.Vertex{encapsed}} @@ -7634,7 +7615,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5178 + // line internal/php5/php5.y:5159 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, nil} @@ -7648,7 +7629,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5193 + // line internal/php5/php5.y:5174 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -7666,7 +7647,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5212 + // line internal/php5/php5.y:5193 { yyVAL.node = yyDollar[1].node @@ -7674,7 +7655,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5221 + // line internal/php5/php5.y:5202 { yyVAL.node = yyDollar[1].node @@ -7682,7 +7663,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5227 + // line internal/php5/php5.y:5208 { yyVAL.node = yyDollar[1].node @@ -7690,7 +7671,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5233 + // line internal/php5/php5.y:5214 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -7706,7 +7687,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5247 + // line internal/php5/php5.y:5228 { name := &ast.NameRelative{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -7723,7 +7704,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5262 + // line internal/php5/php5.y:5243 { name := &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -7739,7 +7720,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5276 + // line internal/php5/php5.y:5257 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -7755,7 +7736,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5290 + // line internal/php5/php5.y:5271 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -7770,7 +7751,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5303 + // line internal/php5/php5.y:5284 { yyVAL.node = yyDollar[1].node @@ -7778,7 +7759,7 @@ yydefault: } case 375: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5309 + // line internal/php5/php5.y:5290 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7792,7 +7773,7 @@ yydefault: } case 376: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5321 + // line internal/php5/php5.y:5302 { yyVAL.node = yyDollar[1].node @@ -7800,7 +7781,7 @@ yydefault: } case 377: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5330 + // line internal/php5/php5.y:5311 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7816,7 +7797,7 @@ yydefault: } case 378: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5344 + // line internal/php5/php5.y:5325 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7831,7 +7812,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5357 + // line internal/php5/php5.y:5338 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7846,7 +7827,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5370 + // line internal/php5/php5.y:5351 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7861,7 +7842,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5383 + // line internal/php5/php5.y:5364 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7876,7 +7857,7 @@ yydefault: } case 382: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5396 + // line internal/php5/php5.y:5377 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7891,7 +7872,7 @@ yydefault: } case 383: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5409 + // line internal/php5/php5.y:5390 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7906,7 +7887,7 @@ yydefault: } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5422 + // line internal/php5/php5.y:5403 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -7920,7 +7901,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5434 + // line internal/php5/php5.y:5415 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -7934,7 +7915,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5446 + // line internal/php5/php5.y:5427 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7949,7 +7930,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5459 + // line internal/php5/php5.y:5440 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7964,7 +7945,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5472 + // line internal/php5/php5.y:5453 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7979,7 +7960,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5485 + // line internal/php5/php5.y:5466 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7994,7 +7975,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5498 + // line internal/php5/php5.y:5479 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8009,7 +7990,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5511 + // line internal/php5/php5.y:5492 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8024,7 +8005,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5524 + // line internal/php5/php5.y:5505 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8039,7 +8020,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5537 + // line internal/php5/php5.y:5518 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8054,7 +8035,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5550 + // line internal/php5/php5.y:5531 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8069,7 +8050,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5563 + // line internal/php5/php5.y:5544 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8084,7 +8065,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5576 + // line internal/php5/php5.y:5557 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8099,7 +8080,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5589 + // line internal/php5/php5.y:5570 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8114,7 +8095,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5602 + // line internal/php5/php5.y:5583 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8129,7 +8110,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5615 + // line internal/php5/php5.y:5596 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8144,7 +8125,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5628 + // line internal/php5/php5.y:5609 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8160,7 +8141,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5642 + // line internal/php5/php5.y:5623 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8175,7 +8156,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5655 + // line internal/php5/php5.y:5636 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8190,7 +8171,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5668 + // line internal/php5/php5.y:5649 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8205,7 +8186,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5681 + // line internal/php5/php5.y:5662 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8220,7 +8201,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:5694 + // line internal/php5/php5.y:5675 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -8236,7 +8217,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5708 + // line internal/php5/php5.y:5689 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -8252,7 +8233,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5722 + // line internal/php5/php5.y:5703 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -8266,7 +8247,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5734 + // line internal/php5/php5.y:5715 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -8280,7 +8261,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5746 + // line internal/php5/php5.y:5727 { yyVAL.node = yyDollar[2].node @@ -8292,7 +8273,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5759 + // line internal/php5/php5.y:5740 { yyVAL.node = yyDollar[1].node @@ -8300,7 +8281,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5765 + // line internal/php5/php5.y:5746 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -8316,7 +8297,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5779 + // line internal/php5/php5.y:5760 { name := &ast.NameRelative{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -8333,7 +8314,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5794 + // line internal/php5/php5.y:5775 { name := &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprConstFetch{ast.Node{}, name} @@ -8349,7 +8330,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5811 + // line internal/php5/php5.y:5792 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} @@ -8365,7 +8346,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5825 + // line internal/php5/php5.y:5806 { yyVAL.node = yyDollar[1].node @@ -8373,7 +8354,7 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5831 + // line internal/php5/php5.y:5812 { yyVAL.node = yyDollar[1].node @@ -8381,7 +8362,7 @@ yydefault: } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5837 + // line internal/php5/php5.y:5818 { yyVAL.node = yyDollar[1].node @@ -8389,7 +8370,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5843 + // line internal/php5/php5.y:5824 { yyVAL.node = &ast.ScalarEncapsed{ast.Node{}, yyDollar[2].list} @@ -8403,7 +8384,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5855 + // line internal/php5/php5.y:5836 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, yyDollar[2].list} @@ -8417,7 +8398,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5867 + // line internal/php5/php5.y:5848 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -8431,7 +8412,7 @@ yydefault: } case 421: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5882 + // line internal/php5/php5.y:5863 { yyVAL.list = nil @@ -8439,7 +8420,7 @@ yydefault: } case 422: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:5888 + // line internal/php5/php5.y:5869 { yyVAL.list = yyDollar[1].list @@ -8452,19 +8433,19 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:5902 + // line internal/php5/php5.y:5883 { yyVAL.token = nil } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5906 + // line internal/php5/php5.y:5887 { yyVAL.token = yyDollar[1].token } case 425: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:5913 + // line internal/php5/php5.y:5894 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8481,7 +8462,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5928 + // line internal/php5/php5.y:5909 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -8497,7 +8478,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5942 + // line internal/php5/php5.y:5923 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -8513,7 +8494,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5956 + // line internal/php5/php5.y:5937 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -8528,7 +8509,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5972 + // line internal/php5/php5.y:5953 { yyVAL.node = yyDollar[1].node @@ -8536,7 +8517,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:5978 + // line internal/php5/php5.y:5959 { yyVAL.node = yyDollar[1].node @@ -8544,7 +8525,7 @@ yydefault: } case 431: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:5987 + // line internal/php5/php5.y:5968 { yyVAL.node = yyDollar[2].node @@ -8562,7 +8543,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6003 + // line internal/php5/php5.y:5984 { yyVAL.node = yyDollar[2].node @@ -8580,7 +8561,7 @@ yydefault: } case 433: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6023 + // line internal/php5/php5.y:6004 { yyVAL.node = yyDollar[1].node @@ -8588,7 +8569,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6033 + // line internal/php5/php5.y:6014 { yyVAL.node = yyDollar[1].node @@ -8596,7 +8577,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6042 + // line internal/php5/php5.y:6023 { yyVAL.node = yyDollar[1].node @@ -8604,7 +8585,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:6051 + // line internal/php5/php5.y:6032 { yyVAL.node = yyDollar[1].node @@ -8664,7 +8645,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6109 + // line internal/php5/php5.y:6090 { yyVAL.node = yyDollar[1].node @@ -8672,7 +8653,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6118 + // line internal/php5/php5.y:6099 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].list...) @@ -8680,7 +8661,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:6124 + // line internal/php5/php5.y:6105 { yyVAL.list = []ast.Vertex{} @@ -8688,7 +8669,7 @@ yydefault: } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6134 + // line internal/php5/php5.y:6115 { if yyDollar[3].list != nil { yyDollar[3].list[0].(*ast.ExprMethodCall).Method = yyDollar[2].list[len(yyDollar[2].list)-1].(*ast.ExprPropertyFetch).Property @@ -8704,7 +8685,7 @@ yydefault: } case 441: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6151 + // line internal/php5/php5.y:6132 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -8720,7 +8701,7 @@ yydefault: } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6165 + // line internal/php5/php5.y:6146 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = []ast.Vertex{yyDollar[1].node, fetch} @@ -8736,7 +8717,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6182 + // line internal/php5/php5.y:6163 { yyVAL.node = &ast.ExprMethodCall{ast.Node{}, nil, nil, yyDollar[1].node.(*ast.ArgumentList)} @@ -8747,7 +8728,7 @@ yydefault: } case 444: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6194 + // line internal/php5/php5.y:6175 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -8755,7 +8736,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6200 + // line internal/php5/php5.y:6181 { yyVAL.list = yyDollar[1].list @@ -8763,7 +8744,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:6206 + // line internal/php5/php5.y:6187 { yyVAL.list = nil @@ -8771,7 +8752,7 @@ yydefault: } case 447: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6215 + // line internal/php5/php5.y:6196 { yyVAL.node = yyDollar[1].node @@ -8779,7 +8760,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6221 + // line internal/php5/php5.y:6202 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -8793,7 +8774,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6236 + // line internal/php5/php5.y:6217 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8808,7 +8789,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6249 + // line internal/php5/php5.y:6230 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8823,7 +8804,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6265 + // line internal/php5/php5.y:6246 { yyVAL.node = yyDollar[1].node @@ -8831,7 +8812,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6274 + // line internal/php5/php5.y:6255 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8847,7 +8828,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6288 + // line internal/php5/php5.y:6269 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8863,7 +8844,7 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6305 + // line internal/php5/php5.y:6286 { yyVAL.node = yyDollar[1].node @@ -8871,7 +8852,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6311 + // line internal/php5/php5.y:6292 { yyVAL.node = yyDollar[1].node @@ -8879,7 +8860,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6317 + // line internal/php5/php5.y:6298 { yyVAL.node = yyDollar[1].node @@ -8887,7 +8868,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6327 + // line internal/php5/php5.y:6308 { yyVAL.node = yyDollar[1].node @@ -8895,7 +8876,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6333 + // line internal/php5/php5.y:6314 { yyDollar[1].simpleIndirectReference.last.VarName = yyDollar[2].node @@ -8909,7 +8890,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6345 + // line internal/php5/php5.y:6326 { yyVAL.node = yyDollar[1].node @@ -8917,7 +8898,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6354 + // line internal/php5/php5.y:6335 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8933,7 +8914,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6368 + // line internal/php5/php5.y:6349 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -8949,7 +8930,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6382 + // line internal/php5/php5.y:6363 { yyVAL.node = yyDollar[1].node @@ -8957,9 +8938,9 @@ yydefault: } case 463: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6392 + // line internal/php5/php5.y:6373 { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} // save position @@ -8968,13 +8949,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 464: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6407 + // line internal/php5/php5.y:6387 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -8983,7 +8963,6 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.Start, append(yyDollar[2].token.Hidden, append(yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token), yyDollar[3].node.GetNode().Tokens[token.Start]...)...)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.End, append(yyDollar[3].node.GetNode().Tokens[token.End], append(yyDollar[4].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[4].token)...)...)) @@ -8991,7 +8970,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:6425 + // line internal/php5/php5.y:6404 { yyVAL.node = nil @@ -8999,7 +8978,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6431 + // line internal/php5/php5.y:6410 { yyVAL.node = yyDollar[1].node @@ -9007,7 +8986,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6441 + // line internal/php5/php5.y:6420 { yyVAL.list = yyDollar[1].list @@ -9015,7 +8994,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6447 + // line internal/php5/php5.y:6426 { fetch := &ast.ExprPropertyFetch{ast.Node{}, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{fetch} @@ -9027,7 +9006,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6460 + // line internal/php5/php5.y:6439 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -9043,7 +9022,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6474 + // line internal/php5/php5.y:6453 { fetch := &ast.ExprArrayDimFetch{ast.Node{}, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, fetch) @@ -9059,7 +9038,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6488 + // line internal/php5/php5.y:6467 { fetch := &ast.ExprPropertyFetch{ast.Node{}, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{fetch} @@ -9071,7 +9050,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6501 + // line internal/php5/php5.y:6480 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -9085,7 +9064,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6513 + // line internal/php5/php5.y:6492 { yyVAL.node = yyDollar[2].node @@ -9100,7 +9079,7 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6529 + // line internal/php5/php5.y:6508 { n := &ast.ExprVariable{ast.Node{}, nil} yyVAL.simpleIndirectReference = simpleIndirectReference{[]*ast.ExprVariable{n}, n} @@ -9110,13 +9089,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(n, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(n, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 475: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6543 + // line internal/php5/php5.y:6521 { n := &ast.ExprVariable{ast.Node{}, nil} @@ -9130,13 +9108,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(n, token.Start, yyDollar[2].token.Hidden) - yylex.(*Parser).setFreeFloating(n, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6564 + // line internal/php5/php5.y:6541 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []ast.Vertex{&ast.ExprArrayItem{ast.Node{}, false, nil, nil}} @@ -9151,7 +9128,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6577 + // line internal/php5/php5.y:6554 { if yyDollar[1].node.(*ast.ExprArrayItem).Key == nil && yyDollar[1].node.(*ast.ExprArrayItem).Val == nil { yyVAL.list = []ast.Vertex{} @@ -9163,7 +9140,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6591 + // line internal/php5/php5.y:6568 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} @@ -9177,7 +9154,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6603 + // line internal/php5/php5.y:6580 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, listNode} @@ -9195,7 +9172,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:6619 + // line internal/php5/php5.y:6596 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, nil} @@ -9203,7 +9180,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php5/php5.y:6629 + // line internal/php5/php5.y:6606 { yyVAL.list = []ast.Vertex{} @@ -9211,7 +9188,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6635 + // line internal/php5/php5.y:6612 { yyVAL.list = yyDollar[1].list @@ -9228,7 +9205,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php5/php5.y:6653 + // line internal/php5/php5.y:6630 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, yyDollar[5].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -9245,7 +9222,7 @@ yydefault: } case 484: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6668 + // line internal/php5/php5.y:6645 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[3].node} yyVAL.list = append(yyDollar[1].list, arrayItem) @@ -9261,7 +9238,7 @@ yydefault: } case 485: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6682 + // line internal/php5/php5.y:6659 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -9277,7 +9254,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6696 + // line internal/php5/php5.y:6673 { arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} yyVAL.list = []ast.Vertex{arrayItem} @@ -9292,7 +9269,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:6709 + // line internal/php5/php5.y:6686 { reference := &ast.ExprReference{ast.Node{}, yyDollar[6].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[3].node, reference} @@ -9312,7 +9289,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6727 + // line internal/php5/php5.y:6704 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -9330,7 +9307,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6743 + // line internal/php5/php5.y:6720 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, reference} @@ -9349,7 +9326,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6760 + // line internal/php5/php5.y:6737 { reference := &ast.ExprReference{ast.Node{}, yyDollar[2].node} arrayItem := &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -9366,7 +9343,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6778 + // line internal/php5/php5.y:6755 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -9374,7 +9351,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6784 + // line internal/php5/php5.y:6761 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.list = append(yyDollar[1].list, encapsed) @@ -9389,7 +9366,7 @@ yydefault: } case 493: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6797 + // line internal/php5/php5.y:6774 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -9397,7 +9374,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:6803 + // line internal/php5/php5.y:6780 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{encapsed, yyDollar[2].node} @@ -9412,9 +9389,9 @@ yydefault: } case 495: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6819 + // line internal/php5/php5.y:6796 { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} // save position @@ -9423,15 +9400,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 496: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6834 + // line internal/php5/php5.y:6810 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, variable, yyDollar[3].node} @@ -9441,7 +9417,6 @@ yydefault: yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, append(yyDollar[2].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token)...)) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Expr, append(yyDollar[4].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[4].token)...)) @@ -9449,9 +9424,9 @@ yydefault: } case 497: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6852 + // line internal/php5/php5.y:6827 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} fetch := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, variable, fetch} @@ -9463,7 +9438,6 @@ yydefault: yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[3].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(fetch, token.Start, yyDollar[3].token.Hidden) @@ -9471,7 +9445,7 @@ yydefault: } case 498: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6872 + // line internal/php5/php5.y:6846 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -9488,7 +9462,7 @@ yydefault: } case 499: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6887 + // line internal/php5/php5.y:6861 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, name} @@ -9507,7 +9481,7 @@ yydefault: } case 500: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php5/php5.y:6904 + // line internal/php5/php5.y:6878 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -9528,7 +9502,7 @@ yydefault: } case 501: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:6923 + // line internal/php5/php5.y:6897 { yyVAL.node = yyDollar[2].node @@ -9540,7 +9514,7 @@ yydefault: } case 502: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6936 + // line internal/php5/php5.y:6910 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -9554,7 +9528,7 @@ yydefault: } case 503: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6948 + // line internal/php5/php5.y:6922 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -9573,9 +9547,9 @@ yydefault: } case 504: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:6965 + // line internal/php5/php5.y:6939 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -9584,13 +9558,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 505: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6983 + // line internal/php5/php5.y:6956 { yyVAL.node = &ast.ExprIsset{ast.Node{}, yyDollar[3].list} @@ -9606,7 +9579,7 @@ yydefault: } case 506: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:6997 + // line internal/php5/php5.y:6970 { yyVAL.node = &ast.ExprEmpty{ast.Node{}, yyDollar[3].node} @@ -9622,7 +9595,7 @@ yydefault: } case 507: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:7011 + // line internal/php5/php5.y:6984 { yyVAL.node = &ast.ExprEmpty{ast.Node{}, yyDollar[3].node} @@ -9638,7 +9611,7 @@ yydefault: } case 508: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:7025 + // line internal/php5/php5.y:6998 { yyVAL.node = &ast.ExprInclude{ast.Node{}, yyDollar[2].node} @@ -9652,7 +9625,7 @@ yydefault: } case 509: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:7037 + // line internal/php5/php5.y:7010 { yyVAL.node = &ast.ExprIncludeOnce{ast.Node{}, yyDollar[2].node} @@ -9666,7 +9639,7 @@ yydefault: } case 510: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php5/php5.y:7049 + // line internal/php5/php5.y:7022 { yyVAL.node = &ast.ExprEval{ast.Node{}, yyDollar[3].node} @@ -9682,7 +9655,7 @@ yydefault: } case 511: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:7063 + // line internal/php5/php5.y:7036 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -9696,7 +9669,7 @@ yydefault: } case 512: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php5/php5.y:7075 + // line internal/php5/php5.y:7048 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -9710,7 +9683,7 @@ yydefault: } case 513: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:7090 + // line internal/php5/php5.y:7063 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -9718,7 +9691,7 @@ yydefault: } case 514: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:7096 + // line internal/php5/php5.y:7069 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -9729,7 +9702,7 @@ yydefault: } case 515: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:7108 + // line internal/php5/php5.y:7081 { yyVAL.node = yyDollar[1].node @@ -9737,7 +9710,7 @@ yydefault: } case 516: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php5/php5.y:7114 + // line internal/php5/php5.y:7087 { yyVAL.node = yyDollar[1].node @@ -9745,7 +9718,7 @@ yydefault: } case 517: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:7123 + // line internal/php5/php5.y:7096 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -9763,7 +9736,7 @@ yydefault: } case 518: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:7139 + // line internal/php5/php5.y:7112 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -9781,7 +9754,7 @@ yydefault: } case 519: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:7158 + // line internal/php5/php5.y:7131 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -9799,7 +9772,7 @@ yydefault: } case 520: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php5/php5.y:7177 + // line internal/php5/php5.y:7150 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 7b05f37..07a2c3b 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -1418,7 +1418,7 @@ catch_statement: } | T_CATCH '(' fully_qualified_class_name T_VARIABLE ')' '{' inner_statement_list '}' additional_catches { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} catchNode := &ast.StmtCatch{ast.Node{}, []ast.Vertex{$3}, variable, $7} $$ = append([]ast.Vertex{catchNode}, $9...) @@ -1432,7 +1432,6 @@ catch_statement: 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).addDollarToken(variable) yylex.(*Parser).setFreeFloating(catchNode, token.Var, $5.Hidden) yylex.(*Parser).setFreeFloating(catchNode, token.Cond, $6.Hidden) yylex.(*Parser).setFreeFloating(catchNode, token.Stmts, $8.Hidden) @@ -1497,7 +1496,7 @@ non_empty_additional_catches: additional_catch: T_CATCH '(' fully_qualified_class_name T_VARIABLE ')' '{' inner_statement_list '}' { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.StmtCatch{ast.Node{}, []ast.Vertex{$3}, variable, $7} @@ -1510,7 +1509,6 @@ additional_catch: yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) yylex.(*Parser).setFreeFloating($$, token.Catch, $2.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, $4.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) yylex.(*Parser).setFreeFloating($$, token.Cond, $6.Hidden) yylex.(*Parser).setFreeFloating($$, token.Stmts, $8.Hidden) @@ -2284,7 +2282,7 @@ non_empty_parameter_list: parameter: optional_class_type is_reference is_variadic T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.Parameter{ast.Node{}, $2 != nil, $3 != nil, $1, variable, nil} @@ -2312,7 +2310,6 @@ parameter: yylex.(*Parser).setFreeFloating($$, token.Ampersand, $3.Hidden) } yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if $3 == nil { @@ -2329,7 +2326,7 @@ parameter: } | optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.Parameter{ast.Node{}, $2 != nil, $3 != nil, $1, variable, $6} @@ -2358,7 +2355,6 @@ parameter: } yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if $3 == nil { @@ -2552,7 +2548,7 @@ global_var_list: global_var: T_VARIABLE { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, name} // save position @@ -2561,7 +2557,6 @@ global_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2574,7 +2569,6 @@ global_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -2587,7 +2581,6 @@ global_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) 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)...)...)) @@ -2599,7 +2592,7 @@ global_var: static_var_list: static_var_list ',' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($3.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $3.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, nil} $$ = append($1, staticVar) @@ -2611,14 +2604,13 @@ static_var_list: // save comments yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | static_var_list ',' T_VARIABLE '=' static_scalar { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($3.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $3.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, $5} $$ = append($1, staticVar) @@ -2630,7 +2622,6 @@ static_var_list: // save comments yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, $3.Hidden) yylex.(*Parser).setFreeFloating(staticVar, token.Var, $4.Hidden) @@ -2638,7 +2629,7 @@ static_var_list: } | T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, nil} $$ = []ast.Vertex{staticVar} @@ -2649,14 +2640,13 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '=' static_scalar { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} staticVar := &ast.StmtStaticVar{ast.Node{}, variable, $3} $$ = []ast.Vertex{staticVar} @@ -2667,7 +2657,6 @@ static_var_list: staticVar.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(staticVar, token.Start, $1.Hidden) yylex.(*Parser).setFreeFloating(staticVar, token.Var, $2.Hidden) @@ -3154,7 +3143,7 @@ member_modifier: class_variable_declaration: class_variable_declaration ',' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($3.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $3.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, nil} $$ = append($1, property) @@ -3165,7 +3154,6 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenPosition($3) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) yylex.(*Parser).setFreeFloating(property, token.Start, $3.Hidden) @@ -3173,7 +3161,7 @@ class_variable_declaration: } | class_variable_declaration ',' T_VARIABLE '=' static_scalar { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($3.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $3.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, $5} $$ = append($1, property) @@ -3185,7 +3173,6 @@ class_variable_declaration: // save comments yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, $3.Hidden) yylex.(*Parser).setFreeFloating(property, token.Var, $4.Hidden) @@ -3193,7 +3180,7 @@ class_variable_declaration: } | T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, nil} $$ = []ast.Vertex{property} @@ -3204,14 +3191,13 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenPosition($1) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, $1.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '=' static_scalar { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} property := &ast.StmtProperty{ast.Node{}, variable, $3} $$ = []ast.Vertex{property} @@ -3222,7 +3208,6 @@ class_variable_declaration: property.GetNode().Position = position.NewTokenNodePosition($1, $3) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(property, token.Start, $2.Hidden) yylex.(*Parser).setFreeFloating(property, token.Var, $2.Hidden) @@ -4592,7 +4577,7 @@ lexical_vars: lexical_var_list: lexical_var_list ',' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($3.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $3.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = append($1, variable) @@ -4603,13 +4588,12 @@ lexical_var_list: // save comments yylex.(*Parser).setFreeFloating(lastNode($1), token.End, $2.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, $3.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | lexical_var_list ',' '&' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} reference := &ast.ExprReference{ast.Node{}, variable} $$ = append($1, reference) @@ -4623,13 +4607,12 @@ lexical_var_list: 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).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = []ast.Vertex{variable} @@ -4639,13 +4622,12 @@ lexical_var_list: // save comments yylex.(*Parser).setFreeFloating(variable, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | '&' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($2.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $2.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} reference := &ast.ExprReference{ast.Node{}, variable} $$ = []ast.Vertex{reference} @@ -4658,7 +4640,6 @@ lexical_var_list: // save comments yylex.(*Parser).setFreeFloating(reference, token.Start, $1.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6390,7 +6371,7 @@ reference_variable: compound_variable: T_VARIABLE { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, name} // save position @@ -6399,7 +6380,6 @@ compound_variable: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6412,7 +6392,6 @@ compound_variable: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) 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)...)...)) @@ -6535,7 +6514,6 @@ simple_indirect_reference: // save comments yylex.(*Parser).setFreeFloating(n, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating(n, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -6553,9 +6531,8 @@ simple_indirect_reference: // save comments yylex.(*Parser).setFreeFloating(n, token.Start, $2.Hidden) - yylex.(*Parser).setFreeFloating(n, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($2)) - yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) + yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } ; @@ -6817,7 +6794,7 @@ encaps_list: encaps_var: T_VARIABLE { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, name} // save position @@ -6826,13 +6803,12 @@ encaps_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '[' encaps_var_offset ']' { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.ExprArrayDimFetch{ast.Node{}, variable, $3} @@ -6842,7 +6818,6 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) @@ -6850,7 +6825,7 @@ encaps_var: } | T_VARIABLE T_OBJECT_OPERATOR T_STRING { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} fetch := &ast.Identifier{ast.Node{}, $3.Value} $$ = &ast.ExprPropertyFetch{ast.Node{}, variable, fetch} @@ -6862,7 +6837,6 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Hidden) @@ -6963,7 +6937,7 @@ encaps_var_offset: } | T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -6972,7 +6946,6 @@ encaps_var_offset: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/internal/php5/php5_test.go b/internal/php5/php5_test.go index 5bef94b..6f4d199 100644 --- a/internal/php5/php5_test.go +++ b/internal/php5/php5_test.go @@ -486,7 +486,7 @@ func TestPhp5(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -519,7 +519,7 @@ func TestPhp5(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -563,7 +563,7 @@ func TestPhp5(t *testing.T) { EndPos: 27, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -605,7 +605,7 @@ func TestPhp5(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -638,7 +638,7 @@ func TestPhp5(t *testing.T) { EndPos: 37, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -682,7 +682,7 @@ func TestPhp5(t *testing.T) { EndPos: 46, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -735,7 +735,7 @@ func TestPhp5(t *testing.T) { EndPos: 54, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -768,7 +768,7 @@ func TestPhp5(t *testing.T) { EndPos: 61, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -867,7 +867,7 @@ func TestPhp5(t *testing.T) { EndPos: 77, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -900,7 +900,7 @@ func TestPhp5(t *testing.T) { EndPos: 84, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -944,7 +944,7 @@ func TestPhp5(t *testing.T) { EndPos: 93, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.Identifier{ @@ -997,7 +997,7 @@ func TestPhp5(t *testing.T) { EndPos: 101, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -1030,7 +1030,7 @@ func TestPhp5(t *testing.T) { EndPos: 108, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1118,7 +1118,7 @@ func TestPhp5(t *testing.T) { EndPos: 123, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -1151,7 +1151,7 @@ func TestPhp5(t *testing.T) { EndPos: 130, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1233,7 +1233,7 @@ func TestPhp5(t *testing.T) { EndPos: 157, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1322,7 +1322,7 @@ func TestPhp5(t *testing.T) { EndPos: 176, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1437,7 +1437,7 @@ func TestPhp5(t *testing.T) { EndPos: 222, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1526,7 +1526,7 @@ func TestPhp5(t *testing.T) { EndPos: 241, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1618,7 +1618,7 @@ func TestPhp5(t *testing.T) { EndPos: 266, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1707,7 +1707,7 @@ func TestPhp5(t *testing.T) { EndPos: 285, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1788,7 +1788,7 @@ func TestPhp5(t *testing.T) { EndPos: 317, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1877,7 +1877,7 @@ func TestPhp5(t *testing.T) { EndPos: 336, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -2248,7 +2248,7 @@ func TestPhp5(t *testing.T) { EndPos: 703, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, }, @@ -2311,7 +2311,7 @@ func TestPhp5(t *testing.T) { EndPos: 718, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarLnumber{ @@ -2386,7 +2386,7 @@ func TestPhp5(t *testing.T) { EndPos: 736, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarString{ @@ -2461,7 +2461,7 @@ func TestPhp5(t *testing.T) { EndPos: 793, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarString{ @@ -2536,7 +2536,7 @@ func TestPhp5(t *testing.T) { EndPos: 813, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ExprVariable{ @@ -2557,7 +2557,7 @@ func TestPhp5(t *testing.T) { EndPos: 818, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -2601,7 +2601,7 @@ func TestPhp5(t *testing.T) { EndPos: 829, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, &ast.ScalarEncapsedStringPart{ @@ -2633,7 +2633,7 @@ func TestPhp5(t *testing.T) { EndPos: 834, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -2696,7 +2696,7 @@ func TestPhp5(t *testing.T) { EndPos: 849, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.Identifier{ @@ -2911,7 +2911,7 @@ func TestPhp5(t *testing.T) { EndPos: 909, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -2966,7 +2966,7 @@ func TestPhp5(t *testing.T) { EndPos: 929, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3008,7 +3008,7 @@ func TestPhp5(t *testing.T) { EndPos: 950, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3050,7 +3050,7 @@ func TestPhp5(t *testing.T) { EndPos: 966, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3094,7 +3094,7 @@ func TestPhp5(t *testing.T) { EndPos: 986, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3157,7 +3157,7 @@ func TestPhp5(t *testing.T) { EndPos: 1015, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3199,7 +3199,7 @@ func TestPhp5(t *testing.T) { EndPos: 1031, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3241,7 +3241,7 @@ func TestPhp5(t *testing.T) { EndPos: 1046, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -4600,7 +4600,7 @@ func TestPhp5(t *testing.T) { EndPos: 1740, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ScalarLnumber{ @@ -4644,7 +4644,7 @@ func TestPhp5(t *testing.T) { EndPos: 1754, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -4686,7 +4686,7 @@ func TestPhp5(t *testing.T) { EndPos: 1765, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Expr: &ast.ScalarLnumber{ @@ -4730,7 +4730,7 @@ func TestPhp5(t *testing.T) { EndPos: 1773, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -4774,7 +4774,7 @@ func TestPhp5(t *testing.T) { EndPos: 1782, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -4805,7 +4805,7 @@ func TestPhp5(t *testing.T) { EndPos: 1788, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -4859,7 +4859,7 @@ func TestPhp5(t *testing.T) { EndPos: 1805, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -4903,7 +4903,7 @@ func TestPhp5(t *testing.T) { EndPos: 1814, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -4947,7 +4947,7 @@ func TestPhp5(t *testing.T) { EndPos: 1841, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -4968,7 +4968,7 @@ func TestPhp5(t *testing.T) { EndPos: 1847, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5021,7 +5021,7 @@ func TestPhp5(t *testing.T) { EndPos: 1871, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5063,7 +5063,7 @@ func TestPhp5(t *testing.T) { EndPos: 1889, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -5084,7 +5084,7 @@ func TestPhp5(t *testing.T) { EndPos: 1895, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5126,7 +5126,7 @@ func TestPhp5(t *testing.T) { EndPos: 1924, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -5147,7 +5147,7 @@ func TestPhp5(t *testing.T) { EndPos: 1930, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -5168,7 +5168,7 @@ func TestPhp5(t *testing.T) { EndPos: 1936, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5221,7 +5221,7 @@ func TestPhp5(t *testing.T) { EndPos: 1960, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -5242,7 +5242,7 @@ func TestPhp5(t *testing.T) { EndPos: 1966, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5284,7 +5284,7 @@ func TestPhp5(t *testing.T) { EndPos: 1984, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -5305,7 +5305,7 @@ func TestPhp5(t *testing.T) { EndPos: 1990, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -5335,7 +5335,7 @@ func TestPhp5(t *testing.T) { EndPos: 1997, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -5378,7 +5378,7 @@ func TestPhp5(t *testing.T) { EndPos: 2015, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -5399,7 +5399,7 @@ func TestPhp5(t *testing.T) { EndPos: 2021, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprList{ @@ -5439,7 +5439,7 @@ func TestPhp5(t *testing.T) { EndPos: 2032, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -5574,7 +5574,7 @@ func TestPhp5(t *testing.T) { EndPos: 2127, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -5642,7 +5642,7 @@ func TestPhp5(t *testing.T) { EndPos: 2159, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -5686,7 +5686,7 @@ func TestPhp5(t *testing.T) { EndPos: 2172, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -5800,7 +5800,7 @@ func TestPhp5(t *testing.T) { EndPos: 2246, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -5821,7 +5821,7 @@ func TestPhp5(t *testing.T) { EndPos: 2250, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, &ast.ExprVariable{ @@ -5851,7 +5851,7 @@ func TestPhp5(t *testing.T) { EndPos: 2255, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -5979,7 +5979,7 @@ func TestPhp5(t *testing.T) { EndPos: 2291, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6021,7 +6021,7 @@ func TestPhp5(t *testing.T) { EndPos: 2304, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6063,7 +6063,7 @@ func TestPhp5(t *testing.T) { EndPos: 2319, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -6107,7 +6107,7 @@ func TestPhp5(t *testing.T) { EndPos: 2332, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6170,7 +6170,7 @@ func TestPhp5(t *testing.T) { EndPos: 2353, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6212,7 +6212,7 @@ func TestPhp5(t *testing.T) { EndPos: 2368, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -6254,7 +6254,7 @@ func TestPhp5(t *testing.T) { EndPos: 2383, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -6319,7 +6319,7 @@ func TestPhp5(t *testing.T) { EndPos: 2404, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6361,7 +6361,7 @@ func TestPhp5(t *testing.T) { EndPos: 2419, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -6413,7 +6413,7 @@ func TestPhp5(t *testing.T) { EndPos: 2435, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -6791,7 +6791,7 @@ func TestPhp5(t *testing.T) { EndPos: 2628, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -6881,7 +6881,7 @@ func TestPhp5(t *testing.T) { EndPos: 2660, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -6912,7 +6912,7 @@ func TestPhp5(t *testing.T) { EndPos: 2664, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -7013,7 +7013,7 @@ func TestPhp5(t *testing.T) { EndPos: 2700, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -7055,7 +7055,7 @@ func TestPhp5(t *testing.T) { EndPos: 2708, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -7100,7 +7100,7 @@ func TestPhp5(t *testing.T) { EndPos: 2722, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7131,7 +7131,7 @@ func TestPhp5(t *testing.T) { EndPos: 2726, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -7185,7 +7185,7 @@ func TestPhp5(t *testing.T) { EndPos: 2743, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -7227,7 +7227,7 @@ func TestPhp5(t *testing.T) { EndPos: 2751, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -7623,7 +7623,7 @@ func TestPhp5(t *testing.T) { EndPos: 2995, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -8424,7 +8424,7 @@ func TestPhp5(t *testing.T) { EndPos: 3287, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8494,7 +8494,7 @@ func TestPhp5(t *testing.T) { EndPos: 3320, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8551,7 +8551,7 @@ func TestPhp5(t *testing.T) { EndPos: 3351, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8621,7 +8621,7 @@ func TestPhp5(t *testing.T) { EndPos: 3384, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8678,7 +8678,7 @@ func TestPhp5(t *testing.T) { EndPos: 3416, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8735,7 +8735,7 @@ func TestPhp5(t *testing.T) { EndPos: 3458, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8805,7 +8805,7 @@ func TestPhp5(t *testing.T) { EndPos: 3491, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -8851,7 +8851,7 @@ func TestPhp5(t *testing.T) { EndPos: 3518, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -8872,7 +8872,7 @@ func TestPhp5(t *testing.T) { EndPos: 3522, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -9626,7 +9626,7 @@ func TestPhp5(t *testing.T) { EndPos: 3738, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -9687,7 +9687,7 @@ func TestPhp5(t *testing.T) { EndPos: 3747, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -9866,7 +9866,7 @@ func TestPhp5(t *testing.T) { EndPos: 3795, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -9941,7 +9941,7 @@ func TestPhp5(t *testing.T) { EndPos: 3814, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10004,7 +10004,7 @@ func TestPhp5(t *testing.T) { EndPos: 3828, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10109,7 +10109,7 @@ func TestPhp5(t *testing.T) { EndPos: 3846, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10153,7 +10153,7 @@ func TestPhp5(t *testing.T) { EndPos: 3854, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10194,7 +10194,7 @@ func TestPhp5(t *testing.T) { EndPos: 3861, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10289,7 +10289,7 @@ func TestPhp5(t *testing.T) { EndPos: 3886, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10330,7 +10330,7 @@ func TestPhp5(t *testing.T) { EndPos: 3899, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10408,7 +10408,7 @@ func TestPhp5(t *testing.T) { EndPos: 3930, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10441,7 +10441,7 @@ func TestPhp5(t *testing.T) { EndPos: 3934, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10474,7 +10474,7 @@ func TestPhp5(t *testing.T) { EndPos: 3943, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, &ast.ExprReference{ @@ -10504,7 +10504,7 @@ func TestPhp5(t *testing.T) { EndPos: 3948, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -10563,7 +10563,7 @@ func TestPhp5(t *testing.T) { EndPos: 3967, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10596,7 +10596,7 @@ func TestPhp5(t *testing.T) { EndPos: 3971, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10638,7 +10638,7 @@ func TestPhp5(t *testing.T) { EndPos: 3981, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -10660,7 +10660,7 @@ func TestPhp5(t *testing.T) { EndPos: 3985, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -10856,7 +10856,7 @@ func TestPhp5(t *testing.T) { EndPos: 4051, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10950,7 +10950,7 @@ func TestPhp5(t *testing.T) { EndPos: 4073, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10991,7 +10991,7 @@ func TestPhp5(t *testing.T) { EndPos: 4084, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11054,7 +11054,7 @@ func TestPhp5(t *testing.T) { EndPos: 4104, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11117,7 +11117,7 @@ func TestPhp5(t *testing.T) { EndPos: 4124, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11255,7 +11255,7 @@ func TestPhp5(t *testing.T) { EndPos: 4155, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11377,7 +11377,7 @@ func TestPhp5(t *testing.T) { EndPos: 4176, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -11428,7 +11428,7 @@ func TestPhp5(t *testing.T) { EndPos: 4185, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11473,7 +11473,7 @@ func TestPhp5(t *testing.T) { EndPos: 4193, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11514,7 +11514,7 @@ func TestPhp5(t *testing.T) { EndPos: 4201, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11555,7 +11555,7 @@ func TestPhp5(t *testing.T) { EndPos: 4211, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11596,7 +11596,7 @@ func TestPhp5(t *testing.T) { EndPos: 4219, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11637,7 +11637,7 @@ func TestPhp5(t *testing.T) { EndPos: 4234, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11678,7 +11678,7 @@ func TestPhp5(t *testing.T) { EndPos: 4253, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11719,7 +11719,7 @@ func TestPhp5(t *testing.T) { EndPos: 4267, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11760,7 +11760,7 @@ func TestPhp5(t *testing.T) { EndPos: 4286, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11801,7 +11801,7 @@ func TestPhp5(t *testing.T) { EndPos: 4293, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameName{ @@ -11865,7 +11865,7 @@ func TestPhp5(t *testing.T) { EndPos: 4314, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameRelative{ @@ -11929,7 +11929,7 @@ func TestPhp5(t *testing.T) { EndPos: 4345, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameFullyQualified{ @@ -11994,7 +11994,7 @@ func TestPhp5(t *testing.T) { EndPos: 4374, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -12015,7 +12015,7 @@ func TestPhp5(t *testing.T) { EndPos: 4378, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12123,7 +12123,7 @@ func TestPhp5(t *testing.T) { EndPos: 4408, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12183,7 +12183,7 @@ func TestPhp5(t *testing.T) { EndPos: 4419, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12214,7 +12214,7 @@ func TestPhp5(t *testing.T) { EndPos: 4423, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12238,7 +12238,7 @@ func TestPhp5(t *testing.T) { EndPos: 4429, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12307,7 +12307,7 @@ func TestPhp5(t *testing.T) { EndPos: 4440, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12332,7 +12332,7 @@ func TestPhp5(t *testing.T) { EndPos: 4448, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12411,7 +12411,7 @@ func TestPhp5(t *testing.T) { EndPos: 4464, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12438,7 +12438,7 @@ func TestPhp5(t *testing.T) { EndPos: 4471, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12479,7 +12479,7 @@ func TestPhp5(t *testing.T) { EndPos: 4478, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Method: &ast.Identifier{ @@ -12690,7 +12690,7 @@ func TestPhp5(t *testing.T) { EndPos: 4545, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12731,7 +12731,7 @@ func TestPhp5(t *testing.T) { EndPos: 4552, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -12792,7 +12792,7 @@ func TestPhp5(t *testing.T) { EndPos: 4563, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -12892,7 +12892,7 @@ func TestPhp5(t *testing.T) { EndPos: 4577, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -13020,7 +13020,7 @@ func TestPhp5(t *testing.T) { EndPos: 4609, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Method: &ast.Identifier{ @@ -13118,7 +13118,7 @@ func TestPhp5(t *testing.T) { EndPos: 4633, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13329,7 +13329,7 @@ func TestPhp5(t *testing.T) { EndPos: 4676, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13589,7 +13589,7 @@ func TestPhp5(t *testing.T) { EndPos: 4745, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -13640,7 +13640,7 @@ func TestPhp5(t *testing.T) { EndPos: 4755, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.ExprVariable{ @@ -13661,7 +13661,7 @@ func TestPhp5(t *testing.T) { EndPos: 4761, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -13735,7 +13735,7 @@ func TestPhp5(t *testing.T) { EndPos: 4776, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -13799,7 +13799,7 @@ func TestPhp5(t *testing.T) { EndPos: 4799, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -13863,7 +13863,7 @@ func TestPhp5(t *testing.T) { EndPos: 4813, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -13904,7 +13904,7 @@ func TestPhp5(t *testing.T) { EndPos: 4819, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -13925,7 +13925,7 @@ func TestPhp5(t *testing.T) { EndPos: 4824, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -13946,7 +13946,7 @@ func TestPhp5(t *testing.T) { EndPos: 4829, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -13987,7 +13987,7 @@ func TestPhp5(t *testing.T) { EndPos: 4835, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfFalse: &ast.ExprVariable{ @@ -14008,7 +14008,7 @@ func TestPhp5(t *testing.T) { EndPos: 4842, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -14049,7 +14049,7 @@ func TestPhp5(t *testing.T) { EndPos: 4848, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprTernary{ @@ -14079,7 +14079,7 @@ func TestPhp5(t *testing.T) { EndPos: 4853, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfTrue: &ast.ExprVariable{ @@ -14100,7 +14100,7 @@ func TestPhp5(t *testing.T) { EndPos: 4858, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, IfFalse: &ast.ExprVariable{ @@ -14121,7 +14121,7 @@ func TestPhp5(t *testing.T) { EndPos: 4863, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -14143,7 +14143,7 @@ func TestPhp5(t *testing.T) { EndPos: 4868, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -14193,7 +14193,7 @@ func TestPhp5(t *testing.T) { EndPos: 4874, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -14214,7 +14214,7 @@ func TestPhp5(t *testing.T) { EndPos: 4879, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -14235,7 +14235,7 @@ func TestPhp5(t *testing.T) { EndPos: 4884, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -14257,7 +14257,7 @@ func TestPhp5(t *testing.T) { EndPos: 4889, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, IfFalse: &ast.ExprVariable{ @@ -14278,7 +14278,7 @@ func TestPhp5(t *testing.T) { EndPos: 4894, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -14319,7 +14319,7 @@ func TestPhp5(t *testing.T) { EndPos: 4901, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14360,7 +14360,7 @@ func TestPhp5(t *testing.T) { EndPos: 4908, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14401,7 +14401,7 @@ func TestPhp5(t *testing.T) { EndPos: 4915, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14451,7 +14451,7 @@ func TestPhp5(t *testing.T) { EndPos: 4923, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14513,7 +14513,7 @@ func TestPhp5(t *testing.T) { EndPos: 4944, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14554,7 +14554,7 @@ func TestPhp5(t *testing.T) { EndPos: 4956, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ExprVariable{ @@ -14575,7 +14575,7 @@ func TestPhp5(t *testing.T) { EndPos: 4962, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14680,7 +14680,7 @@ func TestPhp5(t *testing.T) { EndPos: 4994, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ExprClassConstFetch{ @@ -14765,7 +14765,7 @@ func TestPhp5(t *testing.T) { EndPos: 5024, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14806,7 +14806,7 @@ func TestPhp5(t *testing.T) { EndPos: 5039, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14847,7 +14847,7 @@ func TestPhp5(t *testing.T) { EndPos: 5051, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14888,7 +14888,7 @@ func TestPhp5(t *testing.T) { EndPos: 5065, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14929,7 +14929,7 @@ func TestPhp5(t *testing.T) { EndPos: 5078, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14970,7 +14970,7 @@ func TestPhp5(t *testing.T) { EndPos: 5093, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15011,7 +15011,7 @@ func TestPhp5(t *testing.T) { EndPos: 5104, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15052,7 +15052,7 @@ func TestPhp5(t *testing.T) { EndPos: 5118, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15093,7 +15093,7 @@ func TestPhp5(t *testing.T) { EndPos: 5132, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15134,7 +15134,7 @@ func TestPhp5(t *testing.T) { EndPos: 5145, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15175,7 +15175,7 @@ func TestPhp5(t *testing.T) { EndPos: 5152, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15196,7 +15196,7 @@ func TestPhp5(t *testing.T) { EndPos: 5157, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15237,7 +15237,7 @@ func TestPhp5(t *testing.T) { EndPos: 5163, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15258,7 +15258,7 @@ func TestPhp5(t *testing.T) { EndPos: 5168, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15299,7 +15299,7 @@ func TestPhp5(t *testing.T) { EndPos: 5174, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15320,7 +15320,7 @@ func TestPhp5(t *testing.T) { EndPos: 5179, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15361,7 +15361,7 @@ func TestPhp5(t *testing.T) { EndPos: 5185, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15382,7 +15382,7 @@ func TestPhp5(t *testing.T) { EndPos: 5191, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15423,7 +15423,7 @@ func TestPhp5(t *testing.T) { EndPos: 5197, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15444,7 +15444,7 @@ func TestPhp5(t *testing.T) { EndPos: 5203, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15485,7 +15485,7 @@ func TestPhp5(t *testing.T) { EndPos: 5209, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15506,7 +15506,7 @@ func TestPhp5(t *testing.T) { EndPos: 5214, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15547,7 +15547,7 @@ func TestPhp5(t *testing.T) { EndPos: 5220, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15568,7 +15568,7 @@ func TestPhp5(t *testing.T) { EndPos: 5225, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15609,7 +15609,7 @@ func TestPhp5(t *testing.T) { EndPos: 5231, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15630,7 +15630,7 @@ func TestPhp5(t *testing.T) { EndPos: 5237, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15671,7 +15671,7 @@ func TestPhp5(t *testing.T) { EndPos: 5243, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15692,7 +15692,7 @@ func TestPhp5(t *testing.T) { EndPos: 5249, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15733,7 +15733,7 @@ func TestPhp5(t *testing.T) { EndPos: 5255, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15754,7 +15754,7 @@ func TestPhp5(t *testing.T) { EndPos: 5260, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15795,7 +15795,7 @@ func TestPhp5(t *testing.T) { EndPos: 5266, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15816,7 +15816,7 @@ func TestPhp5(t *testing.T) { EndPos: 5273, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15857,7 +15857,7 @@ func TestPhp5(t *testing.T) { EndPos: 5279, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15878,7 +15878,7 @@ func TestPhp5(t *testing.T) { EndPos: 5286, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15919,7 +15919,7 @@ func TestPhp5(t *testing.T) { EndPos: 5292, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15940,7 +15940,7 @@ func TestPhp5(t *testing.T) { EndPos: 5298, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15981,7 +15981,7 @@ func TestPhp5(t *testing.T) { EndPos: 5304, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16002,7 +16002,7 @@ func TestPhp5(t *testing.T) { EndPos: 5311, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16043,7 +16043,7 @@ func TestPhp5(t *testing.T) { EndPos: 5317, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16064,7 +16064,7 @@ func TestPhp5(t *testing.T) { EndPos: 5322, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16105,7 +16105,7 @@ func TestPhp5(t *testing.T) { EndPos: 5328, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16126,7 +16126,7 @@ func TestPhp5(t *testing.T) { EndPos: 5333, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16167,7 +16167,7 @@ func TestPhp5(t *testing.T) { EndPos: 5339, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16188,7 +16188,7 @@ func TestPhp5(t *testing.T) { EndPos: 5344, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16229,7 +16229,7 @@ func TestPhp5(t *testing.T) { EndPos: 5350, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16250,7 +16250,7 @@ func TestPhp5(t *testing.T) { EndPos: 5356, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16291,7 +16291,7 @@ func TestPhp5(t *testing.T) { EndPos: 5362, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16312,7 +16312,7 @@ func TestPhp5(t *testing.T) { EndPos: 5369, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16353,7 +16353,7 @@ func TestPhp5(t *testing.T) { EndPos: 5375, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16374,7 +16374,7 @@ func TestPhp5(t *testing.T) { EndPos: 5380, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16415,7 +16415,7 @@ func TestPhp5(t *testing.T) { EndPos: 5386, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16436,7 +16436,7 @@ func TestPhp5(t *testing.T) { EndPos: 5392, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16477,7 +16477,7 @@ func TestPhp5(t *testing.T) { EndPos: 5398, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16498,7 +16498,7 @@ func TestPhp5(t *testing.T) { EndPos: 5404, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16539,7 +16539,7 @@ func TestPhp5(t *testing.T) { EndPos: 5410, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16560,7 +16560,7 @@ func TestPhp5(t *testing.T) { EndPos: 5416, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16601,7 +16601,7 @@ func TestPhp5(t *testing.T) { EndPos: 5422, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16622,7 +16622,7 @@ func TestPhp5(t *testing.T) { EndPos: 5428, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16663,7 +16663,7 @@ func TestPhp5(t *testing.T) { EndPos: 5434, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16684,7 +16684,7 @@ func TestPhp5(t *testing.T) { EndPos: 5439, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16725,7 +16725,7 @@ func TestPhp5(t *testing.T) { EndPos: 5446, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -16746,7 +16746,7 @@ func TestPhp5(t *testing.T) { EndPos: 5452, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16787,7 +16787,7 @@ func TestPhp5(t *testing.T) { EndPos: 5458, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -16861,7 +16861,7 @@ func TestPhp5(t *testing.T) { EndPos: 5475, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -16935,7 +16935,7 @@ func TestPhp5(t *testing.T) { EndPos: 5489, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16980,7 +16980,7 @@ func TestPhp5(t *testing.T) { EndPos: 5496, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17001,7 +17001,7 @@ func TestPhp5(t *testing.T) { EndPos: 5501, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17042,7 +17042,7 @@ func TestPhp5(t *testing.T) { EndPos: 5507, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17063,7 +17063,7 @@ func TestPhp5(t *testing.T) { EndPos: 5513, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17104,7 +17104,7 @@ func TestPhp5(t *testing.T) { EndPos: 5519, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17125,7 +17125,7 @@ func TestPhp5(t *testing.T) { EndPos: 5525, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17166,7 +17166,7 @@ func TestPhp5(t *testing.T) { EndPos: 5531, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17187,7 +17187,7 @@ func TestPhp5(t *testing.T) { EndPos: 5537, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17228,7 +17228,7 @@ func TestPhp5(t *testing.T) { EndPos: 5543, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17249,7 +17249,7 @@ func TestPhp5(t *testing.T) { EndPos: 5549, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17290,7 +17290,7 @@ func TestPhp5(t *testing.T) { EndPos: 5555, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17311,7 +17311,7 @@ func TestPhp5(t *testing.T) { EndPos: 5561, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17352,7 +17352,7 @@ func TestPhp5(t *testing.T) { EndPos: 5567, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17373,7 +17373,7 @@ func TestPhp5(t *testing.T) { EndPos: 5573, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17414,7 +17414,7 @@ func TestPhp5(t *testing.T) { EndPos: 5579, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17435,7 +17435,7 @@ func TestPhp5(t *testing.T) { EndPos: 5585, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17476,7 +17476,7 @@ func TestPhp5(t *testing.T) { EndPos: 5591, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17497,7 +17497,7 @@ func TestPhp5(t *testing.T) { EndPos: 5597, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17538,7 +17538,7 @@ func TestPhp5(t *testing.T) { EndPos: 5603, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17559,7 +17559,7 @@ func TestPhp5(t *testing.T) { EndPos: 5609, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17600,7 +17600,7 @@ func TestPhp5(t *testing.T) { EndPos: 5615, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17621,7 +17621,7 @@ func TestPhp5(t *testing.T) { EndPos: 5622, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17662,7 +17662,7 @@ func TestPhp5(t *testing.T) { EndPos: 5628, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17683,7 +17683,7 @@ func TestPhp5(t *testing.T) { EndPos: 5635, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17724,7 +17724,7 @@ func TestPhp5(t *testing.T) { EndPos: 5641, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17745,7 +17745,7 @@ func TestPhp5(t *testing.T) { EndPos: 5648, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18399,7 +18399,7 @@ func TestPhp5(t *testing.T) { EndPos: 5813, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -18449,7 +18449,7 @@ func TestPhp5(t *testing.T) { EndPos: 5825, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.ExprVariable{ @@ -18470,7 +18470,7 @@ func TestPhp5(t *testing.T) { EndPos: 5831, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -18530,7 +18530,7 @@ func TestPhp5(t *testing.T) { EndPos: 5841, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -18640,7 +18640,7 @@ func TestPhp5(t *testing.T) { EndPos: 5857, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -18682,7 +18682,7 @@ func TestPhp5(t *testing.T) { EndPos: 5863, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprConstFetch{ @@ -18738,7 +18738,7 @@ func TestPhp5(t *testing.T) { EndPos: 5876, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -18805,7 +18805,7 @@ func TestPhp5(t *testing.T) { EndPos: 5892, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprArrayDimFetch{ @@ -18902,7 +18902,7 @@ func TestPhp5(t *testing.T) { EndPos: 5915, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBooleanNot{ @@ -18966,7 +18966,7 @@ func TestPhp5(t *testing.T) { EndPos: 5933, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBitwiseNot{ @@ -19030,7 +19030,7 @@ func TestPhp5(t *testing.T) { EndPos: 5951, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprUnaryPlus{ @@ -19094,7 +19094,7 @@ func TestPhp5(t *testing.T) { EndPos: 5969, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprUnaryMinus{ @@ -19158,7 +19158,7 @@ func TestPhp5(t *testing.T) { EndPos: 5987, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -19212,7 +19212,7 @@ func TestPhp5(t *testing.T) { EndPos: 6006, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprTernary{ @@ -19287,7 +19287,7 @@ func TestPhp5(t *testing.T) { EndPos: 6028, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprTernary{ @@ -19373,7 +19373,7 @@ func TestPhp5(t *testing.T) { EndPos: 6053, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryBitwiseAnd{ @@ -19448,7 +19448,7 @@ func TestPhp5(t *testing.T) { EndPos: 6074, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryBitwiseOr{ @@ -19523,7 +19523,7 @@ func TestPhp5(t *testing.T) { EndPos: 6095, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryBitwiseXor{ @@ -19598,7 +19598,7 @@ func TestPhp5(t *testing.T) { EndPos: 6116, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryBooleanAnd{ @@ -19673,7 +19673,7 @@ func TestPhp5(t *testing.T) { EndPos: 6138, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryBooleanOr{ @@ -19748,7 +19748,7 @@ func TestPhp5(t *testing.T) { EndPos: 6160, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryConcat{ @@ -19823,7 +19823,7 @@ func TestPhp5(t *testing.T) { EndPos: 6181, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryDiv{ @@ -19898,7 +19898,7 @@ func TestPhp5(t *testing.T) { EndPos: 6202, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryEqual{ @@ -19973,7 +19973,7 @@ func TestPhp5(t *testing.T) { EndPos: 6224, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryGreaterOrEqual{ @@ -20048,7 +20048,7 @@ func TestPhp5(t *testing.T) { EndPos: 6246, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryGreater{ @@ -20123,7 +20123,7 @@ func TestPhp5(t *testing.T) { EndPos: 6267, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryIdentical{ @@ -20198,7 +20198,7 @@ func TestPhp5(t *testing.T) { EndPos: 6290, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryLogicalAnd{ @@ -20273,7 +20273,7 @@ func TestPhp5(t *testing.T) { EndPos: 6313, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryLogicalOr{ @@ -20348,7 +20348,7 @@ func TestPhp5(t *testing.T) { EndPos: 6335, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryLogicalXor{ @@ -20423,7 +20423,7 @@ func TestPhp5(t *testing.T) { EndPos: 6358, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryMinus{ @@ -20498,7 +20498,7 @@ func TestPhp5(t *testing.T) { EndPos: 6379, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryMod{ @@ -20573,7 +20573,7 @@ func TestPhp5(t *testing.T) { EndPos: 6400, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryMul{ @@ -20648,7 +20648,7 @@ func TestPhp5(t *testing.T) { EndPos: 6421, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryNotEqual{ @@ -20723,7 +20723,7 @@ func TestPhp5(t *testing.T) { EndPos: 6443, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryNotIdentical{ @@ -20798,7 +20798,7 @@ func TestPhp5(t *testing.T) { EndPos: 6466, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryPlus{ @@ -20873,7 +20873,7 @@ func TestPhp5(t *testing.T) { EndPos: 6487, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryPow{ @@ -20948,7 +20948,7 @@ func TestPhp5(t *testing.T) { EndPos: 6509, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryShiftLeft{ @@ -21023,7 +21023,7 @@ func TestPhp5(t *testing.T) { EndPos: 6531, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinaryShiftRight{ @@ -21098,7 +21098,7 @@ func TestPhp5(t *testing.T) { EndPos: 6553, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinarySmallerOrEqual{ @@ -21173,7 +21173,7 @@ func TestPhp5(t *testing.T) { EndPos: 6575, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprBinarySmaller{ @@ -21248,7 +21248,7 @@ func TestPhp5(t *testing.T) { EndPos: 6596, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprClassConstFetch{ @@ -21335,7 +21335,7 @@ func TestPhp5(t *testing.T) { EndPos: 6620, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprClassConstFetch{ @@ -21422,7 +21422,7 @@ func TestPhp5(t *testing.T) { EndPos: 6646, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarMagicConstant{ @@ -21476,7 +21476,7 @@ func TestPhp5(t *testing.T) { EndPos: 6671, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprConstFetch{ @@ -21552,7 +21552,7 @@ func TestPhp5(t *testing.T) { EndPos: 6690, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprConstFetch{ @@ -21628,7 +21628,7 @@ func TestPhp5(t *testing.T) { EndPos: 6719, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprConstFetch{ @@ -21704,7 +21704,7 @@ func TestPhp5(t *testing.T) { EndPos: 6739, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprArray{ @@ -21757,7 +21757,7 @@ func TestPhp5(t *testing.T) { EndPos: 6762, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprArray{ @@ -21865,7 +21865,7 @@ func TestPhp5(t *testing.T) { EndPos: 6794, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprArrayDimFetch{ @@ -22067,7 +22067,7 @@ func TestPhp5(t *testing.T) { EndPos: 6844, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -22109,7 +22109,7 @@ func TestPhp5(t *testing.T) { EndPos: 6853, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -22178,7 +22178,7 @@ func TestPhp5(t *testing.T) { EndPos: 6863, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -22253,7 +22253,7 @@ func TestPhp5(t *testing.T) { EndPos: 6877, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ExprVariable{ @@ -22274,7 +22274,7 @@ func TestPhp5(t *testing.T) { EndPos: 6880, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22315,7 +22315,7 @@ func TestPhp5(t *testing.T) { EndPos: 6889, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -22356,7 +22356,7 @@ func TestPhp5(t *testing.T) { EndPos: 6898, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.ExprVariable{ @@ -22377,7 +22377,7 @@ func TestPhp5(t *testing.T) { EndPos: 6905, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -22428,7 +22428,7 @@ func TestPhp5(t *testing.T) { EndPos: 6916, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ConstantName: &ast.Identifier{ @@ -22768,7 +22768,7 @@ CAD; EndPos: 85, }, }, - Value: []byte("world"), + Value: []byte("$world"), }, }, &ast.ScalarEncapsedStringPart{ diff --git a/internal/php7/parser.go b/internal/php7/parser.go index c219232..7426278 100644 --- a/internal/php7/parser.go +++ b/internal/php7/parser.go @@ -62,10 +62,6 @@ func lastNode(nn []ast.Vertex) ast.Vertex { return nn[len(nn)-1] } -func isDollar(r rune) bool { - return r == '$' -} - func (p *Parser) MoveFreeFloating(src ast.Vertex, dst ast.Vertex) { if p.withTokens == false { return @@ -109,19 +105,6 @@ func (p *Parser) GetFreeFloatingToken(t *scanner.Token) []token.Token { } } -func (p *Parser) addDollarToken(v ast.Vertex) { - if p.withTokens == false { - return - } - - p.setFreeFloating(v, token.Dollar, []token.Token{ - { - ID: token.ID('$'), - Value: []byte("$"), - }, - }) -} - func (p *Parser) splitSemiColonAndPhpCloseTag(htmlNode ast.Vertex, prevNode ast.Vertex) { if p.withTokens == false { return diff --git a/internal/php7/parser_test.go b/internal/php7/parser_test.go index a7d2ced..05cdefc 100644 --- a/internal/php7/parser_test.go +++ b/internal/php7/parser_test.go @@ -51,7 +51,7 @@ func TestIdentifier(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -167,7 +167,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -200,7 +200,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 19, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -244,7 +244,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 28, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -286,7 +286,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 31, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -319,7 +319,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 38, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -363,7 +363,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 47, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -416,7 +416,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 55, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -449,7 +449,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 62, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -548,7 +548,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 78, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -581,7 +581,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 85, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -625,7 +625,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 94, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.Identifier{ @@ -678,7 +678,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 102, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -711,7 +711,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 109, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -799,7 +799,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 124, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -832,7 +832,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 131, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -906,7 +906,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 174, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -939,7 +939,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 181, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1061,7 +1061,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 28, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1150,7 +1150,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 47, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1275,7 +1275,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 94, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1364,7 +1364,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 113, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1466,7 +1466,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 139, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1555,7 +1555,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 158, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1646,7 +1646,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 191, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1735,7 +1735,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 210, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -2068,7 +2068,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { EndPos: 13, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, }, @@ -2145,7 +2145,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -2222,7 +2222,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { EndPos: 13, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -2310,7 +2310,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -2331,7 +2331,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -2417,7 +2417,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { EndPos: 13, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.Identifier{ @@ -2701,7 +2701,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { EndPos: 14, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -2804,7 +2804,7 @@ LBL; EndPos: 19, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -2896,7 +2896,7 @@ LBL; EndPos: 21, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, &ast.ScalarEncapsedStringPart{ @@ -3711,7 +3711,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3780,7 +3780,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3822,7 +3822,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { EndPos: 27, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3893,7 +3893,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3985,7 +3985,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -4027,7 +4027,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 27, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -4069,7 +4069,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { EndPos: 42, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -6209,7 +6209,7 @@ func TestStmtEcho(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ScalarLnumber{ @@ -6276,7 +6276,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -6385,7 +6385,7 @@ func TestStmtFor(t *testing.T) { EndPos: 9, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Expr: &ast.ScalarLnumber{ @@ -6429,7 +6429,7 @@ func TestStmtFor(t *testing.T) { EndPos: 17, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -6473,7 +6473,7 @@ func TestStmtFor(t *testing.T) { EndPos: 26, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -6504,7 +6504,7 @@ func TestStmtFor(t *testing.T) { EndPos: 32, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -6581,7 +6581,7 @@ func TestStmtFor_Alt(t *testing.T) { EndPos: 11, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -6625,7 +6625,7 @@ func TestStmtFor_Alt(t *testing.T) { EndPos: 20, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -6692,7 +6692,7 @@ func TestStmtForeach(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -6713,7 +6713,7 @@ func TestStmtForeach(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6789,7 +6789,7 @@ func TestStmtForeach_Expr(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6854,7 +6854,7 @@ func TestStmtForeach_Alt(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -6875,7 +6875,7 @@ func TestStmtForeach_Alt(t *testing.T) { EndPos: 20, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6940,7 +6940,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6961,7 +6961,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -6982,7 +6982,7 @@ func TestStmtForeach_WithKey(t *testing.T) { EndPos: 26, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -7058,7 +7058,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -7079,7 +7079,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { EndPos: 26, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -7144,7 +7144,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -7165,7 +7165,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -7195,7 +7195,7 @@ func TestStmtForeach_WithRef(t *testing.T) { EndPos: 27, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -7261,7 +7261,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -7282,7 +7282,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprList{ @@ -7322,7 +7322,7 @@ func TestStmtForeach_WithList(t *testing.T) { EndPos: 31, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -7528,7 +7528,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 24, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7572,7 +7572,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 37, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -7605,7 +7605,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { EndPos: 49, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7799,7 +7799,7 @@ func TestStmtGlobal(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7855,7 +7855,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -7876,7 +7876,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, &ast.ExprVariable{ @@ -7906,7 +7906,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 21, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -8113,7 +8113,7 @@ func TestStmtIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -8178,7 +8178,7 @@ func TestStmtIf_ElseIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -8220,7 +8220,7 @@ func TestStmtIf_ElseIf(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -8287,7 +8287,7 @@ func TestStmtIf_Else(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -8373,7 +8373,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -8415,7 +8415,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -8457,7 +8457,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { EndPos: 39, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -8545,7 +8545,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -8587,7 +8587,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 24, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -8639,7 +8639,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { EndPos: 40, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -9190,7 +9190,7 @@ func TestStmtProperty(t *testing.T) { EndPos: 20, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9303,7 +9303,7 @@ func TestStmtProperty_Properties(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9334,7 +9334,7 @@ func TestStmtProperty_Properties(t *testing.T) { EndPos: 34, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -9458,7 +9458,7 @@ func TestStmtProperty_Properties2(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -9500,7 +9500,7 @@ func TestStmtProperty_Properties2(t *testing.T) { EndPos: 38, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -9625,7 +9625,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { EndPos: 24, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9693,7 +9693,7 @@ func TestStmtStaticVar(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9759,7 +9759,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -9790,7 +9790,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -9867,7 +9867,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ScalarLnumber{ @@ -9909,7 +9909,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { EndPos: 20, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10441,7 +10441,7 @@ func TestStmtThrow(t *testing.T) { EndPos: 11, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -11544,7 +11544,7 @@ func TestStmtTry_TryCatch(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11662,7 +11662,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { EndPos: 49, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11757,7 +11757,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11814,7 +11814,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 63, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -11909,7 +11909,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { EndPos: 32, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -12013,7 +12013,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 29, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -12070,7 +12070,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 61, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -12127,7 +12127,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 103, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -12185,7 +12185,7 @@ func TestStmtUnset(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12241,7 +12241,7 @@ func TestStmtUnset_Vars(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -12262,7 +12262,7 @@ func TestStmtUnset_Vars(t *testing.T) { EndPos: 15, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12318,7 +12318,7 @@ func TestStmtUnset_TrailingComma(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -12339,7 +12339,7 @@ func TestStmtUnset_TrailingComma(t *testing.T) { EndPos: 15, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14220,7 +14220,7 @@ func TestExprArrayDimFetch(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -14304,7 +14304,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -14552,7 +14552,7 @@ func TestExprArray_Items(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14631,7 +14631,7 @@ func TestExprArray_ItemUnpack(t *testing.T) { EndPos: 14, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14699,7 +14699,7 @@ func TestExprArrowFunction(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14788,7 +14788,7 @@ func TestExprArrowFunction_ReturnType(t *testing.T) { EndPos: 22, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14852,7 +14852,7 @@ func TestExprBitwiseNot(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14916,7 +14916,7 @@ func TestExprBooleanNot(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15122,7 +15122,7 @@ func TestExprClone_Brackets(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15186,7 +15186,7 @@ func TestExprClone(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15310,7 +15310,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15343,7 +15343,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15376,7 +15376,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 27, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, &ast.ExprReference{ @@ -15406,7 +15406,7 @@ func TestExprClosure_Use(t *testing.T) { EndPos: 32, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -15488,7 +15488,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15521,7 +15521,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15563,7 +15563,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 28, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -15585,7 +15585,7 @@ func TestExprClosure_Use2(t *testing.T) { EndPos: 32, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -15919,7 +15919,7 @@ func TestExprEmpty(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15983,7 +15983,7 @@ func TestExprErrorSuppress(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16047,7 +16047,7 @@ func TestExprEval(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16200,7 +16200,7 @@ func TestExprExit_Expr(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16353,7 +16353,7 @@ func TestExprDie_Expr(t *testing.T) { EndPos: 9, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16670,7 +16670,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -16721,7 +16721,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 16, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16842,7 +16842,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 12, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Right: &ast.ScalarLnumber{ @@ -16921,7 +16921,7 @@ func TestExprPostDec(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -16985,7 +16985,7 @@ func TestExprPostInc(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17049,7 +17049,7 @@ func TestExprPreDec(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17113,7 +17113,7 @@ func TestExprPreInc(t *testing.T) { EndPos: 7, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17177,7 +17177,7 @@ func TestExprInclude(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17241,7 +17241,7 @@ func TestExprInclude_Once(t *testing.T) { EndPos: 18, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17305,7 +17305,7 @@ func TestExprRequire(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17369,7 +17369,7 @@ func TestExprRequire_Once(t *testing.T) { EndPos: 18, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17433,7 +17433,7 @@ func TestExprInstanceOf(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameName{ @@ -17520,7 +17520,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameRelative{ @@ -17607,7 +17607,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameFullyQualified{ @@ -17695,7 +17695,7 @@ func TestExprIsset(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17761,7 +17761,7 @@ func TestExprIsset_Variables(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -17782,7 +17782,7 @@ func TestExprIsset_Variables(t *testing.T) { EndPos: 15, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17858,7 +17858,7 @@ func TestExprList_Empty(t *testing.T) { EndPos: 14, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17941,7 +17941,7 @@ func TestExprList(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -17965,7 +17965,7 @@ func TestExprList(t *testing.T) { EndPos: 16, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18057,7 +18057,7 @@ func TestExprList_ArrayIndex(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18082,7 +18082,7 @@ func TestExprList_ArrayIndex(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18184,7 +18184,7 @@ func TestExprList_List(t *testing.T) { EndPos: 15, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18211,7 +18211,7 @@ func TestExprList_List(t *testing.T) { EndPos: 22, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18295,7 +18295,7 @@ func TestExprList_EmptyItem(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18319,7 +18319,7 @@ func TestExprList_EmptyItem(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18404,7 +18404,7 @@ func TestExprList_EmptyItems(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18429,7 +18429,7 @@ func TestExprList_EmptyItems(t *testing.T) { EndPos: 22, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18493,7 +18493,7 @@ func TestExprMethodCall(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Method: &ast.Identifier{ @@ -18826,7 +18826,7 @@ func TestExprNew_Anonymous(t *testing.T) { EndPos: 16, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18859,7 +18859,7 @@ func TestExprNew_Anonymous(t *testing.T) { EndPos: 23, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18928,7 +18928,7 @@ func TestExprPrint(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18992,7 +18992,7 @@ func TestExprPropertyFetch(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -19059,7 +19059,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -19080,7 +19080,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 20, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -19110,7 +19110,7 @@ func TestExprReference_ForeachWithRef(t *testing.T) { EndPos: 27, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -19197,7 +19197,7 @@ func TestExprShellExec(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -19423,7 +19423,7 @@ func TestExprShortArray_Items(t *testing.T) { EndPos: 13, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19510,7 +19510,7 @@ func TestExprShortList(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -19534,7 +19534,7 @@ func TestExprShortList(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19626,7 +19626,7 @@ func TestExprShortList_ArrayIndex(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -19651,7 +19651,7 @@ func TestExprShortList_ArrayIndex(t *testing.T) { EndPos: 14, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19753,7 +19753,7 @@ func TestExprShortList_List(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -19780,7 +19780,7 @@ func TestExprShortList_List(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -20128,7 +20128,7 @@ func TestExprStaticCall_Var(t *testing.T) { EndPos: 12, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -20202,7 +20202,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { EndPos: 7, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.ExprVariable{ @@ -20223,7 +20223,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { EndPos: 13, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -20320,7 +20320,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 12, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -20407,7 +20407,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { EndPos: 22, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -20494,7 +20494,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { EndPos: 13, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -20558,7 +20558,7 @@ func TestExprTernary(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -20579,7 +20579,7 @@ func TestExprTernary(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -20600,7 +20600,7 @@ func TestExprTernary(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -20664,7 +20664,7 @@ func TestExprTernary_Simple(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfFalse: &ast.ExprVariable{ @@ -20685,7 +20685,7 @@ func TestExprTernary_Simple(t *testing.T) { EndPos: 12, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -20749,7 +20749,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprTernary{ @@ -20779,7 +20779,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfTrue: &ast.ExprVariable{ @@ -20800,7 +20800,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, IfFalse: &ast.ExprVariable{ @@ -20821,7 +20821,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 20, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -20843,7 +20843,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { EndPos: 25, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -20916,7 +20916,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -20937,7 +20937,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -20958,7 +20958,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 15, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -20980,7 +20980,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 20, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, IfFalse: &ast.ExprVariable{ @@ -21001,7 +21001,7 @@ func TestExprTernary_NestedCond(t *testing.T) { EndPos: 25, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -21065,7 +21065,7 @@ func TestExprUnaryMinus(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21129,7 +21129,7 @@ func TestExprUnaryPlus(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21184,7 +21184,7 @@ func TestExprVariable(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21247,7 +21247,7 @@ func TestExprVariable_Variable(t *testing.T) { EndPos: 6, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21354,7 +21354,7 @@ func TestExprYield_Val(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21418,7 +21418,7 @@ func TestExprYield_KeyVal(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ExprVariable{ @@ -21439,7 +21439,7 @@ func TestExprYield_KeyVal(t *testing.T) { EndPos: 17, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21557,7 +21557,7 @@ func TestExprYield_KeyExpr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ScalarLnumber{ @@ -21632,7 +21632,7 @@ func TestExprYieldFrom(t *testing.T) { EndPos: 16, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -21698,7 +21698,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -21719,7 +21719,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21783,7 +21783,7 @@ func TestExprAssign_Reference(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -21804,7 +21804,7 @@ func TestExprAssign_Reference(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -21868,7 +21868,7 @@ func TestExprAssign_ReferenceNew(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -21965,7 +21965,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprNew{ @@ -22039,7 +22039,7 @@ func TestExprAssign_ReferenceArgs(t *testing.T) { EndPos: 19, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22107,7 +22107,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22128,7 +22128,7 @@ func TestExprAssign_BitwiseAnd(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22192,7 +22192,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22213,7 +22213,7 @@ func TestExprAssign_BitwiseOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22277,7 +22277,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22298,7 +22298,7 @@ func TestExprAssign_BitwiseXor(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22362,7 +22362,7 @@ func TestExprAssign_Concat(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22383,7 +22383,7 @@ func TestExprAssign_Concat(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22447,7 +22447,7 @@ func TestExprAssign_Div(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22468,7 +22468,7 @@ func TestExprAssign_Div(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22532,7 +22532,7 @@ func TestExprAssign_Minus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22553,7 +22553,7 @@ func TestExprAssign_Minus(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22617,7 +22617,7 @@ func TestExprAssign_Mod(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22638,7 +22638,7 @@ func TestExprAssign_Mod(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22702,7 +22702,7 @@ func TestExprAssign_Mul(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22723,7 +22723,7 @@ func TestExprAssign_Mul(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22787,7 +22787,7 @@ func TestExprAssign_Plus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22808,7 +22808,7 @@ func TestExprAssign_Plus(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22872,7 +22872,7 @@ func TestExprAssign_Pow(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22893,7 +22893,7 @@ func TestExprAssign_Pow(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -22957,7 +22957,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -22978,7 +22978,7 @@ func TestExprAssign_ShiftLeft(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23042,7 +23042,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -23063,7 +23063,7 @@ func TestExprAssign_ShiftRight(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23127,7 +23127,7 @@ func TestExprAssign_Coalesce(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -23148,7 +23148,7 @@ func TestExprAssign_Coalesce(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23214,7 +23214,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23235,7 +23235,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23299,7 +23299,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23320,7 +23320,7 @@ func TestExprBinary_BitwiseOr(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23384,7 +23384,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23405,7 +23405,7 @@ func TestExprBinary_BitwiseXor(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23469,7 +23469,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23490,7 +23490,7 @@ func TestExprBinary_BooleanAnd(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23554,7 +23554,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23575,7 +23575,7 @@ func TestExprBinary_BooleanOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23639,7 +23639,7 @@ func TestExprBinary_Coalesce(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23660,7 +23660,7 @@ func TestExprBinary_Coalesce(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23724,7 +23724,7 @@ func TestExprBinary_Concat(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23745,7 +23745,7 @@ func TestExprBinary_Concat(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23809,7 +23809,7 @@ func TestExprBinary_Div(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23830,7 +23830,7 @@ func TestExprBinary_Div(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23894,7 +23894,7 @@ func TestExprBinary_Equal(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -23915,7 +23915,7 @@ func TestExprBinary_Equal(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -23979,7 +23979,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24000,7 +24000,7 @@ func TestExprBinary_GreaterOrEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24064,7 +24064,7 @@ func TestExprBinary_Greater(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24085,7 +24085,7 @@ func TestExprBinary_Greater(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24149,7 +24149,7 @@ func TestExprBinary_Identical(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24170,7 +24170,7 @@ func TestExprBinary_Identical(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24234,7 +24234,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24255,7 +24255,7 @@ func TestExprBinary_LogicalAnd(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24319,7 +24319,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24340,7 +24340,7 @@ func TestExprBinary_LogicalOr(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24404,7 +24404,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24425,7 +24425,7 @@ func TestExprBinary_LogicalXor(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24489,7 +24489,7 @@ func TestExprBinary_Minus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24510,7 +24510,7 @@ func TestExprBinary_Minus(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24574,7 +24574,7 @@ func TestExprBinary_Mod(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24595,7 +24595,7 @@ func TestExprBinary_Mod(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24659,7 +24659,7 @@ func TestExprBinary_Mul(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24680,7 +24680,7 @@ func TestExprBinary_Mul(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24744,7 +24744,7 @@ func TestExprBinary_NotEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24765,7 +24765,7 @@ func TestExprBinary_NotEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24829,7 +24829,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24850,7 +24850,7 @@ func TestExprBinary_NotIdentical(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24914,7 +24914,7 @@ func TestExprBinary_Plus(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -24935,7 +24935,7 @@ func TestExprBinary_Plus(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -24999,7 +24999,7 @@ func TestExprBinary_Pow(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25020,7 +25020,7 @@ func TestExprBinary_Pow(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25084,7 +25084,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25105,7 +25105,7 @@ func TestExprBinary_ShiftLeft(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25169,7 +25169,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25190,7 +25190,7 @@ func TestExprBinary_ShiftRight(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25254,7 +25254,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25275,7 +25275,7 @@ func TestExprBinary_SmallerOrEqual(t *testing.T) { EndPos: 11, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25339,7 +25339,7 @@ func TestExprBinary_Smaller(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25360,7 +25360,7 @@ func TestExprBinary_Smaller(t *testing.T) { EndPos: 10, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25424,7 +25424,7 @@ func TestExprBinary_Spaceship(t *testing.T) { EndPos: 5, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -25445,7 +25445,7 @@ func TestExprBinary_Spaceship(t *testing.T) { EndPos: 12, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -25511,7 +25511,7 @@ func TestExprCast_Array(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25575,7 +25575,7 @@ func TestExprCast_Bool(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25639,7 +25639,7 @@ func TestExprCast_BoolShort(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25703,7 +25703,7 @@ func TestExprCast_Double(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25767,7 +25767,7 @@ func TestExprCast_CastFloat(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25831,7 +25831,7 @@ func TestExprCast_Int(t *testing.T) { EndPos: 14, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25895,7 +25895,7 @@ func TestExprCast_IntShort(t *testing.T) { EndPos: 10, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -25959,7 +25959,7 @@ func TestExprCast_Object(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -26023,7 +26023,7 @@ func TestExprCast_String(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -26087,7 +26087,7 @@ func TestExprCast_BinaryString(t *testing.T) { EndPos: 13, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -26151,7 +26151,7 @@ func TestExprCast_Unset(t *testing.T) { EndPos: 12, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, diff --git a/internal/php7/php7.go b/internal/php7/php7.go index cccb6d9..90532bc 100644 --- a/internal/php7/php7.go +++ b/internal/php7/php7.go @@ -346,7 +346,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -// line internal/php7/php7.y:5663 +// line internal/php7/php7.y:5647 // line yacctab:1 var yyExca = [...]int{ @@ -2113,7 +2113,7 @@ yydefault: case 1: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:294 +// line internal/php7/php7.y:294 { yylex.(*Parser).rootNode = &ast.Root{ast.Node{}, yyDollar[1].list} @@ -2126,469 +2126,469 @@ yydefault: } case 2: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 3: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 4: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 5: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 6: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 7: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 8: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 9: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:307 +// line internal/php7/php7.y:307 { yyVAL.token = yyDollar[1].token } case 10: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 11: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 12: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 13: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 14: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 15: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 16: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 17: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 18: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 19: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 20: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 21: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:308 +// line internal/php7/php7.y:308 { yyVAL.token = yyDollar[1].token } case 22: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 23: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 24: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 25: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 26: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 27: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 28: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 29: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 30: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 31: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:309 +// line internal/php7/php7.y:309 { yyVAL.token = yyDollar[1].token } case 32: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 33: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 34: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 35: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 36: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 37: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 38: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 39: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 40: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 41: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:310 +// line internal/php7/php7.y:310 { yyVAL.token = yyDollar[1].token } case 42: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 43: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 44: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 45: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 46: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 47: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 48: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 49: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 50: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 51: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 52: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:311 +// line internal/php7/php7.y:311 { yyVAL.token = yyDollar[1].token } case 53: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 54: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 55: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 56: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 57: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 58: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 59: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 60: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:312 +// line internal/php7/php7.y:312 { yyVAL.token = yyDollar[1].token } case 61: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 62: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 63: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 64: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 65: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 66: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 67: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 68: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 69: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:313 +// line internal/php7/php7.y:313 { yyVAL.token = yyDollar[1].token } case 70: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:318 +// line internal/php7/php7.y:318 { yyVAL.token = yyDollar[1].token } case 71: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 72: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 73: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 74: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 75: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 76: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:321 +// line internal/php7/php7.y:321 { yyVAL.token = yyDollar[1].token } case 77: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:326 +// line internal/php7/php7.y:326 { yyVAL.token = yyDollar[1].token } case 78: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:330 +// line internal/php7/php7.y:330 { yyVAL.token = yyDollar[1].token } case 79: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:337 +// line internal/php7/php7.y:337 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -2603,7 +2603,7 @@ yydefault: } case 80: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:350 +// line internal/php7/php7.y:350 { yyVAL.list = []ast.Vertex{} @@ -2611,7 +2611,7 @@ yydefault: } case 81: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:359 +// line internal/php7/php7.y:359 { namePart := &ast.NameNamePart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{namePart} @@ -2626,7 +2626,7 @@ yydefault: } case 82: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:372 +// line internal/php7/php7.y:372 { namePart := &ast.NameNamePart{ast.Node{}, yyDollar[3].token.Value} yyVAL.list = append(yyDollar[1].list, namePart) @@ -2642,7 +2642,7 @@ yydefault: } case 83: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:389 +// line internal/php7/php7.y:389 { yyVAL.node = &ast.NameName{ast.Node{}, yyDollar[1].list} @@ -2656,7 +2656,7 @@ yydefault: } case 84: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:401 +// line internal/php7/php7.y:401 { yyVAL.node = &ast.NameRelative{ast.Node{}, yyDollar[3].list} @@ -2671,7 +2671,7 @@ yydefault: } case 85: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:414 +// line internal/php7/php7.y:414 { yyVAL.node = &ast.NameFullyQualified{ast.Node{}, yyDollar[2].list} @@ -2685,7 +2685,7 @@ yydefault: } case 86: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:429 +// line internal/php7/php7.y:429 { // error yyVAL.node = nil @@ -2694,7 +2694,7 @@ yydefault: } case 87: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:436 +// line internal/php7/php7.y:436 { yyVAL.node = yyDollar[1].node @@ -2702,7 +2702,7 @@ yydefault: } case 88: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:442 +// line internal/php7/php7.y:442 { yyVAL.node = yyDollar[1].node @@ -2710,7 +2710,7 @@ yydefault: } case 89: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:448 +// line internal/php7/php7.y:448 { yyVAL.node = yyDollar[1].node @@ -2718,7 +2718,7 @@ yydefault: } case 90: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:454 +// line internal/php7/php7.y:454 { yyVAL.node = yyDollar[1].node @@ -2726,7 +2726,7 @@ yydefault: } case 91: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:460 +// line internal/php7/php7.y:460 { yyVAL.node = yyDollar[1].node @@ -2734,7 +2734,7 @@ yydefault: } case 92: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:466 +// line internal/php7/php7.y:466 { yyVAL.node = &ast.StmtHaltCompiler{ast.Node{}} @@ -2752,7 +2752,7 @@ yydefault: } case 93: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:482 +// line internal/php7/php7.y:482 { name := &ast.NameName{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtNamespace{ast.Node{}, name, nil} @@ -2771,7 +2771,7 @@ yydefault: } case 94: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:499 +// line internal/php7/php7.y:499 { name := &ast.NameName{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtNamespace{ast.Node{}, name, yyDollar[4].list} @@ -2790,7 +2790,7 @@ yydefault: } case 95: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:516 +// line internal/php7/php7.y:516 { yyVAL.node = &ast.StmtNamespace{ast.Node{}, nil, yyDollar[3].list} @@ -2806,7 +2806,7 @@ yydefault: } case 96: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:530 +// line internal/php7/php7.y:530 { yyVAL.node = yyDollar[2].node @@ -2822,7 +2822,7 @@ yydefault: } case 97: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:544 +// line internal/php7/php7.y:544 { yyDollar[3].node.(*ast.StmtGroupUse).UseType = yyDollar[2].node yyVAL.node = yyDollar[3].node @@ -2839,7 +2839,7 @@ yydefault: } case 98: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:559 +// line internal/php7/php7.y:559 { yyVAL.node = &ast.StmtUseList{ast.Node{}, nil, yyDollar[2].list} @@ -2855,7 +2855,7 @@ yydefault: } case 99: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:573 +// line internal/php7/php7.y:573 { yyVAL.node = &ast.StmtUseList{ast.Node{}, yyDollar[2].node, yyDollar[3].list} @@ -2871,7 +2871,7 @@ yydefault: } case 100: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:587 +// line internal/php7/php7.y:587 { yyVAL.node = &ast.StmtConstList{ast.Node{}, yyDollar[2].list} @@ -2887,7 +2887,7 @@ yydefault: } case 101: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:604 +// line internal/php7/php7.y:604 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -2901,7 +2901,7 @@ yydefault: } case 102: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:616 +// line internal/php7/php7.y:616 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -2915,7 +2915,7 @@ yydefault: } case 103: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:631 +// line internal/php7/php7.y:631 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.StmtGroupUse{ast.Node{}, nil, name, yyDollar[4].list} @@ -2938,7 +2938,7 @@ yydefault: } case 104: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:652 +// line internal/php7/php7.y:652 { name := &ast.NameName{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtGroupUse{ast.Node{}, nil, name, yyDollar[5].list} @@ -2962,7 +2962,7 @@ yydefault: } case 105: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:677 +// line internal/php7/php7.y:677 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.StmtGroupUse{ast.Node{}, nil, name, yyDollar[4].list} @@ -2985,7 +2985,7 @@ yydefault: } case 106: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:698 +// line internal/php7/php7.y:698 { name := &ast.NameName{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtGroupUse{ast.Node{}, nil, name, yyDollar[5].list} @@ -3009,19 +3009,19 @@ yydefault: } case 107: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:723 +// line internal/php7/php7.y:723 { yyVAL.token = nil } case 108: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:727 +// line internal/php7/php7.y:727 { yyVAL.token = yyDollar[1].token } case 109: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:734 +// line internal/php7/php7.y:734 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3032,7 +3032,7 @@ yydefault: } case 110: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:743 +// line internal/php7/php7.y:743 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3040,7 +3040,7 @@ yydefault: } case 111: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:752 +// line internal/php7/php7.y:752 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3051,7 +3051,7 @@ yydefault: } case 112: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:761 +// line internal/php7/php7.y:761 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3059,7 +3059,7 @@ yydefault: } case 113: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:770 +// line internal/php7/php7.y:770 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3070,7 +3070,7 @@ yydefault: } case 114: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:779 +// line internal/php7/php7.y:779 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3078,7 +3078,7 @@ yydefault: } case 115: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:788 +// line internal/php7/php7.y:788 { yyVAL.node = yyDollar[1].node @@ -3086,7 +3086,7 @@ yydefault: } case 116: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:794 +// line internal/php7/php7.y:794 { yyDollar[2].node.(*ast.StmtUse).UseType = yyDollar[1].node yyVAL.node = yyDollar[2].node @@ -3095,7 +3095,7 @@ yydefault: } case 117: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:804 +// line internal/php7/php7.y:804 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} yyVAL.node = &ast.StmtUse{ast.Node{}, nil, name, nil} @@ -3111,7 +3111,7 @@ yydefault: } case 118: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:818 +// line internal/php7/php7.y:818 { name := &ast.NameName{ast.Node{}, yyDollar[1].list} alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} @@ -3131,7 +3131,7 @@ yydefault: } case 119: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:839 +// line internal/php7/php7.y:839 { yyVAL.node = yyDollar[1].node @@ -3142,7 +3142,7 @@ yydefault: } case 120: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:848 +// line internal/php7/php7.y:848 { yyVAL.node = yyDollar[2].node @@ -3157,7 +3157,7 @@ yydefault: } case 121: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:864 +// line internal/php7/php7.y:864 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3168,7 +3168,7 @@ yydefault: } case 122: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:873 +// line internal/php7/php7.y:873 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3176,7 +3176,7 @@ yydefault: } case 123: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:882 +// line internal/php7/php7.y:882 { if inlineHtmlNode, ok := yyDollar[2].node.(*ast.StmtInlineHtml); ok && len(yyDollar[1].list) > 0 { prevNode := lastNode(yyDollar[1].list) @@ -3191,7 +3191,7 @@ yydefault: } case 124: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:895 +// line internal/php7/php7.y:895 { yyVAL.list = []ast.Vertex{} @@ -3199,7 +3199,7 @@ yydefault: } case 125: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:904 +// line internal/php7/php7.y:904 { // error yyVAL.node = nil @@ -3208,7 +3208,7 @@ yydefault: } case 126: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:911 +// line internal/php7/php7.y:911 { yyVAL.node = yyDollar[1].node @@ -3216,7 +3216,7 @@ yydefault: } case 127: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:917 +// line internal/php7/php7.y:917 { yyVAL.node = yyDollar[1].node @@ -3224,7 +3224,7 @@ yydefault: } case 128: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:923 +// line internal/php7/php7.y:923 { yyVAL.node = yyDollar[1].node @@ -3232,7 +3232,7 @@ yydefault: } case 129: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:929 +// line internal/php7/php7.y:929 { yyVAL.node = yyDollar[1].node @@ -3240,7 +3240,7 @@ yydefault: } case 130: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:935 +// line internal/php7/php7.y:935 { yyVAL.node = yyDollar[1].node @@ -3248,7 +3248,7 @@ yydefault: } case 131: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:941 +// line internal/php7/php7.y:941 { yyVAL.node = &ast.StmtHaltCompiler{ast.Node{}} @@ -3266,7 +3266,7 @@ yydefault: } case 132: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:959 +// line internal/php7/php7.y:959 { yyVAL.node = &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} @@ -3281,7 +3281,7 @@ yydefault: } case 133: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:972 +// line internal/php7/php7.y:972 { yyVAL.node = yyDollar[1].node @@ -3289,7 +3289,7 @@ yydefault: } case 134: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:978 +// line internal/php7/php7.y:978 { yyVAL.node = yyDollar[1].node @@ -3297,7 +3297,7 @@ yydefault: } case 135: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:984 +// line internal/php7/php7.y:984 { switch n := yyDollar[5].node.(type) { case *ast.StmtWhile: @@ -3320,7 +3320,7 @@ yydefault: } case 136: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1005 +// line internal/php7/php7.y:1005 { yyVAL.node = &ast.StmtDo{ast.Node{}, yyDollar[2].node, yyDollar[5].node} @@ -3339,7 +3339,7 @@ yydefault: } case 137: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1022 +// line internal/php7/php7.y:1022 { switch n := yyDollar[9].node.(type) { case *ast.StmtFor: @@ -3368,7 +3368,7 @@ yydefault: } case 138: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1049 +// line internal/php7/php7.y:1049 { switch n := yyDollar[5].node.(type) { case *ast.StmtSwitch: @@ -3393,7 +3393,7 @@ yydefault: } case 139: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1072 +// line internal/php7/php7.y:1072 { yyVAL.node = &ast.StmtBreak{ast.Node{}, yyDollar[2].node} @@ -3409,7 +3409,7 @@ yydefault: } case 140: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1086 +// line internal/php7/php7.y:1086 { yyVAL.node = &ast.StmtContinue{ast.Node{}, yyDollar[2].node} @@ -3425,7 +3425,7 @@ yydefault: } case 141: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1100 +// line internal/php7/php7.y:1100 { yyVAL.node = &ast.StmtReturn{ast.Node{}, yyDollar[2].node} @@ -3441,7 +3441,7 @@ yydefault: } case 142: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1114 +// line internal/php7/php7.y:1114 { yyVAL.node = &ast.StmtGlobal{ast.Node{}, yyDollar[2].list} @@ -3457,7 +3457,7 @@ yydefault: } case 143: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1128 +// line internal/php7/php7.y:1128 { yyVAL.node = &ast.StmtStatic{ast.Node{}, yyDollar[2].list} @@ -3473,7 +3473,7 @@ yydefault: } case 144: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1142 +// line internal/php7/php7.y:1142 { yyVAL.node = &ast.StmtEcho{ast.Node{}, yyDollar[2].list} @@ -3490,7 +3490,7 @@ yydefault: } case 145: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1157 +// line internal/php7/php7.y:1157 { yyVAL.node = &ast.StmtInlineHtml{ast.Node{}, yyDollar[1].token.Value} @@ -3504,7 +3504,7 @@ yydefault: } case 146: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1169 +// line internal/php7/php7.y:1169 { yyVAL.node = &ast.StmtExpression{ast.Node{}, yyDollar[1].node} @@ -3520,7 +3520,7 @@ yydefault: } case 147: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1183 +// line internal/php7/php7.y:1183 { yyVAL.node = &ast.StmtUnset{ast.Node{}, yyDollar[3].list} @@ -3542,7 +3542,7 @@ yydefault: } case 148: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1203 +// line internal/php7/php7.y:1203 { switch n := yyDollar[7].node.(type) { case *ast.StmtForeach: @@ -3568,7 +3568,7 @@ yydefault: } case 149: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1228 +// line internal/php7/php7.y:1228 { switch n := yyDollar[9].node.(type) { case *ast.StmtForeach: @@ -3597,7 +3597,7 @@ yydefault: } case 150: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1255 +// line internal/php7/php7.y:1255 { yyVAL.node = yyDollar[5].node yyVAL.node.(*ast.StmtDeclare).Consts = yyDollar[3].list @@ -3614,7 +3614,7 @@ yydefault: } case 151: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1270 +// line internal/php7/php7.y:1270 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -3629,7 +3629,7 @@ yydefault: } case 152: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1283 +// line internal/php7/php7.y:1283 { if yyDollar[6].node == nil { yyVAL.node = &ast.StmtTry{ast.Node{}, yyDollar[3].list, yyDollar[5].list, yyDollar[6].node} @@ -3648,7 +3648,7 @@ yydefault: } case 153: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1300 +// line internal/php7/php7.y:1300 { yyVAL.node = &ast.StmtThrow{ast.Node{}, yyDollar[2].node} @@ -3664,7 +3664,7 @@ yydefault: } case 154: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1314 +// line internal/php7/php7.y:1314 { label := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtGoto{ast.Node{}, label} @@ -3683,7 +3683,7 @@ yydefault: } case 155: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1331 +// line internal/php7/php7.y:1331 { label := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtLabel{ast.Node{}, label} @@ -3700,7 +3700,7 @@ yydefault: } case 156: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1348 +// line internal/php7/php7.y:1348 { yyVAL.list = []ast.Vertex{} @@ -3708,9 +3708,9 @@ yydefault: } case 157: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1354 +// line internal/php7/php7.y:1354 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[5].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[5].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} catch := &ast.StmtCatch{ast.Node{}, yyDollar[4].list, variable, yyDollar[8].list} yyVAL.list = append(yyDollar[1].list, catch) @@ -3724,7 +3724,6 @@ yydefault: yylex.(*Parser).setFreeFloating(catch, token.Start, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(catch, token.Catch, yyDollar[3].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[5].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(catch, token.Var, yyDollar[6].token.Hidden) yylex.(*Parser).setFreeFloating(catch, token.Cond, yyDollar[7].token.Hidden) yylex.(*Parser).setFreeFloating(catch, token.Stmts, yyDollar[9].token.Hidden) @@ -3733,7 +3732,7 @@ yydefault: } case 158: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1379 +// line internal/php7/php7.y:1378 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3741,7 +3740,7 @@ yydefault: } case 159: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1385 +// line internal/php7/php7.y:1384 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3752,7 +3751,7 @@ yydefault: } case 160: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1397 +// line internal/php7/php7.y:1396 { yyVAL.node = nil @@ -3760,7 +3759,7 @@ yydefault: } case 161: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1403 +// line internal/php7/php7.y:1402 { yyVAL.node = &ast.StmtFinally{ast.Node{}, yyDollar[3].list} @@ -3776,7 +3775,7 @@ yydefault: } case 162: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1420 +// line internal/php7/php7.y:1419 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3784,7 +3783,7 @@ yydefault: } case 163: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1426 +// line internal/php7/php7.y:1425 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -3795,7 +3794,7 @@ yydefault: } case 164: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1438 +// line internal/php7/php7.y:1437 { yyVAL.node = yyDollar[1].node @@ -3803,7 +3802,7 @@ yydefault: } case 165: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:1447 +// line internal/php7/php7.y:1446 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtFunction{ast.Node{}, yyDollar[2].token != nil, name, yyDollar[6].list, yyDollar[8].node, yyDollar[10].list} @@ -3839,31 +3838,31 @@ yydefault: } case 166: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1483 +// line internal/php7/php7.y:1482 { yyVAL.token = nil } case 167: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1487 +// line internal/php7/php7.y:1486 { yyVAL.token = yyDollar[1].token } case 168: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1494 +// line internal/php7/php7.y:1493 { yyVAL.token = nil } case 169: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1498 +// line internal/php7/php7.y:1497 { yyVAL.token = yyDollar[1].token } case 170: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:1505 +// line internal/php7/php7.y:1504 { name := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, name, yyDollar[1].list, nil, yyDollar[4].ClassExtends, yyDollar[5].ClassImplements, yyDollar[8].list} @@ -3883,7 +3882,7 @@ yydefault: } case 171: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:1523 +// line internal/php7/php7.y:1522 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtClass{ast.Node{}, name, nil, nil, yyDollar[3].ClassExtends, yyDollar[4].ClassImplements, yyDollar[7].list} @@ -3902,7 +3901,7 @@ yydefault: } case 172: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1543 +// line internal/php7/php7.y:1542 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -3910,7 +3909,7 @@ yydefault: } case 173: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1549 +// line internal/php7/php7.y:1548 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -3918,7 +3917,7 @@ yydefault: } case 174: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1558 +// line internal/php7/php7.y:1557 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3932,7 +3931,7 @@ yydefault: } case 175: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1570 +// line internal/php7/php7.y:1569 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -3946,7 +3945,7 @@ yydefault: } case 176: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1585 +// line internal/php7/php7.y:1584 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtTrait{ast.Node{}, name, yyDollar[5].list} @@ -3965,7 +3964,7 @@ yydefault: } case 177: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:1605 +// line internal/php7/php7.y:1604 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.StmtInterface{ast.Node{}, name, yyDollar[3].InterfaceExtends, yyDollar[6].list} @@ -3984,7 +3983,7 @@ yydefault: } case 178: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1625 +// line internal/php7/php7.y:1624 { yyVAL.ClassExtends = nil @@ -3992,7 +3991,7 @@ yydefault: } case 179: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1631 +// line internal/php7/php7.y:1630 { yyVAL.ClassExtends = &ast.StmtClassExtends{ast.Node{}, yyDollar[2].node} @@ -4006,7 +4005,7 @@ yydefault: } case 180: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1646 +// line internal/php7/php7.y:1645 { yyVAL.InterfaceExtends = nil @@ -4014,7 +4013,7 @@ yydefault: } case 181: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1652 +// line internal/php7/php7.y:1651 { yyVAL.InterfaceExtends = &ast.StmtInterfaceExtends{ast.Node{}, yyDollar[2].list} @@ -4028,7 +4027,7 @@ yydefault: } case 182: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1667 +// line internal/php7/php7.y:1666 { yyVAL.ClassImplements = nil @@ -4036,7 +4035,7 @@ yydefault: } case 183: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1673 +// line internal/php7/php7.y:1672 { yyVAL.ClassImplements = &ast.StmtClassImplements{ast.Node{}, yyDollar[2].list} @@ -4050,7 +4049,7 @@ yydefault: } case 184: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1688 +// line internal/php7/php7.y:1687 { yyVAL.node = yyDollar[1].node @@ -4058,7 +4057,7 @@ yydefault: } case 185: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:1694 +// line internal/php7/php7.y:1693 { yyVAL.node = &ast.ExprReference{ast.Node{}, yyDollar[2].node} @@ -4072,7 +4071,7 @@ yydefault: } case 186: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1706 +// line internal/php7/php7.y:1705 { yyVAL.node = &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -4088,7 +4087,7 @@ yydefault: } case 187: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1720 +// line internal/php7/php7.y:1719 { yyVAL.node = &ast.ExprShortList{ast.Node{}, yyDollar[2].list} @@ -4103,7 +4102,7 @@ yydefault: } case 188: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1736 +// line internal/php7/php7.y:1735 { yyVAL.node = &ast.StmtFor{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4114,7 +4113,7 @@ yydefault: } case 189: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1745 +// line internal/php7/php7.y:1744 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltFor{ast.Node{}, nil, nil, nil, stmtList} @@ -4133,7 +4132,7 @@ yydefault: } case 190: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1765 +// line internal/php7/php7.y:1764 { yyVAL.node = &ast.StmtForeach{ast.Node{}, nil, nil, nil, yyDollar[1].node} @@ -4144,7 +4143,7 @@ yydefault: } case 191: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1774 +// line internal/php7/php7.y:1773 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltForeach{ast.Node{}, nil, nil, nil, stmtList} @@ -4163,7 +4162,7 @@ yydefault: } case 192: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1794 +// line internal/php7/php7.y:1793 { yyVAL.node = &ast.StmtDeclare{ast.Node{}, false, nil, yyDollar[1].node} @@ -4174,7 +4173,7 @@ yydefault: } case 193: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1803 +// line internal/php7/php7.y:1802 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtDeclare{ast.Node{}, true, nil, stmtList} @@ -4193,7 +4192,7 @@ yydefault: } case 194: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:1823 +// line internal/php7/php7.y:1822 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4210,7 +4209,7 @@ yydefault: } case 195: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1838 +// line internal/php7/php7.y:1837 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.StmtSwitch{ast.Node{}, nil, caseList} @@ -4228,7 +4227,7 @@ yydefault: } case 196: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1854 +// line internal/php7/php7.y:1853 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltSwitch{ast.Node{}, nil, caseList} @@ -4247,7 +4246,7 @@ yydefault: } case 197: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1871 +// line internal/php7/php7.y:1870 { caseList := &ast.StmtCaseList{ast.Node{}, yyDollar[3].list} @@ -4268,7 +4267,7 @@ yydefault: } case 198: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:1893 +// line internal/php7/php7.y:1892 { yyVAL.list = []ast.Vertex{} @@ -4276,7 +4275,7 @@ yydefault: } case 199: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1899 +// line internal/php7/php7.y:1898 { _case := &ast.StmtCase{ast.Node{}, yyDollar[3].node, yyDollar[5].list} yyVAL.list = append(yyDollar[1].list, _case) @@ -4293,7 +4292,7 @@ yydefault: } case 200: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1914 +// line internal/php7/php7.y:1913 { _default := &ast.StmtDefault{ast.Node{}, yyDollar[4].list} yyVAL.list = append(yyDollar[1].list, _default) @@ -4310,19 +4309,19 @@ yydefault: } case 201: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1932 +// line internal/php7/php7.y:1931 { yyVAL.token = yyDollar[1].token } case 202: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1936 +// line internal/php7/php7.y:1935 { yyVAL.token = yyDollar[1].token } case 203: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:1943 +// line internal/php7/php7.y:1942 { yyVAL.node = &ast.StmtWhile{ast.Node{}, nil, yyDollar[1].node} @@ -4333,7 +4332,7 @@ yydefault: } case 204: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:1952 +// line internal/php7/php7.y:1951 { stmtList := &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.StmtAltWhile{ast.Node{}, nil, stmtList} @@ -4352,7 +4351,7 @@ yydefault: } case 205: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:1972 +// line internal/php7/php7.y:1971 { yyVAL.node = &ast.StmtIf{ast.Node{}, yyDollar[3].node, yyDollar[5].node, nil, nil} @@ -4368,7 +4367,7 @@ yydefault: } case 206: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:1986 +// line internal/php7/php7.y:1985 { _elseIf := &ast.StmtElseIf{ast.Node{}, yyDollar[4].node, yyDollar[6].node} yyDollar[1].node.(*ast.StmtIf).ElseIf = append(yyDollar[1].node.(*ast.StmtIf).ElseIf, _elseIf) @@ -4388,7 +4387,7 @@ yydefault: } case 207: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2007 +// line internal/php7/php7.y:2006 { yyVAL.node = yyDollar[1].node @@ -4396,7 +4395,7 @@ yydefault: } case 208: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2013 +// line internal/php7/php7.y:2012 { _else := &ast.StmtElse{ast.Node{}, yyDollar[3].node} yyDollar[1].node.(*ast.StmtIf).Else = _else @@ -4414,7 +4413,7 @@ yydefault: } case 209: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2032 +// line internal/php7/php7.y:2031 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[6].list} yyVAL.node = &ast.StmtAltIf{ast.Node{}, yyDollar[3].node, stmts, nil, nil} @@ -4433,7 +4432,7 @@ yydefault: } case 210: yyDollar = yyS[yypt-7 : yypt+1] - // line internal/php7/php7.y:2049 +// line internal/php7/php7.y:2048 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[7].list} _elseIf := &ast.StmtAltElseIf{ast.Node{}, yyDollar[4].node, stmts} @@ -4455,7 +4454,7 @@ yydefault: } case 211: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2072 +// line internal/php7/php7.y:2071 { yyVAL.node = yyDollar[1].node @@ -4471,7 +4470,7 @@ yydefault: } case 212: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2086 +// line internal/php7/php7.y:2085 { stmts := &ast.StmtStmtList{ast.Node{}, yyDollar[4].list} _else := &ast.StmtAltElse{ast.Node{}, stmts} @@ -4495,7 +4494,7 @@ yydefault: } case 213: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2111 +// line internal/php7/php7.y:2110 { yyVAL.list = yyDollar[1].list @@ -4503,7 +4502,7 @@ yydefault: } case 214: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2117 +// line internal/php7/php7.y:2116 { yyVAL.list = nil @@ -4511,7 +4510,7 @@ yydefault: } case 215: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2126 +// line internal/php7/php7.y:2125 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4519,7 +4518,7 @@ yydefault: } case 216: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2132 +// line internal/php7/php7.y:2131 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4530,9 +4529,9 @@ yydefault: } case 217: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2144 +// line internal/php7/php7.y:2143 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.Parameter{ast.Node{}, yyDollar[2].token != nil, yyDollar[3].token != nil, yyDollar[1].node, variable, nil} @@ -4561,8 +4560,6 @@ yydefault: } yylex.(*Parser).setFreeFloating(yyVAL.node, token.Variadic, yyDollar[4].token.Hidden) - yylex.(*Parser).addDollarToken(variable) - // normalize if yyDollar[3].token == nil { yylex.(*Parser).setFreeFloating(yyVAL.node, token.Ampersand, yyVAL.node.GetNode().Tokens[token.Variadic]) @@ -4581,9 +4578,9 @@ yydefault: } case 218: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:2190 +// line internal/php7/php7.y:2188 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[4].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.Parameter{ast.Node{}, yyDollar[2].token != nil, yyDollar[3].token != nil, yyDollar[1].node, variable, yyDollar[6].node} @@ -4613,8 +4610,6 @@ yydefault: yylex.(*Parser).setFreeFloating(yyVAL.node, token.Variadic, yyDollar[4].token.Hidden) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[5].token.Hidden) - yylex.(*Parser).addDollarToken(variable) - // normalize if yyDollar[3].token == nil { yylex.(*Parser).setFreeFloating(yyVAL.node, token.Ampersand, yyVAL.node.GetNode().Tokens[token.Variadic]) @@ -4633,7 +4628,7 @@ yydefault: } case 219: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2240 +// line internal/php7/php7.y:2237 { yyVAL.node = nil @@ -4641,7 +4636,7 @@ yydefault: } case 220: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2246 +// line internal/php7/php7.y:2243 { yyVAL.node = yyDollar[1].node @@ -4649,7 +4644,7 @@ yydefault: } case 221: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2255 +// line internal/php7/php7.y:2252 { yyVAL.node = yyDollar[1].node @@ -4657,7 +4652,7 @@ yydefault: } case 222: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2261 +// line internal/php7/php7.y:2258 { yyVAL.node = &ast.Nullable{ast.Node{}, yyDollar[2].node} @@ -4671,7 +4666,7 @@ yydefault: } case 223: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2276 +// line internal/php7/php7.y:2273 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4685,7 +4680,7 @@ yydefault: } case 224: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2288 +// line internal/php7/php7.y:2285 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -4699,7 +4694,7 @@ yydefault: } case 225: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2300 +// line internal/php7/php7.y:2297 { yyVAL.node = yyDollar[1].node @@ -4707,7 +4702,7 @@ yydefault: } case 226: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2309 +// line internal/php7/php7.y:2306 { yyVAL.node = nil @@ -4715,7 +4710,7 @@ yydefault: } case 227: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2315 +// line internal/php7/php7.y:2312 { yyVAL.node = yyDollar[2].node @@ -4726,7 +4721,7 @@ yydefault: } case 228: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2327 +// line internal/php7/php7.y:2324 { yyVAL.node = &ast.ArgumentList{ast.Node{}, nil} @@ -4741,7 +4736,7 @@ yydefault: } case 229: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2340 +// line internal/php7/php7.y:2337 { yyVAL.node = &ast.ArgumentList{ast.Node{}, yyDollar[2].list} @@ -4760,7 +4755,7 @@ yydefault: } case 230: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2360 +// line internal/php7/php7.y:2357 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4768,7 +4763,7 @@ yydefault: } case 231: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2366 +// line internal/php7/php7.y:2363 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4779,7 +4774,7 @@ yydefault: } case 232: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2378 +// line internal/php7/php7.y:2375 { yyVAL.node = &ast.Argument{ast.Node{}, false, false, yyDollar[1].node} @@ -4793,7 +4788,7 @@ yydefault: } case 233: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2390 +// line internal/php7/php7.y:2387 { yyVAL.node = &ast.Argument{ast.Node{}, true, false, yyDollar[2].node} @@ -4807,7 +4802,7 @@ yydefault: } case 234: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2405 +// line internal/php7/php7.y:2402 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4818,7 +4813,7 @@ yydefault: } case 235: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2414 +// line internal/php7/php7.y:2411 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4826,7 +4821,7 @@ yydefault: } case 236: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2423 +// line internal/php7/php7.y:2420 { yyVAL.node = yyDollar[1].node @@ -4834,7 +4829,7 @@ yydefault: } case 237: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2432 +// line internal/php7/php7.y:2429 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -4845,7 +4840,7 @@ yydefault: } case 238: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2441 +// line internal/php7/php7.y:2438 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -4853,9 +4848,9 @@ yydefault: } case 239: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2450 +// line internal/php7/php7.y:2447 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.StmtStaticVar{ast.Node{}, variable, nil} @@ -4866,15 +4861,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 240: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2467 +// line internal/php7/php7.y:2463 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.StmtStaticVar{ast.Node{}, variable, yyDollar[3].node} @@ -4885,14 +4879,13 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 241: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2488 +// line internal/php7/php7.y:2483 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -4900,7 +4893,7 @@ yydefault: } case 242: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2494 +// line internal/php7/php7.y:2489 { yyVAL.list = []ast.Vertex{} @@ -4908,7 +4901,7 @@ yydefault: } case 243: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2503 +// line internal/php7/php7.y:2498 { yyVAL.node = &ast.StmtPropertyList{ast.Node{}, yyDollar[1].list, yyDollar[2].node, yyDollar[3].list} @@ -4924,7 +4917,7 @@ yydefault: } case 244: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2517 +// line internal/php7/php7.y:2512 { yyVAL.node = &ast.StmtClassConstList{ast.Node{}, yyDollar[1].list, yyDollar[3].list} @@ -4945,7 +4938,7 @@ yydefault: } case 245: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2536 +// line internal/php7/php7.y:2531 { yyVAL.node = &ast.StmtTraitUse{ast.Node{}, yyDollar[2].list, yyDollar[3].node} @@ -4959,7 +4952,7 @@ yydefault: } case 246: yyDollar = yyS[yypt-10 : yypt+1] - // line internal/php7/php7.y:2548 +// line internal/php7/php7.y:2543 { name := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtClassMethod{ast.Node{}, yyDollar[3].token != nil, name, yyDollar[1].list, yyDollar[7].list, yyDollar[9].node, yyDollar[10].node} @@ -4996,7 +4989,7 @@ yydefault: } case 247: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2585 +// line internal/php7/php7.y:2580 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5004,7 +4997,7 @@ yydefault: } case 248: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2591 +// line internal/php7/php7.y:2586 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5015,7 +5008,7 @@ yydefault: } case 249: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2603 +// line internal/php7/php7.y:2598 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -5029,7 +5022,7 @@ yydefault: } case 250: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2616 +// line internal/php7/php7.y:2611 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, nil} @@ -5043,7 +5036,7 @@ yydefault: } case 251: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2628 +// line internal/php7/php7.y:2623 { yyVAL.node = &ast.StmtTraitAdaptationList{ast.Node{}, yyDollar[2].list} @@ -5057,7 +5050,7 @@ yydefault: } case 252: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2643 +// line internal/php7/php7.y:2638 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5065,7 +5058,7 @@ yydefault: } case 253: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2649 +// line internal/php7/php7.y:2644 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5073,7 +5066,7 @@ yydefault: } case 254: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2658 +// line internal/php7/php7.y:2653 { yyVAL.node = yyDollar[1].node @@ -5085,7 +5078,7 @@ yydefault: } case 255: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2668 +// line internal/php7/php7.y:2663 { yyVAL.node = yyDollar[1].node @@ -5097,7 +5090,7 @@ yydefault: } case 256: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2681 +// line internal/php7/php7.y:2676 { yyVAL.node = &ast.StmtTraitUsePrecedence{ast.Node{}, yyDollar[1].node, yyDollar[3].list} @@ -5112,7 +5105,7 @@ yydefault: } case 257: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2697 +// line internal/php7/php7.y:2692 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -5130,7 +5123,7 @@ yydefault: } case 258: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2713 +// line internal/php7/php7.y:2708 { alias := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, nil, alias} @@ -5148,7 +5141,7 @@ yydefault: } case 259: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2729 +// line internal/php7/php7.y:2724 { alias := &ast.Identifier{ast.Node{}, yyDollar[4].token.Value} yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, alias} @@ -5166,7 +5159,7 @@ yydefault: } case 260: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2745 +// line internal/php7/php7.y:2740 { yyVAL.node = &ast.StmtTraitUseAlias{ast.Node{}, yyDollar[1].node, yyDollar[3].node, nil} @@ -5181,7 +5174,7 @@ yydefault: } case 261: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2761 +// line internal/php7/php7.y:2756 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, nil, name} @@ -5197,7 +5190,7 @@ yydefault: } case 262: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2775 +// line internal/php7/php7.y:2770 { yyVAL.node = yyDollar[1].node @@ -5205,7 +5198,7 @@ yydefault: } case 263: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2784 +// line internal/php7/php7.y:2779 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.StmtTraitMethodRef{ast.Node{}, yyDollar[1].node, target} @@ -5223,7 +5216,7 @@ yydefault: } case 264: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2803 +// line internal/php7/php7.y:2798 { yyVAL.node = &ast.StmtNop{ast.Node{}} @@ -5238,7 +5231,7 @@ yydefault: } case 265: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2816 +// line internal/php7/php7.y:2811 { yyVAL.node = &ast.StmtStmtList{ast.Node{}, yyDollar[2].list} @@ -5253,7 +5246,7 @@ yydefault: } case 266: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2832 +// line internal/php7/php7.y:2827 { yyVAL.list = yyDollar[1].list @@ -5261,7 +5254,7 @@ yydefault: } case 267: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2838 +// line internal/php7/php7.y:2833 { modifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{modifier} @@ -5276,7 +5269,7 @@ yydefault: } case 268: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:2854 +// line internal/php7/php7.y:2849 { yyVAL.list = nil @@ -5284,7 +5277,7 @@ yydefault: } case 269: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2860 +// line internal/php7/php7.y:2855 { yyVAL.list = yyDollar[1].list @@ -5292,7 +5285,7 @@ yydefault: } case 270: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2869 +// line internal/php7/php7.y:2864 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5300,7 +5293,7 @@ yydefault: } case 271: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2875 +// line internal/php7/php7.y:2870 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -5308,7 +5301,7 @@ yydefault: } case 272: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2884 +// line internal/php7/php7.y:2879 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5322,7 +5315,7 @@ yydefault: } case 273: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2896 +// line internal/php7/php7.y:2891 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5336,7 +5329,7 @@ yydefault: } case 274: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2908 +// line internal/php7/php7.y:2903 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5350,7 +5343,7 @@ yydefault: } case 275: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2920 +// line internal/php7/php7.y:2915 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5364,7 +5357,7 @@ yydefault: } case 276: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2932 +// line internal/php7/php7.y:2927 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5378,7 +5371,7 @@ yydefault: } case 277: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2944 +// line internal/php7/php7.y:2939 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -5392,7 +5385,7 @@ yydefault: } case 278: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:2959 +// line internal/php7/php7.y:2954 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5403,7 +5396,7 @@ yydefault: } case 279: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:2968 +// line internal/php7/php7.y:2963 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5411,9 +5404,9 @@ yydefault: } case 280: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:2977 +// line internal/php7/php7.y:2972 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.StmtProperty{ast.Node{}, variable, nil} @@ -5424,15 +5417,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 281: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:2994 +// line internal/php7/php7.y:2988 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.StmtProperty{ast.Node{}, variable, yyDollar[3].node} @@ -5443,14 +5435,13 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 282: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3015 +// line internal/php7/php7.y:3008 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5461,7 +5452,7 @@ yydefault: } case 283: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3024 +// line internal/php7/php7.y:3017 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5469,7 +5460,7 @@ yydefault: } case 284: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3033 +// line internal/php7/php7.y:3026 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtConstant{ast.Node{}, name, yyDollar[3].node} @@ -5486,7 +5477,7 @@ yydefault: } case 285: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3051 +// line internal/php7/php7.y:3044 { name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.StmtConstant{ast.Node{}, name, yyDollar[3].node} @@ -5503,7 +5494,7 @@ yydefault: } case 286: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3069 +// line internal/php7/php7.y:3062 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5514,7 +5505,7 @@ yydefault: } case 287: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3078 +// line internal/php7/php7.y:3071 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5522,7 +5513,7 @@ yydefault: } case 288: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3087 +// line internal/php7/php7.y:3080 { yyVAL.node = yyDollar[1].node @@ -5530,7 +5521,7 @@ yydefault: } case 289: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:3096 +// line internal/php7/php7.y:3089 { yyVAL.list = nil @@ -5538,7 +5529,7 @@ yydefault: } case 290: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3102 +// line internal/php7/php7.y:3095 { yyVAL.list = yyDollar[1].list @@ -5546,7 +5537,7 @@ yydefault: } case 291: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3111 +// line internal/php7/php7.y:3104 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -5557,7 +5548,7 @@ yydefault: } case 292: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3120 +// line internal/php7/php7.y:3113 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -5565,7 +5556,7 @@ yydefault: } case 293: yyDollar = yyS[yypt-8 : yypt+1] - // line internal/php7/php7.y:3129 +// line internal/php7/php7.y:3122 { if yyDollar[2].node != nil { yyVAL.node = &ast.StmtClass{ast.Node{}, nil, nil, yyDollar[2].node.(*ast.ArgumentList), yyDollar[3].ClassExtends, yyDollar[4].ClassImplements, yyDollar[7].list} @@ -5585,7 +5576,7 @@ yydefault: } case 294: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3150 +// line internal/php7/php7.y:3143 { if yyDollar[3].node != nil { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, yyDollar[3].node.(*ast.ArgumentList)} @@ -5602,7 +5593,7 @@ yydefault: } case 295: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3165 +// line internal/php7/php7.y:3158 { yyVAL.node = &ast.ExprNew{ast.Node{}, yyDollar[2].node, nil} @@ -5616,7 +5607,7 @@ yydefault: } case 296: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:3180 +// line internal/php7/php7.y:3173 { listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, listNode, yyDollar[6].node} @@ -5635,7 +5626,7 @@ yydefault: } case 297: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3197 +// line internal/php7/php7.y:3190 { shortList := &ast.ExprShortList{ast.Node{}, yyDollar[2].list} yyVAL.node = &ast.ExprAssign{ast.Node{}, shortList, yyDollar[5].node} @@ -5653,7 +5644,7 @@ yydefault: } case 298: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3213 +// line internal/php7/php7.y:3206 { yyVAL.node = &ast.ExprAssign{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5668,7 +5659,7 @@ yydefault: } case 299: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3226 +// line internal/php7/php7.y:3219 { yyVAL.node = &ast.ExprAssignReference{ast.Node{}, yyDollar[1].node, yyDollar[4].node} @@ -5684,7 +5675,7 @@ yydefault: } case 300: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3240 +// line internal/php7/php7.y:3233 { yyVAL.node = &ast.ExprClone{ast.Node{}, yyDollar[2].node} @@ -5698,7 +5689,7 @@ yydefault: } case 301: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3252 +// line internal/php7/php7.y:3245 { yyVAL.node = &ast.ExprAssignPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5713,7 +5704,7 @@ yydefault: } case 302: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3265 +// line internal/php7/php7.y:3258 { yyVAL.node = &ast.ExprAssignMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5728,7 +5719,7 @@ yydefault: } case 303: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3278 +// line internal/php7/php7.y:3271 { yyVAL.node = &ast.ExprAssignMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5743,7 +5734,7 @@ yydefault: } case 304: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3291 +// line internal/php7/php7.y:3284 { yyVAL.node = &ast.ExprAssignPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5758,7 +5749,7 @@ yydefault: } case 305: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3304 +// line internal/php7/php7.y:3297 { yyVAL.node = &ast.ExprAssignDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5773,7 +5764,7 @@ yydefault: } case 306: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3317 +// line internal/php7/php7.y:3310 { yyVAL.node = &ast.ExprAssignConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5788,7 +5779,7 @@ yydefault: } case 307: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3330 +// line internal/php7/php7.y:3323 { yyVAL.node = &ast.ExprAssignMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5803,7 +5794,7 @@ yydefault: } case 308: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3343 +// line internal/php7/php7.y:3336 { yyVAL.node = &ast.ExprAssignBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5818,7 +5809,7 @@ yydefault: } case 309: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3356 +// line internal/php7/php7.y:3349 { yyVAL.node = &ast.ExprAssignBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5833,7 +5824,7 @@ yydefault: } case 310: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3369 +// line internal/php7/php7.y:3362 { yyVAL.node = &ast.ExprAssignBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5848,7 +5839,7 @@ yydefault: } case 311: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3382 +// line internal/php7/php7.y:3375 { yyVAL.node = &ast.ExprAssignShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5863,7 +5854,7 @@ yydefault: } case 312: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3395 +// line internal/php7/php7.y:3388 { yyVAL.node = &ast.ExprAssignShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5878,7 +5869,7 @@ yydefault: } case 313: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3408 +// line internal/php7/php7.y:3401 { yyVAL.node = &ast.ExprAssignCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5893,7 +5884,7 @@ yydefault: } case 314: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3421 +// line internal/php7/php7.y:3414 { yyVAL.node = &ast.ExprPostInc{ast.Node{}, yyDollar[1].node} @@ -5908,7 +5899,7 @@ yydefault: } case 315: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3434 +// line internal/php7/php7.y:3427 { yyVAL.node = &ast.ExprPreInc{ast.Node{}, yyDollar[2].node} @@ -5922,7 +5913,7 @@ yydefault: } case 316: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3446 +// line internal/php7/php7.y:3439 { yyVAL.node = &ast.ExprPostDec{ast.Node{}, yyDollar[1].node} @@ -5937,7 +5928,7 @@ yydefault: } case 317: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3459 +// line internal/php7/php7.y:3452 { yyVAL.node = &ast.ExprPreDec{ast.Node{}, yyDollar[2].node} @@ -5951,7 +5942,7 @@ yydefault: } case 318: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3471 +// line internal/php7/php7.y:3464 { yyVAL.node = &ast.ExprBinaryBooleanOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5966,7 +5957,7 @@ yydefault: } case 319: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3484 +// line internal/php7/php7.y:3477 { yyVAL.node = &ast.ExprBinaryBooleanAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5981,7 +5972,7 @@ yydefault: } case 320: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3497 +// line internal/php7/php7.y:3490 { yyVAL.node = &ast.ExprBinaryLogicalOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -5996,7 +5987,7 @@ yydefault: } case 321: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3510 +// line internal/php7/php7.y:3503 { yyVAL.node = &ast.ExprBinaryLogicalAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6011,7 +6002,7 @@ yydefault: } case 322: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3523 +// line internal/php7/php7.y:3516 { yyVAL.node = &ast.ExprBinaryLogicalXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6026,7 +6017,7 @@ yydefault: } case 323: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3536 +// line internal/php7/php7.y:3529 { yyVAL.node = &ast.ExprBinaryBitwiseOr{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6041,7 +6032,7 @@ yydefault: } case 324: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3549 +// line internal/php7/php7.y:3542 { yyVAL.node = &ast.ExprBinaryBitwiseAnd{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6056,7 +6047,7 @@ yydefault: } case 325: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3562 +// line internal/php7/php7.y:3555 { yyVAL.node = &ast.ExprBinaryBitwiseXor{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6071,7 +6062,7 @@ yydefault: } case 326: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3575 +// line internal/php7/php7.y:3568 { yyVAL.node = &ast.ExprBinaryConcat{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6086,7 +6077,7 @@ yydefault: } case 327: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3588 +// line internal/php7/php7.y:3581 { yyVAL.node = &ast.ExprBinaryPlus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6101,7 +6092,7 @@ yydefault: } case 328: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3601 +// line internal/php7/php7.y:3594 { yyVAL.node = &ast.ExprBinaryMinus{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6116,7 +6107,7 @@ yydefault: } case 329: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3614 +// line internal/php7/php7.y:3607 { yyVAL.node = &ast.ExprBinaryMul{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6131,7 +6122,7 @@ yydefault: } case 330: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3627 +// line internal/php7/php7.y:3620 { yyVAL.node = &ast.ExprBinaryPow{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6146,7 +6137,7 @@ yydefault: } case 331: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3640 +// line internal/php7/php7.y:3633 { yyVAL.node = &ast.ExprBinaryDiv{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6161,7 +6152,7 @@ yydefault: } case 332: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3653 +// line internal/php7/php7.y:3646 { yyVAL.node = &ast.ExprBinaryMod{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6176,7 +6167,7 @@ yydefault: } case 333: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3666 +// line internal/php7/php7.y:3659 { yyVAL.node = &ast.ExprBinaryShiftLeft{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6191,7 +6182,7 @@ yydefault: } case 334: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3679 +// line internal/php7/php7.y:3672 { yyVAL.node = &ast.ExprBinaryShiftRight{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6206,7 +6197,7 @@ yydefault: } case 335: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3692 +// line internal/php7/php7.y:3685 { yyVAL.node = &ast.ExprUnaryPlus{ast.Node{}, yyDollar[2].node} @@ -6220,7 +6211,7 @@ yydefault: } case 336: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3704 +// line internal/php7/php7.y:3697 { yyVAL.node = &ast.ExprUnaryMinus{ast.Node{}, yyDollar[2].node} @@ -6234,7 +6225,7 @@ yydefault: } case 337: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3716 +// line internal/php7/php7.y:3709 { yyVAL.node = &ast.ExprBooleanNot{ast.Node{}, yyDollar[2].node} @@ -6248,7 +6239,7 @@ yydefault: } case 338: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3728 +// line internal/php7/php7.y:3721 { yyVAL.node = &ast.ExprBitwiseNot{ast.Node{}, yyDollar[2].node} @@ -6262,7 +6253,7 @@ yydefault: } case 339: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3740 +// line internal/php7/php7.y:3733 { yyVAL.node = &ast.ExprBinaryIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6277,7 +6268,7 @@ yydefault: } case 340: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3753 +// line internal/php7/php7.y:3746 { yyVAL.node = &ast.ExprBinaryNotIdentical{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6292,7 +6283,7 @@ yydefault: } case 341: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3766 +// line internal/php7/php7.y:3759 { yyVAL.node = &ast.ExprBinaryEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6307,7 +6298,7 @@ yydefault: } case 342: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3779 +// line internal/php7/php7.y:3772 { yyVAL.node = &ast.ExprBinaryNotEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6323,7 +6314,7 @@ yydefault: } case 343: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3793 +// line internal/php7/php7.y:3786 { yyVAL.node = &ast.ExprBinarySmaller{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6338,7 +6329,7 @@ yydefault: } case 344: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3806 +// line internal/php7/php7.y:3799 { yyVAL.node = &ast.ExprBinarySmallerOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6353,7 +6344,7 @@ yydefault: } case 345: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3819 +// line internal/php7/php7.y:3812 { yyVAL.node = &ast.ExprBinaryGreater{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6368,7 +6359,7 @@ yydefault: } case 346: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3832 +// line internal/php7/php7.y:3825 { yyVAL.node = &ast.ExprBinaryGreaterOrEqual{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6383,7 +6374,7 @@ yydefault: } case 347: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3845 +// line internal/php7/php7.y:3838 { yyVAL.node = &ast.ExprBinarySpaceship{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6398,7 +6389,7 @@ yydefault: } case 348: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3858 +// line internal/php7/php7.y:3851 { yyVAL.node = &ast.ExprInstanceOf{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6413,7 +6404,7 @@ yydefault: } case 349: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3871 +// line internal/php7/php7.y:3864 { yyVAL.node = yyDollar[2].node @@ -6425,7 +6416,7 @@ yydefault: } case 350: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3881 +// line internal/php7/php7.y:3874 { yyVAL.node = yyDollar[1].node @@ -6433,7 +6424,7 @@ yydefault: } case 351: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:3887 +// line internal/php7/php7.y:3880 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[5].node} @@ -6449,7 +6440,7 @@ yydefault: } case 352: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:3901 +// line internal/php7/php7.y:3894 { yyVAL.node = &ast.ExprTernary{ast.Node{}, yyDollar[1].node, nil, yyDollar[4].node} @@ -6465,7 +6456,7 @@ yydefault: } case 353: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:3915 +// line internal/php7/php7.y:3908 { yyVAL.node = &ast.ExprBinaryCoalesce{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -6480,7 +6471,7 @@ yydefault: } case 354: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:3928 +// line internal/php7/php7.y:3921 { yyVAL.node = yyDollar[1].node @@ -6488,7 +6479,7 @@ yydefault: } case 355: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3934 +// line internal/php7/php7.y:3927 { yyVAL.node = &ast.ExprCastInt{ast.Node{}, yyDollar[2].node} @@ -6503,7 +6494,7 @@ yydefault: } case 356: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3947 +// line internal/php7/php7.y:3940 { yyVAL.node = &ast.ExprCastDouble{ast.Node{}, yyDollar[2].node} @@ -6518,7 +6509,7 @@ yydefault: } case 357: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3960 +// line internal/php7/php7.y:3953 { yyVAL.node = &ast.ExprCastString{ast.Node{}, yyDollar[2].node} @@ -6533,7 +6524,7 @@ yydefault: } case 358: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3973 +// line internal/php7/php7.y:3966 { yyVAL.node = &ast.ExprCastArray{ast.Node{}, yyDollar[2].node} @@ -6548,7 +6539,7 @@ yydefault: } case 359: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3986 +// line internal/php7/php7.y:3979 { yyVAL.node = &ast.ExprCastObject{ast.Node{}, yyDollar[2].node} @@ -6563,7 +6554,7 @@ yydefault: } case 360: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:3999 +// line internal/php7/php7.y:3992 { yyVAL.node = &ast.ExprCastBool{ast.Node{}, yyDollar[2].node} @@ -6578,7 +6569,7 @@ yydefault: } case 361: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4012 +// line internal/php7/php7.y:4005 { yyVAL.node = &ast.ExprCastUnset{ast.Node{}, yyDollar[2].node} @@ -6593,7 +6584,7 @@ yydefault: } case 362: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4025 +// line internal/php7/php7.y:4018 { var e *ast.ExprExit if yyDollar[2].node != nil { @@ -6622,7 +6613,7 @@ yydefault: } case 363: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4052 +// line internal/php7/php7.y:4045 { yyVAL.node = &ast.ExprErrorSuppress{ast.Node{}, yyDollar[2].node} @@ -6636,7 +6627,7 @@ yydefault: } case 364: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4064 +// line internal/php7/php7.y:4057 { yyVAL.node = yyDollar[1].node @@ -6644,7 +6635,7 @@ yydefault: } case 365: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4070 +// line internal/php7/php7.y:4063 { yyVAL.node = &ast.ExprShellExec{ast.Node{}, yyDollar[2].list} @@ -6658,7 +6649,7 @@ yydefault: } case 366: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4082 +// line internal/php7/php7.y:4075 { yyVAL.node = &ast.ExprPrint{ast.Node{}, yyDollar[2].node} @@ -6672,7 +6663,7 @@ yydefault: } case 367: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4094 +// line internal/php7/php7.y:4087 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, nil} @@ -6686,7 +6677,7 @@ yydefault: } case 368: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4106 +// line internal/php7/php7.y:4099 { yyVAL.node = &ast.ExprYield{ast.Node{}, nil, yyDollar[2].node} @@ -6700,7 +6691,7 @@ yydefault: } case 369: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4118 +// line internal/php7/php7.y:4111 { yyVAL.node = &ast.ExprYield{ast.Node{}, yyDollar[2].node, yyDollar[4].node} @@ -6715,7 +6706,7 @@ yydefault: } case 370: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4131 +// line internal/php7/php7.y:4124 { yyVAL.node = &ast.ExprYieldFrom{ast.Node{}, yyDollar[2].node} @@ -6729,7 +6720,7 @@ yydefault: } case 371: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4143 +// line internal/php7/php7.y:4136 { yyVAL.node = yyDollar[1].node @@ -6737,7 +6728,7 @@ yydefault: } case 372: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4149 +// line internal/php7/php7.y:4142 { yyVAL.node = yyDollar[2].node @@ -6760,7 +6751,7 @@ yydefault: } case 373: yyDollar = yyS[yypt-11 : yypt+1] - // line internal/php7/php7.y:4172 +// line internal/php7/php7.y:4165 { yyVAL.node = &ast.ExprClosure{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[5].list, yyDollar[7].ClosureUse, yyDollar[8].node, yyDollar[10].list} @@ -6797,7 +6788,7 @@ yydefault: } case 374: yyDollar = yyS[yypt-9 : yypt+1] - // line internal/php7/php7.y:4204 +// line internal/php7/php7.y:4197 { yyVAL.node = &ast.ExprArrowFunction{ast.Node{}, yyDollar[2].token != nil, false, yyDollar[4].list, yyDollar[6].node, yyDollar[9].node} @@ -6829,19 +6820,19 @@ yydefault: } case 376: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4239 +// line internal/php7/php7.y:4232 { yyVAL.token = nil } case 377: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4243 +// line internal/php7/php7.y:4236 { yyVAL.token = yyDollar[1].token } case 378: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4250 +// line internal/php7/php7.y:4243 { yyVAL.ClosureUse = nil @@ -6849,7 +6840,7 @@ yydefault: } case 379: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4256 +// line internal/php7/php7.y:4249 { yyVAL.ClosureUse = &ast.ExprClosureUse{ast.Node{}, yyDollar[3].list} @@ -6865,7 +6856,7 @@ yydefault: } case 380: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4273 +// line internal/php7/php7.y:4266 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -6876,7 +6867,7 @@ yydefault: } case 381: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4282 +// line internal/php7/php7.y:4275 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -6884,9 +6875,9 @@ yydefault: } case 382: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4291 +// line internal/php7/php7.y:4284 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -6895,15 +6886,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 383: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4306 +// line internal/php7/php7.y:4298 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[2].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.ExprReference{ast.Node{}, variable} @@ -6915,13 +6905,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, yyDollar[2].token.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 384: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4327 +// line internal/php7/php7.y:4318 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6935,7 +6924,7 @@ yydefault: } case 385: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4339 +// line internal/php7/php7.y:4330 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6950,7 +6939,7 @@ yydefault: } case 386: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4352 +// line internal/php7/php7.y:4343 { yyVAL.node = &ast.ExprStaticCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -6965,7 +6954,7 @@ yydefault: } case 387: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4365 +// line internal/php7/php7.y:4356 { yyVAL.node = &ast.ExprFunctionCall{ast.Node{}, yyDollar[1].node, yyDollar[2].node.(*ast.ArgumentList)} @@ -6979,7 +6968,7 @@ yydefault: } case 388: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4380 +// line internal/php7/php7.y:4371 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -6993,7 +6982,7 @@ yydefault: } case 389: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4392 +// line internal/php7/php7.y:4383 { yyVAL.node = yyDollar[1].node @@ -7001,7 +6990,7 @@ yydefault: } case 390: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4401 +// line internal/php7/php7.y:4392 { yyVAL.node = yyDollar[1].node @@ -7009,7 +6998,7 @@ yydefault: } case 391: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4407 +// line internal/php7/php7.y:4398 { yyVAL.node = yyDollar[1].node @@ -7017,7 +7006,7 @@ yydefault: } case 392: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4416 +// line internal/php7/php7.y:4407 { yyVAL.node = nil @@ -7025,7 +7014,7 @@ yydefault: } case 393: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4422 +// line internal/php7/php7.y:4413 { yyVAL.node = &ast.ExprExit{ast.Node{}, false, yyDollar[2].node} @@ -7040,7 +7029,7 @@ yydefault: } case 394: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4438 +// line internal/php7/php7.y:4429 { yyVAL.list = []ast.Vertex{} @@ -7048,7 +7037,7 @@ yydefault: } case 395: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4444 +// line internal/php7/php7.y:4435 { part := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{part} @@ -7060,7 +7049,7 @@ yydefault: } case 396: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4454 +// line internal/php7/php7.y:4445 { yyVAL.list = yyDollar[1].list @@ -7068,7 +7057,7 @@ yydefault: } case 397: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4463 +// line internal/php7/php7.y:4454 { yyVAL.node = nil @@ -7076,7 +7065,7 @@ yydefault: } case 398: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4469 +// line internal/php7/php7.y:4460 { yyVAL.node = yyDollar[1].node @@ -7084,7 +7073,7 @@ yydefault: } case 399: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4478 +// line internal/php7/php7.y:4469 { yyVAL.node = &ast.ExprArray{ast.Node{}, yyDollar[3].list} @@ -7100,7 +7089,7 @@ yydefault: } case 400: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4492 +// line internal/php7/php7.y:4483 { yyVAL.node = &ast.ExprShortArray{ast.Node{}, yyDollar[2].list} @@ -7115,7 +7104,7 @@ yydefault: } case 401: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4505 +// line internal/php7/php7.y:4496 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -7129,7 +7118,7 @@ yydefault: } case 402: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4520 +// line internal/php7/php7.y:4511 { yyVAL.node = &ast.ScalarLnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7143,7 +7132,7 @@ yydefault: } case 403: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4532 +// line internal/php7/php7.y:4523 { yyVAL.node = &ast.ScalarDnumber{ast.Node{}, yyDollar[1].token.Value} @@ -7157,7 +7146,7 @@ yydefault: } case 404: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4544 +// line internal/php7/php7.y:4535 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7171,7 +7160,7 @@ yydefault: } case 405: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4556 +// line internal/php7/php7.y:4547 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7185,7 +7174,7 @@ yydefault: } case 406: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4568 +// line internal/php7/php7.y:4559 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7199,7 +7188,7 @@ yydefault: } case 407: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4580 +// line internal/php7/php7.y:4571 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7213,7 +7202,7 @@ yydefault: } case 408: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4592 +// line internal/php7/php7.y:4583 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7227,7 +7216,7 @@ yydefault: } case 409: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4604 +// line internal/php7/php7.y:4595 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7241,7 +7230,7 @@ yydefault: } case 410: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4616 +// line internal/php7/php7.y:4607 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7255,7 +7244,7 @@ yydefault: } case 411: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4628 +// line internal/php7/php7.y:4619 { yyVAL.node = &ast.ScalarMagicConstant{ast.Node{}, yyDollar[1].token.Value} @@ -7269,7 +7258,7 @@ yydefault: } case 412: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4640 +// line internal/php7/php7.y:4631 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, []ast.Vertex{encapsed}} @@ -7285,7 +7274,7 @@ yydefault: } case 413: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4654 +// line internal/php7/php7.y:4645 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, nil} @@ -7299,7 +7288,7 @@ yydefault: } case 414: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4666 +// line internal/php7/php7.y:4657 { yyVAL.node = &ast.ScalarEncapsed{ast.Node{}, yyDollar[2].list} @@ -7313,7 +7302,7 @@ yydefault: } case 415: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4678 +// line internal/php7/php7.y:4669 { yyVAL.node = &ast.ScalarHeredoc{ast.Node{}, yyDollar[1].token.Value, yyDollar[2].list} @@ -7327,7 +7316,7 @@ yydefault: } case 416: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4690 +// line internal/php7/php7.y:4681 { yyVAL.node = yyDollar[1].node @@ -7335,7 +7324,7 @@ yydefault: } case 417: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4696 +// line internal/php7/php7.y:4687 { yyVAL.node = yyDollar[1].node @@ -7343,7 +7332,7 @@ yydefault: } case 418: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4705 +// line internal/php7/php7.y:4696 { yyVAL.node = &ast.ExprConstFetch{ast.Node{}, yyDollar[1].node} @@ -7357,7 +7346,7 @@ yydefault: } case 419: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4717 +// line internal/php7/php7.y:4708 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -7375,7 +7364,7 @@ yydefault: } case 420: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4733 +// line internal/php7/php7.y:4724 { target := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprClassConstFetch{ast.Node{}, yyDollar[1].node, target} @@ -7393,7 +7382,7 @@ yydefault: } case 421: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4752 +// line internal/php7/php7.y:4743 { yyVAL.node = yyDollar[1].node @@ -7401,7 +7390,7 @@ yydefault: } case 422: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4758 +// line internal/php7/php7.y:4749 { yyVAL.node = yyDollar[1].node @@ -7409,7 +7398,7 @@ yydefault: } case 423: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:4767 +// line internal/php7/php7.y:4758 { yyVAL.node = nil @@ -7417,7 +7406,7 @@ yydefault: } case 424: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4773 +// line internal/php7/php7.y:4764 { yyVAL.node = yyDollar[1].node @@ -7425,7 +7414,7 @@ yydefault: } case 425: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4782 +// line internal/php7/php7.y:4773 { yyVAL.node = yyDollar[1].node @@ -7433,7 +7422,7 @@ yydefault: } case 426: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4791 +// line internal/php7/php7.y:4782 { yyVAL.node = yyDollar[1].node @@ -7441,7 +7430,7 @@ yydefault: } case 427: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4797 +// line internal/php7/php7.y:4788 { yyVAL.node = yyDollar[2].node @@ -7453,7 +7442,7 @@ yydefault: } case 428: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4807 +// line internal/php7/php7.y:4798 { yyVAL.node = yyDollar[1].node @@ -7461,7 +7450,7 @@ yydefault: } case 429: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4816 +// line internal/php7/php7.y:4807 { yyVAL.node = yyDollar[1].node @@ -7469,7 +7458,7 @@ yydefault: } case 430: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4822 +// line internal/php7/php7.y:4813 { yyVAL.node = yyDollar[2].node @@ -7481,7 +7470,7 @@ yydefault: } case 431: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4832 +// line internal/php7/php7.y:4823 { yyVAL.node = yyDollar[1].node @@ -7489,7 +7478,7 @@ yydefault: } case 432: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4841 +// line internal/php7/php7.y:4832 { yyVAL.node = yyDollar[1].node @@ -7497,7 +7486,7 @@ yydefault: } case 433: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4847 +// line internal/php7/php7.y:4838 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7513,7 +7502,7 @@ yydefault: } case 434: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4861 +// line internal/php7/php7.y:4852 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7529,7 +7518,7 @@ yydefault: } case 435: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4875 +// line internal/php7/php7.y:4866 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7545,7 +7534,7 @@ yydefault: } case 436: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4889 +// line internal/php7/php7.y:4880 { yyVAL.node = &ast.ExprMethodCall{ast.Node{}, yyDollar[1].node, yyDollar[3].node, yyDollar[4].node.(*ast.ArgumentList)} @@ -7560,7 +7549,7 @@ yydefault: } case 437: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4902 +// line internal/php7/php7.y:4893 { yyVAL.node = yyDollar[1].node @@ -7568,7 +7557,7 @@ yydefault: } case 438: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4911 +// line internal/php7/php7.y:4902 { yyVAL.node = yyDollar[1].node @@ -7576,7 +7565,7 @@ yydefault: } case 439: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4917 +// line internal/php7/php7.y:4908 { yyVAL.node = yyDollar[1].node @@ -7584,7 +7573,7 @@ yydefault: } case 440: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4923 +// line internal/php7/php7.y:4914 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7599,9 +7588,9 @@ yydefault: } case 441: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:4939 +// line internal/php7/php7.y:4930 { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} // save position @@ -7610,13 +7599,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 442: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:4954 +// line internal/php7/php7.y:4944 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[3].node} @@ -7625,7 +7613,6 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.Start, append(yyDollar[2].token.Hidden, append(yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token), yyDollar[3].node.GetNode().Tokens[token.Start]...)...)) yylex.(*Parser).setFreeFloating(yyDollar[3].node, token.End, append(yyDollar[3].node.GetNode().Tokens[token.End], append(yyDollar[4].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[4].token)...)...)) @@ -7633,7 +7620,7 @@ yydefault: } case 443: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:4969 +// line internal/php7/php7.y:4958 { yyVAL.node = &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -7642,13 +7629,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).setFreeFloating(yyVAL.node, token.Dollar, yylex.(*Parser).GetFreeFloatingToken(yyDollar[1].token)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 444: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4985 +// line internal/php7/php7.y:4973 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7663,7 +7649,7 @@ yydefault: } case 445: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:4998 +// line internal/php7/php7.y:4986 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7678,7 +7664,7 @@ yydefault: } case 446: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5014 +// line internal/php7/php7.y:5002 { yyVAL.node = yyDollar[1].node @@ -7686,7 +7672,7 @@ yydefault: } case 447: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5020 +// line internal/php7/php7.y:5008 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7702,7 +7688,7 @@ yydefault: } case 448: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5034 +// line internal/php7/php7.y:5022 { yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7718,7 +7704,7 @@ yydefault: } case 449: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5048 +// line internal/php7/php7.y:5036 { yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7733,7 +7719,7 @@ yydefault: } case 450: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5061 +// line internal/php7/php7.y:5049 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7748,7 +7734,7 @@ yydefault: } case 451: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5074 +// line internal/php7/php7.y:5062 { yyVAL.node = &ast.ExprStaticPropertyFetch{ast.Node{}, yyDollar[1].node, yyDollar[3].node} @@ -7763,7 +7749,7 @@ yydefault: } case 452: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5090 +// line internal/php7/php7.y:5078 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7777,7 +7763,7 @@ yydefault: } case 453: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5102 +// line internal/php7/php7.y:5090 { yyVAL.node = yyDollar[2].node @@ -7789,7 +7775,7 @@ yydefault: } case 454: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5112 +// line internal/php7/php7.y:5100 { yyVAL.node = yyDollar[1].node @@ -7797,7 +7783,7 @@ yydefault: } case 455: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5121 +// line internal/php7/php7.y:5109 { yyVAL.node = &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} @@ -7811,7 +7797,7 @@ yydefault: } case 456: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5133 +// line internal/php7/php7.y:5121 { yyVAL.node = yyDollar[2].node @@ -7823,7 +7809,7 @@ yydefault: } case 457: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5143 +// line internal/php7/php7.y:5131 { yyVAL.node = yyDollar[1].node @@ -7831,7 +7817,7 @@ yydefault: } case 458: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5152 +// line internal/php7/php7.y:5140 { yyVAL.list = yyDollar[1].list @@ -7839,7 +7825,7 @@ yydefault: } case 459: yyDollar = yyS[yypt-0 : yypt+1] - // line internal/php7/php7.y:5161 +// line internal/php7/php7.y:5149 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, nil} @@ -7847,7 +7833,7 @@ yydefault: } case 460: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5167 +// line internal/php7/php7.y:5155 { yyVAL.node = yyDollar[1].node @@ -7855,7 +7841,7 @@ yydefault: } case 461: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5176 +// line internal/php7/php7.y:5164 { if len(yyDollar[1].list) == 0 { yyDollar[1].list = []ast.Vertex{&ast.ExprArrayItem{ast.Node{}, false, nil, nil}} @@ -7870,7 +7856,7 @@ yydefault: } case 462: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5189 +// line internal/php7/php7.y:5177 { if yyDollar[1].node.(*ast.ExprArrayItem).Key == nil && yyDollar[1].node.(*ast.ExprArrayItem).Val == nil { yyVAL.list = []ast.Vertex{} @@ -7882,7 +7868,7 @@ yydefault: } case 463: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5202 +// line internal/php7/php7.y:5190 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, yyDollar[3].node} @@ -7897,7 +7883,7 @@ yydefault: } case 464: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5215 +// line internal/php7/php7.y:5203 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, yyDollar[1].node} @@ -7911,7 +7897,7 @@ yydefault: } case 465: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5227 +// line internal/php7/php7.y:5215 { reference := &ast.ExprReference{ast.Node{}, yyDollar[4].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, yyDollar[1].node, reference} @@ -7929,7 +7915,7 @@ yydefault: } case 466: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5243 +// line internal/php7/php7.y:5231 { reference := &ast.ExprReference{ast.Node{}, yyDollar[2].node} yyVAL.node = &ast.ExprArrayItem{ast.Node{}, false, nil, reference} @@ -7945,7 +7931,7 @@ yydefault: } case 467: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5257 +// line internal/php7/php7.y:5245 { yyVAL.node = &ast.ExprArrayItem{ast.Node{}, true, nil, yyDollar[2].node} @@ -7959,7 +7945,7 @@ yydefault: } case 468: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:5269 +// line internal/php7/php7.y:5257 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[5].list} @@ -7980,7 +7966,7 @@ yydefault: } case 469: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5288 +// line internal/php7/php7.y:5276 { // TODO: Cannot use list() as standalone expression listNode := &ast.ExprList{ast.Node{}, yyDollar[3].list} @@ -7999,7 +7985,7 @@ yydefault: } case 470: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5308 +// line internal/php7/php7.y:5296 { yyVAL.list = append(yyDollar[1].list, yyDollar[2].node) @@ -8007,7 +7993,7 @@ yydefault: } case 471: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5314 +// line internal/php7/php7.y:5302 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[2].token.Value} yyVAL.list = append(yyDollar[1].list, encapsed) @@ -8022,7 +8008,7 @@ yydefault: } case 472: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5327 +// line internal/php7/php7.y:5315 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -8030,7 +8016,7 @@ yydefault: } case 473: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5333 +// line internal/php7/php7.y:5321 { encapsed := &ast.ScalarEncapsedStringPart{ast.Node{}, yyDollar[1].token.Value} yyVAL.list = []ast.Vertex{encapsed, yyDollar[2].node} @@ -8045,9 +8031,9 @@ yydefault: } case 474: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5349 +// line internal/php7/php7.y:5337 { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, name} // save position @@ -8056,15 +8042,14 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 475: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5364 +// line internal/php7/php7.y:5351 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} yyVAL.node = &ast.ExprArrayDimFetch{ast.Node{}, variable, yyDollar[3].node} @@ -8074,7 +8059,6 @@ yydefault: yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[4].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, append(yyDollar[2].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[2].token)...)) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Expr, append(yyDollar[4].token.Hidden, yylex.(*Parser).GetFreeFloatingToken(yyDollar[4].token)...)) @@ -8082,9 +8066,9 @@ yydefault: } case 476: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5382 +// line internal/php7/php7.y:5368 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} fetch := &ast.Identifier{ast.Node{}, yyDollar[3].token.Value} yyVAL.node = &ast.ExprPropertyFetch{ast.Node{}, variable, fetch} @@ -8096,7 +8080,6 @@ yydefault: yyVAL.node.GetNode().Position = position.NewTokensPosition(yyDollar[1].token, yyDollar[3].token) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating(yyVAL.node, token.Var, yyDollar[2].token.Hidden) yylex.(*Parser).setFreeFloating(fetch, token.Start, yyDollar[3].token.Hidden) @@ -8104,7 +8087,7 @@ yydefault: } case 477: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5402 +// line internal/php7/php7.y:5387 { variable := &ast.ExprVariable{ast.Node{}, yyDollar[2].node} @@ -8121,7 +8104,7 @@ yydefault: } case 478: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5417 +// line internal/php7/php7.y:5402 { name := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, name} @@ -8140,7 +8123,7 @@ yydefault: } case 479: yyDollar = yyS[yypt-6 : yypt+1] - // line internal/php7/php7.y:5434 +// line internal/php7/php7.y:5419 { identifier := &ast.Identifier{ast.Node{}, yyDollar[2].token.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} @@ -8161,7 +8144,7 @@ yydefault: } case 480: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5453 +// line internal/php7/php7.y:5438 { yyVAL.node = yyDollar[2].node @@ -8173,7 +8156,7 @@ yydefault: } case 481: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5466 +// line internal/php7/php7.y:5451 { yyVAL.node = &ast.ScalarString{ast.Node{}, yyDollar[1].token.Value} @@ -8187,7 +8170,7 @@ yydefault: } case 482: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5478 +// line internal/php7/php7.y:5463 { // TODO: add option to handle 64 bit integer if _, err := strconv.Atoi(string(yyDollar[1].token.Value)); err == nil { @@ -8206,7 +8189,7 @@ yydefault: } case 483: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5495 +// line internal/php7/php7.y:5480 { var lnumber *ast.ScalarLnumber // TODO: add option to handle 64 bit integer @@ -8234,9 +8217,9 @@ yydefault: } case 484: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5521 +// line internal/php7/php7.y:5506 { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc(yyDollar[1].token.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, yyDollar[1].token.Value} yyVAL.node = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -8245,13 +8228,12 @@ yydefault: // save comments yylex.(*Parser).setFreeFloating(yyVAL.node, token.Start, yyDollar[1].token.Hidden) - yylex.(*Parser).addDollarToken(yyVAL.node) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } case 485: yyDollar = yyS[yypt-5 : yypt+1] - // line internal/php7/php7.y:5539 +// line internal/php7/php7.y:5523 { yyVAL.node = &ast.ExprIsset{ast.Node{}, yyDollar[3].list} @@ -8271,7 +8253,7 @@ yydefault: } case 486: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5557 +// line internal/php7/php7.y:5541 { yyVAL.node = &ast.ExprEmpty{ast.Node{}, yyDollar[3].node} @@ -8287,7 +8269,7 @@ yydefault: } case 487: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5571 +// line internal/php7/php7.y:5555 { yyVAL.node = &ast.ExprInclude{ast.Node{}, yyDollar[2].node} @@ -8301,7 +8283,7 @@ yydefault: } case 488: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5583 +// line internal/php7/php7.y:5567 { yyVAL.node = &ast.ExprIncludeOnce{ast.Node{}, yyDollar[2].node} @@ -8315,7 +8297,7 @@ yydefault: } case 489: yyDollar = yyS[yypt-4 : yypt+1] - // line internal/php7/php7.y:5595 +// line internal/php7/php7.y:5579 { yyVAL.node = &ast.ExprEval{ast.Node{}, yyDollar[3].node} @@ -8331,7 +8313,7 @@ yydefault: } case 490: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5609 +// line internal/php7/php7.y:5593 { yyVAL.node = &ast.ExprRequire{ast.Node{}, yyDollar[2].node} @@ -8345,7 +8327,7 @@ yydefault: } case 491: yyDollar = yyS[yypt-2 : yypt+1] - // line internal/php7/php7.y:5621 +// line internal/php7/php7.y:5605 { yyVAL.node = &ast.ExprRequireOnce{ast.Node{}, yyDollar[2].node} @@ -8359,7 +8341,7 @@ yydefault: } case 492: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5636 +// line internal/php7/php7.y:5620 { yyVAL.list = []ast.Vertex{yyDollar[1].node} @@ -8367,7 +8349,7 @@ yydefault: } case 493: yyDollar = yyS[yypt-3 : yypt+1] - // line internal/php7/php7.y:5642 +// line internal/php7/php7.y:5626 { yyVAL.list = append(yyDollar[1].list, yyDollar[3].node) @@ -8378,7 +8360,7 @@ yydefault: } case 494: yyDollar = yyS[yypt-1 : yypt+1] - // line internal/php7/php7.y:5654 +// line internal/php7/php7.y:5638 { yyVAL.node = yyDollar[1].node diff --git a/internal/php7/php7.y b/internal/php7/php7.y index 16e3936..29a4a8b 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -1352,7 +1352,7 @@ catch_list: } | catch_list T_CATCH '(' catch_name_list T_VARIABLE ')' '{' inner_statement_list '}' { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($5.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $5.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} catch := &ast.StmtCatch{ast.Node{}, $4, variable, $8} $$ = append($1, catch) @@ -1366,7 +1366,6 @@ catch_list: 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).addDollarToken(variable) yylex.(*Parser).setFreeFloating(catch, token.Var, $6.Hidden) yylex.(*Parser).setFreeFloating(catch, token.Cond, $7.Hidden) yylex.(*Parser).setFreeFloating(catch, token.Stmts, $9.Hidden) @@ -2142,7 +2141,7 @@ non_empty_parameter_list: parameter: optional_type is_reference is_variadic T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.Parameter{ast.Node{}, $2 != nil, $3 != nil, $1, variable, nil} @@ -2171,7 +2170,6 @@ parameter: } yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if $3 == nil { @@ -2188,7 +2186,7 @@ parameter: } | optional_type is_reference is_variadic T_VARIABLE '=' expr { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($4.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $4.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.Parameter{ast.Node{}, $2 != nil, $3 != nil, $1, variable, $6} @@ -2218,7 +2216,6 @@ parameter: yylex.(*Parser).setFreeFloating($$, token.Variadic, $4.Hidden) yylex.(*Parser).setFreeFloating($$, token.Var, $5.Hidden) - yylex.(*Parser).addDollarToken(variable) // normalize if $3 == nil { @@ -2448,7 +2445,7 @@ static_var_list: static_var: T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.StmtStaticVar{ast.Node{}, variable, nil} @@ -2459,13 +2456,12 @@ static_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '=' expr { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.StmtStaticVar{ast.Node{}, variable, $3} @@ -2476,7 +2472,6 @@ static_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -2975,7 +2970,7 @@ property_list: property: T_VARIABLE backup_doc_comment { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.StmtProperty{ast.Node{}, variable, nil} @@ -2986,13 +2981,12 @@ property: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '=' expr backup_doc_comment { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.StmtProperty{ast.Node{}, variable, $3} @@ -3003,7 +2997,6 @@ property: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) @@ -4289,7 +4282,7 @@ lexical_var_list: lexical_var: T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -4298,13 +4291,12 @@ lexical_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | '&' T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($2.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $2.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.ExprReference{ast.Node{}, variable} @@ -4316,7 +4308,6 @@ lexical_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) yylex.(*Parser).setFreeFloating(variable, token.Start, $2.Hidden) - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4937,7 +4928,7 @@ variable: simple_variable: T_VARIABLE { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, name} // save position @@ -4946,7 +4937,6 @@ simple_variable: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -4959,7 +4949,6 @@ simple_variable: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) 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)...)...)) @@ -4974,7 +4963,6 @@ simple_variable: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).setFreeFloating($$, token.Dollar, yylex.(*Parser).GetFreeFloatingToken($1)) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } @@ -5347,7 +5335,7 @@ encaps_list: encaps_var: T_VARIABLE { - name := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + name := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, name} // save position @@ -5356,13 +5344,12 @@ encaps_var: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } | T_VARIABLE '[' encaps_var_offset ']' { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} $$ = &ast.ExprArrayDimFetch{ast.Node{}, variable, $3} @@ -5372,7 +5359,6 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $4) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, append($2.Hidden, yylex.(*Parser).GetFreeFloatingToken($2)...)) yylex.(*Parser).setFreeFloating($$, token.Expr, append($4.Hidden, yylex.(*Parser).GetFreeFloatingToken($4)...)) @@ -5380,7 +5366,7 @@ encaps_var: } | T_VARIABLE T_OBJECT_OPERATOR T_STRING { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} variable := &ast.ExprVariable{ast.Node{}, identifier} fetch := &ast.Identifier{ast.Node{}, $3.Value} $$ = &ast.ExprPropertyFetch{ast.Node{}, variable, fetch} @@ -5392,7 +5378,6 @@ encaps_var: $$.GetNode().Position = position.NewTokensPosition($1, $3) // save comments - yylex.(*Parser).addDollarToken(variable) yylex.(*Parser).setFreeFloating($$, token.Var, $2.Hidden) yylex.(*Parser).setFreeFloating(fetch, token.Start, $3.Hidden) @@ -5519,7 +5504,7 @@ encaps_var_offset: } | T_VARIABLE { - identifier := &ast.Identifier{ast.Node{}, bytes.TrimLeftFunc($1.Value, isDollar)} + identifier := &ast.Identifier{ast.Node{}, $1.Value} $$ = &ast.ExprVariable{ast.Node{}, identifier} // save position @@ -5528,7 +5513,6 @@ encaps_var_offset: // save comments yylex.(*Parser).setFreeFloating($$, token.Start, $1.Hidden) - yylex.(*Parser).addDollarToken($$) yylex.(*Parser).returnTokenToPool(yyDollar, &yyVAL) } diff --git a/internal/php7/php7_test.go b/internal/php7/php7_test.go index 1fd25a0..169e62c 100644 --- a/internal/php7/php7_test.go +++ b/internal/php7/php7_test.go @@ -455,7 +455,7 @@ func TestPhp7(t *testing.T) { EndPos: 11, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -488,7 +488,7 @@ func TestPhp7(t *testing.T) { EndPos: 18, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -532,7 +532,7 @@ func TestPhp7(t *testing.T) { EndPos: 27, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -574,7 +574,7 @@ func TestPhp7(t *testing.T) { EndPos: 30, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -607,7 +607,7 @@ func TestPhp7(t *testing.T) { EndPos: 37, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -651,7 +651,7 @@ func TestPhp7(t *testing.T) { EndPos: 46, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -704,7 +704,7 @@ func TestPhp7(t *testing.T) { EndPos: 54, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -737,7 +737,7 @@ func TestPhp7(t *testing.T) { EndPos: 61, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -836,7 +836,7 @@ func TestPhp7(t *testing.T) { EndPos: 77, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -869,7 +869,7 @@ func TestPhp7(t *testing.T) { EndPos: 84, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -913,7 +913,7 @@ func TestPhp7(t *testing.T) { EndPos: 93, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Call: &ast.Identifier{ @@ -966,7 +966,7 @@ func TestPhp7(t *testing.T) { EndPos: 101, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -999,7 +999,7 @@ func TestPhp7(t *testing.T) { EndPos: 108, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1087,7 +1087,7 @@ func TestPhp7(t *testing.T) { EndPos: 123, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -1120,7 +1120,7 @@ func TestPhp7(t *testing.T) { EndPos: 130, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1194,7 +1194,7 @@ func TestPhp7(t *testing.T) { EndPos: 173, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -1227,7 +1227,7 @@ func TestPhp7(t *testing.T) { EndPos: 180, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -1304,7 +1304,7 @@ func TestPhp7(t *testing.T) { EndPos: 212, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -1354,7 +1354,7 @@ func TestPhp7(t *testing.T) { EndPos: 224, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Dim: &ast.ScalarLnumber{ @@ -1416,7 +1416,7 @@ func TestPhp7(t *testing.T) { EndPos: 239, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Dim: &ast.ExprVariable{ @@ -1437,7 +1437,7 @@ func TestPhp7(t *testing.T) { EndPos: 244, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -1488,7 +1488,7 @@ func TestPhp7(t *testing.T) { EndPos: 257, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.Identifier{ @@ -1550,7 +1550,7 @@ func TestPhp7(t *testing.T) { EndPos: 274, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.ExprVariable{ @@ -1571,7 +1571,7 @@ func TestPhp7(t *testing.T) { EndPos: 280, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -1633,7 +1633,7 @@ func TestPhp7(t *testing.T) { EndPos: 300, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -1723,7 +1723,7 @@ func TestPhp7(t *testing.T) { EndPos: 327, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -1812,7 +1812,7 @@ func TestPhp7(t *testing.T) { EndPos: 346, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -1937,7 +1937,7 @@ func TestPhp7(t *testing.T) { EndPos: 393, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -2026,7 +2026,7 @@ func TestPhp7(t *testing.T) { EndPos: 412, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -2128,7 +2128,7 @@ func TestPhp7(t *testing.T) { EndPos: 438, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -2217,7 +2217,7 @@ func TestPhp7(t *testing.T) { EndPos: 457, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -2308,7 +2308,7 @@ func TestPhp7(t *testing.T) { EndPos: 490, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, DefaultValue: &ast.ExprConstFetch{ @@ -2397,7 +2397,7 @@ func TestPhp7(t *testing.T) { EndPos: 509, }, }, - Value: []byte("baz"), + Value: []byte("$baz"), }, }, }, @@ -2768,7 +2768,7 @@ func TestPhp7(t *testing.T) { EndPos: 876, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, }, @@ -2831,7 +2831,7 @@ func TestPhp7(t *testing.T) { EndPos: 891, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarLnumber{ @@ -2906,7 +2906,7 @@ func TestPhp7(t *testing.T) { EndPos: 909, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ExprUnaryMinus{ @@ -2991,7 +2991,7 @@ func TestPhp7(t *testing.T) { EndPos: 928, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarString{ @@ -3066,7 +3066,7 @@ func TestPhp7(t *testing.T) { EndPos: 985, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarString{ @@ -3141,7 +3141,7 @@ func TestPhp7(t *testing.T) { EndPos: 1043, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ScalarString{ @@ -3216,7 +3216,7 @@ func TestPhp7(t *testing.T) { EndPos: 1063, }, }, - Value: []byte("var"), + Value: []byte("$var"), }, }, Dim: &ast.ExprVariable{ @@ -3237,7 +3237,7 @@ func TestPhp7(t *testing.T) { EndPos: 1068, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -3281,7 +3281,7 @@ func TestPhp7(t *testing.T) { EndPos: 1079, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, &ast.ScalarEncapsedStringPart{ @@ -3313,7 +3313,7 @@ func TestPhp7(t *testing.T) { EndPos: 1084, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -3376,7 +3376,7 @@ func TestPhp7(t *testing.T) { EndPos: 1099, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.Identifier{ @@ -3591,7 +3591,7 @@ func TestPhp7(t *testing.T) { EndPos: 1160, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -3655,7 +3655,7 @@ func TestPhp7(t *testing.T) { EndPos: 1177, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Method: &ast.Identifier{ @@ -3710,7 +3710,7 @@ func TestPhp7(t *testing.T) { EndPos: 1197, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3752,7 +3752,7 @@ func TestPhp7(t *testing.T) { EndPos: 1218, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3794,7 +3794,7 @@ func TestPhp7(t *testing.T) { EndPos: 1234, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3838,7 +3838,7 @@ func TestPhp7(t *testing.T) { EndPos: 1254, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3901,7 +3901,7 @@ func TestPhp7(t *testing.T) { EndPos: 1283, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -3943,7 +3943,7 @@ func TestPhp7(t *testing.T) { EndPos: 1299, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -3985,7 +3985,7 @@ func TestPhp7(t *testing.T) { EndPos: 1314, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -5476,7 +5476,7 @@ func TestPhp7(t *testing.T) { EndPos: 2036, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ScalarLnumber{ @@ -5520,7 +5520,7 @@ func TestPhp7(t *testing.T) { EndPos: 2050, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -5562,7 +5562,7 @@ func TestPhp7(t *testing.T) { EndPos: 2061, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Expr: &ast.ScalarLnumber{ @@ -5606,7 +5606,7 @@ func TestPhp7(t *testing.T) { EndPos: 2069, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -5650,7 +5650,7 @@ func TestPhp7(t *testing.T) { EndPos: 2078, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5681,7 +5681,7 @@ func TestPhp7(t *testing.T) { EndPos: 2084, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5735,7 +5735,7 @@ func TestPhp7(t *testing.T) { EndPos: 2101, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, Right: &ast.ScalarLnumber{ @@ -5779,7 +5779,7 @@ func TestPhp7(t *testing.T) { EndPos: 2110, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5810,7 +5810,7 @@ func TestPhp7(t *testing.T) { EndPos: 2116, }, }, - Value: []byte("i"), + Value: []byte("$i"), }, }, }, @@ -5854,7 +5854,7 @@ func TestPhp7(t *testing.T) { EndPos: 2143, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -5875,7 +5875,7 @@ func TestPhp7(t *testing.T) { EndPos: 2149, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5917,7 +5917,7 @@ func TestPhp7(t *testing.T) { EndPos: 2167, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Var: &ast.ExprVariable{ @@ -5938,7 +5938,7 @@ func TestPhp7(t *testing.T) { EndPos: 2173, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -5980,7 +5980,7 @@ func TestPhp7(t *testing.T) { EndPos: 2202, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6001,7 +6001,7 @@ func TestPhp7(t *testing.T) { EndPos: 2208, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprVariable{ @@ -6022,7 +6022,7 @@ func TestPhp7(t *testing.T) { EndPos: 2214, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, Stmt: &ast.StmtStmtList{ @@ -6064,7 +6064,7 @@ func TestPhp7(t *testing.T) { EndPos: 2232, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6085,7 +6085,7 @@ func TestPhp7(t *testing.T) { EndPos: 2238, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprReference{ @@ -6115,7 +6115,7 @@ func TestPhp7(t *testing.T) { EndPos: 2245, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -6158,7 +6158,7 @@ func TestPhp7(t *testing.T) { EndPos: 2263, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6179,7 +6179,7 @@ func TestPhp7(t *testing.T) { EndPos: 2269, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprList{ @@ -6219,7 +6219,7 @@ func TestPhp7(t *testing.T) { EndPos: 2280, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -6264,7 +6264,7 @@ func TestPhp7(t *testing.T) { EndPos: 2299, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Key: &ast.ExprVariable{ @@ -6285,7 +6285,7 @@ func TestPhp7(t *testing.T) { EndPos: 2305, }, }, - Value: []byte("k"), + Value: []byte("$k"), }, }, Var: &ast.ExprShortList{ @@ -6325,7 +6325,7 @@ func TestPhp7(t *testing.T) { EndPos: 2312, }, }, - Value: []byte("v"), + Value: []byte("$v"), }, }, }, @@ -6519,7 +6519,7 @@ func TestPhp7(t *testing.T) { EndPos: 2433, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -6540,7 +6540,7 @@ func TestPhp7(t *testing.T) { EndPos: 2437, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -6614,7 +6614,7 @@ func TestPhp7(t *testing.T) { EndPos: 2463, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6656,7 +6656,7 @@ func TestPhp7(t *testing.T) { EndPos: 2476, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6698,7 +6698,7 @@ func TestPhp7(t *testing.T) { EndPos: 2491, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -6742,7 +6742,7 @@ func TestPhp7(t *testing.T) { EndPos: 2504, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6805,7 +6805,7 @@ func TestPhp7(t *testing.T) { EndPos: 2525, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6847,7 +6847,7 @@ func TestPhp7(t *testing.T) { EndPos: 2540, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -6889,7 +6889,7 @@ func TestPhp7(t *testing.T) { EndPos: 2555, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -6954,7 +6954,7 @@ func TestPhp7(t *testing.T) { EndPos: 2576, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Stmt: &ast.StmtStmtList{ @@ -6996,7 +6996,7 @@ func TestPhp7(t *testing.T) { EndPos: 2591, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Stmt: &ast.StmtStmtList{ @@ -7048,7 +7048,7 @@ func TestPhp7(t *testing.T) { EndPos: 2607, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, Stmt: &ast.StmtStmtList{ @@ -7415,7 +7415,7 @@ func TestPhp7(t *testing.T) { EndPos: 2796, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7505,7 +7505,7 @@ func TestPhp7(t *testing.T) { EndPos: 2828, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7536,7 +7536,7 @@ func TestPhp7(t *testing.T) { EndPos: 2832, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -7592,7 +7592,7 @@ func TestPhp7(t *testing.T) { EndPos: 2850, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -7623,7 +7623,7 @@ func TestPhp7(t *testing.T) { EndPos: 2854, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, Expr: &ast.ScalarLnumber{ @@ -8030,7 +8030,7 @@ func TestPhp7(t *testing.T) { EndPos: 3103, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -8966,7 +8966,7 @@ func TestPhp7(t *testing.T) { EndPos: 3445, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -9059,7 +9059,7 @@ func TestPhp7(t *testing.T) { EndPos: 3495, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -9129,7 +9129,7 @@ func TestPhp7(t *testing.T) { EndPos: 3528, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -9186,7 +9186,7 @@ func TestPhp7(t *testing.T) { EndPos: 3559, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -9256,7 +9256,7 @@ func TestPhp7(t *testing.T) { EndPos: 3592, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, Stmts: []ast.Vertex{}, @@ -9302,7 +9302,7 @@ func TestPhp7(t *testing.T) { EndPos: 3619, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -9323,7 +9323,7 @@ func TestPhp7(t *testing.T) { EndPos: 3623, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10637,7 +10637,7 @@ func TestPhp7(t *testing.T) { EndPos: 3991, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -10698,7 +10698,7 @@ func TestPhp7(t *testing.T) { EndPos: 4000, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Dim: &ast.ScalarLnumber{ @@ -10877,7 +10877,7 @@ func TestPhp7(t *testing.T) { EndPos: 4048, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -10922,7 +10922,7 @@ func TestPhp7(t *testing.T) { EndPos: 4057, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -10963,7 +10963,7 @@ func TestPhp7(t *testing.T) { EndPos: 4064, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11058,7 +11058,7 @@ func TestPhp7(t *testing.T) { EndPos: 4085, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ConstantName: &ast.Identifier{ @@ -11110,7 +11110,7 @@ func TestPhp7(t *testing.T) { EndPos: 4102, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11151,7 +11151,7 @@ func TestPhp7(t *testing.T) { EndPos: 4115, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11229,7 +11229,7 @@ func TestPhp7(t *testing.T) { EndPos: 4146, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11262,7 +11262,7 @@ func TestPhp7(t *testing.T) { EndPos: 4150, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -11295,7 +11295,7 @@ func TestPhp7(t *testing.T) { EndPos: 4159, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, &ast.ExprReference{ @@ -11325,7 +11325,7 @@ func TestPhp7(t *testing.T) { EndPos: 4164, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -11545,7 +11545,7 @@ func TestPhp7(t *testing.T) { EndPos: 4236, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11586,7 +11586,7 @@ func TestPhp7(t *testing.T) { EndPos: 4244, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11627,7 +11627,7 @@ func TestPhp7(t *testing.T) { EndPos: 4255, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11690,7 +11690,7 @@ func TestPhp7(t *testing.T) { EndPos: 4275, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11753,7 +11753,7 @@ func TestPhp7(t *testing.T) { EndPos: 4293, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -11953,7 +11953,7 @@ func TestPhp7(t *testing.T) { EndPos: 4340, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, ArgumentList: &ast.ArgumentList{ @@ -12004,7 +12004,7 @@ func TestPhp7(t *testing.T) { EndPos: 4349, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12045,7 +12045,7 @@ func TestPhp7(t *testing.T) { EndPos: 4357, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12086,7 +12086,7 @@ func TestPhp7(t *testing.T) { EndPos: 4367, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12127,7 +12127,7 @@ func TestPhp7(t *testing.T) { EndPos: 4375, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12168,7 +12168,7 @@ func TestPhp7(t *testing.T) { EndPos: 4390, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12209,7 +12209,7 @@ func TestPhp7(t *testing.T) { EndPos: 4409, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12250,7 +12250,7 @@ func TestPhp7(t *testing.T) { EndPos: 4423, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12291,7 +12291,7 @@ func TestPhp7(t *testing.T) { EndPos: 4442, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12332,7 +12332,7 @@ func TestPhp7(t *testing.T) { EndPos: 4449, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameName{ @@ -12396,7 +12396,7 @@ func TestPhp7(t *testing.T) { EndPos: 4470, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameRelative{ @@ -12460,7 +12460,7 @@ func TestPhp7(t *testing.T) { EndPos: 4501, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Class: &ast.NameFullyQualified{ @@ -12525,7 +12525,7 @@ func TestPhp7(t *testing.T) { EndPos: 4530, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, &ast.ExprVariable{ @@ -12546,7 +12546,7 @@ func TestPhp7(t *testing.T) { EndPos: 4534, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12607,7 +12607,7 @@ func TestPhp7(t *testing.T) { EndPos: 4546, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12631,7 +12631,7 @@ func TestPhp7(t *testing.T) { EndPos: 4552, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12700,7 +12700,7 @@ func TestPhp7(t *testing.T) { EndPos: 4563, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12725,7 +12725,7 @@ func TestPhp7(t *testing.T) { EndPos: 4571, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12804,7 +12804,7 @@ func TestPhp7(t *testing.T) { EndPos: 4587, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -12831,7 +12831,7 @@ func TestPhp7(t *testing.T) { EndPos: 4594, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -12872,7 +12872,7 @@ func TestPhp7(t *testing.T) { EndPos: 4601, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Method: &ast.Identifier{ @@ -13123,7 +13123,7 @@ func TestPhp7(t *testing.T) { EndPos: 4675, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13156,7 +13156,7 @@ func TestPhp7(t *testing.T) { EndPos: 4682, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13202,7 +13202,7 @@ func TestPhp7(t *testing.T) { EndPos: 4698, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13243,7 +13243,7 @@ func TestPhp7(t *testing.T) { EndPos: 4705, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Property: &ast.Identifier{ @@ -13307,7 +13307,7 @@ func TestPhp7(t *testing.T) { EndPos: 4721, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13518,7 +13518,7 @@ func TestPhp7(t *testing.T) { EndPos: 4764, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13582,7 +13582,7 @@ func TestPhp7(t *testing.T) { EndPos: 4774, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13606,7 +13606,7 @@ func TestPhp7(t *testing.T) { EndPos: 4780, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13675,7 +13675,7 @@ func TestPhp7(t *testing.T) { EndPos: 4787, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13700,7 +13700,7 @@ func TestPhp7(t *testing.T) { EndPos: 4795, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -13779,7 +13779,7 @@ func TestPhp7(t *testing.T) { EndPos: 4807, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -13806,7 +13806,7 @@ func TestPhp7(t *testing.T) { EndPos: 4814, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14062,7 +14062,7 @@ func TestPhp7(t *testing.T) { EndPos: 4880, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -14103,7 +14103,7 @@ func TestPhp7(t *testing.T) { EndPos: 4888, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.ExprVariable{ @@ -14124,7 +14124,7 @@ func TestPhp7(t *testing.T) { EndPos: 4894, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -14188,7 +14188,7 @@ func TestPhp7(t *testing.T) { EndPos: 4917, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -14252,7 +14252,7 @@ func TestPhp7(t *testing.T) { EndPos: 4931, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -14293,7 +14293,7 @@ func TestPhp7(t *testing.T) { EndPos: 4937, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -14314,7 +14314,7 @@ func TestPhp7(t *testing.T) { EndPos: 4942, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -14335,7 +14335,7 @@ func TestPhp7(t *testing.T) { EndPos: 4947, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -14376,7 +14376,7 @@ func TestPhp7(t *testing.T) { EndPos: 4953, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfFalse: &ast.ExprVariable{ @@ -14397,7 +14397,7 @@ func TestPhp7(t *testing.T) { EndPos: 4960, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -14438,7 +14438,7 @@ func TestPhp7(t *testing.T) { EndPos: 4966, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprTernary{ @@ -14468,7 +14468,7 @@ func TestPhp7(t *testing.T) { EndPos: 4971, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfTrue: &ast.ExprVariable{ @@ -14489,7 +14489,7 @@ func TestPhp7(t *testing.T) { EndPos: 4976, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, IfFalse: &ast.ExprVariable{ @@ -14510,7 +14510,7 @@ func TestPhp7(t *testing.T) { EndPos: 4981, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, }, @@ -14532,7 +14532,7 @@ func TestPhp7(t *testing.T) { EndPos: 4986, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -14582,7 +14582,7 @@ func TestPhp7(t *testing.T) { EndPos: 4992, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, IfTrue: &ast.ExprVariable{ @@ -14603,7 +14603,7 @@ func TestPhp7(t *testing.T) { EndPos: 4997, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, IfFalse: &ast.ExprVariable{ @@ -14624,7 +14624,7 @@ func TestPhp7(t *testing.T) { EndPos: 5002, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, }, @@ -14646,7 +14646,7 @@ func TestPhp7(t *testing.T) { EndPos: 5007, }, }, - Value: []byte("d"), + Value: []byte("$d"), }, }, IfFalse: &ast.ExprVariable{ @@ -14667,7 +14667,7 @@ func TestPhp7(t *testing.T) { EndPos: 5012, }, }, - Value: []byte("e"), + Value: []byte("$e"), }, }, }, @@ -14708,7 +14708,7 @@ func TestPhp7(t *testing.T) { EndPos: 5019, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14749,7 +14749,7 @@ func TestPhp7(t *testing.T) { EndPos: 5026, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14790,7 +14790,7 @@ func TestPhp7(t *testing.T) { EndPos: 5033, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14851,7 +14851,7 @@ func TestPhp7(t *testing.T) { EndPos: 5054, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14892,7 +14892,7 @@ func TestPhp7(t *testing.T) { EndPos: 5066, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Value: &ast.ExprVariable{ @@ -14913,7 +14913,7 @@ func TestPhp7(t *testing.T) { EndPos: 5072, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -14954,7 +14954,7 @@ func TestPhp7(t *testing.T) { EndPos: 5089, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -14995,7 +14995,7 @@ func TestPhp7(t *testing.T) { EndPos: 5105, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15036,7 +15036,7 @@ func TestPhp7(t *testing.T) { EndPos: 5120, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15077,7 +15077,7 @@ func TestPhp7(t *testing.T) { EndPos: 5132, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15118,7 +15118,7 @@ func TestPhp7(t *testing.T) { EndPos: 5146, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15159,7 +15159,7 @@ func TestPhp7(t *testing.T) { EndPos: 5159, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15200,7 +15200,7 @@ func TestPhp7(t *testing.T) { EndPos: 5174, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15241,7 +15241,7 @@ func TestPhp7(t *testing.T) { EndPos: 5185, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15282,7 +15282,7 @@ func TestPhp7(t *testing.T) { EndPos: 5199, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15323,7 +15323,7 @@ func TestPhp7(t *testing.T) { EndPos: 5213, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15364,7 +15364,7 @@ func TestPhp7(t *testing.T) { EndPos: 5226, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -15405,7 +15405,7 @@ func TestPhp7(t *testing.T) { EndPos: 5233, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15426,7 +15426,7 @@ func TestPhp7(t *testing.T) { EndPos: 5238, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15467,7 +15467,7 @@ func TestPhp7(t *testing.T) { EndPos: 5244, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15488,7 +15488,7 @@ func TestPhp7(t *testing.T) { EndPos: 5249, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15529,7 +15529,7 @@ func TestPhp7(t *testing.T) { EndPos: 5255, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15550,7 +15550,7 @@ func TestPhp7(t *testing.T) { EndPos: 5260, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15591,7 +15591,7 @@ func TestPhp7(t *testing.T) { EndPos: 5266, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15612,7 +15612,7 @@ func TestPhp7(t *testing.T) { EndPos: 5272, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15653,7 +15653,7 @@ func TestPhp7(t *testing.T) { EndPos: 5278, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15674,7 +15674,7 @@ func TestPhp7(t *testing.T) { EndPos: 5284, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15715,7 +15715,7 @@ func TestPhp7(t *testing.T) { EndPos: 5290, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15736,7 +15736,7 @@ func TestPhp7(t *testing.T) { EndPos: 5296, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15777,7 +15777,7 @@ func TestPhp7(t *testing.T) { EndPos: 5302, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15798,7 +15798,7 @@ func TestPhp7(t *testing.T) { EndPos: 5307, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15839,7 +15839,7 @@ func TestPhp7(t *testing.T) { EndPos: 5313, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15860,7 +15860,7 @@ func TestPhp7(t *testing.T) { EndPos: 5318, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15901,7 +15901,7 @@ func TestPhp7(t *testing.T) { EndPos: 5324, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15922,7 +15922,7 @@ func TestPhp7(t *testing.T) { EndPos: 5330, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -15963,7 +15963,7 @@ func TestPhp7(t *testing.T) { EndPos: 5336, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -15984,7 +15984,7 @@ func TestPhp7(t *testing.T) { EndPos: 5342, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16025,7 +16025,7 @@ func TestPhp7(t *testing.T) { EndPos: 5348, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16046,7 +16046,7 @@ func TestPhp7(t *testing.T) { EndPos: 5353, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16087,7 +16087,7 @@ func TestPhp7(t *testing.T) { EndPos: 5359, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16108,7 +16108,7 @@ func TestPhp7(t *testing.T) { EndPos: 5366, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16149,7 +16149,7 @@ func TestPhp7(t *testing.T) { EndPos: 5372, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16170,7 +16170,7 @@ func TestPhp7(t *testing.T) { EndPos: 5379, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16211,7 +16211,7 @@ func TestPhp7(t *testing.T) { EndPos: 5385, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16232,7 +16232,7 @@ func TestPhp7(t *testing.T) { EndPos: 5391, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16273,7 +16273,7 @@ func TestPhp7(t *testing.T) { EndPos: 5397, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16294,7 +16294,7 @@ func TestPhp7(t *testing.T) { EndPos: 5404, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16335,7 +16335,7 @@ func TestPhp7(t *testing.T) { EndPos: 5410, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16356,7 +16356,7 @@ func TestPhp7(t *testing.T) { EndPos: 5415, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16397,7 +16397,7 @@ func TestPhp7(t *testing.T) { EndPos: 5421, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16418,7 +16418,7 @@ func TestPhp7(t *testing.T) { EndPos: 5426, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16459,7 +16459,7 @@ func TestPhp7(t *testing.T) { EndPos: 5432, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16480,7 +16480,7 @@ func TestPhp7(t *testing.T) { EndPos: 5437, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16521,7 +16521,7 @@ func TestPhp7(t *testing.T) { EndPos: 5443, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16542,7 +16542,7 @@ func TestPhp7(t *testing.T) { EndPos: 5449, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16583,7 +16583,7 @@ func TestPhp7(t *testing.T) { EndPos: 5455, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16604,7 +16604,7 @@ func TestPhp7(t *testing.T) { EndPos: 5462, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16645,7 +16645,7 @@ func TestPhp7(t *testing.T) { EndPos: 5468, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16666,7 +16666,7 @@ func TestPhp7(t *testing.T) { EndPos: 5473, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16707,7 +16707,7 @@ func TestPhp7(t *testing.T) { EndPos: 5479, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16728,7 +16728,7 @@ func TestPhp7(t *testing.T) { EndPos: 5485, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16769,7 +16769,7 @@ func TestPhp7(t *testing.T) { EndPos: 5491, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16790,7 +16790,7 @@ func TestPhp7(t *testing.T) { EndPos: 5497, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16831,7 +16831,7 @@ func TestPhp7(t *testing.T) { EndPos: 5503, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16852,7 +16852,7 @@ func TestPhp7(t *testing.T) { EndPos: 5509, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16893,7 +16893,7 @@ func TestPhp7(t *testing.T) { EndPos: 5515, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16914,7 +16914,7 @@ func TestPhp7(t *testing.T) { EndPos: 5521, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -16955,7 +16955,7 @@ func TestPhp7(t *testing.T) { EndPos: 5527, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -16976,7 +16976,7 @@ func TestPhp7(t *testing.T) { EndPos: 5532, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17017,7 +17017,7 @@ func TestPhp7(t *testing.T) { EndPos: 5538, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Right: &ast.ExprVariable{ @@ -17038,7 +17038,7 @@ func TestPhp7(t *testing.T) { EndPos: 5545, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17079,7 +17079,7 @@ func TestPhp7(t *testing.T) { EndPos: 5552, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17100,7 +17100,7 @@ func TestPhp7(t *testing.T) { EndPos: 5558, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17141,7 +17141,7 @@ func TestPhp7(t *testing.T) { EndPos: 5564, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17162,7 +17162,7 @@ func TestPhp7(t *testing.T) { EndPos: 5569, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17203,7 +17203,7 @@ func TestPhp7(t *testing.T) { EndPos: 5575, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17224,7 +17224,7 @@ func TestPhp7(t *testing.T) { EndPos: 5581, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17265,7 +17265,7 @@ func TestPhp7(t *testing.T) { EndPos: 5587, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17286,7 +17286,7 @@ func TestPhp7(t *testing.T) { EndPos: 5593, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17327,7 +17327,7 @@ func TestPhp7(t *testing.T) { EndPos: 5599, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17348,7 +17348,7 @@ func TestPhp7(t *testing.T) { EndPos: 5605, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17389,7 +17389,7 @@ func TestPhp7(t *testing.T) { EndPos: 5611, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17410,7 +17410,7 @@ func TestPhp7(t *testing.T) { EndPos: 5617, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17451,7 +17451,7 @@ func TestPhp7(t *testing.T) { EndPos: 5623, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17472,7 +17472,7 @@ func TestPhp7(t *testing.T) { EndPos: 5629, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17513,7 +17513,7 @@ func TestPhp7(t *testing.T) { EndPos: 5635, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17534,7 +17534,7 @@ func TestPhp7(t *testing.T) { EndPos: 5641, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17575,7 +17575,7 @@ func TestPhp7(t *testing.T) { EndPos: 5647, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17596,7 +17596,7 @@ func TestPhp7(t *testing.T) { EndPos: 5653, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17637,7 +17637,7 @@ func TestPhp7(t *testing.T) { EndPos: 5659, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17658,7 +17658,7 @@ func TestPhp7(t *testing.T) { EndPos: 5665, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17699,7 +17699,7 @@ func TestPhp7(t *testing.T) { EndPos: 5671, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17720,7 +17720,7 @@ func TestPhp7(t *testing.T) { EndPos: 5677, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17761,7 +17761,7 @@ func TestPhp7(t *testing.T) { EndPos: 5683, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17782,7 +17782,7 @@ func TestPhp7(t *testing.T) { EndPos: 5690, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17823,7 +17823,7 @@ func TestPhp7(t *testing.T) { EndPos: 5696, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17844,7 +17844,7 @@ func TestPhp7(t *testing.T) { EndPos: 5703, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -17885,7 +17885,7 @@ func TestPhp7(t *testing.T) { EndPos: 5709, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, Expr: &ast.ExprVariable{ @@ -17906,7 +17906,7 @@ func TestPhp7(t *testing.T) { EndPos: 5716, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18095,7 +18095,7 @@ func TestPhp7(t *testing.T) { EndPos: 5794, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18128,7 +18128,7 @@ func TestPhp7(t *testing.T) { EndPos: 5801, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18276,7 +18276,7 @@ func TestPhp7(t *testing.T) { EndPos: 5927, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, DefaultValue: &ast.ScalarLnumber{ @@ -18320,7 +18320,7 @@ func TestPhp7(t *testing.T) { EndPos: 5938, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, DefaultValue: &ast.ScalarLnumber{ @@ -18364,7 +18364,7 @@ func TestPhp7(t *testing.T) { EndPos: 5946, }, }, - Value: []byte("c"), + Value: []byte("$c"), }, }, DefaultValue: &ast.ScalarLnumber{ @@ -18444,7 +18444,7 @@ func TestPhp7(t *testing.T) { EndPos: 5978, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -18488,7 +18488,7 @@ func TestPhp7(t *testing.T) { EndPos: 5991, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -18857,7 +18857,7 @@ func TestPhp7(t *testing.T) { EndPos: 6142, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -19090,7 +19090,7 @@ func TestPhp7(t *testing.T) { EndPos: 6183, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, }, @@ -19228,7 +19228,7 @@ func TestPhp7(t *testing.T) { EndPos: 6212, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, ArgumentList: &ast.ArgumentList{ @@ -19311,7 +19311,7 @@ func TestPhp7(t *testing.T) { EndPos: 6228, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, Dim: &ast.ScalarLnumber{ @@ -19374,7 +19374,7 @@ func TestPhp7(t *testing.T) { EndPos: 6245, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.ExprVariable{ @@ -19395,7 +19395,7 @@ func TestPhp7(t *testing.T) { EndPos: 6251, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, }, @@ -19436,7 +19436,7 @@ func TestPhp7(t *testing.T) { EndPos: 6259, }, }, - Value: []byte("foo"), + Value: []byte("$foo"), }, }, Property: &ast.ExprArrayDimFetch{ @@ -19466,7 +19466,7 @@ func TestPhp7(t *testing.T) { EndPos: 6266, }, }, - Value: []byte("bar"), + Value: []byte("$bar"), }, }, Dim: &ast.ScalarLnumber{ @@ -19549,7 +19549,7 @@ func TestPhp7(t *testing.T) { EndPos: 6282, }, }, - Value: []byte("a"), + Value: []byte("$a"), }, }, }, @@ -19611,7 +19611,7 @@ func TestPhp7(t *testing.T) { EndPos: 6294, }, }, - Value: []byte("b"), + Value: []byte("$b"), }, }, }, @@ -19945,7 +19945,7 @@ CAD; EndPos: 85, }, }, - Value: []byte("world"), + Value: []byte("$world"), }, }, &ast.ScalarEncapsedStringPart{ diff --git a/pkg/printer/printer.go b/pkg/printer/printer.go index 421db21..09399dd 100644 --- a/pkg/printer/printer.go +++ b/pkg/printer/printer.go @@ -1,10 +1,11 @@ package printer import ( - "github.com/z7zmey/php-parser/pkg/ast" - "github.com/z7zmey/php-parser/pkg/token" "io" "strings" + + "github.com/z7zmey/php-parser/pkg/ast" + "github.com/z7zmey/php-parser/pkg/token" ) type printerState int @@ -1860,7 +1861,7 @@ func (p *Printer) printExprVariable(n ast.Vertex) { p.printFreeFloating(nn, token.Start) p.printFreeFloating(nn, token.Dollar) - if nn.GetNode().Tokens.IsEmpty() { + if _, ok := nn.VarName.(*ast.Identifier); !ok { io.WriteString(p.w, "$") } diff --git a/pkg/printer/printer_parsed_php5_test.go b/pkg/printer/printer_parsed_php5_test.go index e632f11..2257614 100644 --- a/pkg/printer/printer_parsed_php5_test.go +++ b/pkg/printer/printer_parsed_php5_test.go @@ -1084,7 +1084,7 @@ func TestParseAndPrintPhp5Shebang(t *testing.T) { test