From cb4b4e69c44d84342e245d6a9a4cf32aaa2c915c Mon Sep 17 00:00:00 2001 From: Vadym Slizov Date: Mon, 28 Dec 2020 23:01:02 +0200 Subject: [PATCH] refactoring: fix naming --- internal/php5/parser_test.go | 1096 +++++++------- internal/php5/php5.go | Bin 265606 -> 265200 bytes internal/php5/php5.y | 232 +-- internal/php7/parser_test.go | 1304 ++++++++--------- internal/php7/php7.go | Bin 221511 -> 221316 bytes internal/php7/php7.y | 184 +-- pkg/ast/ast.go | 10 +- pkg/ast/node.go | 96 +- pkg/visitor/dumper/dumper.go | 86 +- pkg/visitor/dumper/dumper_test.go | 2 +- pkg/visitor/formatter/formatter.go | 76 +- pkg/visitor/formatter/formatter_test.go | 728 ++++----- pkg/visitor/nsresolver/namespace_resolver.go | 44 +- .../nsresolver/namespace_resolver_test.go | 296 ++-- pkg/visitor/null.go | 10 +- pkg/visitor/printer/printer.go | 74 +- pkg/visitor/printer/printer_php7_test.go | 4 +- pkg/visitor/printer/printer_test.go | 736 +++++----- pkg/visitor/traverser/traverser.go | 56 +- 19 files changed, 2517 insertions(+), 2517 deletions(-) diff --git a/internal/php5/parser_test.go b/internal/php5/parser_test.go index ad51d2f..6c1dfde 100644 --- a/internal/php5/parser_test.go +++ b/internal/php5/parser_test.go @@ -38,7 +38,7 @@ func TestIdentifier(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -133,7 +133,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 5, EndPos: 19, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -141,7 +141,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 8, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -194,7 +194,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 9, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 2, @@ -209,7 +209,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -266,7 +266,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -343,7 +343,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 23, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -385,7 +385,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 28, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 3, @@ -400,7 +400,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -457,7 +457,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 35, EndPos: 37, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -534,7 +534,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 42, EndPos: 46, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -605,7 +605,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 52, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 4, @@ -620,7 +620,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 52, EndPos: 54, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -677,7 +677,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -747,7 +747,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 66, EndPos: 85, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -755,7 +755,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 69, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -827,7 +827,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 75, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 5, @@ -842,7 +842,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 75, EndPos: 77, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -899,7 +899,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 82, EndPos: 84, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -976,7 +976,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 89, EndPos: 93, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1047,7 +1047,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 99, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 6, @@ -1062,7 +1062,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 99, EndPos: 101, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1119,7 +1119,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 106, EndPos: 108, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1211,7 +1211,7 @@ func TestPhp5ArgumentNode(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1219,7 +1219,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 120, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1262,7 +1262,7 @@ func TestPhp5ArgumentNode(t *testing.T) { EndPos: 121, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 7, @@ -1277,7 +1277,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 121, EndPos: 123, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1334,7 +1334,7 @@ func TestPhp5ArgumentNode(t *testing.T) { StartPos: 128, EndPos: 130, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1455,7 +1455,7 @@ func TestPhp5ParameterNode(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1504,7 +1504,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 18, EndPos: 31, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1512,7 +1512,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 21, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1540,7 +1540,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 22, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1589,7 +1589,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 27, EndPos: 31, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1597,7 +1597,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 31, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1627,7 +1627,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 33, EndPos: 45, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1635,7 +1635,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 36, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1707,7 +1707,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 41, EndPos: 45, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1814,7 +1814,7 @@ func TestPhp5ParameterNode(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -1918,7 +1918,7 @@ func TestPhp5ParameterNode(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -1967,7 +1967,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 83, EndPos: 96, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -1975,7 +1975,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 86, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2003,7 +2003,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 87, EndPos: 91, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2052,7 +2052,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 92, EndPos: 96, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2060,7 +2060,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 96, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2090,7 +2090,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 98, EndPos: 110, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2098,7 +2098,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 101, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2170,7 +2170,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 106, EndPos: 110, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2322,7 +2322,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 127, EndPos: 140, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2330,7 +2330,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 130, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2358,7 +2358,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 131, EndPos: 135, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2407,7 +2407,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 136, EndPos: 140, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2415,7 +2415,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 140, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2445,7 +2445,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 142, EndPos: 154, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2453,7 +2453,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 145, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2525,7 +2525,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 150, EndPos: 154, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2690,7 +2690,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 178, EndPos: 191, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2698,7 +2698,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 181, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2726,7 +2726,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 182, EndPos: 186, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2775,7 +2775,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 187, EndPos: 191, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2783,7 +2783,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 191, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2813,7 +2813,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 193, EndPos: 205, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2821,7 +2821,7 @@ func TestPhp5ParameterNode(t *testing.T) { EndPos: 196, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -2893,7 +2893,7 @@ func TestPhp5ParameterNode(t *testing.T) { StartPos: 201, EndPos: 205, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3074,7 +3074,7 @@ func TestName(t *testing.T) { StartPos: 3, EndPos: 8, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3082,7 +3082,7 @@ func TestName(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3233,7 +3233,7 @@ func TestFullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3372,7 +3372,7 @@ func TestRelative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3522,7 +3522,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3660,7 +3660,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3798,7 +3798,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3955,7 +3955,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3999,7 +3999,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4155,7 +4155,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4185,7 +4185,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { EndPos: 15, }, }, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4352,7 +4352,7 @@ func TestScalarEncapsed_DollarOpenCurlyBraces(t *testing.T) { EndPos: 11, }, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4510,7 +4510,7 @@ func TestScalarEncapsed_DollarOpenCurlyBracesDimNumber(t *testing.T) { EndPos: 11, }, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4721,7 +4721,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { StartPos: 10, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4923,7 +4923,7 @@ LBL; StartPos: 15, EndPos: 19, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -5096,7 +5096,7 @@ LBL; StartPos: 17, EndPos: 21, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -6682,7 +6682,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -6870,7 +6870,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -6990,7 +6990,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -7181,7 +7181,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7433,7 +7433,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7553,7 +7553,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -7661,7 +7661,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 40, EndPos: 42, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -7868,7 +7868,7 @@ func TestStmtClassConstList_WithoutModifiers(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8233,7 +8233,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8304,7 +8304,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8482,7 +8482,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8617,7 +8617,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8772,7 +8772,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8950,7 +8950,7 @@ func TestStmtClassMethod_Php5ClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9107,7 +9107,7 @@ func TestStmtClassMethod_Php5ClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9306,7 +9306,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9441,7 +9441,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9596,7 +9596,7 @@ func TestStmtClass_SimpleClass(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9755,7 +9755,7 @@ func TestStmtClass_AbstractClass(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9914,7 +9914,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9967,7 +9967,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { }, }, }, - Extends: &ast.NameName{ + Extends: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9975,7 +9975,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { EndPos: 30, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10148,7 +10148,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10202,7 +10202,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { }, }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10210,7 +10210,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10384,7 +10384,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10438,7 +10438,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10446,7 +10446,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10479,7 +10479,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10487,7 +10487,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { EndPos: 38, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -12401,7 +12401,7 @@ func TestStmtEcho(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -12574,7 +12574,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -12840,7 +12840,7 @@ func TestStmtFor(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -12940,7 +12940,7 @@ func TestStmtFor(t *testing.T) { StartPos: 15, EndPos: 17, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13052,7 +13052,7 @@ func TestStmtFor(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13109,7 +13109,7 @@ func TestStmtFor(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13313,7 +13313,7 @@ func TestStmtFor_Alt(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13425,7 +13425,7 @@ func TestStmtFor_Alt(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13633,7 +13633,7 @@ func TestStmtForeach(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13682,7 +13682,7 @@ func TestStmtForeach(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13906,7 +13906,7 @@ func TestStmtForeach_Expr(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14080,7 +14080,7 @@ func TestStmtForeach_Alt(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14129,7 +14129,7 @@ func TestStmtForeach_Alt(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14325,7 +14325,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14374,7 +14374,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14435,7 +14435,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14659,7 +14659,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14720,7 +14720,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14894,7 +14894,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14943,7 +14943,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15026,7 +15026,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15188,7 +15188,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15237,7 +15237,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15345,7 +15345,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15491,7 +15491,7 @@ func TestStmtFunction(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15637,7 +15637,7 @@ func TestStmtFunction_Return(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15812,7 +15812,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15887,7 +15887,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15965,7 +15965,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 35, EndPos: 37, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16068,7 +16068,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 47, EndPos: 49, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16206,7 +16206,7 @@ func TestStmtFunction_Ref(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16408,7 +16408,7 @@ func TestStmtGlobal(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16521,7 +16521,7 @@ func TestStmtGlobal_Vars(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16560,7 +16560,7 @@ func TestStmtGlobal_Vars(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16621,14 +16621,14 @@ func TestStmtGlobal_Vars(t *testing.T) { }, }, }, - VarName: &ast.ExprVariable{ + Name: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 19, EndPos: 21, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16688,14 +16688,14 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 25, }, }, - VarName: &ast.ExprFunctionCall{ + Name: &ast.ExprFunctionCall{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 25, EndPos: 30, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16703,7 +16703,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16829,7 +16829,7 @@ func TestStmtGotoLabel(t *testing.T) { StartPos: 3, EndPos: 5, }, - LabelName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17134,7 +17134,7 @@ func TestStmtIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17296,7 +17296,7 @@ func TestStmtIf_ElseIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17426,7 +17426,7 @@ func TestStmtIf_ElseIf(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17590,7 +17590,7 @@ func TestStmtIf_Else(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17823,7 +17823,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17953,7 +17953,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18083,7 +18083,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 37, EndPos: 39, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18318,7 +18318,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18448,7 +18448,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18608,7 +18608,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 38, EndPos: 40, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18895,7 +18895,7 @@ func TestStmtInterface(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19021,7 +19021,7 @@ func TestStmtInterface_Extend(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19075,7 +19075,7 @@ func TestStmtInterface_Extend(t *testing.T) { }, }, Extends: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19083,7 +19083,7 @@ func TestStmtInterface_Extend(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19212,7 +19212,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19266,7 +19266,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, Extends: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19274,7 +19274,7 @@ func TestStmtInterface_Extends(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19307,7 +19307,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19315,7 +19315,7 @@ func TestStmtInterface_Extends(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19456,7 +19456,7 @@ func TestStmtNamespace(t *testing.T) { }, }, }, - Name: &ast.NameName{ + Name: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19464,7 +19464,7 @@ func TestStmtNamespace(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19569,7 +19569,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { }, }, }, - Name: &ast.NameName{ + Name: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19577,7 +19577,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19800,7 +19800,7 @@ func TestStmtProperty(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19882,7 +19882,7 @@ func TestStmtProperty(t *testing.T) { Value: []byte("var"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -19897,7 +19897,7 @@ func TestStmtProperty(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20015,7 +20015,7 @@ func TestStmtProperty_Properties(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20128,7 +20128,7 @@ func TestStmtProperty_Properties(t *testing.T) { Value: []byte("static"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -20143,7 +20143,7 @@ func TestStmtProperty_Properties(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20190,7 +20190,7 @@ func TestStmtProperty_Properties(t *testing.T) { StartPos: 32, EndPos: 34, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20373,7 +20373,7 @@ func TestStmtProperty_Properties2(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20486,7 +20486,7 @@ func TestStmtProperty_Properties2(t *testing.T) { Value: []byte("static"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -20501,7 +20501,7 @@ func TestStmtProperty_Properties2(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20601,7 +20601,7 @@ func TestStmtProperty_Properties2(t *testing.T) { StartPos: 36, EndPos: 38, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20746,7 +20746,7 @@ func TestStmtStaticVar(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20867,7 +20867,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20914,7 +20914,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21100,7 +21100,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21200,7 +21200,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21395,7 +21395,7 @@ func TestStmtSwitch(t *testing.T) { }, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -21794,7 +21794,7 @@ func TestStmtSwitch_Semicolon(t *testing.T) { EndPos: 18, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -22184,7 +22184,7 @@ func TestStmtSwitch_Alt(t *testing.T) { }, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -22552,7 +22552,7 @@ func TestStmtSwitch_AltSemicolon(t *testing.T) { EndPos: 18, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -22799,7 +22799,7 @@ func TestStmtThrow(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22903,7 +22903,7 @@ func TestStmtTrait(t *testing.T) { }, }, }, - TraitName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23029,7 +23029,7 @@ func TestStmtTraitUse(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23113,7 +23113,7 @@ func TestStmtTraitUse(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23121,7 +23121,7 @@ func TestStmtTraitUse(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23251,7 +23251,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23335,7 +23335,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23343,7 +23343,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23376,7 +23376,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23384,7 +23384,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23526,7 +23526,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23610,7 +23610,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23618,7 +23618,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23651,7 +23651,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23659,7 +23659,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23823,7 +23823,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23907,7 +23907,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23915,7 +23915,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23948,7 +23948,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23956,7 +23956,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24236,7 +24236,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24320,7 +24320,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24328,7 +24328,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24361,7 +24361,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24369,7 +24369,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24680,7 +24680,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24764,7 +24764,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24772,7 +24772,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24805,7 +24805,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24813,7 +24813,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24889,7 +24889,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { StartPos: 30, EndPos: 58, }, - Trait: &ast.NameName{ + Trait: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24897,7 +24897,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24982,7 +24982,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, Insteadof: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24990,7 +24990,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 52, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25023,7 +25023,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25031,7 +25031,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 58, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25095,7 +25095,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { StartPos: 60, EndPos: 75, }, - Trait: &ast.NameName{ + Trait: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25103,7 +25103,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 63, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25522,7 +25522,7 @@ func TestStmtTry_TryCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25530,7 +25530,7 @@ func TestStmtTry_TryCatch(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25559,7 +25559,7 @@ func TestStmtTry_TryCatch(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25785,7 +25785,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25793,7 +25793,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25822,7 +25822,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25950,7 +25950,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25958,7 +25958,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 59, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -25987,7 +25987,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { StartPos: 60, EndPos: 62, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -26213,7 +26213,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -26221,7 +26221,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -26250,7 +26250,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -26538,7 +26538,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26546,7 +26546,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 26, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26575,7 +26575,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26721,7 +26721,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26750,7 +26750,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26906,7 +26906,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26935,7 +26935,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 101, EndPos: 103, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27092,7 +27092,7 @@ func TestStmtUnset(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27213,7 +27213,7 @@ func TestStmtUnset_Vars(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27240,7 +27240,7 @@ func TestStmtUnset_Vars(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27328,7 +27328,7 @@ func TestStmtUse(t *testing.T) { EndPos: 11, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27367,15 +27367,15 @@ func TestStmtUse(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27383,7 +27383,7 @@ func TestStmtUse(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27451,7 +27451,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { EndPos: 12, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27490,8 +27490,8 @@ func TestStmtUse_FullyQualified(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27520,7 +27520,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27528,7 +27528,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { EndPos: 11, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27584,7 +27584,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { EndPos: 19, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27623,8 +27623,8 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27653,7 +27653,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27661,7 +27661,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { EndPos: 11, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27770,7 +27770,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 16, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27809,15 +27809,15 @@ func TestStmtUse_List(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27825,7 +27825,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27859,14 +27859,14 @@ func TestStmtUse_List(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 15, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27874,7 +27874,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27954,7 +27954,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 23, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27993,15 +27993,15 @@ func TestStmtUse_ListAlias(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28009,7 +28009,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28043,14 +28043,14 @@ func TestStmtUse_ListAlias(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 22, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28058,7 +28058,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28191,7 +28191,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 26, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28261,15 +28261,15 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, Value: []byte("function"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 16, EndPos: 19, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28277,7 +28277,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28311,7 +28311,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28340,7 +28340,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28348,7 +28348,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 25, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28416,7 +28416,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 40, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28486,15 +28486,15 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { }, Value: []byte("function"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 16, EndPos: 26, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28502,7 +28502,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28589,7 +28589,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { Value: []byte("foo"), }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28618,7 +28618,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28626,7 +28626,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 32, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28747,7 +28747,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 23, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28817,15 +28817,15 @@ func TestStmtUse_ListConstType(t *testing.T) { }, Value: []byte("const"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 13, EndPos: 16, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28833,7 +28833,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28867,7 +28867,7 @@ func TestStmtUse_ListConstType(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28896,7 +28896,7 @@ func TestStmtUse_ListConstType(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28904,7 +28904,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28972,7 +28972,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 37, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29042,15 +29042,15 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { }, Value: []byte("const"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 13, EndPos: 23, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29058,7 +29058,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29145,7 +29145,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { Value: []byte("foo"), }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29174,7 +29174,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29182,7 +29182,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 29, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30035,7 +30035,7 @@ func TestExprArrayDimFetch(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30178,7 +30178,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30711,7 +30711,7 @@ func TestExprArray_Items(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30853,7 +30853,7 @@ func TestExprBitwiseNot(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30960,7 +30960,7 @@ func TestExprBooleanNot(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31028,7 +31028,7 @@ func TestExprClassConstFetch(t *testing.T) { StartPos: 3, EndPos: 11, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31036,7 +31036,7 @@ func TestExprClassConstFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31089,7 +31089,7 @@ func TestExprClassConstFetch(t *testing.T) { EndPos: 8, }, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31207,7 +31207,7 @@ func TestExprClassConstFetch_Static(t *testing.T) { EndPos: 11, }, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31330,7 +31330,7 @@ func TestExprClone_Brackets(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31448,7 +31448,7 @@ func TestExprClone(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31706,7 +31706,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31741,7 +31741,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31841,7 +31841,7 @@ func TestExprClosure_Use(t *testing.T) { }, }, }, - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ Position: &position.Position{ StartLine: 1, @@ -31856,7 +31856,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31913,7 +31913,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32095,7 +32095,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32130,7 +32130,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32230,7 +32230,7 @@ func TestExprClosure_Use2(t *testing.T) { }, }, }, - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ Position: &position.Position{ StartLine: 1, @@ -32255,7 +32255,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 26, EndPos: 28, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32290,7 +32290,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32427,7 +32427,7 @@ func TestExprConstFetch(t *testing.T) { StartPos: 3, EndPos: 6, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32435,7 +32435,7 @@ func TestExprConstFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32576,7 +32576,7 @@ func TestExprConstFetch_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32685,7 +32685,7 @@ func TestExprConstFetch_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32803,7 +32803,7 @@ func TestExprEmpty(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32920,7 +32920,7 @@ func TestExprErrorSuppress(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33037,7 +33037,7 @@ func TestExprEval(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33344,7 +33344,7 @@ func TestExprExit_Expr(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33651,7 +33651,7 @@ func TestExprDie_Expr(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33729,7 +33729,7 @@ func TestExprFunctionCall(t *testing.T) { StartPos: 3, EndPos: 8, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33737,7 +33737,7 @@ func TestExprFunctionCall(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33898,7 +33898,7 @@ func TestExprFunctionCall_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34027,7 +34027,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34058,7 +34058,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -34161,7 +34161,7 @@ func TestExprFunctionCall_Var(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34213,7 +34213,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -34238,14 +34238,14 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 13, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34338,7 +34338,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { StartPos: 3, EndPos: 15, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34346,7 +34346,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 7, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34399,7 +34399,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -34421,7 +34421,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34538,7 +34538,7 @@ func TestExprPostDec(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34645,7 +34645,7 @@ func TestExprPostInc(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34784,7 +34784,7 @@ func TestExprPreDec(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34891,7 +34891,7 @@ func TestExprPreInc(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34998,7 +34998,7 @@ func TestExprInclude(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35117,7 +35117,7 @@ func TestExprInclude_Once(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35236,7 +35236,7 @@ func TestExprRequire(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35355,7 +35355,7 @@ func TestExprRequire_Once(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35442,7 +35442,7 @@ func TestExprInstanceOf(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35506,7 +35506,7 @@ func TestExprInstanceOf(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35514,7 +35514,7 @@ func TestExprInstanceOf(t *testing.T) { EndPos: 20, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35602,7 +35602,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35706,7 +35706,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35782,7 +35782,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35876,7 +35876,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35995,7 +35995,7 @@ func TestExprIsset(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36124,7 +36124,7 @@ func TestExprIsset_Variables(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36151,7 +36151,7 @@ func TestExprIsset_Variables(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36346,7 +36346,7 @@ func TestExprList_Empty(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36490,7 +36490,7 @@ func TestExprList(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36552,7 +36552,7 @@ func TestExprList(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36703,7 +36703,7 @@ func TestExprList_ArrayIndex(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36786,7 +36786,7 @@ func TestExprList_ArrayIndex(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36965,7 +36965,7 @@ func TestExprList_List(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37040,7 +37040,7 @@ func TestExprList_List(t *testing.T) { StartPos: 20, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37185,7 +37185,7 @@ func TestExprList_EmptyItem(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37271,7 +37271,7 @@ func TestExprList_EmptyItem(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37417,7 +37417,7 @@ func TestExprList_EmptyItems(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37548,7 +37548,7 @@ func TestExprList_EmptyItems(t *testing.T) { StartPos: 20, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37635,7 +37635,7 @@ func TestExprMethodCall(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37806,7 +37806,7 @@ func TestExprNew(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37814,7 +37814,7 @@ func TestExprNew(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37967,7 +37967,7 @@ func TestExprNew_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38118,7 +38118,7 @@ func TestExprNew_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38263,7 +38263,7 @@ func TestExprPrint(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38351,7 +38351,7 @@ func TestExprPropertyFetch(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38403,7 +38403,7 @@ func TestExprPropertyFetch(t *testing.T) { EndPos: 7, }, }, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38529,7 +38529,7 @@ func TestExprShellExec(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38942,7 +38942,7 @@ func TestExprShortArray_Items(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39045,7 +39045,7 @@ func TestExprStaticCall(t *testing.T) { StartPos: 3, EndPos: 13, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39053,7 +39053,7 @@ func TestExprStaticCall(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39243,7 +39243,7 @@ func TestExprStaticCall_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39401,7 +39401,7 @@ func TestExprStaticCall_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39519,7 +39519,7 @@ func TestExprStaticCall_Var(t *testing.T) { StartPos: 3, EndPos: 14, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39527,7 +39527,7 @@ func TestExprStaticCall_Var(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39587,7 +39587,7 @@ func TestExprStaticCall_Var(t *testing.T) { StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39682,7 +39682,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39741,7 +39741,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39829,7 +39829,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { StartPos: 3, EndPos: 12, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39837,7 +39837,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39890,14 +39890,14 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 8, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40015,7 +40015,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40046,14 +40046,14 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { EndPos: 18, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 18, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40161,7 +40161,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40192,14 +40192,14 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { EndPos: 9, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40267,14 +40267,14 @@ func TestExprTernary(t *testing.T) { StartPos: 3, EndPos: 15, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40345,7 +40345,7 @@ func TestExprTernary(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40406,7 +40406,7 @@ func TestExprTernary(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40486,14 +40486,14 @@ func TestExprTernary_Simple(t *testing.T) { StartPos: 3, EndPos: 12, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40586,7 +40586,7 @@ func TestExprTernary_Simple(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40666,14 +40666,14 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 3, EndPos: 25, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40744,14 +40744,14 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 8, EndPos: 20, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40812,7 +40812,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40873,7 +40873,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40935,7 +40935,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 23, EndPos: 25, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41015,21 +41015,21 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 3, EndPos: 25, }, - Condition: &ast.ExprTernary{ + Cond: &ast.ExprTernary{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 15, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41100,7 +41100,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41161,7 +41161,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41223,7 +41223,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41284,7 +41284,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 23, EndPos: 25, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41403,7 +41403,7 @@ func TestExprUnaryMinus(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41510,7 +41510,7 @@ func TestExprUnaryPlus(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41578,7 +41578,7 @@ func TestExprVariable(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41699,14 +41699,14 @@ func TestExprVariable_Variable(t *testing.T) { }, }, }, - VarName: &ast.ExprVariable{ + Name: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41886,14 +41886,14 @@ func TestExprYield_Val(t *testing.T) { }, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42012,7 +42012,7 @@ func TestExprYield_KeyVal(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42066,14 +42066,14 @@ func TestExprYield_KeyVal(t *testing.T) { }, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 15, EndPos: 17, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42185,7 +42185,7 @@ func TestExprYield_Expr(t *testing.T) { }, }, }, - Value: &ast.ScalarLnumber{ + Val: &ast.ScalarLnumber{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42303,7 +42303,7 @@ func TestExprYield_KeyExpr(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42357,7 +42357,7 @@ func TestExprYield_KeyExpr(t *testing.T) { }, }, }, - Value: &ast.ScalarLnumber{ + Val: &ast.ScalarLnumber{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42461,7 +42461,7 @@ func TestExprAssign(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -42532,7 +42532,7 @@ func TestExprAssign(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -42597,7 +42597,7 @@ func TestExprAssign(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -42668,7 +42668,7 @@ func TestExprAssign(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -42733,7 +42733,7 @@ func TestExprAssign(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -42826,7 +42826,7 @@ func TestExprAssign(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -42834,7 +42834,7 @@ func TestExprAssign(t *testing.T) { EndPos: 41, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -42901,7 +42901,7 @@ func TestExprAssign(t *testing.T) { StartPos: 45, EndPos: 47, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -42994,7 +42994,7 @@ func TestExprAssign(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -43002,7 +43002,7 @@ func TestExprAssign(t *testing.T) { EndPos: 58, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -43045,7 +43045,7 @@ func TestExprAssign(t *testing.T) { EndPos: 59, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 5, @@ -43060,7 +43060,7 @@ func TestExprAssign(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -43126,7 +43126,7 @@ func TestExprAssign(t *testing.T) { StartPos: 66, EndPos: 68, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -43187,7 +43187,7 @@ func TestExprAssign(t *testing.T) { StartPos: 72, EndPos: 74, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -43252,7 +43252,7 @@ func TestExprAssign(t *testing.T) { StartPos: 78, EndPos: 80, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -43313,7 +43313,7 @@ func TestExprAssign(t *testing.T) { StartPos: 84, EndPos: 86, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -43378,7 +43378,7 @@ func TestExprAssign(t *testing.T) { StartPos: 90, EndPos: 92, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -43439,7 +43439,7 @@ func TestExprAssign(t *testing.T) { StartPos: 96, EndPos: 98, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -43504,7 +43504,7 @@ func TestExprAssign(t *testing.T) { StartPos: 102, EndPos: 104, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -43565,7 +43565,7 @@ func TestExprAssign(t *testing.T) { StartPos: 108, EndPos: 110, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -43630,7 +43630,7 @@ func TestExprAssign(t *testing.T) { StartPos: 114, EndPos: 116, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -43691,7 +43691,7 @@ func TestExprAssign(t *testing.T) { StartPos: 120, EndPos: 122, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -43756,7 +43756,7 @@ func TestExprAssign(t *testing.T) { StartPos: 126, EndPos: 128, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -43817,7 +43817,7 @@ func TestExprAssign(t *testing.T) { StartPos: 132, EndPos: 134, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -43882,7 +43882,7 @@ func TestExprAssign(t *testing.T) { StartPos: 138, EndPos: 140, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -43943,7 +43943,7 @@ func TestExprAssign(t *testing.T) { StartPos: 144, EndPos: 146, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -44008,7 +44008,7 @@ func TestExprAssign(t *testing.T) { StartPos: 150, EndPos: 152, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -44069,7 +44069,7 @@ func TestExprAssign(t *testing.T) { StartPos: 156, EndPos: 158, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -44134,7 +44134,7 @@ func TestExprAssign(t *testing.T) { StartPos: 162, EndPos: 164, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -44195,7 +44195,7 @@ func TestExprAssign(t *testing.T) { StartPos: 168, EndPos: 170, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -44260,7 +44260,7 @@ func TestExprAssign(t *testing.T) { StartPos: 174, EndPos: 176, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -44321,7 +44321,7 @@ func TestExprAssign(t *testing.T) { StartPos: 181, EndPos: 183, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -44386,7 +44386,7 @@ func TestExprAssign(t *testing.T) { StartPos: 187, EndPos: 189, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -44447,7 +44447,7 @@ func TestExprAssign(t *testing.T) { StartPos: 194, EndPos: 196, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -44512,7 +44512,7 @@ func TestExprAssign(t *testing.T) { StartPos: 200, EndPos: 202, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -44573,7 +44573,7 @@ func TestExprAssign(t *testing.T) { StartPos: 207, EndPos: 209, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -44687,7 +44687,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -44758,7 +44758,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -44823,7 +44823,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -44884,7 +44884,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 21, EndPos: 23, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -44949,7 +44949,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -45010,7 +45010,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 32, EndPos: 34, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -45075,7 +45075,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 38, EndPos: 40, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -45136,7 +45136,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 44, EndPos: 46, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -45201,7 +45201,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 50, EndPos: 52, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -45262,7 +45262,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 56, EndPos: 58, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -45327,7 +45327,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 62, EndPos: 64, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -45388,7 +45388,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 67, EndPos: 69, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -45453,7 +45453,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 73, EndPos: 75, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -45514,7 +45514,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 78, EndPos: 80, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -45579,7 +45579,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 84, EndPos: 86, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -45640,7 +45640,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 90, EndPos: 92, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -45705,7 +45705,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 96, EndPos: 98, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -45766,7 +45766,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 102, EndPos: 104, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -45831,7 +45831,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 108, EndPos: 110, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -45892,7 +45892,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 113, EndPos: 115, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -45957,7 +45957,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 119, EndPos: 121, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -46018,7 +46018,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 126, EndPos: 128, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -46083,7 +46083,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 132, EndPos: 134, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -46144,7 +46144,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 139, EndPos: 141, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -46209,7 +46209,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 145, EndPos: 147, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -46270,7 +46270,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 151, EndPos: 153, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -46335,7 +46335,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 157, EndPos: 159, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -46396,7 +46396,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 164, EndPos: 166, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -46461,7 +46461,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 170, EndPos: 172, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -46522,7 +46522,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 175, EndPos: 177, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -46587,7 +46587,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 181, EndPos: 183, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -46648,7 +46648,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 186, EndPos: 188, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -46713,7 +46713,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 192, EndPos: 194, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -46774,7 +46774,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 197, EndPos: 199, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -46839,7 +46839,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 203, EndPos: 205, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 19, EndLine: 19, @@ -46900,7 +46900,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 209, EndPos: 211, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 19, EndLine: 19, @@ -46965,7 +46965,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 215, EndPos: 217, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 20, EndLine: 20, @@ -47026,7 +47026,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 222, EndPos: 224, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 20, EndLine: 20, @@ -47091,7 +47091,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 228, EndPos: 230, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 21, EndLine: 21, @@ -47152,7 +47152,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 233, EndPos: 235, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 21, EndLine: 21, @@ -47217,7 +47217,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 239, EndPos: 241, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 22, EndLine: 22, @@ -47278,7 +47278,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 245, EndPos: 247, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 22, EndLine: 22, @@ -47343,7 +47343,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 251, EndPos: 253, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 23, EndLine: 23, @@ -47404,7 +47404,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 257, EndPos: 259, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 23, EndLine: 23, @@ -47469,7 +47469,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 263, EndPos: 265, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 24, EndLine: 24, @@ -47530,7 +47530,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 269, EndPos: 271, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 24, EndLine: 24, @@ -47595,7 +47595,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 275, EndPos: 277, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 25, EndLine: 25, @@ -47656,7 +47656,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 281, EndPos: 283, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 25, EndLine: 25, @@ -47721,7 +47721,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 287, EndPos: 289, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 26, EndLine: 26, @@ -47782,7 +47782,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 292, EndPos: 294, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 26, EndLine: 26, @@ -47914,7 +47914,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -47989,7 +47989,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -48064,7 +48064,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 39, EndPos: 41, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -48139,7 +48139,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 53, EndPos: 55, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -48214,7 +48214,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 66, EndPos: 68, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -48289,7 +48289,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 81, EndPos: 83, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -48364,7 +48364,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 92, EndPos: 94, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -48439,7 +48439,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 106, EndPos: 108, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -48514,7 +48514,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 120, EndPos: 122, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -48589,7 +48589,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 134, EndPos: 136, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -48664,7 +48664,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 147, EndPos: 149, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -49322,7 +49322,7 @@ CAD; StartPos: 79, EndPos: 85, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, diff --git a/internal/php5/php5.go b/internal/php5/php5.go index f93f178b08a189954f823aaf5bf7b5d3b0aa0eb0..b213c534b1e0b358971a8c5125a8c1b77da0c2fb 100644 GIT binary patch delta 2563 zcmbtVYfzMB6rOX=vcN72i^*MJ(FPS-TtJko3Fci)O|2vebG(3J2!lFm+JfVzUT73&w0-Co^SJe z=1w-39)P3a(hv?7kV_Vrtmk*9z)W6~2FE0E6eNJlz9b4Nkl!|75SJ|n3s-eg0+(9B zho|R5fNnw2vLg0vr2wuU2_w15iqpBq24?;y5=Zdr7+6WOa*Md(IL2~KEkts7G5T=Q z7`O`dyrEpshDlr+iJlytPH}uB5(D{826}MW&*;l-Hpu;7C&=P>XeQ2#g=j9=fV%P- z;LlYR=*|Th5X!Bi!JV_80&h_i7=XvDCogVJgxtF_bZnghOSO6g{eXKmM_e3spOHNih^qVmyE{DyD!Q+z=;bS-a(;C-NOIO=sKxf1Ya6C z?mP@*TN>_>=oOHe!XsNDo9FZ>30B9Go?DD)=CXD)$m);bxc7LiMUx;>q3agfIwqafU&@S04}bJrCZ!rKjG z;_#Qj#G$(&TuSTU_6UXUH3J26_%xg%=Pp1hI4q%DatjPHp$!s&cUaM%tv{-L`6bv4 ztlm`sn|FapCjJW50rpZvRoXxe8J=j38lYgYrj#G9_7hlJh0BTkQ!s+n_oKz07Q zDz`aQX<$z;k}I-omx*)FhGPDFY_f31ghfVx_EgoR>#udJRf< z74p|A8sXNT<1I;r^p#uR8$T$gHc)oJFikyofB8#e(hFA{AUyo{NX1`T51LbOT})AbL>U!GxUAoqQYxkt359Cpb=(1 zKq0dH5TzjR_y~u|(IaHlY0D6HtEcV4^|WNT3whsNq)GQYo2C5eetKP2{z4f8Je%4n zMpP?*b4*d4#<=6nTHc}|+7$Jb%U5WI-R=B~^!+5H>l$SZ?it=e+w?B5N^jCdABScV Z-F4#>{hE9xdG;-58=cD&Jl~{?`v=GIa5Vq` delta 2839 zcmbtWdr;JM5TD(><8d5t_~0erAv76^9-yWti1;WmWN=hQEgVid<5G~vk&k8!b;fEk zfvI6LE2&0P`$NW2)=VBYJ^rv1d#TgdXlm-1&6TC-jN12i2izSf)^vZ|+;{i0ug~sx zzvp7prfsI${m?pGJ{b@zn7=LR^)_9U}D!HvT{Kxq;bM! z2;qWD7-5)UFIi!$vN;_q`TZ;y&7F@b%}eJomWwW8I&ZT;I2Zl^(VV{ljJ#kBI5c0Q zxb|i3t3+wvOM|PSUN_~{R<>2q7`8-GB-fqCOplXQtr*Q67O453_MtK(1I|#0Pee|9 z9M(zmBvm@M6{<83Oaw@r~>n=fKKH)TSm zMqn)PpIPAOXRz7BF1J}Bf{#B5VO*aF-^tCX(1?8_`=ypRbD-1!Ier$D_6s*qeoJQm zoBTxO=NO2!P~I{ZO8e&SVeKQu8uBai?-S^OnQerARos`f@1=7Qd={e5vn{o+;GCrx z$Ia(xk1SjUb0$-vt%?&}xP&b)Vi4CNuHdr<9Li@a(7<_nfF<=q7!xocP87}%81zI< zd5IeH^4=IZY%WAoV+%z$W@C=T?SnkhPhVlHu9ngR@EYmoSJ@m+xqc89Q*ds%(_XdA zR$_OXH(sN?T#*99IR6xc%G6evnXJomR67~=QAR3a{#sG2?2K^Bdf02>t|53kNRgLs zE3;cU;&V)vgh-qWZdlqC8Z0ZL@Jr9p&96oU*SRo8aS_h-^Dt8aV{r<4WA#H!=FDQ8 zA&cWN+yhhL6WFx~+qr854&z@YPz<}~;%M1vMvEs_59A1&&Onh2O2TLiv{yMD_G+u7 zJ%USg0dwrm(v{Epbg8HHL0YRgdq0J8-69yrs$r4bSpvb@AcXPkeK3^wra-VXrQqU` z4@g{8X-yBUY8q#+r<-D3h;MoG7FC+vzfyM@&q#d{ZW$a>Y~W=4?umQmYO1p(B-SB(@R-`>WzeRXlHnrLQ|ffBgZ zshT(ZuIiDyQJpt1iL+elwkp|0@O3E4;W3bFK+S$~pFkURw9ikc*{ma9FTH4^95B$+ zy=ecMMAa0AI_-{gLo!a}j_HuarXjRdHiuKVu8&5PCM=O`4OuXRD=INS%ym=-I<+L$aDF{mq_v)=82*a~Rvs*jl^7#yw^35Jubc+; z|HSkz#mYDD&>MO``a3>QS5F%oQNI%03s-*LLFwp8qyC0c7uaZ!OxZ;l-Tu77?YrqQ z&y%EV?#Wlp^tG-J3(H!_>bVozGG?`m^F?=%vQV$pY2~y#5G6&2C{^bbMDmU{+TzKe zDUc#1x1F9E(d$^$vw5rco}G}j7s$KdPjJK~8tbwBBS?2l!Y(T!+_ox#XfEET)~Ly( zcEV9n57_D}G~1)qo)q=keJrnDRdd)ItmPVw3+z2f!C$o1G|*&;UN->-0(=_y5I}qI MfPh)t7NSf42hhRFtN;K2 diff --git a/internal/php5/php5.y b/internal/php5/php5.y index 54e00b5..41ef5e4 100644 --- a/internal/php5/php5.y +++ b/internal/php5/php5.y @@ -293,7 +293,7 @@ namespace_name: { $$ = &ParserSeparatedList{ Items: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: yylex.(*Parser).builder.NewTokenPosition($1), StringTkn: $1, Value: $1.Value, @@ -303,7 +303,7 @@ namespace_name: } | namespace_name T_NS_SEPARATOR T_STRING { - part := &ast.NameNamePart{ + part := &ast.NamePart{ Position: yylex.(*Parser).builder.NewTokenPosition($3), StringTkn: $3, Value: $3.Value, @@ -349,7 +349,7 @@ top_statement: $$ = &ast.StmtNamespace{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), NsTkn: $1, - Name: &ast.NameName{ + Name: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -362,7 +362,7 @@ top_statement: $$ = &ast.StmtNamespace{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $5), NsTkn: $1, - Name: &ast.NameName{ + Name: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -384,17 +384,17 @@ top_statement: } | T_USE use_declarations ';' { - $$ = &ast.StmtUse{ + $$ = &ast.StmtUseList{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), UseTkn: $1, - UseDeclarations: $2.(*ParserSeparatedList).Items, + Uses: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, SemiColonTkn: $3, } } | T_USE T_FUNCTION use_function_declarations ';' { - $$ = &ast.StmtUse{ + $$ = &ast.StmtUseList{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), UseTkn: $1, Type: &ast.Identifier{ @@ -402,14 +402,14 @@ top_statement: IdentifierTkn: $2, Value: $2.Value, }, - UseDeclarations: $3.(*ParserSeparatedList).Items, + Uses: $3.(*ParserSeparatedList).Items, SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } } | T_USE T_CONST use_const_declarations ';' { - $$ = &ast.StmtUse{ + $$ = &ast.StmtUseList{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), UseTkn: $1, Type: &ast.Identifier{ @@ -417,7 +417,7 @@ top_statement: IdentifierTkn: $2, Value: $2.Value, }, - UseDeclarations: $3.(*ParserSeparatedList).Items, + Uses: $3.(*ParserSeparatedList).Items, SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } @@ -449,9 +449,9 @@ use_declarations: use_declaration: namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -460,9 +460,9 @@ use_declaration: } | namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $3), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -477,10 +477,10 @@ use_declaration: } | T_NS_SEPARATOR namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokenNodeListPosition($1, $2.(*ParserSeparatedList).Items), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -489,10 +489,10 @@ use_declaration: } | T_NS_SEPARATOR namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -526,9 +526,9 @@ use_function_declarations: use_function_declaration: namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -537,9 +537,9 @@ use_function_declaration: } | namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $3), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -554,10 +554,10 @@ use_function_declaration: } | T_NS_SEPARATOR namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokenNodeListPosition($1, $2.(*ParserSeparatedList).Items), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -566,10 +566,10 @@ use_function_declaration: } | T_NS_SEPARATOR namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -603,9 +603,9 @@ use_const_declarations: use_const_declaration: namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -614,9 +614,9 @@ use_const_declaration: } | namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $3), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -631,10 +631,10 @@ use_const_declaration: } | T_NS_SEPARATOR namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokenNodeListPosition($1, $2.(*ParserSeparatedList).Items), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -643,10 +643,10 @@ use_const_declaration: } | T_NS_SEPARATOR namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), NsSeparatorTkn: $1, - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -755,7 +755,7 @@ statement: { $$ = &ast.StmtLabel{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $2), - LabelName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -1115,7 +1115,7 @@ catch_statement: Types: []ast.Vertex{$3}, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -1179,7 +1179,7 @@ additional_catch: Types: []ast.Vertex{$3}, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -1259,7 +1259,7 @@ unticked_function_declaration_statement: Position: yylex.(*Parser).builder.NewTokensPosition($1, $9), FunctionTkn: $1, AmpersandTkn: $2, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -1287,7 +1287,7 @@ unticked_class_declaration_statement: } n.Position = yylex.(*Parser).builder.NewNodeTokenPosition($1, $7) - n.ClassName = className + n.Name = className n.OpenCurlyBracketTkn = $5 n.Stmts = $6 n.CloseCurlyBracketTkn = $7 @@ -1310,7 +1310,7 @@ unticked_class_declaration_statement: } n.Position = yylex.(*Parser).builder.NewNodeTokenPosition($1, $7) - n.TraitName = traitName + n.Name = traitName n.OpenCurlyBracketTkn = $5 n.Stmts = $6 n.CloseCurlyBracketTkn = $7 @@ -1331,7 +1331,7 @@ unticked_class_declaration_statement: iface := &ast.StmtInterface{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $6), InterfaceTkn: $1, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -1631,7 +1631,7 @@ switch_case_list: $$ = &ast.StmtSwitch{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), OpenCurlyBracketTkn: $1, - CaseList: $2, + Cases: $2, CloseCurlyBracketTkn: $3, } } @@ -1641,7 +1641,7 @@ switch_case_list: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), OpenCurlyBracketTkn: $1, CaseSeparatorTkn: $2, - CaseList: $3, + Cases: $3, CloseCurlyBracketTkn: $4, } } @@ -1650,7 +1650,7 @@ switch_case_list: $$ = &ast.StmtSwitch{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), ColonTkn: $1, - CaseList: $2, + Cases: $2, EndSwitchTkn: $3, SemiColonTkn: $4, } @@ -1661,7 +1661,7 @@ switch_case_list: Position: yylex.(*Parser).builder.NewTokensPosition($1, $5), ColonTkn: $1, CaseSeparatorTkn: $2, - CaseList: $3, + Cases: $3, EndSwitchTkn: $4, SemiColonTkn: $5, } @@ -1857,7 +1857,7 @@ parameter: VariadicTkn: $3, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -1883,7 +1883,7 @@ parameter: VariadicTkn: $3, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -2030,7 +2030,7 @@ global_var: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2042,7 +2042,7 @@ global_var: $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2), DollarTkn: $1, - VarName: $2, + Name: $2, } } | '$' '{' expr '}' @@ -2051,7 +2051,7 @@ global_var: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), DollarTkn: $1, OpenCurlyBracketTkn: $2, - VarName: $3, + Name: $3, CloseCurlyBracketTkn: $4, } } @@ -2065,7 +2065,7 @@ static_var_list: Position: yylex.(*Parser).builder.NewTokenPosition($3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($3), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -2082,7 +2082,7 @@ static_var_list: Position: yylex.(*Parser).builder.NewTokenNodePosition($3, $5), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($3), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -2103,7 +2103,7 @@ static_var_list: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2121,7 +2121,7 @@ static_var_list: Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2154,7 +2154,7 @@ class_statement: $$ = &ast.StmtPropertyList{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1, $3), Modifiers: $1, - Properties: $2.(*ParserSeparatedList).Items, + Props: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, SemiColonTkn: $3, } @@ -2181,7 +2181,7 @@ class_statement: Modifiers: $1, FunctionTkn: $2, AmpersandTkn: $3, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -2512,7 +2512,7 @@ class_variable_declaration: Position: yylex.(*Parser).builder.NewTokenPosition($3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($3), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -2531,7 +2531,7 @@ class_variable_declaration: Position: yylex.(*Parser).builder.NewTokenNodePosition($3, $5), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($3), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -2554,7 +2554,7 @@ class_variable_declaration: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2573,7 +2573,7 @@ class_variable_declaration: Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2744,7 +2744,7 @@ new_expr: NewTkn: $1, Class: $2, OpenParenthesisTkn: $3.(*ArgumentList).OpenParenthesisTkn, - Arguments: $3.(*ArgumentList).Arguments, + Args: $3.(*ArgumentList).Arguments, SeparatorTkns: $3.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ArgumentList).CloseParenthesisTkn, } @@ -2802,7 +2802,7 @@ expr_without_variable: NewTkn: $4, Class: $5, OpenParenthesisTkn: $6.(*ArgumentList).OpenParenthesisTkn, - Arguments: $6.(*ArgumentList).Arguments, + Args: $6.(*ArgumentList).Arguments, SeparatorTkns: $6.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $6.(*ArgumentList).CloseParenthesisTkn, } @@ -3281,7 +3281,7 @@ expr_without_variable: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $5), - Condition: $1, + Cond: $1, QuestionTkn: $2, IfTrue: $3, ColonTkn: $4, @@ -3292,7 +3292,7 @@ expr_without_variable: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $4), - Condition: $1, + Cond: $1, QuestionTkn: $2, ColonTkn: $3, IfFalse: $4, @@ -3462,7 +3462,7 @@ yield_expr: $$ = &ast.ExprYield{ Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2), YieldTkn: $1, - Value: $2, + Val: $2, } } | T_YIELD variable @@ -3470,7 +3470,7 @@ yield_expr: $$ = &ast.ExprYield{ Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2), YieldTkn: $1, - Value: $2, + Val: $2, } } | T_YIELD expr T_DOUBLE_ARROW expr_without_variable @@ -3480,7 +3480,7 @@ yield_expr: YieldTkn: $1, Key: $2, DoubleArrowTkn: $3, - Value: $4, + Val: $4, } } | T_YIELD expr T_DOUBLE_ARROW variable @@ -3490,7 +3490,7 @@ yield_expr: YieldTkn: $1, Key: $2, DoubleArrowTkn: $3, - Value: $4, + Val: $4, } } ; @@ -3583,7 +3583,7 @@ lexical_vars: $$ = &ast.ExprClosure{ UseTkn: $1, UseOpenParenthesisTkn: $2, - Use: $3.(*ParserSeparatedList).Items, + Uses: $3.(*ParserSeparatedList).Items, UseSeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, UseCloseParenthesisTkn: $4, } @@ -3597,7 +3597,7 @@ lexical_var_list: Position: yylex.(*Parser).builder.NewTokenPosition($3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($3), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -3617,7 +3617,7 @@ lexical_var_list: AmpersandTkn: $3, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -3636,7 +3636,7 @@ lexical_var_list: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -3655,7 +3655,7 @@ lexical_var_list: AmpersandTkn: $1, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($2), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -3674,13 +3674,13 @@ function_call: { $$ = &ast.ExprFunctionCall{ Position: yylex.(*Parser).builder.NewNodeListNodePosition($1.(*ParserSeparatedList).Items, $2), - Function: &ast.NameName{ + Function: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $2.(*ArgumentList).OpenParenthesisTkn, - Arguments: $2.(*ArgumentList).Arguments, + Args: $2.(*ArgumentList).Arguments, SeparatorTkns: $2.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ArgumentList).CloseParenthesisTkn, } @@ -3697,7 +3697,7 @@ function_call: SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3713,7 +3713,7 @@ function_call: SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, }, OpenParenthesisTkn: $3.(*ArgumentList).OpenParenthesisTkn, - Arguments: $3.(*ArgumentList).Arguments, + Args: $3.(*ArgumentList).Arguments, SeparatorTkns: $3.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ArgumentList).CloseParenthesisTkn, } @@ -3726,7 +3726,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3747,7 +3747,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3760,7 +3760,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3781,7 +3781,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3792,7 +3792,7 @@ function_call: Position: yylex.(*Parser).builder.NewNodesPosition($1, $2), Function: $1, OpenParenthesisTkn: $2.(*ArgumentList).OpenParenthesisTkn, - Arguments: $2.(*ArgumentList).Arguments, + Args: $2.(*ArgumentList).Arguments, SeparatorTkns: $2.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ArgumentList).CloseParenthesisTkn, } @@ -3810,7 +3810,7 @@ class_name: } | namespace_name { - $$ = &ast.NameName{ + $$ = &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -3840,7 +3840,7 @@ class_name: fully_qualified_class_name: namespace_name { - $$ = &ast.NameName{ + $$ = &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -4105,7 +4105,7 @@ static_class_constant: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -4134,7 +4134,7 @@ static_scalar_value: { $$ = &ast.ExprConstFetch{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Const: &ast.NameName{ + Const: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -4461,7 +4461,7 @@ static_operation: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $4), - Condition: $1, + Cond: $1, QuestionTkn: $2, ColonTkn: $3, IfFalse: $4, @@ -4471,7 +4471,7 @@ static_operation: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $5), - Condition: $1, + Cond: $1, QuestionTkn: $2, IfTrue: $3, ColonTkn: $4, @@ -4514,7 +4514,7 @@ general_constant: { $$ = &ast.ExprConstFetch{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Const: &ast.NameName{ + Const: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -4553,7 +4553,7 @@ scalar: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -4750,7 +4750,7 @@ variable: $3 = append($3, &ast.ExprFunctionCall{ Position: yylex.(*Parser).builder.NewNodePosition(mc), OpenParenthesisTkn: mc.OpenParenthesisTkn, - Arguments: mc.Arguments, + Args: mc.Args, SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.CloseParenthesisTkn, }, @@ -4758,7 +4758,7 @@ variable: $3 = append($3, $4[1:len($4)]...) case *ast.ExprPropertyFetch: $4[0].(*ast.ExprMethodCall).OpenCurlyBracketTkn = l.OpenCurlyBracketTkn - $4[0].(*ast.ExprMethodCall).Method = l.Property + $4[0].(*ast.ExprMethodCall).Method = l.Prop $4[0].(*ast.ExprMethodCall).CloseCurlyBracketTkn = l.CloseCurlyBracketTkn $4[0].(*ast.ExprMethodCall).ObjectOperatorTkn = l.ObjectOperatorTkn $3 = append($3[:len($3)-1], $4...) @@ -4844,7 +4844,7 @@ variable_property: $2 = append($2, &ast.ExprFunctionCall{ Position: yylex.(*Parser).builder.NewNodePosition(mc), OpenParenthesisTkn: mc.OpenParenthesisTkn, - Arguments: mc.Arguments, + Args: mc.Args, SeparatorTkns: mc.SeparatorTkns, CloseParenthesisTkn: mc.OpenParenthesisTkn, }, @@ -4852,7 +4852,7 @@ variable_property: $2 = append($2, $3[1:len($3)]...) case *ast.ExprPropertyFetch: $3[0].(*ast.ExprMethodCall).OpenCurlyBracketTkn = l.OpenCurlyBracketTkn - $3[0].(*ast.ExprMethodCall).Method = l.Property + $3[0].(*ast.ExprMethodCall).Method = l.Prop $3[0].(*ast.ExprMethodCall).CloseCurlyBracketTkn = l.CloseCurlyBracketTkn $3[0].(*ast.ExprMethodCall).ObjectOperatorTkn = l.ObjectOperatorTkn $2 = append($2[:len($2)-1], $3...) @@ -4896,7 +4896,7 @@ method: $$ = &ast.ExprMethodCall{ Position: yylex.(*Parser).builder.NewNodePosition($1), OpenParenthesisTkn: $1.(*ArgumentList).OpenParenthesisTkn, - Arguments: $1.(*ArgumentList).Arguments, + Args: $1.(*ArgumentList).Arguments, SeparatorTkns: $1.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $1.(*ArgumentList).CloseParenthesisTkn, } @@ -4926,7 +4926,7 @@ variable_without_objects: | simple_indirect_reference reference_variable { for i := len($1)-1; i>=0; i-- { - $1[i].(*ast.ExprVariable).VarName = $2 + $1[i].(*ast.ExprVariable).Name = $2 $1[i].(*ast.ExprVariable).Position = yylex.(*Parser).builder.NewNodesPosition($1[i], $2) $2 = $1[i] } @@ -4942,7 +4942,7 @@ static_member: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects @@ -4951,7 +4951,7 @@ static_member: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } ; @@ -5010,7 +5010,7 @@ base_variable: | simple_indirect_reference reference_variable { for i := len($1)-1; i>=0; i-- { - $1[i].(*ast.ExprVariable).VarName = $2 + $1[i].(*ast.ExprVariable).Name = $2 $1[i].(*ast.ExprVariable).Position = yylex.(*Parser).builder.NewNodesPosition($1[i], $2) $2 = $1[i] } @@ -5056,7 +5056,7 @@ compound_variable: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -5069,7 +5069,7 @@ compound_variable: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), DollarTkn: $1, OpenCurlyBracketTkn: $2, - VarName: $3, + Name: $3, CloseCurlyBracketTkn: $4, } } @@ -5097,7 +5097,7 @@ object_property: $$ = []ast.Vertex{ &ast.ExprPropertyFetch{ Position: yylex.(*Parser).builder.NewNodePosition($1), - Property: $1, + Prop: $1, }, } } @@ -5132,12 +5132,12 @@ object_dim_list: { property := &ast.ExprPropertyFetch{ Position: yylex.(*Parser).builder.NewNodePosition($1), - Property: $1, + Prop: $1, } if brackets, ok := $1.(*ParserBrackets); ok { property.OpenCurlyBracketTkn = brackets.OpenBracketTkn - property.Property = brackets.Child + property.Prop = brackets.Child property.CloseCurlyBracketTkn = brackets.CloseBracketTkn } @@ -5398,7 +5398,7 @@ encaps_var: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -5411,7 +5411,7 @@ encaps_var: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -5428,14 +5428,14 @@ encaps_var: Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, }, }, ObjectOperatorTkn: $2, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -5447,7 +5447,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: $2, + Name: $2, CloseCurlyBracketTkn: $3, } } @@ -5456,7 +5456,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -5469,7 +5469,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -5521,7 +5521,7 @@ encaps_var_offset: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -5640,7 +5640,7 @@ class_constant: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -5653,7 +5653,7 @@ class_constant: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -5669,7 +5669,7 @@ static_class_name_scalar: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -5685,7 +5685,7 @@ class_name_scalar: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, diff --git a/internal/php7/parser_test.go b/internal/php7/parser_test.go index aa1b77d..b35eece 100644 --- a/internal/php7/parser_test.go +++ b/internal/php7/parser_test.go @@ -38,7 +38,7 @@ func TestIdentifier(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -135,7 +135,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 5, EndPos: 19, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -143,7 +143,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 8, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -196,7 +196,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 9, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 2, @@ -211,7 +211,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -268,7 +268,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -345,7 +345,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 23, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -387,7 +387,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 28, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 3, @@ -402,7 +402,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -459,7 +459,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 35, EndPos: 37, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -536,7 +536,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 42, EndPos: 46, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -607,7 +607,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 52, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 4, @@ -622,7 +622,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 52, EndPos: 54, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -679,7 +679,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -749,7 +749,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 66, EndPos: 85, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -757,7 +757,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 69, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -829,7 +829,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 75, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 5, @@ -844,7 +844,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 75, EndPos: 77, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -901,7 +901,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 82, EndPos: 84, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -978,7 +978,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 89, EndPos: 93, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1049,7 +1049,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 99, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 6, @@ -1064,7 +1064,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 99, EndPos: 101, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1121,7 +1121,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 106, EndPos: 108, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -1213,7 +1213,7 @@ func TestPhp7ArgumentNode(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1221,7 +1221,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 120, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1264,7 +1264,7 @@ func TestPhp7ArgumentNode(t *testing.T) { EndPos: 121, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 7, @@ -1279,7 +1279,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 121, EndPos: 123, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1336,7 +1336,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 128, EndPos: 130, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -1499,7 +1499,7 @@ func TestPhp7ArgumentNode(t *testing.T) { }, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 9, @@ -1514,7 +1514,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 171, EndPos: 173, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -1571,7 +1571,7 @@ func TestPhp7ArgumentNode(t *testing.T) { StartPos: 178, EndPos: 180, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -1727,7 +1727,7 @@ func TestPhp7ParameterNode(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1793,7 +1793,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 19, }, }, - Expr: &ast.NameName{ + Expr: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1801,7 +1801,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1830,7 +1830,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 23, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1879,7 +1879,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 28, EndPos: 32, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1887,7 +1887,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 32, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1917,7 +1917,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 34, EndPos: 46, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1925,7 +1925,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 37, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -1997,7 +1997,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 42, EndPos: 46, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -2104,7 +2104,7 @@ func TestPhp7ParameterNode(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2208,7 +2208,7 @@ func TestPhp7ParameterNode(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2274,7 +2274,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 85, }, }, - Expr: &ast.NameName{ + Expr: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2282,7 +2282,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 88, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2311,7 +2311,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 89, EndPos: 93, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2360,7 +2360,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 94, EndPos: 98, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2368,7 +2368,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 98, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2398,7 +2398,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 100, EndPos: 112, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2406,7 +2406,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 103, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2478,7 +2478,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 108, EndPos: 112, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -2647,7 +2647,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 130, }, }, - Expr: &ast.NameName{ + Expr: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2655,7 +2655,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 133, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2684,7 +2684,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 134, EndPos: 138, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2733,7 +2733,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 139, EndPos: 143, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2741,7 +2741,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 143, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2771,7 +2771,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 145, EndPos: 157, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2779,7 +2779,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 148, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -2851,7 +2851,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 153, EndPos: 157, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -3033,7 +3033,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 182, }, }, - Expr: &ast.NameName{ + Expr: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3041,7 +3041,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 185, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3070,7 +3070,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 186, EndPos: 190, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3119,7 +3119,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 191, EndPos: 195, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3127,7 +3127,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 195, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3157,7 +3157,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 197, EndPos: 209, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3165,7 +3165,7 @@ func TestPhp7ParameterNode(t *testing.T) { EndPos: 200, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3237,7 +3237,7 @@ func TestPhp7ParameterNode(t *testing.T) { StartPos: 205, EndPos: 209, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -3431,7 +3431,7 @@ func TestName(t *testing.T) { StartPos: 3, EndPos: 8, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3439,7 +3439,7 @@ func TestName(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3590,7 +3590,7 @@ func TestFullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3729,7 +3729,7 @@ func TestRelative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -3879,7 +3879,7 @@ func TestScalarEncapsed_SimpleVar(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4017,7 +4017,7 @@ func TestScalarEncapsed_SimpleVarOneChar(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4155,7 +4155,7 @@ func TestScalarEncapsed_SimpleVarEndsEcapsed(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4312,7 +4312,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4356,7 +4356,7 @@ func TestScalarEncapsed_StringVarCurveOpen(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4512,7 +4512,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4542,7 +4542,7 @@ func TestScalarEncapsed_SimpleVarPropertyFetch(t *testing.T) { EndPos: 15, }, }, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4709,7 +4709,7 @@ func TestScalarEncapsed_DollarOpenCurlyBraces(t *testing.T) { EndPos: 11, }, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -4867,7 +4867,7 @@ func TestScalarEncapsed_DollarOpenCurlyBracesDimNumber(t *testing.T) { EndPos: 11, }, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -5078,7 +5078,7 @@ func TestScalarEncapsed_CurlyOpenMethodCall(t *testing.T) { StartPos: 10, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -5280,7 +5280,7 @@ LBL; StartPos: 15, EndPos: 19, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -5453,7 +5453,7 @@ LBL; StartPos: 17, EndPos: 21, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7040,7 +7040,7 @@ func TestStmtAltIf_AltIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7241,7 +7241,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7361,7 +7361,7 @@ func TestStmtAltIf_AltElseIf(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -7552,7 +7552,7 @@ func TestStmtAltIf_AltElse(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7804,7 +7804,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -7924,7 +7924,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -8032,7 +8032,7 @@ func TestStmtAltIf_AltElseElseIf(t *testing.T) { StartPos: 40, EndPos: 42, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -8239,7 +8239,7 @@ func TestStmtClassConstList(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -8637,7 +8637,7 @@ func TestStmtClassConstList_WithoutModifiers(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9002,7 +9002,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9073,7 +9073,7 @@ func TestStmtClassMethod_SimpleClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9251,7 +9251,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9386,7 +9386,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9541,7 +9541,7 @@ func TestStmtClassMethod_PrivateProtectedClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9719,7 +9719,7 @@ func TestStmtClassMethod_Php7ClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9876,7 +9876,7 @@ func TestStmtClassMethod_Php7ClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9925,7 +9925,7 @@ func TestStmtClassMethod_Php7ClassMethod(t *testing.T) { EndPos: 44, }, }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -9933,7 +9933,7 @@ func TestStmtClassMethod_Php7ClassMethod(t *testing.T) { EndPos: 49, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10126,7 +10126,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10261,7 +10261,7 @@ func TestStmtClassMethod_AbstractClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10449,7 +10449,7 @@ func TestStmtClassMethod_Php7AbstractClassMethod(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10553,7 +10553,7 @@ func TestStmtClassMethod_Php7AbstractClassMethod(t *testing.T) { }, }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10614,7 +10614,7 @@ func TestStmtClassMethod_Php7AbstractClassMethod(t *testing.T) { EndPos: 45, }, }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10622,7 +10622,7 @@ func TestStmtClassMethod_Php7AbstractClassMethod(t *testing.T) { EndPos: 50, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10759,7 +10759,7 @@ func TestStmtClass_SimpleClass(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -10918,7 +10918,7 @@ func TestStmtClass_AbstractClass(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11077,7 +11077,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11130,7 +11130,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { }, }, }, - Extends: &ast.NameName{ + Extends: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11138,7 +11138,7 @@ func TestStmtClass_ClassExtends(t *testing.T) { EndPos: 30, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11311,7 +11311,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11365,7 +11365,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { }, }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11373,7 +11373,7 @@ func TestStmtClass_ClassImplement(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11547,7 +11547,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11601,7 +11601,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11609,7 +11609,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11642,7 +11642,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11650,7 +11650,7 @@ func TestStmtClass_ClassImplements(t *testing.T) { EndPos: 38, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11881,7 +11881,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { }, }, }, - Extends: &ast.NameName{ + Extends: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11889,7 +11889,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { EndPos: 26, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11945,7 +11945,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { }, }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11953,7 +11953,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { EndPos: 41, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11986,7 +11986,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -11994,7 +11994,7 @@ func TestStmtClass_AnonimousClass(t *testing.T) { EndPos: 46, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -13920,7 +13920,7 @@ func TestStmtEcho(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14093,7 +14093,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14303,7 +14303,7 @@ func TestStmtFor(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14403,7 +14403,7 @@ func TestStmtFor(t *testing.T) { StartPos: 15, EndPos: 17, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14515,7 +14515,7 @@ func TestStmtFor(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14572,7 +14572,7 @@ func TestStmtFor(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14776,7 +14776,7 @@ func TestStmtFor_Alt(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -14888,7 +14888,7 @@ func TestStmtFor_Alt(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15096,7 +15096,7 @@ func TestStmtForeach(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15145,7 +15145,7 @@ func TestStmtForeach(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15369,7 +15369,7 @@ func TestStmtForeach_Expr(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15543,7 +15543,7 @@ func TestStmtForeach_Alt(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15592,7 +15592,7 @@ func TestStmtForeach_Alt(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15788,7 +15788,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15837,7 +15837,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -15898,7 +15898,7 @@ func TestStmtForeach_WithKey(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16122,7 +16122,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16183,7 +16183,7 @@ func TestStmtForeach_ExprWithKey(t *testing.T) { StartPos: 24, EndPos: 26, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16357,7 +16357,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16406,7 +16406,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16489,7 +16489,7 @@ func TestStmtForeach_WithRef(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16651,7 +16651,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16700,7 +16700,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16808,7 +16808,7 @@ func TestStmtForeach_WithList(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -16954,7 +16954,7 @@ func TestStmtFunction(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17100,7 +17100,7 @@ func TestStmtFunction_Return(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17275,7 +17275,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17350,7 +17350,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17428,7 +17428,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 35, EndPos: 37, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17531,7 +17531,7 @@ func TestStmtFunction_ReturnVar(t *testing.T) { StartPos: 47, EndPos: 49, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17669,7 +17669,7 @@ func TestStmtFunction_Ref(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17885,7 +17885,7 @@ func TestStmtFunction_ReturnType(t *testing.T) { }, }, }, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17934,7 +17934,7 @@ func TestStmtFunction_ReturnType(t *testing.T) { EndPos: 19, }, }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -17942,7 +17942,7 @@ func TestStmtFunction_ReturnType(t *testing.T) { EndPos: 24, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18078,7 +18078,7 @@ func TestStmtGlobal(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18191,7 +18191,7 @@ func TestStmtGlobal_Vars(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18230,7 +18230,7 @@ func TestStmtGlobal_Vars(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18291,14 +18291,14 @@ func TestStmtGlobal_Vars(t *testing.T) { }, }, }, - VarName: &ast.ExprVariable{ + Name: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 19, EndPos: 21, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18358,14 +18358,14 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 25, }, }, - VarName: &ast.ExprFunctionCall{ + Name: &ast.ExprFunctionCall{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 25, EndPos: 30, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18373,7 +18373,7 @@ func TestStmtGlobal_Vars(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18499,7 +18499,7 @@ func TestStmtGotoLabel(t *testing.T) { StartPos: 3, EndPos: 5, }, - LabelName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18804,7 +18804,7 @@ func TestStmtIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -18966,7 +18966,7 @@ func TestStmtIf_ElseIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19096,7 +19096,7 @@ func TestStmtIf_ElseIf(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19260,7 +19260,7 @@ func TestStmtIf_Else(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19493,7 +19493,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19623,7 +19623,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19753,7 +19753,7 @@ func TestStmtIf_ElseElseIf(t *testing.T) { StartPos: 37, EndPos: 39, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -19988,7 +19988,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20118,7 +20118,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20278,7 +20278,7 @@ func TestStmtIf_ElseIfElseIfElse(t *testing.T) { StartPos: 38, EndPos: 40, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20565,7 +20565,7 @@ func TestStmtInterface(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20691,7 +20691,7 @@ func TestStmtInterface_Extend(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20745,7 +20745,7 @@ func TestStmtInterface_Extend(t *testing.T) { }, }, Extends: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20753,7 +20753,7 @@ func TestStmtInterface_Extend(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20882,7 +20882,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, }, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20936,7 +20936,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, Extends: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20944,7 +20944,7 @@ func TestStmtInterface_Extends(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20977,7 +20977,7 @@ func TestStmtInterface_Extends(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -20985,7 +20985,7 @@ func TestStmtInterface_Extends(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21126,7 +21126,7 @@ func TestStmtNamespace(t *testing.T) { }, }, }, - Name: &ast.NameName{ + Name: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21134,7 +21134,7 @@ func TestStmtNamespace(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21239,7 +21239,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { }, }, }, - Name: &ast.NameName{ + Name: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21247,7 +21247,7 @@ func TestStmtNamespace_Stmts(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21470,7 +21470,7 @@ func TestStmtProperty(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21552,7 +21552,7 @@ func TestStmtProperty(t *testing.T) { Value: []byte("var"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -21567,7 +21567,7 @@ func TestStmtProperty(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21685,7 +21685,7 @@ func TestStmtProperty_Properties(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21798,7 +21798,7 @@ func TestStmtProperty_Properties(t *testing.T) { Value: []byte("static"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -21813,7 +21813,7 @@ func TestStmtProperty_Properties(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -21860,7 +21860,7 @@ func TestStmtProperty_Properties(t *testing.T) { StartPos: 32, EndPos: 34, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22043,7 +22043,7 @@ func TestStmtProperty_Properties2(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22156,7 +22156,7 @@ func TestStmtProperty_Properties2(t *testing.T) { Value: []byte("static"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -22171,7 +22171,7 @@ func TestStmtProperty_Properties2(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22271,7 +22271,7 @@ func TestStmtProperty_Properties2(t *testing.T) { StartPos: 36, EndPos: 38, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22401,7 +22401,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22483,7 +22483,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { Value: []byte("var"), }, }, - Type: &ast.NameName{ + Type: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22491,7 +22491,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { EndPos: 21, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22524,7 +22524,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { }, }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Position: &position.Position{ StartLine: 1, @@ -22539,7 +22539,7 @@ func TestStmtProperty_PropertyType(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22672,7 +22672,7 @@ func TestStmtStaticVar(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22793,7 +22793,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -22840,7 +22840,7 @@ func TestStmtStaticVar_Vars(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23026,7 +23026,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23126,7 +23126,7 @@ func TestStmtStaticVar_Vars2(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -23322,7 +23322,7 @@ func TestStmtSwitch(t *testing.T) { }, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -23735,7 +23735,7 @@ func TestStmtSwitch_Semicolon(t *testing.T) { EndPos: 18, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -24139,7 +24139,7 @@ func TestStmtSwitch_Alt(t *testing.T) { }, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -24520,7 +24520,7 @@ func TestStmtSwitch_AltSemicolon(t *testing.T) { EndPos: 18, }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Position: &position.Position{ StartLine: 3, @@ -24767,7 +24767,7 @@ func TestStmtThrow(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24871,7 +24871,7 @@ func TestStmtTrait(t *testing.T) { }, }, }, - TraitName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -24997,7 +24997,7 @@ func TestStmtTraitUse(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25081,7 +25081,7 @@ func TestStmtTraitUse(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25089,7 +25089,7 @@ func TestStmtTraitUse(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25219,7 +25219,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25303,7 +25303,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25311,7 +25311,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25344,7 +25344,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25352,7 +25352,7 @@ func TestStmtTraitUse_Uses(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25494,7 +25494,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25578,7 +25578,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25586,7 +25586,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25619,7 +25619,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25627,7 +25627,7 @@ func TestStmtTraitUse_EmptyAdaptations(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25791,7 +25791,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25875,7 +25875,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25883,7 +25883,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25916,7 +25916,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -25924,7 +25924,7 @@ func TestStmtTraitUse_Modifier(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26204,7 +26204,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26288,7 +26288,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26296,7 +26296,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26329,7 +26329,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26337,7 +26337,7 @@ func TestStmtTraitUse_AliasModifier(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26648,7 +26648,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26732,7 +26732,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26740,7 +26740,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26773,7 +26773,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26781,7 +26781,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 27, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26857,7 +26857,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { StartPos: 30, EndPos: 58, }, - Trait: &ast.NameName{ + Trait: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26865,7 +26865,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 33, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26950,7 +26950,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, Insteadof: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26958,7 +26958,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 52, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26991,7 +26991,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -26999,7 +26999,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 58, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27063,7 +27063,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { StartPos: 60, EndPos: 75, }, - Trait: &ast.NameName{ + Trait: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27071,7 +27071,7 @@ func TestStmtTraitUse_Adaptions(t *testing.T) { EndPos: 63, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -27505,7 +27505,7 @@ func TestStmtTry_TryCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27513,7 +27513,7 @@ func TestStmtTry_TryCatch(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27542,7 +27542,7 @@ func TestStmtTry_TryCatch(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27782,7 +27782,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27790,7 +27790,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27811,7 +27811,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { }, }, }, - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27819,7 +27819,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { EndPos: 45, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -27860,7 +27860,7 @@ func TestStmtTry_Php7TryCatch(t *testing.T) { StartPos: 46, EndPos: 48, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28100,7 +28100,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28108,7 +28108,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28137,7 +28137,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28265,7 +28265,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28273,7 +28273,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { EndPos: 59, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28302,7 +28302,7 @@ func TestStmtTry_TryCatchCatch(t *testing.T) { StartPos: 60, EndPos: 62, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28542,7 +28542,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28550,7 +28550,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { EndPos: 28, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28579,7 +28579,7 @@ func TestStmtTry_TryCatchFinally(t *testing.T) { StartPos: 29, EndPos: 31, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -28880,7 +28880,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28888,7 +28888,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { EndPos: 26, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -28917,7 +28917,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29063,7 +29063,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29092,7 +29092,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29248,7 +29248,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29277,7 +29277,7 @@ func TestStmtTry_TryCatchCatchCatch(t *testing.T) { StartPos: 101, EndPos: 103, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29434,7 +29434,7 @@ func TestStmtUnset(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29555,7 +29555,7 @@ func TestStmtUnset_Vars(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29582,7 +29582,7 @@ func TestStmtUnset_Vars(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29727,7 +29727,7 @@ func TestStmtUnset_TrailingComma(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29754,7 +29754,7 @@ func TestStmtUnset_TrailingComma(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29852,7 +29852,7 @@ func TestStmtUse(t *testing.T) { EndPos: 11, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29891,15 +29891,15 @@ func TestStmtUse(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29907,7 +29907,7 @@ func TestStmtUse(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -29975,7 +29975,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { EndPos: 12, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30014,8 +30014,8 @@ func TestStmtUse_FullyQualified(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30044,7 +30044,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30052,7 +30052,7 @@ func TestStmtUse_FullyQualified(t *testing.T) { EndPos: 11, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30108,7 +30108,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { EndPos: 19, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30147,8 +30147,8 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30177,7 +30177,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30185,7 +30185,7 @@ func TestStmtUse_FullyQualifiedAlias(t *testing.T) { EndPos: 11, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30294,7 +30294,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 16, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30333,15 +30333,15 @@ func TestStmtUse_List(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30349,7 +30349,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30383,14 +30383,14 @@ func TestStmtUse_List(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 15, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30398,7 +30398,7 @@ func TestStmtUse_List(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30478,7 +30478,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 23, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30517,15 +30517,15 @@ func TestStmtUse_ListAlias(t *testing.T) { }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 7, EndPos: 10, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30533,7 +30533,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30567,14 +30567,14 @@ func TestStmtUse_ListAlias(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 22, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30582,7 +30582,7 @@ func TestStmtUse_ListAlias(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30715,7 +30715,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 26, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30785,15 +30785,15 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, Value: []byte("function"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 16, EndPos: 19, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30801,7 +30801,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30835,7 +30835,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30864,7 +30864,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30872,7 +30872,7 @@ func TestStmtUse_ListFunctionType(t *testing.T) { EndPos: 25, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -30940,7 +30940,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 40, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31010,15 +31010,15 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { }, Value: []byte("function"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 16, EndPos: 26, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31026,7 +31026,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31113,7 +31113,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { Value: []byte("foo"), }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31142,7 +31142,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31150,7 +31150,7 @@ func TestStmtUse_ListFunctionTypeAliases(t *testing.T) { EndPos: 32, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31271,7 +31271,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 23, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31341,15 +31341,15 @@ func TestStmtUse_ListConstType(t *testing.T) { }, Value: []byte("const"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 13, EndPos: 16, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31357,7 +31357,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31391,7 +31391,7 @@ func TestStmtUse_ListConstType(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31420,7 +31420,7 @@ func TestStmtUse_ListConstType(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31428,7 +31428,7 @@ func TestStmtUse_ListConstType(t *testing.T) { EndPos: 22, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31496,7 +31496,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 37, }, Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31566,15 +31566,15 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { }, Value: []byte("const"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 13, EndPos: 23, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31582,7 +31582,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31669,7 +31669,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { Value: []byte("foo"), }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31698,7 +31698,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { }, }, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31706,7 +31706,7 @@ func TestStmtUse_ListConstTypeAliases(t *testing.T) { EndPos: 29, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31827,7 +31827,7 @@ func TestStmtUse_GroupUse(t *testing.T) { EndPos: 22, }, Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31866,7 +31866,7 @@ func TestStmtUse_GroupUse(t *testing.T) { }, }, }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31874,7 +31874,7 @@ func TestStmtUse_GroupUse(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31927,15 +31927,15 @@ func TestStmtUse_GroupUse(t *testing.T) { EndPos: 12, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 15, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31943,7 +31943,7 @@ func TestStmtUse_GroupUse(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31965,14 +31965,14 @@ func TestStmtUse_GroupUse(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 17, EndPos: 20, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -31980,7 +31980,7 @@ func TestStmtUse_GroupUse(t *testing.T) { EndPos: 20, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32070,7 +32070,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { EndPos: 30, }, Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32109,7 +32109,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { }, }, }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32117,7 +32117,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32170,15 +32170,15 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { EndPos: 12, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 12, EndPos: 15, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32186,7 +32186,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { EndPos: 15, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32208,14 +32208,14 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 17, EndPos: 28, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32223,7 +32223,7 @@ func TestStmtUse_GroupUseAlias(t *testing.T) { EndPos: 20, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32366,7 +32366,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { EndPos: 31, }, Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32436,7 +32436,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { }, Value: []byte("function"), }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32444,7 +32444,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32497,15 +32497,15 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { EndPos: 21, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 21, EndPos: 24, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32513,7 +32513,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { EndPos: 24, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32535,14 +32535,14 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 26, EndPos: 29, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32550,7 +32550,7 @@ func TestStmtUse_FunctionGroupUse(t *testing.T) { EndPos: 29, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32640,7 +32640,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { EndPos: 28, }, Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32710,7 +32710,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { }, Value: []byte("const"), }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32718,7 +32718,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32771,15 +32771,15 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { EndPos: 18, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 18, EndPos: 21, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32787,7 +32787,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { EndPos: 21, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32809,14 +32809,14 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 23, EndPos: 26, }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32824,7 +32824,7 @@ func TestStmtUse_ConstGroupUse(t *testing.T) { EndPos: 26, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32914,7 +32914,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { EndPos: 37, }, Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32953,7 +32953,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { }, }, }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -32961,7 +32961,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33014,8 +33014,8 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { EndPos: 12, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33041,7 +33041,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { }, Value: []byte("const"), }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33049,7 +33049,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { EndPos: 21, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33083,7 +33083,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { }, }, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33121,7 +33121,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { }, Value: []byte("function"), }, - Use: &ast.NameName{ + Use: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33129,7 +33129,7 @@ func TestStmtUse_MixedGroupUse(t *testing.T) { EndPos: 35, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -33951,7 +33951,7 @@ func TestExprArrayDimFetch(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34094,7 +34094,7 @@ func TestExprArrayDimFetch_Nested(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34627,7 +34627,7 @@ func TestExprArray_Items(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34797,7 +34797,7 @@ func TestExprArray_ItemUnpack(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -34958,7 +34958,7 @@ func TestExprArrowFunction(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35146,7 +35146,7 @@ func TestExprArrowFunction_ReturnType(t *testing.T) { }, }, }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35154,7 +35154,7 @@ func TestExprArrowFunction_ReturnType(t *testing.T) { EndPos: 16, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35216,7 +35216,7 @@ func TestExprArrowFunction_ReturnType(t *testing.T) { StartPos: 20, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35335,7 +35335,7 @@ func TestExprBitwiseNot(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35442,7 +35442,7 @@ func TestExprBooleanNot(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35510,7 +35510,7 @@ func TestExprClassConstFetch(t *testing.T) { StartPos: 3, EndPos: 11, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35518,7 +35518,7 @@ func TestExprClassConstFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35571,7 +35571,7 @@ func TestExprClassConstFetch(t *testing.T) { EndPos: 8, }, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35689,7 +35689,7 @@ func TestExprClassConstFetch_Static(t *testing.T) { EndPos: 11, }, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35812,7 +35812,7 @@ func TestExprClone_Brackets(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -35930,7 +35930,7 @@ func TestExprClone(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36188,7 +36188,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36223,7 +36223,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36323,7 +36323,7 @@ func TestExprClosure_Use(t *testing.T) { }, }, }, - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ Position: &position.Position{ StartLine: 1, @@ -36338,7 +36338,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 25, EndPos: 27, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36395,7 +36395,7 @@ func TestExprClosure_Use(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36577,7 +36577,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36612,7 +36612,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36712,7 +36712,7 @@ func TestExprClosure_Use2(t *testing.T) { }, }, }, - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ Position: &position.Position{ StartLine: 1, @@ -36737,7 +36737,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 26, EndPos: 28, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36772,7 +36772,7 @@ func TestExprClosure_Use2(t *testing.T) { StartPos: 30, EndPos: 32, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36971,7 +36971,7 @@ func TestExprClosure_ReturnType(t *testing.T) { EndPos: 14, }, }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -36979,7 +36979,7 @@ func TestExprClosure_ReturnType(t *testing.T) { EndPos: 19, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37093,7 +37093,7 @@ func TestExprConstFetch(t *testing.T) { StartPos: 3, EndPos: 6, }, - Const: &ast.NameName{ + Const: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37101,7 +37101,7 @@ func TestExprConstFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37242,7 +37242,7 @@ func TestExprConstFetch_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37351,7 +37351,7 @@ func TestExprConstFetch_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37469,7 +37469,7 @@ func TestExprEmpty(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37586,7 +37586,7 @@ func TestExprErrorSuppress(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -37703,7 +37703,7 @@ func TestExprEval(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38010,7 +38010,7 @@ func TestExprExit_Expr(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38317,7 +38317,7 @@ func TestExprDie_Expr(t *testing.T) { StartPos: 7, EndPos: 9, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38395,7 +38395,7 @@ func TestExprFunctionCall(t *testing.T) { StartPos: 3, EndPos: 8, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38403,7 +38403,7 @@ func TestExprFunctionCall(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38564,7 +38564,7 @@ func TestExprFunctionCall_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38693,7 +38693,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38724,7 +38724,7 @@ func TestExprFunctionCall_FullyQualified(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -38827,7 +38827,7 @@ func TestExprFunctionCall_Var(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -38879,7 +38879,7 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -38904,14 +38904,14 @@ func TestExprFunctionCall_Var(t *testing.T) { EndPos: 13, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39004,7 +39004,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { StartPos: 3, EndPos: 15, }, - Function: &ast.NameName{ + Function: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39012,7 +39012,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 7, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39065,7 +39065,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { EndPos: 8, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -39087,7 +39087,7 @@ func TestExprFunctionCall_ExprArg(t *testing.T) { StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39204,7 +39204,7 @@ func TestExprPostDec(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39311,7 +39311,7 @@ func TestExprPostInc(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39450,7 +39450,7 @@ func TestExprPreDec(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39557,7 +39557,7 @@ func TestExprPreInc(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39664,7 +39664,7 @@ func TestExprInclude(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39783,7 +39783,7 @@ func TestExprInclude_Once(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -39902,7 +39902,7 @@ func TestExprRequire(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40021,7 +40021,7 @@ func TestExprRequire_Once(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40108,7 +40108,7 @@ func TestExprInstanceOf(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40172,7 +40172,7 @@ func TestExprInstanceOf(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40180,7 +40180,7 @@ func TestExprInstanceOf(t *testing.T) { EndPos: 20, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40268,7 +40268,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40372,7 +40372,7 @@ func TestExprInstanceOf_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40448,7 +40448,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40542,7 +40542,7 @@ func TestExprInstanceOf_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40661,7 +40661,7 @@ func TestExprIsset(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40790,7 +40790,7 @@ func TestExprIsset_Variables(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -40817,7 +40817,7 @@ func TestExprIsset_Variables(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41009,7 +41009,7 @@ func TestExprList_Empty(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41153,7 +41153,7 @@ func TestExprList(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41215,7 +41215,7 @@ func TestExprList(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41366,7 +41366,7 @@ func TestExprList_ArrayIndex(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41449,7 +41449,7 @@ func TestExprList_ArrayIndex(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41628,7 +41628,7 @@ func TestExprList_List(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41703,7 +41703,7 @@ func TestExprList_List(t *testing.T) { StartPos: 20, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41848,7 +41848,7 @@ func TestExprList_EmptyItem(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -41934,7 +41934,7 @@ func TestExprList_EmptyItem(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42080,7 +42080,7 @@ func TestExprList_EmptyItems(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42211,7 +42211,7 @@ func TestExprList_EmptyItems(t *testing.T) { StartPos: 20, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42298,7 +42298,7 @@ func TestExprMethodCall(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42469,7 +42469,7 @@ func TestExprNew(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42477,7 +42477,7 @@ func TestExprNew(t *testing.T) { EndPos: 10, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42630,7 +42630,7 @@ func TestExprNew_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42781,7 +42781,7 @@ func TestExprNew_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -42953,7 +42953,7 @@ func TestExprNew_Anonymous(t *testing.T) { }, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 1, @@ -42968,7 +42968,7 @@ func TestExprNew_Anonymous(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43025,7 +43025,7 @@ func TestExprNew_Anonymous(t *testing.T) { StartPos: 21, EndPos: 23, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43207,7 +43207,7 @@ func TestExprPrint(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43293,7 +43293,7 @@ func TestExprPropertyFetch(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43345,7 +43345,7 @@ func TestExprPropertyFetch(t *testing.T) { EndPos: 7, }, }, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43471,7 +43471,7 @@ func TestExprShellExec(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -43884,7 +43884,7 @@ func TestExprShortArray_Items(t *testing.T) { StartPos: 11, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44041,7 +44041,7 @@ func TestExprShortList(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44103,7 +44103,7 @@ func TestExprShortList(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44244,7 +44244,7 @@ func TestExprShortList_ArrayIndex(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44327,7 +44327,7 @@ func TestExprShortList_ArrayIndex(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44496,7 +44496,7 @@ func TestExprShortList_List(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44571,7 +44571,7 @@ func TestExprShortList_List(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44651,7 +44651,7 @@ func TestExprStaticCall(t *testing.T) { StartPos: 3, EndPos: 13, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44659,7 +44659,7 @@ func TestExprStaticCall(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -44849,7 +44849,7 @@ func TestExprStaticCall_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45007,7 +45007,7 @@ func TestExprStaticCall_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45125,7 +45125,7 @@ func TestExprStaticCall_Var(t *testing.T) { StartPos: 3, EndPos: 14, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45133,7 +45133,7 @@ func TestExprStaticCall_Var(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45193,7 +45193,7 @@ func TestExprStaticCall_Var(t *testing.T) { StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45288,7 +45288,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { StartPos: 3, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45347,7 +45347,7 @@ func TestExprStaticCall_VarVar(t *testing.T) { StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45435,7 +45435,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { StartPos: 3, EndPos: 12, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45443,7 +45443,7 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 6, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45496,14 +45496,14 @@ func TestExprStaticPropertyFetch(t *testing.T) { EndPos: 8, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 8, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45621,7 +45621,7 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45652,14 +45652,14 @@ func TestExprStaticPropertyFetch_Relative(t *testing.T) { EndPos: 18, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 18, EndPos: 22, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45767,7 +45767,7 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { }, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45798,14 +45798,14 @@ func TestExprStaticPropertyFetch_FullyQualified(t *testing.T) { EndPos: 9, }, }, - Property: &ast.ExprVariable{ + Prop: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 9, EndPos: 13, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45873,14 +45873,14 @@ func TestExprTernary(t *testing.T) { StartPos: 3, EndPos: 15, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -45951,7 +45951,7 @@ func TestExprTernary(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46012,7 +46012,7 @@ func TestExprTernary(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46092,14 +46092,14 @@ func TestExprTernary_Simple(t *testing.T) { StartPos: 3, EndPos: 12, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46192,7 +46192,7 @@ func TestExprTernary_Simple(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46272,14 +46272,14 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 3, EndPos: 25, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46350,14 +46350,14 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 8, EndPos: 20, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46418,7 +46418,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46479,7 +46479,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46541,7 +46541,7 @@ func TestExprTernary_NestedTrue(t *testing.T) { StartPos: 23, EndPos: 25, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46621,21 +46621,21 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 3, EndPos: 25, }, - Condition: &ast.ExprTernary{ + Cond: &ast.ExprTernary{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 15, }, - Condition: &ast.ExprVariable{ + Cond: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46706,7 +46706,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 8, EndPos: 10, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46767,7 +46767,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 13, EndPos: 15, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46829,7 +46829,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 18, EndPos: 20, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -46890,7 +46890,7 @@ func TestExprTernary_NestedCond(t *testing.T) { StartPos: 23, EndPos: 25, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47009,7 +47009,7 @@ func TestExprUnaryMinus(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47116,7 +47116,7 @@ func TestExprUnaryPlus(t *testing.T) { StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47184,7 +47184,7 @@ func TestExprVariable(t *testing.T) { StartPos: 3, EndPos: 5, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47305,14 +47305,14 @@ func TestExprVariable_Variable(t *testing.T) { }, }, }, - VarName: &ast.ExprVariable{ + Name: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 4, EndPos: 6, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47492,14 +47492,14 @@ func TestExprYield_Val(t *testing.T) { }, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47618,7 +47618,7 @@ func TestExprYield_KeyVal(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47672,14 +47672,14 @@ func TestExprYield_KeyVal(t *testing.T) { }, }, }, - Value: &ast.ExprVariable{ + Val: &ast.ExprVariable{ Position: &position.Position{ StartLine: 1, EndLine: 1, StartPos: 15, EndPos: 17, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47791,7 +47791,7 @@ func TestExprYield_Expr(t *testing.T) { }, }, }, - Value: &ast.ScalarLnumber{ + Val: &ast.ScalarLnumber{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47909,7 +47909,7 @@ func TestExprYield_KeyExpr(t *testing.T) { StartPos: 9, EndPos: 11, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -47963,7 +47963,7 @@ func TestExprYield_KeyExpr(t *testing.T) { }, }, }, - Value: &ast.ScalarLnumber{ + Val: &ast.ScalarLnumber{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -48081,7 +48081,7 @@ func TestExprYieldFrom(t *testing.T) { StartPos: 14, EndPos: 16, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 1, EndLine: 1, @@ -48187,7 +48187,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -48258,7 +48258,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -48323,7 +48323,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -48394,7 +48394,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 22, EndPos: 24, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -48459,7 +48459,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 28, EndPos: 30, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -48552,7 +48552,7 @@ func TestExprAssign_Assign(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -48560,7 +48560,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 41, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -48627,7 +48627,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 45, EndPos: 47, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -48720,7 +48720,7 @@ func TestExprAssign_Assign(t *testing.T) { }, }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -48728,7 +48728,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 58, }, Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -48771,7 +48771,7 @@ func TestExprAssign_Assign(t *testing.T) { EndPos: 59, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Position: &position.Position{ StartLine: 5, @@ -48786,7 +48786,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 59, EndPos: 61, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -48852,7 +48852,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 66, EndPos: 68, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -48913,7 +48913,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 72, EndPos: 74, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -48978,7 +48978,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 78, EndPos: 80, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -49039,7 +49039,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 84, EndPos: 86, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -49104,7 +49104,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 90, EndPos: 92, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -49165,7 +49165,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 96, EndPos: 98, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -49230,7 +49230,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 102, EndPos: 104, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -49291,7 +49291,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 108, EndPos: 110, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -49356,7 +49356,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 114, EndPos: 116, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -49417,7 +49417,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 120, EndPos: 122, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -49482,7 +49482,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 126, EndPos: 128, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -49543,7 +49543,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 132, EndPos: 134, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -49608,7 +49608,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 138, EndPos: 140, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -49669,7 +49669,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 144, EndPos: 146, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -49734,7 +49734,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 150, EndPos: 152, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -49795,7 +49795,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 156, EndPos: 158, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -49860,7 +49860,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 162, EndPos: 164, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -49921,7 +49921,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 168, EndPos: 170, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -49986,7 +49986,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 174, EndPos: 176, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -50047,7 +50047,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 181, EndPos: 183, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -50112,7 +50112,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 187, EndPos: 189, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -50173,7 +50173,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 194, EndPos: 196, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -50238,7 +50238,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 200, EndPos: 202, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -50299,7 +50299,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 207, EndPos: 209, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -50364,7 +50364,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 213, EndPos: 215, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -50425,7 +50425,7 @@ func TestExprAssign_Assign(t *testing.T) { StartPos: 220, EndPos: 222, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -50541,7 +50541,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 5, EndPos: 7, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -50612,7 +50612,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 10, EndPos: 12, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -50677,7 +50677,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 16, EndPos: 18, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -50738,7 +50738,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 21, EndPos: 23, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -50803,7 +50803,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -50864,7 +50864,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 32, EndPos: 34, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -50929,7 +50929,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 38, EndPos: 40, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -50990,7 +50990,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 44, EndPos: 46, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -51055,7 +51055,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 50, EndPos: 52, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -51116,7 +51116,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 56, EndPos: 58, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -51181,7 +51181,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 62, EndPos: 64, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -51242,7 +51242,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 68, EndPos: 70, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -51307,7 +51307,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 74, EndPos: 76, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -51368,7 +51368,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 79, EndPos: 81, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -51433,7 +51433,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 85, EndPos: 87, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -51494,7 +51494,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 90, EndPos: 92, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -51559,7 +51559,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 96, EndPos: 98, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -51620,7 +51620,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 102, EndPos: 104, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -51685,7 +51685,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 108, EndPos: 110, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -51746,7 +51746,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 114, EndPos: 116, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -51811,7 +51811,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 120, EndPos: 122, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -51872,7 +51872,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 125, EndPos: 127, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -51937,7 +51937,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 131, EndPos: 133, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -51998,7 +51998,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 138, EndPos: 140, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 13, EndLine: 13, @@ -52063,7 +52063,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 144, EndPos: 146, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -52124,7 +52124,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 151, EndPos: 153, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 14, EndLine: 14, @@ -52189,7 +52189,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 157, EndPos: 159, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -52250,7 +52250,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 163, EndPos: 165, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 15, EndLine: 15, @@ -52315,7 +52315,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 169, EndPos: 171, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -52376,7 +52376,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 176, EndPos: 178, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 16, EndLine: 16, @@ -52441,7 +52441,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 182, EndPos: 184, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -52502,7 +52502,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 187, EndPos: 189, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 17, EndLine: 17, @@ -52567,7 +52567,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 193, EndPos: 195, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -52628,7 +52628,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 198, EndPos: 200, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 18, EndLine: 18, @@ -52693,7 +52693,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 204, EndPos: 206, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 19, EndLine: 19, @@ -52754,7 +52754,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 209, EndPos: 211, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 19, EndLine: 19, @@ -52819,7 +52819,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 215, EndPos: 217, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 20, EndLine: 20, @@ -52880,7 +52880,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 221, EndPos: 223, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 20, EndLine: 20, @@ -52945,7 +52945,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 227, EndPos: 229, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 21, EndLine: 21, @@ -53006,7 +53006,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 234, EndPos: 236, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 21, EndLine: 21, @@ -53071,7 +53071,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 240, EndPos: 242, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 22, EndLine: 22, @@ -53132,7 +53132,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 245, EndPos: 247, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 22, EndLine: 22, @@ -53197,7 +53197,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 251, EndPos: 253, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 23, EndLine: 23, @@ -53258,7 +53258,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 257, EndPos: 259, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 23, EndLine: 23, @@ -53323,7 +53323,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 263, EndPos: 265, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 24, EndLine: 24, @@ -53384,7 +53384,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 269, EndPos: 271, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 24, EndLine: 24, @@ -53449,7 +53449,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 275, EndPos: 277, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 25, EndLine: 25, @@ -53510,7 +53510,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 281, EndPos: 283, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 25, EndLine: 25, @@ -53575,7 +53575,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 287, EndPos: 289, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 26, EndLine: 26, @@ -53636,7 +53636,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 293, EndPos: 295, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 26, EndLine: 26, @@ -53701,7 +53701,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 299, EndPos: 301, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 27, EndLine: 27, @@ -53762,7 +53762,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 304, EndPos: 306, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 27, EndLine: 27, @@ -53827,7 +53827,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 310, EndPos: 312, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 28, EndLine: 28, @@ -53888,7 +53888,7 @@ func TestExprBinary_BitwiseAnd(t *testing.T) { StartPos: 317, EndPos: 319, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 28, EndLine: 28, @@ -54020,7 +54020,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 12, EndPos: 14, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 2, EndLine: 2, @@ -54095,7 +54095,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 27, EndPos: 29, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 3, EndLine: 3, @@ -54170,7 +54170,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 39, EndPos: 41, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 4, EndLine: 4, @@ -54245,7 +54245,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 53, EndPos: 55, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 5, EndLine: 5, @@ -54320,7 +54320,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 66, EndPos: 68, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 6, EndLine: 6, @@ -54395,7 +54395,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 81, EndPos: 83, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 7, EndLine: 7, @@ -54470,7 +54470,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 92, EndPos: 94, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 8, EndLine: 8, @@ -54545,7 +54545,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 106, EndPos: 108, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 9, EndLine: 9, @@ -54620,7 +54620,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 120, EndPos: 122, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 10, EndLine: 10, @@ -54695,7 +54695,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 134, EndPos: 136, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, @@ -54770,7 +54770,7 @@ func TestExprCast_Array(t *testing.T) { StartPos: 147, EndPos: 149, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 12, EndLine: 12, @@ -55428,7 +55428,7 @@ CAD; StartPos: 79, EndPos: 85, }, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: &position.Position{ StartLine: 11, EndLine: 11, diff --git a/internal/php7/php7.go b/internal/php7/php7.go index 9810e30bd7d4cfe13636d6e9b9ddf654e0d8054f..eeb759574cf32c77b3edf87fadfc79894a42f52e 100644 GIT binary patch delta 1892 zcmbtUT}+#06wY~H5Wdns7$XI?{%pDlI$B`^DS;N4OM%KtRZKtzbuih5KTE-AmO19s zi@7*V3&AQMAA2+(~yU{JwVJy3@?ybwX99~_kR zAS6M8(>n?ltf-NCG@k_vbvvO&=)4DmU3nUfqA1 z$))Hpx*)VT>xP3XFWr@J-_=UkjJ^z!B_HDwjdrMyUl+*``{_~@Sd%4pfej??N9z=% zVy*`c5R=gfGU&8oZxpO#tc591F>=ve2FZ9b2#xsoqu`1WM9kXecy_3ad$aG7`RKYJ zHe$UWG^%N#o_cr&{v8P!X^1ZPc})KY4jJxYnrVdnsZ`ktCcqOeFk+-rSTN#)N)2=2 zv~CLoy9(%-2lRk*0eC(kDfA>frIL^al+_NiK;i%>MVRRo7wOvD@H42#77V`w1}b>SHn zidUhdSQv2MJmjFGO4i2HCv~DSMqTWVRXKGOHHZ@e0|8#l-iwZL@&*t~c6-Wl zvwaIZQYOiS4!fwt=fW(^qi1+~B8@^p=1fn~9PwTL-_=w{Z|)II|4>fEBU*H^C5Xv7 zTFqkq;kwY{Ev>veuI*)CPcu_@ibYT3jlz=@V>RBzv&|x1{l!2v&B9p=P7I_-GoAiG z9D+MW;fG=*1IHiWrZ?H8(pMx+WEd3=hPP2k)ulXc0He#->z@HmGNS~M!rn#ZdsK$&lRipVw{r0)pBdB qFB7)aNG&Ujw|BP;tbRS{{XKGIwR7n$N}??_az;t0Z}Jg&ME4gWRc$!{ delta 2033 zcmbVNYfO`86wW#CS4wTaa#ySu%G6C!D+8jYq7-FC8&L3q8H%*lk~9i-v~DrGVdC~@ zi(`K{E@l}n(X4>w8rSL9kZyt0E(!l64U9_JouJhD}Z9uj1tBlWrX#}R%uzNzu@amngQ%FSHPFN&j2-CpTG*zKcHI(n)8T%cN|8#) zNp_#ZE+5eF5Y&JsUs0O{0?N1=X=?_VHCUU&Fy?X5RJJE8yUjvpQyNF3226NUV4AA z?Bm>auqQ<1{viAYV+c=&z*20g3TzMUqDVDfA#blxHaQOjIa#;-aH)PcyCB6^KSh^DO!G ziWW7XDG}_tE7zpmWmxT@xMv;127a#&S0V5G3Tide#@0YMHc=@{X%|@5w8TQKO@Ux& zqMA4yl@38BeO!mr=(`~qY|%L=nygiYqcOT>QBx?g8@zm>4@%*Q;NxZR(&yXy0aA=Y zx05n@z`<_~z`Mg$U@Sk+EYIDgzy_GnXAK!(8YJvnw!bc5hXr;j& zsB_yr_%myy?i!crSREIh1uqZySQ;)zbEq{I4vF<)lk!qzAy{}tCca>%6IPXy7+r`H z^0UaV%^v|AV6zurP695nYkQhQE%fM&=;80f94hR?*@l}ZQCAL5qLY2H27LhMQrA^{ zj_%yRT;5rSb}exZ?x9Flrp#1TFK>n%PUG|S==Pz;KBUez@MrOH2B94vgdoY}^ zW?XTxPzGJC9I=r8H#n%1Ae%frIGsQ3#VwHR-4UOerR@+VgHu@e-&SM4dx3L*9)HxB z_%zr5irM)p&@${yasD1IeSnMMshH;x{;rS3)qvONDylTu=wABkhV&_e+GsFc9gN31 ze!|IoAVV!o-oDFJ_&|JeAWONyEH^U#E4evC&8C@~W&68*%3*j)XL&_aMk_wN4A~uf zqdPejF2QznXLPgOr^&+Lt)w`O+csp9dNZO(}>Z|18eM|_9! zlnf8!Sguwkci7LaGIeS6lP;AjSE7mTx!B9yE7h#gx#A9K8%!A1OdeELLxT*SU!iJ9y0s3@|F diff --git a/internal/php7/php7.y b/internal/php7/php7.y index 6a3f21d..fceb827 100644 --- a/internal/php7/php7.y +++ b/internal/php7/php7.y @@ -338,7 +338,7 @@ namespace_name: { $$ = &ParserSeparatedList{ Items: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Position: yylex.(*Parser).builder.NewTokenPosition($1), StringTkn: $1, Value: $1.Value, @@ -348,7 +348,7 @@ namespace_name: } | namespace_name T_NS_SEPARATOR T_STRING { - part := &ast.NameNamePart{ + part := &ast.NamePart{ Position: yylex.(*Parser).builder.NewTokenPosition($3), StringTkn: $3, Value: $3.Value, @@ -364,7 +364,7 @@ namespace_name: name: namespace_name { - $$ = &ast.NameName{ + $$ = &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -432,7 +432,7 @@ top_statement: $$ = &ast.StmtNamespace{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), NsTkn: $1, - Name: &ast.NameName{ + Name: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -445,7 +445,7 @@ top_statement: $$ = &ast.StmtNamespace{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $5), NsTkn: $1, - Name: &ast.NameName{ + Name: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, @@ -467,7 +467,7 @@ top_statement: } | T_USE mixed_group_use_declaration ';' { - use := $2.(*ast.StmtGroupUse) + use := $2.(*ast.StmtGroupUseList) use.Position = yylex.(*Parser).builder.NewTokensPosition($1, $3) use.UseTkn = $1 @@ -477,7 +477,7 @@ top_statement: } | T_USE use_type group_use_declaration ';' { - use := $3.(*ast.StmtGroupUse) + use := $3.(*ast.StmtGroupUseList) use.Position = yylex.(*Parser).builder.NewTokensPosition($1, $4) use.UseTkn = $1 @@ -488,23 +488,23 @@ top_statement: } | T_USE use_declarations ';' { - $$ = &ast.StmtUse{ - Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), - UseTkn: $1, - UseDeclarations: $2.(*ParserSeparatedList).Items, - SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, - SemiColonTkn: $3, + $$ = &ast.StmtUseList{ + Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), + UseTkn: $1, + Uses: $2.(*ParserSeparatedList).Items, + SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, + SemiColonTkn: $3, } } | T_USE use_type use_declarations ';' { - $$ = &ast.StmtUse{ - Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), - UseTkn: $1, - Type: $2, - UseDeclarations: $3.(*ParserSeparatedList).Items, - SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, - SemiColonTkn: $4, + $$ = &ast.StmtUseList{ + Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), + UseTkn: $1, + Type: $2, + Uses: $3.(*ParserSeparatedList).Items, + SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, + SemiColonTkn: $4, } } | T_CONST const_list ';' @@ -545,16 +545,16 @@ group_use_declaration: $4.(*ParserSeparatedList).SeparatorTkns = append($4.(*ParserSeparatedList).SeparatorTkns, $5) } - $$ = &ast.StmtGroupUse{ + $$ = &ast.StmtGroupUseList{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $6), - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $2, OpenCurlyBracketTkn: $3, - UseDeclarations: $4.(*ParserSeparatedList).Items, + Uses: $4.(*ParserSeparatedList).Items, SeparatorTkns: $4.(*ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $6, } @@ -565,17 +565,17 @@ group_use_declaration: $5.(*ParserSeparatedList).SeparatorTkns = append($5.(*ParserSeparatedList).SeparatorTkns, $6) } - $$ = &ast.StmtGroupUse{ + $$ = &ast.StmtGroupUseList{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $7), LeadingNsSeparatorTkn: $1, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $3, OpenCurlyBracketTkn: $4, - UseDeclarations: $5.(*ParserSeparatedList).Items, + Uses: $5.(*ParserSeparatedList).Items, SeparatorTkns: $5.(*ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $7, } @@ -589,16 +589,16 @@ mixed_group_use_declaration: $4.(*ParserSeparatedList).SeparatorTkns = append($4.(*ParserSeparatedList).SeparatorTkns, $5) } - $$ = &ast.StmtGroupUse{ + $$ = &ast.StmtGroupUseList{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $6), - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $2, OpenCurlyBracketTkn: $3, - UseDeclarations: $4.(*ParserSeparatedList).Items, + Uses: $4.(*ParserSeparatedList).Items, SeparatorTkns: $4.(*ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $6, } @@ -609,17 +609,17 @@ mixed_group_use_declaration: $5.(*ParserSeparatedList).SeparatorTkns = append($5.(*ParserSeparatedList).SeparatorTkns, $6) } - $$ = &ast.StmtGroupUse{ + $$ = &ast.StmtGroupUseList{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $7), LeadingNsSeparatorTkn: $1, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($2.(*ParserSeparatedList).Items), Parts: $2.(*ParserSeparatedList).Items, SeparatorTkns: $2.(*ParserSeparatedList).SeparatorTkns, }, NsSeparatorTkn: $3, OpenCurlyBracketTkn: $4, - UseDeclarations: $5.(*ParserSeparatedList).Items, + Uses: $5.(*ParserSeparatedList).Items, SeparatorTkns: $5.(*ParserSeparatedList).SeparatorTkns, CloseCurlyBracketTkn: $7, } @@ -692,7 +692,7 @@ inline_use_declaration: } | use_type unprefixed_use_declaration { - decl := $2.(*ast.StmtUseDeclaration) + decl := $2.(*ast.StmtUse) decl.Type = $1 decl.Position = yylex.(*Parser).builder.NewNodesPosition($1, $2) @@ -703,9 +703,9 @@ inline_use_declaration: unprefixed_use_declaration: namespace_name { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -714,9 +714,9 @@ unprefixed_use_declaration: } | namespace_name T_AS T_STRING { - $$ = &ast.StmtUseDeclaration{ + $$ = &ast.StmtUse{ Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1.(*ParserSeparatedList).Items, $3), - Use: &ast.NameName{ + Use: &ast.Name{ Position: yylex.(*Parser).builder.NewNodeListPosition($1.(*ParserSeparatedList).Items), Parts: $1.(*ParserSeparatedList).Items, SeparatorTkns: $1.(*ParserSeparatedList).SeparatorTkns, @@ -738,7 +738,7 @@ use_declaration: } | T_NS_SEPARATOR unprefixed_use_declaration { - decl := $2.(*ast.StmtUseDeclaration) + decl := $2.(*ast.StmtUse) decl.NsSeparatorTkn = $1 decl.Position = yylex.(*Parser).builder.NewTokenNodePosition($1, $2) @@ -1061,7 +1061,7 @@ statement: { $$ = &ast.StmtLabel{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $2), - LabelName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -1082,7 +1082,7 @@ catch_list: catch.OpenParenthesisTkn = $3 catch.Var = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($5), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($5), IdentifierTkn: $5, Value: $5.Value, @@ -1160,7 +1160,7 @@ function_declaration_statement: Position: yylex.(*Parser).builder.NewTokensPosition($1, $11), FunctionTkn: $1, AmpersandTkn: $2, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -1207,7 +1207,7 @@ class_declaration_statement: Position: yylex.(*Parser).builder.NewOptionalListTokensPosition($1, $2, $9), Modifiers: $1, ClassTkn: $2, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -1235,7 +1235,7 @@ class_declaration_statement: class := &ast.StmtClass{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $8), ClassTkn: $1, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -1296,7 +1296,7 @@ trait_declaration_statement: $$ = &ast.StmtTrait{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $6), TraitTkn: $1, - TraitName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -1314,7 +1314,7 @@ interface_declaration_statement: iface := &ast.StmtInterface{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $7), InterfaceTkn: $1, - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -1492,7 +1492,7 @@ switch_case_list: $$ = &ast.StmtSwitch{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), OpenCurlyBracketTkn: $1, - CaseList: $2, + Cases: $2, CloseCurlyBracketTkn: $3, } } @@ -1502,7 +1502,7 @@ switch_case_list: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), OpenCurlyBracketTkn: $1, CaseSeparatorTkn: $2, - CaseList: $3, + Cases: $3, CloseCurlyBracketTkn: $4, } } @@ -1511,7 +1511,7 @@ switch_case_list: $$ = &ast.StmtSwitch{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), ColonTkn: $1, - CaseList: $2, + Cases: $2, EndSwitchTkn: $3, SemiColonTkn: $4, } @@ -1522,7 +1522,7 @@ switch_case_list: Position: yylex.(*Parser).builder.NewTokensPosition($1, $5), ColonTkn: $1, CaseSeparatorTkn: $2, - CaseList: $3, + Cases: $3, EndSwitchTkn: $4, SemiColonTkn: $5, } @@ -1746,7 +1746,7 @@ parameter: VariadicTkn: $3, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -1772,7 +1772,7 @@ parameter: VariadicTkn: $3, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($4), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -1951,7 +1951,7 @@ static_var: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -1965,7 +1965,7 @@ static_var: Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -1995,7 +1995,7 @@ class_statement: Position: yylex.(*Parser).builder.NewNodeListTokenPosition($1, $4), Modifiers: $1, Type: $2, - Properties: $3.(*ParserSeparatedList).Items, + Props: $3.(*ParserSeparatedList).Items, SeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, SemiColonTkn: $4, } @@ -2043,7 +2043,7 @@ class_statement: Modifiers: $1, FunctionTkn: $2, AmpersandTkn: $3, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($4), IdentifierTkn: $4, Value: $4.Value, @@ -2369,7 +2369,7 @@ property: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2384,7 +2384,7 @@ property: Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -2501,7 +2501,7 @@ anonymous_class: Position: yylex.(*Parser).builder.NewTokensPosition($1, $8), ClassTkn: $1, OpenParenthesisTkn: $2.(*ArgumentList).OpenParenthesisTkn, - Arguments: $2.(*ArgumentList).Arguments, + Args: $2.(*ArgumentList).Arguments, SeparatorTkns: $2.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ArgumentList).CloseParenthesisTkn, OpenCurlyBracketTkn: $6, @@ -2533,7 +2533,7 @@ new_expr: NewTkn: $1, Class: $2, OpenParenthesisTkn: $3.(*ArgumentList).OpenParenthesisTkn, - Arguments: $3.(*ArgumentList).Arguments, + Args: $3.(*ArgumentList).Arguments, SeparatorTkns: $3.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $3.(*ArgumentList).CloseParenthesisTkn, } @@ -3055,7 +3055,7 @@ expr_without_variable: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $5), - Condition: $1, + Cond: $1, QuestionTkn: $2, IfTrue: $3, ColonTkn: $4, @@ -3066,7 +3066,7 @@ expr_without_variable: { $$ = &ast.ExprTernary{ Position: yylex.(*Parser).builder.NewNodesPosition($1, $4), - Condition: $1, + Cond: $1, QuestionTkn: $2, ColonTkn: $3, IfFalse: $4, @@ -3199,7 +3199,7 @@ expr_without_variable: $$ = &ast.ExprYield{ Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2), YieldTkn: $1, - Value: $2, + Val: $2, } } | T_YIELD expr T_DOUBLE_ARROW expr @@ -3209,7 +3209,7 @@ expr_without_variable: YieldTkn: $1, Key: $2, DoubleArrowTkn: $3, - Value: $4, + Val: $4, } } | T_YIELD_FROM expr @@ -3302,7 +3302,7 @@ lexical_vars: $$ = &ast.ExprClosure{ UseTkn: $1, UseOpenParenthesisTkn: $2, - Use: $3.(*ParserSeparatedList).Items, + Uses: $3.(*ParserSeparatedList).Items, UseSeparatorTkns: $3.(*ParserSeparatedList).SeparatorTkns, UseCloseParenthesisTkn: $4, } @@ -3332,7 +3332,7 @@ lexical_var: Position: yylex.(*Parser).builder.NewTokenPosition($1), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -3347,7 +3347,7 @@ lexical_var: AmpersandTkn: $1, Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($2), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -3364,7 +3364,7 @@ function_call: Position: yylex.(*Parser).builder.NewNodesPosition($1, $2), Function: $1, OpenParenthesisTkn: $2.(*ArgumentList).OpenParenthesisTkn, - Arguments: $2.(*ArgumentList).Arguments, + Args: $2.(*ArgumentList).Arguments, SeparatorTkns: $2.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ArgumentList).CloseParenthesisTkn, } @@ -3377,7 +3377,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3398,7 +3398,7 @@ function_call: DoubleColonTkn: $2, Call: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3417,7 +3417,7 @@ function_call: Position: yylex.(*Parser).builder.NewNodesPosition($1, $2), Function: $1, OpenParenthesisTkn: $2.(*ArgumentList).OpenParenthesisTkn, - Arguments: $2.(*ArgumentList).Arguments, + Args: $2.(*ArgumentList).Arguments, SeparatorTkns: $2.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $2.(*ArgumentList).CloseParenthesisTkn, } @@ -3676,7 +3676,7 @@ constant: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -3689,7 +3689,7 @@ constant: Position: yylex.(*Parser).builder.NewNodeTokenPosition($1, $3), Class: $1, DoubleColonTkn: $2, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -3810,7 +3810,7 @@ callable_variable: ObjectOperatorTkn: $2, Method: $3, OpenParenthesisTkn: $4.(*ArgumentList).OpenParenthesisTkn, - Arguments: $4.(*ArgumentList).Arguments, + Args: $4.(*ArgumentList).Arguments, SeparatorTkns: $4.(*ArgumentList).SeparatorTkns, CloseParenthesisTkn: $4.(*ArgumentList).CloseParenthesisTkn, } @@ -3844,12 +3844,12 @@ variable: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Var: $1, ObjectOperatorTkn: $2, - Property: $3, + Prop: $3, } if brackets, ok := $3.(*ParserBrackets); ok { propertyFetch.OpenCurlyBracketTkn = brackets.OpenBracketTkn - propertyFetch.Property = brackets.Child + propertyFetch.Prop = brackets.Child propertyFetch.CloseCurlyBracketTkn = brackets.CloseBracketTkn } @@ -3862,7 +3862,7 @@ simple_variable: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -3875,7 +3875,7 @@ simple_variable: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), DollarTkn: $1, OpenCurlyBracketTkn: $2, - VarName: $3, + Name: $3, CloseCurlyBracketTkn: $4, } } @@ -3884,7 +3884,7 @@ simple_variable: $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2), DollarTkn: $1, - VarName: $2, + Name: $2, } } ; @@ -3896,7 +3896,7 @@ static_member: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } | variable_class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable @@ -3905,7 +3905,7 @@ static_member: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } ; @@ -3941,12 +3941,12 @@ new_variable: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Var: $1, ObjectOperatorTkn: $2, - Property: $3, + Prop: $3, } if brackets, ok := $3.(*ParserBrackets); ok { propertyFetch.OpenCurlyBracketTkn = brackets.OpenBracketTkn - propertyFetch.Property = brackets.Child + propertyFetch.Prop = brackets.Child propertyFetch.CloseCurlyBracketTkn = brackets.CloseBracketTkn } @@ -3958,7 +3958,7 @@ new_variable: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } | new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable @@ -3967,7 +3967,7 @@ new_variable: Position: yylex.(*Parser).builder.NewNodesPosition($1, $3), Class: $1, DoubleColonTkn: $2, - Property: $3, + Prop: $3, } } ; @@ -4174,7 +4174,7 @@ encaps_var: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -4187,7 +4187,7 @@ encaps_var: Position: yylex.(*Parser).builder.NewTokensPosition($1, $4), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, @@ -4204,14 +4204,14 @@ encaps_var: Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), Var: &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, }, }, ObjectOperatorTkn: $2, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($3), IdentifierTkn: $3, Value: $3.Value, @@ -4223,7 +4223,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: $2, + Name: $2, CloseCurlyBracketTkn: $3, } } @@ -4232,7 +4232,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -4245,7 +4245,7 @@ encaps_var: $$ = &ast.ScalarEncapsedStringVar{ Position: yylex.(*Parser).builder.NewTokensPosition($1, $3), DollarOpenCurlyBracketTkn: $1, - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($2), IdentifierTkn: $2, Value: $2.Value, @@ -4321,7 +4321,7 @@ encaps_var_offset: { $$ = &ast.ExprVariable{ Position: yylex.(*Parser).builder.NewTokenPosition($1), - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Position: yylex.(*Parser).builder.NewTokenPosition($1), IdentifierTkn: $1, Value: $1.Value, diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index 261001f..7199459 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -57,9 +57,9 @@ type Visitor interface { StmtTraitUsePrecedence(n *StmtTraitUsePrecedence) StmtTry(n *StmtTry) StmtUnset(n *StmtUnset) - StmtUse(n *StmtUse) - StmtGroupUse(n *StmtGroupUse) - StmtUseDeclaration(n *StmtUseDeclaration) + StmtUse(n *StmtUseList) + StmtGroupUse(n *StmtGroupUseList) + StmtUseDeclaration(n *StmtUse) StmtWhile(n *StmtWhile) ExprArray(n *ExprArray) @@ -166,8 +166,8 @@ type Visitor interface { ScalarMagicConstant(n *ScalarMagicConstant) ScalarString(n *ScalarString) - NameName(n *NameName) + NameName(n *Name) NameFullyQualified(n *NameFullyQualified) NameRelative(n *NameRelative) - NameNamePart(n *NameNamePart) + NameNamePart(n *NamePart) } diff --git a/pkg/ast/node.go b/pkg/ast/node.go index 40e1093..9a9dea7 100644 --- a/pkg/ast/node.go +++ b/pkg/ast/node.go @@ -135,7 +135,7 @@ func (n *ScalarEncapsedStringPart) GetPosition() *position.Position { type ScalarEncapsedStringVar struct { Position *position.Position DollarOpenCurlyBracketTkn *token.Token - VarName Vertex + Name Vertex OpenSquareBracketTkn *token.Token Dim Vertex CloseSquareBracketTkn *token.Token @@ -288,9 +288,9 @@ type StmtClass struct { Position *position.Position Modifiers []Vertex ClassTkn *token.Token - ClassName Vertex + Name Vertex OpenParenthesisTkn *token.Token - Arguments []Vertex + Args []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token ExtendsTkn *token.Token @@ -335,7 +335,7 @@ type StmtClassMethod struct { Modifiers []Vertex FunctionTkn *token.Token AmpersandTkn *token.Token - MethodName Vertex + Name Vertex OpenParenthesisTkn *token.Token Params []Vertex SeparatorTkns []*token.Token @@ -603,7 +603,7 @@ type StmtFunction struct { Position *position.Position FunctionTkn *token.Token AmpersandTkn *token.Token - FunctionName Vertex + Name Vertex OpenParenthesisTkn *token.Token Params []Vertex SeparatorTkns []*token.Token @@ -715,7 +715,7 @@ func (n *StmtInlineHtml) GetPosition() *position.Position { type StmtInterface struct { Position *position.Position InterfaceTkn *token.Token - InterfaceName Vertex + Name Vertex ExtendsTkn *token.Token Extends []Vertex ExtendsSeparatorTkns []*token.Token @@ -734,9 +734,9 @@ func (n *StmtInterface) GetPosition() *position.Position { // StmtLabel node type StmtLabel struct { - Position *position.Position - LabelName Vertex - ColonTkn *token.Token + Position *position.Position + Name Vertex + ColonTkn *token.Token } func (n *StmtLabel) Accept(v Visitor) { @@ -801,7 +801,7 @@ type StmtPropertyList struct { Position *position.Position Modifiers []Vertex Type Vertex - Properties []Vertex + Props []Vertex SeparatorTkns []*token.Token SemiColonTkn *token.Token } @@ -889,7 +889,7 @@ type StmtSwitch struct { ColonTkn *token.Token OpenCurlyBracketTkn *token.Token CaseSeparatorTkn *token.Token - CaseList []Vertex + Cases []Vertex CloseCurlyBracketTkn *token.Token EndSwitchTkn *token.Token SemiColonTkn *token.Token @@ -923,7 +923,7 @@ func (n *StmtThrow) GetPosition() *position.Position { type StmtTrait struct { Position *position.Position TraitTkn *token.Token - TraitName Vertex + Name Vertex OpenCurlyBracketTkn *token.Token Stmts []Vertex CloseCurlyBracketTkn *token.Token @@ -1035,26 +1035,26 @@ func (n *StmtUnset) GetPosition() *position.Position { return n.Position } -// StmtUse node -type StmtUse struct { - Position *position.Position - UseTkn *token.Token - Type Vertex - UseDeclarations []Vertex - SeparatorTkns []*token.Token - SemiColonTkn *token.Token +// StmtUseList node +type StmtUseList struct { + Position *position.Position + UseTkn *token.Token + Type Vertex + Uses []Vertex + SeparatorTkns []*token.Token + SemiColonTkn *token.Token } -func (n *StmtUse) Accept(v Visitor) { +func (n *StmtUseList) Accept(v Visitor) { v.StmtUse(n) } -func (n *StmtUse) GetPosition() *position.Position { +func (n *StmtUseList) GetPosition() *position.Position { return n.Position } -// StmtGroupUse node -type StmtGroupUse struct { +// StmtGroupUseList node +type StmtGroupUseList struct { Position *position.Position UseTkn *token.Token Type Vertex @@ -1062,22 +1062,22 @@ type StmtGroupUse struct { Prefix Vertex NsSeparatorTkn *token.Token OpenCurlyBracketTkn *token.Token - UseDeclarations []Vertex + Uses []Vertex SeparatorTkns []*token.Token CloseCurlyBracketTkn *token.Token SemiColonTkn *token.Token } -func (n *StmtGroupUse) Accept(v Visitor) { +func (n *StmtGroupUseList) Accept(v Visitor) { v.StmtGroupUse(n) } -func (n *StmtGroupUse) GetPosition() *position.Position { +func (n *StmtGroupUseList) GetPosition() *position.Position { return n.Position } -// StmtUseDeclaration node -type StmtUseDeclaration struct { +// StmtUse node +type StmtUse struct { Position *position.Position Type Vertex NsSeparatorTkn *token.Token @@ -1086,11 +1086,11 @@ type StmtUseDeclaration struct { Alias Vertex } -func (n *StmtUseDeclaration) Accept(v Visitor) { +func (n *StmtUse) Accept(v Visitor) { v.StmtUseDeclaration(n) } -func (n *StmtUseDeclaration) GetPosition() *position.Position { +func (n *StmtUse) GetPosition() *position.Position { return n.Position } @@ -1242,7 +1242,7 @@ type ExprClassConstFetch struct { Position *position.Position Class Vertex DoubleColonTkn *token.Token - ConstantName Vertex + Const Vertex } func (n *ExprClassConstFetch) Accept(v Visitor) { @@ -1280,7 +1280,7 @@ type ExprClosure struct { CloseParenthesisTkn *token.Token UseTkn *token.Token UseOpenParenthesisTkn *token.Token - Use []Vertex + Uses []Vertex UseSeparatorTkns []*token.Token UseCloseParenthesisTkn *token.Token ColonTkn *token.Token @@ -1398,7 +1398,7 @@ type ExprFunctionCall struct { Position *position.Position Function Vertex OpenParenthesisTkn *token.Token - Arguments []Vertex + Args []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1502,7 +1502,7 @@ type ExprMethodCall struct { Method Vertex CloseCurlyBracketTkn *token.Token OpenParenthesisTkn *token.Token - Arguments []Vertex + Args []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1521,7 +1521,7 @@ type ExprNew struct { NewTkn *token.Token Class Vertex OpenParenthesisTkn *token.Token - Arguments []Vertex + Args []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1615,7 +1615,7 @@ type ExprPropertyFetch struct { Var Vertex ObjectOperatorTkn *token.Token OpenCurlyBracketTkn *token.Token - Property Vertex + Prop Vertex CloseCurlyBracketTkn *token.Token } @@ -1682,7 +1682,7 @@ type ExprStaticCall struct { Call Vertex CloseCurlyBracketTkn *token.Token OpenParenthesisTkn *token.Token - Arguments []Vertex + Args []Vertex SeparatorTkns []*token.Token CloseParenthesisTkn *token.Token } @@ -1700,7 +1700,7 @@ type ExprStaticPropertyFetch struct { Position *position.Position Class Vertex DoubleColonTkn *token.Token - Property Vertex + Prop Vertex } func (n *ExprStaticPropertyFetch) Accept(v Visitor) { @@ -1714,7 +1714,7 @@ func (n *ExprStaticPropertyFetch) GetPosition() *position.Position { // ExprTernary node type ExprTernary struct { Position *position.Position - Condition Vertex + Cond Vertex QuestionTkn *token.Token IfTrue Vertex ColonTkn *token.Token @@ -1764,7 +1764,7 @@ type ExprVariable struct { Position *position.Position DollarTkn *token.Token OpenCurlyBracketTkn *token.Token - VarName Vertex + Name Vertex CloseCurlyBracketTkn *token.Token } @@ -1782,7 +1782,7 @@ type ExprYield struct { YieldTkn *token.Token Key Vertex DoubleArrowTkn *token.Token - Value Vertex + Val Vertex } func (n *ExprYield) Accept(v Visitor) { @@ -2586,17 +2586,17 @@ func (n *ExprBinarySpaceship) GetPosition() *position.Position { return n.Position } -type NameName struct { +type Name struct { Position *position.Position Parts []Vertex SeparatorTkns []*token.Token } -func (n *NameName) Accept(v Visitor) { +func (n *Name) Accept(v Visitor) { v.NameName(n) } -func (n *NameName) GetPosition() *position.Position { +func (n *Name) GetPosition() *position.Position { return n.Position } @@ -2631,16 +2631,16 @@ func (n *NameRelative) GetPosition() *position.Position { return n.Position } -type NameNamePart struct { +type NamePart struct { Position *position.Position StringTkn *token.Token Value []byte } -func (n *NameNamePart) Accept(v Visitor) { +func (n *NamePart) Accept(v Visitor) { v.NameNamePart(n) } -func (n *NameNamePart) GetPosition() *position.Position { +func (n *NamePart) GetPosition() *position.Position { return n.Position } diff --git a/pkg/visitor/dumper/dumper.go b/pkg/visitor/dumper/dumper.go index 2aa6d0e..e38ebeb 100644 --- a/pkg/visitor/dumper/dumper.go +++ b/pkg/visitor/dumper/dumper.go @@ -99,7 +99,7 @@ func (v *Dumper) dumpToken(key string, tok *token.Token) { v.print(v.indent, "ID: token."+tok.ID.String()+",\n") } if tok.Value != nil { - v.print(v.indent, "Value: []byte("+strconv.Quote(string(tok.Value))+"),\n") + v.print(v.indent, "Val: []byte("+strconv.Quote(string(tok.Value))+"),\n") } v.dumpPosition(tok.Position) v.dumpTokenList("FreeFloating", tok.FreeFloating) @@ -209,7 +209,7 @@ func (v *Dumper) Identifier(n *ast.Identifier) { v.dumpPosition(n.Position) v.dumpToken("IdentifierTkn", n.IdentifierTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -281,9 +281,9 @@ func (v *Dumper) StmtClass(n *ast.StmtClass) { v.dumpPosition(n.Position) v.dumpVertexList("Modifiers", n.Modifiers) v.dumpToken("ClassTkn", n.ClassTkn) - v.dumpVertex("ClassName", n.ClassName) + v.dumpVertex("Name", n.Name) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) - v.dumpVertexList("Arguments", n.Arguments) + v.dumpVertexList("Args", n.Args) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) v.dumpToken("ExtendsTkn", n.ExtendsTkn) @@ -322,7 +322,7 @@ func (v *Dumper) StmtClassMethod(n *ast.StmtClassMethod) { v.dumpVertexList("Modifiers", n.Modifiers) v.dumpToken("FunctionTkn", n.FunctionTkn) v.dumpToken("AmpersandTkn", n.AmpersandTkn) - v.dumpVertex("MethodName", n.MethodName) + v.dumpVertex("Name", n.Name) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) v.dumpVertexList("Params", n.Params) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) @@ -549,7 +549,7 @@ func (v *Dumper) StmtFunction(n *ast.StmtFunction) { v.dumpPosition(n.Position) v.dumpToken("FunctionTkn", n.FunctionTkn) v.dumpToken("AmpersandTkn", n.AmpersandTkn) - v.dumpVertex("FunctionName", n.FunctionName) + v.dumpVertex("Name", n.Name) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) v.dumpVertexList("Params", n.Params) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) @@ -631,7 +631,7 @@ func (v *Dumper) StmtInlineHtml(n *ast.StmtInlineHtml) { v.dumpPosition(n.Position) v.dumpToken("InlineHtmlTkn", n.InlineHtmlTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -643,7 +643,7 @@ func (v *Dumper) StmtInterface(n *ast.StmtInterface) { v.dumpPosition(n.Position) v.dumpToken("InterfaceTkn", n.InterfaceTkn) - v.dumpVertex("InterfaceName", n.InterfaceName) + v.dumpVertex("Name", n.Name) v.dumpToken("ExtendsTkn", n.ExtendsTkn) v.dumpVertexList("Extends", n.Extends) v.dumpTokenList("ExtendsSeparatorTkns", n.ExtendsSeparatorTkns) @@ -660,7 +660,7 @@ func (v *Dumper) StmtLabel(n *ast.StmtLabel) { v.indent++ v.dumpPosition(n.Position) - v.dumpVertex("LabelName", n.LabelName) + v.dumpVertex("Name", n.Name) v.dumpToken("ColonTkn", n.ColonTkn) v.indent-- @@ -714,7 +714,7 @@ func (v *Dumper) StmtPropertyList(n *ast.StmtPropertyList) { v.dumpPosition(n.Position) v.dumpVertexList("Modifiers", n.Modifiers) v.dumpVertex("Type", n.Type) - v.dumpVertexList("Properties", n.Properties) + v.dumpVertexList("Props", n.Props) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("SemiColonTkn", n.SemiColonTkn) @@ -787,7 +787,7 @@ func (v *Dumper) StmtSwitch(n *ast.StmtSwitch) { v.dumpToken("ColonTkn", n.ColonTkn) v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn) v.dumpToken("CaseSeparatorTkn", n.CaseSeparatorTkn) - v.dumpVertexList("CaseList", n.CaseList) + v.dumpVertexList("Cases", n.Cases) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.dumpToken("EndSwitchTkn", n.EndSwitchTkn) v.dumpToken("SemiColonTkn", n.SemiColonTkn) @@ -815,7 +815,7 @@ func (v *Dumper) StmtTrait(n *ast.StmtTrait) { v.dumpPosition(n.Position) v.dumpToken("TraitTkn", n.TraitTkn) - v.dumpVertex("TraitName", n.TraitName) + v.dumpVertex("Name", n.Name) v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn) v.dumpVertexList("Stmts", n.Stmts) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) @@ -907,14 +907,14 @@ func (v *Dumper) StmtUnset(n *ast.StmtUnset) { v.print(v.indent, "},\n") } -func (v *Dumper) StmtUse(n *ast.StmtUse) { - v.print(0, "&ast.StmtUse{\n") +func (v *Dumper) StmtUse(n *ast.StmtUseList) { + v.print(0, "&ast.StmtUseList{\n") v.indent++ v.dumpPosition(n.Position) v.dumpToken("UseTkn", n.UseTkn) v.dumpVertex("Type", n.Type) - v.dumpVertexList("UseDeclarations", n.UseDeclarations) + v.dumpVertexList("Uses", n.Uses) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("SemiColonTkn", n.SemiColonTkn) @@ -922,8 +922,8 @@ func (v *Dumper) StmtUse(n *ast.StmtUse) { v.print(v.indent, "},\n") } -func (v *Dumper) StmtGroupUse(n *ast.StmtGroupUse) { - v.print(0, "&ast.StmtGroupUse{\n") +func (v *Dumper) StmtGroupUse(n *ast.StmtGroupUseList) { + v.print(0, "&ast.StmtGroupUseList{\n") v.indent++ v.dumpPosition(n.Position) @@ -933,7 +933,7 @@ func (v *Dumper) StmtGroupUse(n *ast.StmtGroupUse) { v.dumpVertex("Prefix", n.Prefix) v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn) v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn) - v.dumpVertexList("UseDeclarations", n.UseDeclarations) + v.dumpVertexList("Uses", n.Uses) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.dumpToken("SemiColonTkn", n.SemiColonTkn) @@ -942,14 +942,14 @@ func (v *Dumper) StmtGroupUse(n *ast.StmtGroupUse) { v.print(v.indent, "},\n") } -func (v *Dumper) StmtUseDeclaration(n *ast.StmtUseDeclaration) { - v.print(0, "&ast.StmtUseDeclaration{\n") +func (v *Dumper) StmtUseDeclaration(n *ast.StmtUse) { + v.print(0, "&ast.StmtUse{\n") v.indent++ v.dumpPosition(n.Position) v.dumpVertex("Type", n.Type) v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn) - v.dumpVertex("Use", n.Use) + v.dumpVertex("Uses", n.Use) v.dumpToken("AsTkn", n.AsTkn) v.dumpVertex("Alias", n.Alias) @@ -1084,7 +1084,7 @@ func (v *Dumper) ExprClassConstFetch(n *ast.ExprClassConstFetch) { v.dumpPosition(n.Position) v.dumpVertex("Class", n.Class) v.dumpToken("DoubleColonTkn", n.DoubleColonTkn) - v.dumpVertex("ConstantName", n.ConstantName) + v.dumpVertex("Const", n.Const) v.indent-- v.print(v.indent, "},\n") @@ -1116,7 +1116,7 @@ func (v *Dumper) ExprClosure(n *ast.ExprClosure) { v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) v.dumpToken("UseTkn", n.UseTkn) v.dumpToken("UseOpenParenthesisTkn", n.UseOpenParenthesisTkn) - v.dumpVertexList("Use", n.Use) + v.dumpVertexList("Uses", n.Uses) v.dumpTokenList("UseSeparatorTkns", n.UseSeparatorTkns) v.dumpToken("UseCloseParenthesisTkn", n.UseCloseParenthesisTkn) v.dumpToken("ColonTkn", n.ColonTkn) @@ -1213,7 +1213,7 @@ func (v *Dumper) ExprFunctionCall(n *ast.ExprFunctionCall) { v.dumpPosition(n.Position) v.dumpVertex("Function", n.Function) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) - v.dumpVertexList("Arguments", n.Arguments) + v.dumpVertexList("Args", n.Args) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) @@ -1299,7 +1299,7 @@ func (v *Dumper) ExprMethodCall(n *ast.ExprMethodCall) { v.dumpVertex("Method", n.Method) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) - v.dumpVertexList("Arguments", n.Arguments) + v.dumpVertexList("Args", n.Args) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) @@ -1315,7 +1315,7 @@ func (v *Dumper) ExprNew(n *ast.ExprNew) { v.dumpToken("NewTkn", n.NewTkn) v.dumpVertex("Class", n.Class) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) - v.dumpVertexList("Arguments", n.Arguments) + v.dumpVertexList("Args", n.Args) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) @@ -1391,7 +1391,7 @@ func (v *Dumper) ExprPropertyFetch(n *ast.ExprPropertyFetch) { v.dumpVertex("Var", n.Var) v.dumpToken("ObjectOperatorTkn", n.ObjectOperatorTkn) v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn) - v.dumpVertex("Property", n.Property) + v.dumpVertex("Prop", n.Prop) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.indent-- @@ -1446,7 +1446,7 @@ func (v *Dumper) ExprStaticCall(n *ast.ExprStaticCall) { v.dumpVertex("Call", n.Call) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn) - v.dumpVertexList("Arguments", n.Arguments) + v.dumpVertexList("Args", n.Args) v.dumpTokenList("SeparatorTkns", n.SeparatorTkns) v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn) @@ -1461,7 +1461,7 @@ func (v *Dumper) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) { v.dumpPosition(n.Position) v.dumpVertex("Class", n.Class) v.dumpToken("DoubleColonTkn", n.DoubleColonTkn) - v.dumpVertex("Property", n.Property) + v.dumpVertex("Prop", n.Prop) v.indent-- v.print(v.indent, "},\n") @@ -1472,7 +1472,7 @@ func (v *Dumper) ExprTernary(n *ast.ExprTernary) { v.indent++ v.dumpPosition(n.Position) - v.dumpVertex("Condition", n.Condition) + v.dumpVertex("Cond", n.Cond) v.dumpToken("QuestionTkn", n.QuestionTkn) v.dumpVertex("IfTrue", n.IfTrue) v.dumpToken("ColonTkn", n.ColonTkn) @@ -1513,7 +1513,7 @@ func (v *Dumper) ExprVariable(n *ast.ExprVariable) { v.dumpPosition(n.Position) v.dumpToken("DollarTkn", n.DollarTkn) v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn) - v.dumpVertex("VarName", n.VarName) + v.dumpVertex("Name", n.Name) v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn) v.indent-- @@ -1528,7 +1528,7 @@ func (v *Dumper) ExprYield(n *ast.ExprYield) { v.dumpToken("YieldTkn", n.YieldTkn) v.dumpVertex("Key", n.Key) v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn) - v.dumpVertex("Value", n.Value) + v.dumpVertex("Val", n.Val) v.indent-- v.print(v.indent, "},\n") @@ -2183,7 +2183,7 @@ func (v *Dumper) ScalarDnumber(n *ast.ScalarDnumber) { v.dumpPosition(n.Position) v.dumpToken("NumberTkn", n.NumberTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -2208,7 +2208,7 @@ func (v *Dumper) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) { v.dumpPosition(n.Position) v.dumpToken("EncapsedStrTkn", n.EncapsedStrTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -2220,7 +2220,7 @@ func (v *Dumper) ScalarEncapsedStringVar(n *ast.ScalarEncapsedStringVar) { v.dumpPosition(n.Position) v.dumpToken("DollarOpenCurlyBracketTkn", n.DollarOpenCurlyBracketTkn) - v.dumpVertex("VarName", n.VarName) + v.dumpVertex("Name", n.Name) v.dumpToken("OpenSquareBracketTkn", n.OpenSquareBracketTkn) v.dumpVertex("Dim", n.Dim) v.dumpToken("CloseSquareBracketTkn", n.CloseSquareBracketTkn) @@ -2262,7 +2262,7 @@ func (v *Dumper) ScalarLnumber(n *ast.ScalarLnumber) { v.dumpPosition(n.Position) v.dumpToken("NumberTkn", n.NumberTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -2274,7 +2274,7 @@ func (v *Dumper) ScalarMagicConstant(n *ast.ScalarMagicConstant) { v.dumpPosition(n.Position) v.dumpToken("MagicConstTkn", n.MagicConstTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") @@ -2287,14 +2287,14 @@ func (v *Dumper) ScalarString(n *ast.ScalarString) { v.dumpPosition(n.Position) v.dumpToken("MinusTkn", n.MinusTkn) v.dumpToken("StringTkn", n.StringTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") } -func (v *Dumper) NameName(n *ast.NameName) { - v.print(0, "&ast.NameName{\n") +func (v *Dumper) NameName(n *ast.Name) { + v.print(0, "&ast.Name{\n") v.indent++ v.dumpPosition(n.Position) @@ -2332,13 +2332,13 @@ func (v *Dumper) NameRelative(n *ast.NameRelative) { v.print(v.indent, "},\n") } -func (v *Dumper) NameNamePart(n *ast.NameNamePart) { - v.print(0, "&ast.NameNamePart{\n") +func (v *Dumper) NameNamePart(n *ast.NamePart) { + v.print(0, "&ast.NamePart{\n") v.indent++ v.dumpPosition(n.Position) v.dumpToken("StringTkn", n.StringTkn) - v.dumpValue("Value", n.Value) + v.dumpValue("Val", n.Value) v.indent-- v.print(v.indent, "},\n") diff --git a/pkg/visitor/dumper/dumper_test.go b/pkg/visitor/dumper/dumper_test.go index 8c94ac2..2a9ec04 100644 --- a/pkg/visitor/dumper/dumper_test.go +++ b/pkg/visitor/dumper/dumper_test.go @@ -56,7 +56,7 @@ func TestDumper_root(t *testing.T) { FreeFloating: []*token.Token{ { ID: token.T_WHITESPACE, - Value: []byte(" "), + Val: []byte(" "), Position: &position.Position{ StartLine: 1, EndLine: 2, diff --git a/pkg/visitor/formatter/formatter.go b/pkg/visitor/formatter/formatter.go index e6cb6f6..4f9ce9c 100644 --- a/pkg/visitor/formatter/formatter.go +++ b/pkg/visitor/formatter/formatter.go @@ -267,14 +267,14 @@ func (f *formatter) StmtClass(n *ast.StmtClass) { n.ClassTkn = f.newToken(token.T_CLASS, []byte("class")) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) - n.ClassName.Accept(f) + n.Name.Accept(f) n.OpenParenthesisTkn = nil n.CloseParenthesisTkn = nil - if len(n.Arguments) > 0 { + if len(n.Args) > 0 { n.OpenParenthesisTkn = f.newToken('(', []byte("(")) - n.SeparatorTkns = f.formatList(n.Arguments, ',') + n.SeparatorTkns = f.formatList(n.Args, ',') n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } @@ -333,7 +333,7 @@ func (f *formatter) StmtClassMethod(n *ast.StmtClassMethod) { n.AmpersandTkn = f.newToken('&', []byte("&")) } - n.MethodName.Accept(f) + n.Name.Accept(f) n.OpenParenthesisTkn = f.newToken('(', []byte("(")) @@ -564,7 +564,7 @@ func (f *formatter) StmtFunction(n *ast.StmtFunction) { n.AmpersandTkn = f.newToken('&', []byte("&")) } - n.FunctionName.Accept(f) + n.Name.Accept(f) n.OpenParenthesisTkn = f.newToken('(', []byte("(")) @@ -661,7 +661,7 @@ func (f *formatter) StmtInterface(n *ast.StmtInterface) { n.InterfaceTkn = f.newToken(token.T_INTERFACE, []byte("interface")) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) - n.InterfaceName.Accept(f) + n.Name.Accept(f) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) if n.Extends != nil { @@ -685,7 +685,7 @@ func (f *formatter) StmtInterface(n *ast.StmtInterface) { } func (f *formatter) StmtLabel(n *ast.StmtLabel) { - n.LabelName.Accept(f) + n.Name.Accept(f) n.ColonTkn = f.newToken(':', []byte(":")) } @@ -746,7 +746,7 @@ func (f *formatter) StmtPropertyList(n *ast.StmtPropertyList) { f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) } - n.SeparatorTkns = f.formatList(n.Properties, ',') + n.SeparatorTkns = f.formatList(n.Props, ',') n.SemiColonTkn = f.newSemicolonTkn() } @@ -816,9 +816,9 @@ func (f *formatter) StmtSwitch(n *ast.StmtSwitch) { f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) n.OpenCurlyBracketTkn = f.newToken('{', []byte("{")) - if len(n.CaseList) > 0 { + if len(n.Cases) > 0 { f.indent++ - f.formatStmts(&n.CaseList) + f.formatStmts(&n.Cases) f.indent-- f.addFreeFloating(token.T_WHITESPACE, []byte("\n")) @@ -841,7 +841,7 @@ func (f *formatter) StmtTrait(n *ast.StmtTrait) { n.TraitTkn = f.newToken(token.T_TRAIT, []byte("trait")) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) - n.TraitName.Accept(f) + n.Name.Accept(f) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) n.OpenCurlyBracketTkn = f.newToken('{', []byte("{")) @@ -964,7 +964,7 @@ func (f *formatter) StmtUnset(n *ast.StmtUnset) { n.SemiColonTkn = f.newSemicolonTkn() } -func (f *formatter) StmtUse(n *ast.StmtUse) { +func (f *formatter) StmtUse(n *ast.StmtUseList) { n.UseTkn = f.newToken(token.T_USE, []byte("use")) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) @@ -973,12 +973,12 @@ func (f *formatter) StmtUse(n *ast.StmtUse) { f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) } - n.SeparatorTkns = f.formatList(n.UseDeclarations, ',') + n.SeparatorTkns = f.formatList(n.Uses, ',') n.SemiColonTkn = f.newSemicolonTkn() } -func (f *formatter) StmtGroupUse(n *ast.StmtGroupUse) { +func (f *formatter) StmtGroupUse(n *ast.StmtGroupUseList) { n.UseTkn = f.newToken(token.T_USE, []byte("use")) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) @@ -993,13 +993,13 @@ func (f *formatter) StmtGroupUse(n *ast.StmtGroupUse) { n.NsSeparatorTkn = f.newToken(token.T_NS_SEPARATOR, []byte("\\")) n.OpenCurlyBracketTkn = f.newToken('{', []byte("{")) - n.SeparatorTkns = f.formatList(n.UseDeclarations, ',') + n.SeparatorTkns = f.formatList(n.Uses, ',') n.CloseCurlyBracketTkn = f.newToken('}', []byte("}")) n.SemiColonTkn = f.newSemicolonTkn() } -func (f *formatter) StmtUseDeclaration(n *ast.StmtUseDeclaration) { +func (f *formatter) StmtUseDeclaration(n *ast.StmtUse) { if n.Type != nil { n.Type.Accept(f) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) @@ -1113,7 +1113,7 @@ func (f *formatter) ExprBrackets(n *ast.ExprBrackets) { func (f *formatter) ExprClassConstFetch(n *ast.ExprClassConstFetch) { n.Class.Accept(f) n.DoubleColonTkn = f.newToken(token.T_PAAMAYIM_NEKUDOTAYIM, []byte("::")) - n.ConstantName.Accept(f) + n.Const.Accept(f) } func (f *formatter) ExprClone(n *ast.ExprClone) { @@ -1145,11 +1145,11 @@ func (f *formatter) ExprClosure(n *ast.ExprClosure) { n.UseOpenParenthesisTkn = nil n.UseCloseParenthesisTkn = nil n.UseSeparatorTkns = nil - if len(n.Use) > 0 { + if len(n.Uses) > 0 { f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) n.UseTkn = f.newToken(token.T_USE, []byte("use")) n.OpenParenthesisTkn = f.newToken('(', []byte("(")) - n.SeparatorTkns = f.formatList(n.Use, ',') + n.SeparatorTkns = f.formatList(n.Uses, ',') n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } @@ -1221,8 +1221,8 @@ func (f *formatter) ExprFunctionCall(n *ast.ExprFunctionCall) { n.Function.Accept(f) n.OpenParenthesisTkn = f.newToken('(', []byte("(")) n.SeparatorTkns = nil - if len(n.Arguments) > 0 { - n.SeparatorTkns = f.formatList(n.Arguments, ',') + if len(n.Args) > 0 { + n.SeparatorTkns = f.formatList(n.Args, ',') } n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } @@ -1281,8 +1281,8 @@ func (f *formatter) ExprMethodCall(n *ast.ExprMethodCall) { n.OpenParenthesisTkn = f.newToken('(', []byte("(")) n.SeparatorTkns = nil - if len(n.Arguments) > 0 { - n.SeparatorTkns = f.formatList(n.Arguments, ',') + if len(n.Args) > 0 { + n.SeparatorTkns = f.formatList(n.Args, ',') } n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } @@ -1296,9 +1296,9 @@ func (f *formatter) ExprNew(n *ast.ExprNew) { n.SeparatorTkns = nil n.OpenParenthesisTkn = nil n.CloseParenthesisTkn = nil - if len(n.Arguments) > 0 { + if len(n.Args) > 0 { n.OpenParenthesisTkn = f.newToken('(', []byte("(")) - n.SeparatorTkns = f.formatList(n.Arguments, ',') + n.SeparatorTkns = f.formatList(n.Args, ',') n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } } @@ -1336,7 +1336,7 @@ func (f *formatter) ExprPropertyFetch(n *ast.ExprPropertyFetch) { n.OpenCurlyBracketTkn = nil n.CloseCurlyBracketTkn = nil - switch n.Property.(type) { + switch n.Prop.(type) { case *ast.Identifier: case *ast.ExprVariable: default: @@ -1344,7 +1344,7 @@ func (f *formatter) ExprPropertyFetch(n *ast.ExprPropertyFetch) { n.CloseCurlyBracketTkn = f.newToken('}', []byte("}")) } - n.Property.Accept(f) + n.Prop.Accept(f) } func (f *formatter) ExprRequire(n *ast.ExprRequire) { @@ -1385,8 +1385,8 @@ func (f *formatter) ExprStaticCall(n *ast.ExprStaticCall) { n.OpenParenthesisTkn = f.newToken('(', []byte("(")) n.SeparatorTkns = nil - if len(n.Arguments) > 0 { - n.SeparatorTkns = f.formatList(n.Arguments, ',') + if len(n.Args) > 0 { + n.SeparatorTkns = f.formatList(n.Args, ',') } n.CloseParenthesisTkn = f.newToken(')', []byte(")")) } @@ -1394,11 +1394,11 @@ func (f *formatter) ExprStaticCall(n *ast.ExprStaticCall) { func (f *formatter) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) { n.Class.Accept(f) n.DoubleColonTkn = f.newToken(token.T_PAAMAYIM_NEKUDOTAYIM, []byte("::")) - n.Property.Accept(f) + n.Prop.Accept(f) } func (f *formatter) ExprTernary(n *ast.ExprTernary) { - n.Condition.Accept(f) + n.Cond.Accept(f) f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) n.QuestionTkn = f.newToken('?', []byte("?")) if n.IfTrue != nil { @@ -1422,13 +1422,13 @@ func (f *formatter) ExprUnaryPlus(n *ast.ExprUnaryPlus) { } func (f *formatter) ExprVariable(n *ast.ExprVariable) { - if _, ok := n.VarName.(*ast.Identifier); !ok { + if _, ok := n.Name.(*ast.Identifier); !ok { n.DollarTkn = f.newToken('$', []byte("$")) } n.OpenCurlyBracketTkn = nil n.CloseCurlyBracketTkn = nil - switch n.VarName.(type) { + switch n.Name.(type) { case *ast.Identifier: case *ast.ExprVariable: default: @@ -1436,7 +1436,7 @@ func (f *formatter) ExprVariable(n *ast.ExprVariable) { n.CloseCurlyBracketTkn = f.newToken('}', []byte("}")) } - n.VarName.Accept(f) + n.Name.Accept(f) } func (f *formatter) ExprYield(n *ast.ExprYield) { @@ -1450,7 +1450,7 @@ func (f *formatter) ExprYield(n *ast.ExprYield) { f.addFreeFloating(token.T_WHITESPACE, []byte(" ")) } - n.Value.Accept(f) + n.Val.Accept(f) } func (f *formatter) ExprYieldFrom(n *ast.ExprYieldFrom) { @@ -1942,7 +1942,7 @@ func (f *formatter) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) { func (f *formatter) ScalarEncapsedStringVar(n *ast.ScalarEncapsedStringVar) { n.DollarOpenCurlyBracketTkn = f.newToken(token.T_DOLLAR_OPEN_CURLY_BRACES, []byte("${")) - n.VarName.Accept(f) + n.Name.Accept(f) n.OpenSquareBracketTkn = nil n.CloseSquareBracketTkn = nil @@ -1993,7 +1993,7 @@ func (f *formatter) ScalarString(n *ast.ScalarString) { } } -func (f *formatter) NameName(n *ast.NameName) { +func (f *formatter) NameName(n *ast.Name) { separatorTkns := make([]*token.Token, len(n.Parts)-1) for i, v := range n.Parts { v.Accept(f) @@ -2031,7 +2031,7 @@ func (f *formatter) NameRelative(n *ast.NameRelative) { } } -func (f *formatter) NameNamePart(n *ast.NameNamePart) { +func (f *formatter) NameNamePart(n *ast.NamePart) { if n.StringTkn == nil { n.StringTkn = f.newToken(token.T_STRING, n.Value) } else { diff --git a/pkg/visitor/formatter/formatter_test.go b/pkg/visitor/formatter/formatter_test.go index a170d89..b78ad38 100644 --- a/pkg/visitor/formatter/formatter_test.go +++ b/pkg/visitor/formatter/formatter_test.go @@ -63,7 +63,7 @@ func TestFormatter_Parameter(t *testing.T) { n := &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -89,7 +89,7 @@ func TestFormatter_Parameter_Ref(t *testing.T) { n := &ast.Parameter{ AmpersandTkn: &token.Token{}, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -115,7 +115,7 @@ func TestFormatter_Parameter_Variadic(t *testing.T) { n := &ast.Parameter{ VariadicTkn: &token.Token{}, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -143,7 +143,7 @@ func TestFormatter_Parameter_Type(t *testing.T) { Value: []byte("array"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -168,7 +168,7 @@ func TestFormatter_Parameter_Default(t *testing.T) { n := &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -217,7 +217,7 @@ func TestFormatter_Argument(t *testing.T) { n := &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -243,7 +243,7 @@ func TestFormatter_Argument_Ref(t *testing.T) { n := &ast.Argument{ AmpersandTkn: &token.Token{}, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -269,7 +269,7 @@ func TestFormatter_Argument_Variadic(t *testing.T) { n := &ast.Argument{ VariadicTkn: &token.Token{}, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -313,7 +313,7 @@ func TestFormatter_StmtBreak_Expr(t *testing.T) { n := &ast.StmtBreak{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -338,7 +338,7 @@ func TestFormatter_Case(t *testing.T) { n := &ast.StmtCase{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -367,23 +367,23 @@ func TestFormatter_Catch(t *testing.T) { n := &ast.StmtCatch{ Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, }, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$baz"), }, }, @@ -412,7 +412,7 @@ func TestFormatter_Class(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClass{ - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -445,7 +445,7 @@ func TestFormatter_Class_Modifier(t *testing.T) { Value: []byte("final"), }, }, - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -473,20 +473,20 @@ func TestFormatter_Class_Anonymous(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClass{ - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -517,12 +517,12 @@ func TestFormatter_Class_Extends(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClass{ - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, - Extends: &ast.NameName{ + Extends: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -552,13 +552,13 @@ func TestFormatter_Class_Implements(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClass{ - ClassName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Implements: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -670,7 +670,7 @@ func TestFormatter_ClassMethod(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClassMethod{ - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmt: &ast.StmtNop{}, @@ -699,7 +699,7 @@ func TestFormatter_ClassMethod_Modifier(t *testing.T) { Value: []byte("public"), }, }, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmt: &ast.StmtStmtList{ @@ -730,7 +730,7 @@ func TestFormatter_ClassMethod_Ref(t *testing.T) { n := &ast.StmtClassMethod{ AmpersandTkn: &token.Token{}, - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmt: &ast.StmtStmtList{ @@ -760,20 +760,20 @@ func TestFormatter_ClassMethod_Params(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClassMethod{ - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Params: []ast.Vertex{ &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -806,12 +806,12 @@ func TestFormatter_ClassMethod_ReturnType(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtClassMethod{ - MethodName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -927,7 +927,7 @@ func TestFormatter_StmtContinue_Expr(t *testing.T) { n := &ast.StmtContinue{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -1047,7 +1047,7 @@ func TestFormatter_StmtDo(t *testing.T) { }, }, Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -1129,7 +1129,7 @@ func TestFormatter_StmtElseIf(t *testing.T) { n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -1161,7 +1161,7 @@ func TestFormatter_StmtExpression(t *testing.T) { n := &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$var"), }, }, @@ -1212,36 +1212,36 @@ func TestFormatter_StmtFor(t *testing.T) { n := &ast.StmtFor{ Init: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, }, Cond: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, }, Loop: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -1274,12 +1274,12 @@ func TestFormatter_StmtForeach(t *testing.T) { n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$val"), }, }, @@ -1311,13 +1311,13 @@ func TestFormatter_StmtForeach_Reference(t *testing.T) { n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, AmpersandTkn: &token.Token{}, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$val"), }, }, @@ -1349,17 +1349,17 @@ func TestFormatter_StmtForeach_Key(t *testing.T) { n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Key: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$key"), }, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$val"), }, }, @@ -1390,7 +1390,7 @@ func TestFormatter_StmtFunction(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtFunction{ - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -1419,7 +1419,7 @@ func TestFormatter_StmtFunction_Ref(t *testing.T) { n := &ast.StmtFunction{ AmpersandTkn: &token.Token{}, - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -1447,20 +1447,20 @@ func TestFormatter_StmtFunction_Params(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtFunction{ - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Params: []ast.Vertex{ &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -1491,12 +1491,12 @@ func TestFormatter_StmtFunction_ReturnType(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtFunction{ - FunctionName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -1528,12 +1528,12 @@ func TestFormatter_StmtGlobal(t *testing.T) { n := &ast.StmtGlobal{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -1601,7 +1601,7 @@ func TestFormatter_StmtIf(t *testing.T) { n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -1633,7 +1633,7 @@ func TestFormatter_StmtIf_ElseIf(t *testing.T) { n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -1645,7 +1645,7 @@ func TestFormatter_StmtIf_ElseIf(t *testing.T) { ElseIf: []ast.Vertex{ &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -1657,7 +1657,7 @@ func TestFormatter_StmtIf_ElseIf(t *testing.T) { }, &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$baz"), }, }, @@ -1695,7 +1695,7 @@ func TestFormatter_StmtIf_Else(t *testing.T) { n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -1745,7 +1745,7 @@ func TestFormatter_StmtInlineHtml(t *testing.T) { &ast.StmtEcho{ Exprs: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -1784,7 +1784,7 @@ func TestFormatter_StmtInterface(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtInterface{ - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -1812,13 +1812,13 @@ func TestFormatter_StmtInterface_Extends(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtInterface{ - InterfaceName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Extends: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -1849,7 +1849,7 @@ func TestFormatter_StmtLabel(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtLabel{ - LabelName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("FOO"), }, } @@ -1872,9 +1872,9 @@ func TestFormatter_StmtNamespace_Name(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtNamespace{ - Name: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -1992,7 +1992,7 @@ func TestFormatter_StmtPropertyList(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtPropertyList{ - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Var: &ast.Identifier{ Value: []byte("$foo"), @@ -2032,7 +2032,7 @@ func TestFormatter_StmtPropertyList_Modifiers(t *testing.T) { Value: []byte("static"), }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Var: &ast.Identifier{ Value: []byte("$foo"), @@ -2067,7 +2067,7 @@ func TestFormatter_StmtPropertyList_Type(t *testing.T) { Type: &ast.Identifier{ Value: []byte("array"), }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Var: &ast.Identifier{ Value: []byte("$foo"), @@ -2144,14 +2144,14 @@ func TestFormatter_StmtStatic(t *testing.T) { Vars: []ast.Vertex{ &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -2178,7 +2178,7 @@ func TestFormatter_StmtStaticVar(t *testing.T) { n := &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -2203,7 +2203,7 @@ func TestFormatter_StmtStaticVar_Expr(t *testing.T) { n := &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -2268,11 +2268,11 @@ func TestFormatter_StmtSwitch(t *testing.T) { n := &ast.StmtSwitch{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Cond: &ast.ScalarString{ Value: []byte("'bar'"), @@ -2313,7 +2313,7 @@ func TestFormatter_StmtThrow(t *testing.T) { n := &ast.StmtThrow{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -2337,7 +2337,7 @@ func TestFormatter_StmtTrait(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtTrait{ - TraitName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Stmts: []ast.Vertex{ @@ -2366,16 +2366,16 @@ func TestFormatter_StmtTraitUse(t *testing.T) { n := &ast.StmtTraitUse{ Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -2402,16 +2402,16 @@ func TestFormatter_StmtTraitUse_Adaptations(t *testing.T) { n := &ast.StmtTraitUse{ Traits: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -2478,9 +2478,9 @@ func TestFormatter_StmtTraitUseAlias_Trait(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtTraitUseAlias{ - Trait: &ast.NameName{ + Trait: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -2570,16 +2570,16 @@ func TestFormatter_StmtTraitUsePrecedence(t *testing.T) { Value: []byte("foo"), }, Insteadof: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, }, - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("baz"), }, }, @@ -2605,9 +2605,9 @@ func TestFormatter_StmtTraitUsePrecedence_Trait(t *testing.T) { o := bytes.NewBufferString("") n := &ast.StmtTraitUsePrecedence{ - Trait: &ast.NameName{ + Trait: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -2616,9 +2616,9 @@ func TestFormatter_StmtTraitUsePrecedence_Trait(t *testing.T) { Value: []byte("bar"), }, Insteadof: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("baz"), }, }, @@ -2675,16 +2675,16 @@ func TestFormatter_StmtTry_Catch(t *testing.T) { Catches: []ast.Vertex{ &ast.StmtCatch{ Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -2694,16 +2694,16 @@ func TestFormatter_StmtTry_Catch(t *testing.T) { }, &ast.StmtCatch{ Types: []ast.Vertex{ - &ast.NameName{ + &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -2772,12 +2772,12 @@ func TestFormatter_StmtUnset(t *testing.T) { n := &ast.StmtUnset{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -2801,21 +2801,21 @@ func TestFormatter_StmtUnset(t *testing.T) { func TestFormatter_StmtUse(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + n := &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, }, - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -2841,15 +2841,15 @@ func TestFormatter_StmtUse(t *testing.T) { func TestFormatter_StmtUse_Type(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtUse{ + n := &ast.StmtUseList{ Type: &ast.Identifier{ Value: []byte("function"), }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -2875,28 +2875,28 @@ func TestFormatter_StmtUse_Type(t *testing.T) { func TestFormatter_StmtGroupUse(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtGroupUse{ - Prefix: &ast.NameName{ + n := &ast.StmtGroupUseList{ + Prefix: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, }, }, - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("baz"), }, }, @@ -2922,31 +2922,31 @@ func TestFormatter_StmtGroupUse(t *testing.T) { func TestFormatter_StmtGroupUse_Type(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtGroupUse{ + n := &ast.StmtGroupUseList{ Type: &ast.Identifier{ Value: []byte("function"), }, - Prefix: &ast.NameName{ + Prefix: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, }, }, - &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("baz"), }, }, @@ -2972,10 +2972,10 @@ func TestFormatter_StmtGroupUse_Type(t *testing.T) { func TestFormatter_StmtUseDeclaration(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + n := &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -2999,13 +2999,13 @@ func TestFormatter_StmtUseDeclaration(t *testing.T) { func TestFormatter_StmtUseDeclaration_Type(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtUseDeclaration{ + n := &ast.StmtUse{ Type: &ast.Identifier{ Value: []byte("function"), }, - Use: &ast.NameName{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -3029,10 +3029,10 @@ func TestFormatter_StmtUseDeclaration_Type(t *testing.T) { func TestFormatter_StmtUseDeclaration_Alias(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.StmtUseDeclaration{ - Use: &ast.NameName{ + n := &ast.StmtUse{ + Use: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -3061,7 +3061,7 @@ func TestFormatter_StmtWhile(t *testing.T) { n := &ast.StmtWhile{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3089,14 +3089,14 @@ func TestFormatter_ExprArray(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -3123,12 +3123,12 @@ func TestFormatter_ExprArrayDimFetch(t *testing.T) { n := &ast.ExprArrayDimFetch{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Dim: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -3153,7 +3153,7 @@ func TestFormatter_ExprArrayItem(t *testing.T) { n := &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3178,12 +3178,12 @@ func TestFormatter_ExprArrayItem_Key(t *testing.T) { n := &ast.ExprArrayItem{ Key: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -3209,7 +3209,7 @@ func TestFormatter_ExprArrayItem_Variadic(t *testing.T) { n := &ast.ExprArrayItem{ EllipsisTkn: &token.Token{}, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3234,7 +3234,7 @@ func TestFormatter_ExprArrowFunction(t *testing.T) { n := &ast.ExprArrowFunction{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3260,7 +3260,7 @@ func TestFormatter_ExprArrowFunction_Ref(t *testing.T) { n := &ast.ExprArrowFunction{ AmpersandTkn: &token.Token{}, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3287,21 +3287,21 @@ func TestFormatter_ExprArrowFunction_Params(t *testing.T) { Params: []ast.Vertex{ &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3325,15 +3325,15 @@ func TestFormatter_ExprArrowFunction_ReturnType(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprArrowFunction{ - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -3358,7 +3358,7 @@ func TestFormatter_ExprBitwiseNot(t *testing.T) { n := &ast.ExprBitwiseNot{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3383,7 +3383,7 @@ func TestFormatter_ExprBooleanNot(t *testing.T) { n := &ast.ExprBooleanNot{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3408,7 +3408,7 @@ func TestFormatter_ExprBrackets(t *testing.T) { n := &ast.ExprBrackets{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3433,11 +3433,11 @@ func TestFormatter_ExprClassConstFetch(t *testing.T) { n := &ast.ExprClassConstFetch{ Class: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Value: []byte("bar"), }, } @@ -3461,7 +3461,7 @@ func TestFormatter_ExprClone(t *testing.T) { n := &ast.ExprClone{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3539,14 +3539,14 @@ func TestFormatter_ExprClosure_Params(t *testing.T) { Params: []ast.Vertex{ &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -3577,9 +3577,9 @@ func TestFormatter_ExprClosure_ReturnType(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprClosure{ - ReturnType: &ast.NameName{ + ReturnType: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -3609,10 +3609,10 @@ func TestFormatter_ExprClosure_Use(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprClosure{ - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3644,7 +3644,7 @@ func TestFormatter_ExprClosureUse(t *testing.T) { n := &ast.ExprClosureUse{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, @@ -3670,7 +3670,7 @@ func TestFormatter_ExprClosureUse_Reference(t *testing.T) { n := &ast.ExprClosureUse{ AmpersandTkn: &token.Token{}, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, @@ -3694,9 +3694,9 @@ func TestFormatter_ExprConstFetch(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprConstFetch{ - Const: &ast.NameName{ + Const: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("FOO"), }, }, @@ -3722,7 +3722,7 @@ func TestFormatter_ExprEmpty(t *testing.T) { n := &ast.ExprEmpty{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3747,7 +3747,7 @@ func TestFormatter_ExprErrorSuppress(t *testing.T) { n := &ast.ExprErrorSuppress{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3772,7 +3772,7 @@ func TestFormatter_ExprEval(t *testing.T) { n := &ast.ExprEval{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3816,7 +3816,7 @@ func TestFormatter_ExprExit_Expr(t *testing.T) { n := &ast.ExprExit{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -3840,9 +3840,9 @@ func TestFormatter_ExprFunctionCall(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprFunctionCall{ - Function: &ast.NameName{ + Function: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -3867,17 +3867,17 @@ func TestFormatter_ExprFunctionCall_Arguments(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprFunctionCall{ - Function: &ast.NameName{ + Function: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -3950,13 +3950,13 @@ func TestFormatter_ExprInstanceOf(t *testing.T) { n := &ast.ExprInstanceOf{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -3983,12 +3983,12 @@ func TestFormatter_ExprIsset(t *testing.T) { n := &ast.ExprIsset{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -4016,14 +4016,14 @@ func TestFormatter_ExprList(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -4050,7 +4050,7 @@ func TestFormatter_ExprMethodCall(t *testing.T) { n := &ast.ExprMethodCall{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4078,7 +4078,7 @@ func TestFormatter_ExprMethodCall_Expr(t *testing.T) { n := &ast.ExprMethodCall{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4106,24 +4106,24 @@ func TestFormatter_ExprMethodCall_Arguments(t *testing.T) { n := &ast.ExprMethodCall{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Method: &ast.Identifier{ Value: []byte("bar"), }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -4149,9 +4149,9 @@ func TestFormatter_ExprNew(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprNew{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -4176,24 +4176,24 @@ func TestFormatter_ExprNew_Arguments(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprNew{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -4220,7 +4220,7 @@ func TestFormatter_ExprPreDec(t *testing.T) { n := &ast.ExprPreDec{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4245,7 +4245,7 @@ func TestFormatter_ExprPreInc(t *testing.T) { n := &ast.ExprPreInc{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4270,7 +4270,7 @@ func TestFormatter_ExprPostDec(t *testing.T) { n := &ast.ExprPostDec{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4295,7 +4295,7 @@ func TestFormatter_ExprPostInc(t *testing.T) { n := &ast.ExprPostInc{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4320,7 +4320,7 @@ func TestFormatter_ExprPrint(t *testing.T) { n := &ast.ExprPrint{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4345,11 +4345,11 @@ func TestFormatter_ExprPropertyFetch(t *testing.T) { n := &ast.ExprPropertyFetch{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - Property: &ast.Identifier{ + Prop: &ast.Identifier{ Value: []byte("bar"), }, } @@ -4373,11 +4373,11 @@ func TestFormatter_ExprPropertyFetch_Expr(t *testing.T) { n := &ast.ExprPropertyFetch{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - Property: &ast.ScalarString{ + Prop: &ast.ScalarString{ Value: []byte("'bar'"), }, } @@ -4495,7 +4495,7 @@ func TestFormatter_ExprShellExec_Parts(t *testing.T) { Value: []byte("foo "), }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4523,9 +4523,9 @@ func TestFormatter_ExprStaticCall(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprStaticCall{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -4553,9 +4553,9 @@ func TestFormatter_ExprStaticCall_Expr(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprStaticCall{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -4583,9 +4583,9 @@ func TestFormatter_ExprStaticCall_Arguments(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprStaticCall{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, @@ -4593,17 +4593,17 @@ func TestFormatter_ExprStaticCall_Arguments(t *testing.T) { Call: &ast.Identifier{ Value: []byte("bar"), }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$a"), }, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$b"), }, }, @@ -4629,15 +4629,15 @@ func TestFormatter_ExprStaticPropertyFetch(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprStaticPropertyFetch{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, }, }, - Property: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Prop: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4661,18 +4661,18 @@ func TestFormatter_ExprTernary(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprTernary{ - Condition: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Cond: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, IfTrue: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, IfFalse: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$baz"), }, }, @@ -4696,13 +4696,13 @@ func TestFormatter_ExprTernary_short(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprTernary{ - Condition: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Cond: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, IfFalse: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4727,7 +4727,7 @@ func TestFormatter_ExprUnaryMinus(t *testing.T) { n := &ast.ExprUnaryMinus{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4752,7 +4752,7 @@ func TestFormatter_ExprUnaryPlus(t *testing.T) { n := &ast.ExprUnaryPlus{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4776,7 +4776,7 @@ func TestFormatter_ExprVariable(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, } @@ -4799,8 +4799,8 @@ func TestFormatter_ExprVariable_Variable(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprVariable{ - VarName: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4824,7 +4824,7 @@ func TestFormatter_ExprVariable_Expression(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprVariable{ - VarName: &ast.ScalarString{ + Name: &ast.ScalarString{ Value: []byte("'foo'"), }, } @@ -4847,8 +4847,8 @@ func TestFormatter_ExprYield(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ExprYield{ - Value: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Val: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4873,12 +4873,12 @@ func TestFormatter_ExprYield_Key(t *testing.T) { n := &ast.ExprYield{ Key: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, - Value: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Val: &ast.ExprVariable{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4903,7 +4903,7 @@ func TestFormatter_ExprYieldFrom(t *testing.T) { n := &ast.ExprYieldFrom{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -4928,12 +4928,12 @@ func TestFormatter_ExprAssign(t *testing.T) { n := &ast.ExprAssign{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4958,12 +4958,12 @@ func TestFormatter_ExprAssignReference(t *testing.T) { n := &ast.ExprAssignReference{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -4988,12 +4988,12 @@ func TestFormatter_ExprAssignBitwiseAnd(t *testing.T) { n := &ast.ExprAssignBitwiseAnd{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5018,12 +5018,12 @@ func TestFormatter_ExprAssignBitwiseOr(t *testing.T) { n := &ast.ExprAssignBitwiseOr{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5048,12 +5048,12 @@ func TestFormatter_ExprAssignBitwiseXor(t *testing.T) { n := &ast.ExprAssignBitwiseXor{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5078,12 +5078,12 @@ func TestFormatter_ExprAssignCoalesce(t *testing.T) { n := &ast.ExprAssignCoalesce{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5108,12 +5108,12 @@ func TestFormatter_ExprAssignConcat(t *testing.T) { n := &ast.ExprAssignConcat{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5138,12 +5138,12 @@ func TestFormatter_ExprAssignDiv(t *testing.T) { n := &ast.ExprAssignDiv{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5168,12 +5168,12 @@ func TestFormatter_ExprAssignMinus(t *testing.T) { n := &ast.ExprAssignMinus{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5198,12 +5198,12 @@ func TestFormatter_ExprAssignMod(t *testing.T) { n := &ast.ExprAssignMod{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5228,12 +5228,12 @@ func TestFormatter_ExprAssignMul(t *testing.T) { n := &ast.ExprAssignMul{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5258,12 +5258,12 @@ func TestFormatter_ExprAssignPlus(t *testing.T) { n := &ast.ExprAssignPlus{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5288,12 +5288,12 @@ func TestFormatter_ExprAssignPow(t *testing.T) { n := &ast.ExprAssignPow{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5318,12 +5318,12 @@ func TestFormatter_ExprAssignShiftLeft(t *testing.T) { n := &ast.ExprAssignShiftLeft{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5348,12 +5348,12 @@ func TestFormatter_ExprAssignShiftRight(t *testing.T) { n := &ast.ExprAssignShiftRight{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5378,12 +5378,12 @@ func TestFormatter_ExprBinaryBitwiseAnd(t *testing.T) { n := &ast.ExprBinaryBitwiseAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5408,12 +5408,12 @@ func TestFormatter_ExprBinaryBitwiseOr(t *testing.T) { n := &ast.ExprBinaryBitwiseOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5438,12 +5438,12 @@ func TestFormatter_ExprBinaryBitwiseXor(t *testing.T) { n := &ast.ExprBinaryBitwiseXor{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5468,12 +5468,12 @@ func TestFormatter_ExprBinaryBooleanAnd(t *testing.T) { n := &ast.ExprBinaryBooleanAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5498,12 +5498,12 @@ func TestFormatter_ExprBinaryBooleanOr(t *testing.T) { n := &ast.ExprBinaryBooleanOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5528,12 +5528,12 @@ func TestFormatter_ExprBinaryCoalesce(t *testing.T) { n := &ast.ExprBinaryCoalesce{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5558,12 +5558,12 @@ func TestFormatter_ExprBinaryConcat(t *testing.T) { n := &ast.ExprBinaryConcat{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5588,12 +5588,12 @@ func TestFormatter_ExprBinaryDiv(t *testing.T) { n := &ast.ExprBinaryDiv{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5618,12 +5618,12 @@ func TestFormatter_ExprBinaryEqual(t *testing.T) { n := &ast.ExprBinaryEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5648,12 +5648,12 @@ func TestFormatter_ExprBinaryGreater(t *testing.T) { n := &ast.ExprBinaryGreater{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5678,12 +5678,12 @@ func TestFormatter_ExprBinaryGreaterOrEqual(t *testing.T) { n := &ast.ExprBinaryGreaterOrEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5708,12 +5708,12 @@ func TestFormatter_ExprBinaryIdentical(t *testing.T) { n := &ast.ExprBinaryIdentical{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5738,12 +5738,12 @@ func TestFormatter_ExprBinaryLogicalAnd(t *testing.T) { n := &ast.ExprBinaryLogicalAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5768,12 +5768,12 @@ func TestFormatter_ExprBinaryLogicalOr(t *testing.T) { n := &ast.ExprBinaryLogicalOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5798,12 +5798,12 @@ func TestFormatter_ExprBinaryLogicalXor(t *testing.T) { n := &ast.ExprBinaryLogicalXor{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5828,12 +5828,12 @@ func TestFormatter_ExprBinaryMinus(t *testing.T) { n := &ast.ExprBinaryMinus{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5858,12 +5858,12 @@ func TestFormatter_ExprBinaryMod(t *testing.T) { n := &ast.ExprBinaryMod{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5888,12 +5888,12 @@ func TestFormatter_ExprBinaryMul(t *testing.T) { n := &ast.ExprBinaryMul{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5918,12 +5918,12 @@ func TestFormatter_ExprBinaryNotEqual(t *testing.T) { n := &ast.ExprBinaryNotEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5948,12 +5948,12 @@ func TestFormatter_ExprBinaryNotIdentical(t *testing.T) { n := &ast.ExprBinaryNotIdentical{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -5978,12 +5978,12 @@ func TestFormatter_ExprBinaryPlus(t *testing.T) { n := &ast.ExprBinaryPlus{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6008,12 +6008,12 @@ func TestFormatter_ExprBinaryPow(t *testing.T) { n := &ast.ExprBinaryPow{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6038,12 +6038,12 @@ func TestFormatter_ExprBinaryShiftLeft(t *testing.T) { n := &ast.ExprBinaryShiftLeft{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6068,12 +6068,12 @@ func TestFormatter_ExprBinaryShiftRight(t *testing.T) { n := &ast.ExprBinaryShiftRight{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6098,12 +6098,12 @@ func TestFormatter_ExprBinarySmaller(t *testing.T) { n := &ast.ExprBinarySmaller{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6128,12 +6128,12 @@ func TestFormatter_ExprBinarySmallerOrEqual(t *testing.T) { n := &ast.ExprBinarySmallerOrEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6158,12 +6158,12 @@ func TestFormatter_ExprBinarySpaceship(t *testing.T) { n := &ast.ExprBinarySpaceship{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6188,7 +6188,7 @@ func TestFormatter_ExprCastArray(t *testing.T) { n := &ast.ExprCastArray{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6213,7 +6213,7 @@ func TestFormatter_ExprCastBool(t *testing.T) { n := &ast.ExprCastBool{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6238,7 +6238,7 @@ func TestFormatter_ExprCastDouble(t *testing.T) { n := &ast.ExprCastDouble{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6263,7 +6263,7 @@ func TestFormatter_ExprCastInt(t *testing.T) { n := &ast.ExprCastInt{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6288,7 +6288,7 @@ func TestFormatter_ExprCastObject(t *testing.T) { n := &ast.ExprCastObject{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6313,7 +6313,7 @@ func TestFormatter_ExprCastString(t *testing.T) { n := &ast.ExprCastString{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6338,7 +6338,7 @@ func TestFormatter_ExprCastUnset(t *testing.T) { n := &ast.ExprCastUnset{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6432,7 +6432,7 @@ func TestFormatter_ScalarEncapsed_Parts(t *testing.T) { Value: []byte("foo "), }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6481,7 +6481,7 @@ func TestFormatter_ScalarEncapsedStringVar(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ScalarEncapsedStringVar{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, } @@ -6504,7 +6504,7 @@ func TestFormatter_ScalarEncapsedStringVar_Dim(t *testing.T) { o := bytes.NewBufferString("") n := &ast.ScalarEncapsedStringVar{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("foo"), }, Dim: &ast.ScalarString{ @@ -6531,7 +6531,7 @@ func TestFormatter_ScalarEncapsedStringBrackets(t *testing.T) { n := &ast.ScalarEncapsedStringBrackets{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$foo"), }, }, @@ -6607,7 +6607,7 @@ func TestFormatter_ScalarHeredoc_Parts(t *testing.T) { Value: []byte("foo "), }, &ast.ExprVariable{ - VarName: &ast.Identifier{ + Name: &ast.Identifier{ Value: []byte("$bar"), }, }, @@ -6699,12 +6699,12 @@ func TestFormatter_ScalarString(t *testing.T) { func TestFormatter_NameName(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.NameName{ + n := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -6729,10 +6729,10 @@ func TestFormatter_NameFullyQualified(t *testing.T) { n := &ast.NameFullyQualified{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -6757,10 +6757,10 @@ func TestFormatter_NameRelative(t *testing.T) { n := &ast.NameRelative{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("bar"), }, }, @@ -6783,7 +6783,7 @@ func TestFormatter_NameRelative(t *testing.T) { func TestFormatter_NameNamePart(t *testing.T) { o := bytes.NewBufferString("") - n := &ast.NameNamePart{ + n := &ast.NamePart{ Value: []byte("foo"), } diff --git a/pkg/visitor/nsresolver/namespace_resolver.go b/pkg/visitor/nsresolver/namespace_resolver.go index 2b42a2c..4d17444 100644 --- a/pkg/visitor/nsresolver/namespace_resolver.go +++ b/pkg/visitor/nsresolver/namespace_resolver.go @@ -41,32 +41,32 @@ func (nsr *NamespaceResolver) StmtNamespace(n *ast.StmtNamespace) { if n.Name == nil { nsr.Namespace = NewNamespace("") } else { - NSParts := n.Name.(*ast.NameName).Parts + NSParts := n.Name.(*ast.Name).Parts nsr.Namespace = NewNamespace(concatNameParts(NSParts)) } } -func (nsr *NamespaceResolver) StmtUse(n *ast.StmtUse) { +func (nsr *NamespaceResolver) StmtUse(n *ast.StmtUseList) { useType := "" if n.Type != nil { useType = string(n.Type.(*ast.Identifier).Value) } - for _, nn := range n.UseDeclarations { + for _, nn := range n.Uses { nsr.AddAlias(useType, nn, nil) } nsr.goDeep = false } -func (nsr *NamespaceResolver) StmtGroupUse(n *ast.StmtGroupUse) { +func (nsr *NamespaceResolver) StmtGroupUse(n *ast.StmtGroupUseList) { useType := "" if n.Type != nil { useType = string(n.Type.(*ast.Identifier).Value) } - for _, nn := range n.UseDeclarations { - nsr.AddAlias(useType, nn, n.Prefix.(*ast.NameName).Parts) + for _, nn := range n.Uses { + nsr.AddAlias(useType, nn, n.Prefix.(*ast.Name).Parts) } nsr.goDeep = false @@ -83,8 +83,8 @@ func (nsr *NamespaceResolver) StmtClass(n *ast.StmtClass) { } } - if n.ClassName != nil { - nsr.AddNamespacedName(n, string(n.ClassName.(*ast.Identifier).Value)) + if n.Name != nil { + nsr.AddNamespacedName(n, string(n.Name.(*ast.Identifier).Value)) } } @@ -95,15 +95,15 @@ func (nsr *NamespaceResolver) StmtInterface(n *ast.StmtInterface) { } } - nsr.AddNamespacedName(n, string(n.InterfaceName.(*ast.Identifier).Value)) + nsr.AddNamespacedName(n, string(n.Name.(*ast.Identifier).Value)) } func (nsr *NamespaceResolver) StmtTrait(n *ast.StmtTrait) { - nsr.AddNamespacedName(n, string(n.TraitName.(*ast.Identifier).Value)) + nsr.AddNamespacedName(n, string(n.Name.(*ast.Identifier).Value)) } func (nsr *NamespaceResolver) StmtFunction(n *ast.StmtFunction) { - nsr.AddNamespacedName(n, string(n.FunctionName.(*ast.Identifier).Value)) + nsr.AddNamespacedName(n, string(n.Name.(*ast.Identifier).Value)) for _, parameter := range n.Params { nsr.ResolveType(parameter.(*ast.Parameter).Type) @@ -218,15 +218,15 @@ func (nsr *NamespaceResolver) LeaveNode(n ast.Vertex) { // AddAlias adds a new alias func (nsr *NamespaceResolver) AddAlias(useType string, nn ast.Vertex, prefix []ast.Vertex) { switch use := nn.(type) { - case *ast.StmtUseDeclaration: + case *ast.StmtUse: if use.Type != nil { useType = string(use.Type.(*ast.Identifier).Value) } - useNameParts := use.Use.(*ast.NameName).Parts + useNameParts := use.Use.(*ast.Name).Parts var alias string if use.Alias == nil { - alias = string(useNameParts[len(useNameParts)-1].(*ast.NameNamePart).Value) + alias = string(useNameParts[len(useNameParts)-1].(*ast.NamePart).Value) } else { alias = string(use.Alias.(*ast.Identifier).Value) } @@ -257,7 +257,7 @@ func (nsr *NamespaceResolver) ResolveType(n ast.Vertex) { switch nn := n.(type) { case *ast.Nullable: nsr.ResolveType(nn.Expr) - case *ast.NameName: + case *ast.Name: nsr.ResolveName(n, "") case *ast.NameRelative: nsr.ResolveName(n, "") @@ -308,16 +308,16 @@ func (ns *Namespace) ResolveName(nameNode ast.Vertex, aliasType string) (string, } return ns.Namespace + "\\" + concatNameParts(n.Parts), nil - case *ast.NameName: + case *ast.Name: if aliasType == "const" && len(n.Parts) == 1 { - part := strings.ToLower(string(n.Parts[0].(*ast.NameNamePart).Value)) + part := strings.ToLower(string(n.Parts[0].(*ast.NamePart).Value)) if part == "true" || part == "false" || part == "null" { return part, nil } } if aliasType == "" && len(n.Parts) == 1 { - part := strings.ToLower(string(n.Parts[0].(*ast.NameNamePart).Value)) + part := strings.ToLower(string(n.Parts[0].(*ast.NamePart).Value)) switch part { case "self": @@ -366,9 +366,9 @@ func (ns *Namespace) ResolveName(nameNode ast.Vertex, aliasType string) (string, // ResolveAlias returns alias or error if not found func (ns *Namespace) ResolveAlias(nameNode ast.Vertex, aliasType string) (string, error) { aliasType = strings.ToLower(aliasType) - nameParts := nameNode.(*ast.NameName).Parts + nameParts := nameNode.(*ast.Name).Parts - firstPartStr := string(nameParts[0].(*ast.NameNamePart).Value) + firstPartStr := string(nameParts[0].(*ast.NamePart).Value) if len(nameParts) > 1 { // resolve aliases for qualified names, always against class alias type firstPartStr = strings.ToLower(firstPartStr) @@ -393,9 +393,9 @@ func concatNameParts(parts ...[]ast.Vertex) string { for _, p := range parts { for _, n := range p { if str == "" { - str = string(n.(*ast.NameNamePart).Value) + str = string(n.(*ast.NamePart).Value) } else { - str = str + "\\" + string(n.(*ast.NameNamePart).Value) + str = str + "\\" + string(n.(*ast.NamePart).Value) } } } diff --git a/pkg/visitor/nsresolver/namespace_resolver_test.go b/pkg/visitor/nsresolver/namespace_resolver_test.go index 1229822..324ba0d 100644 --- a/pkg/visitor/nsresolver/namespace_resolver_test.go +++ b/pkg/visitor/nsresolver/namespace_resolver_test.go @@ -11,14 +11,14 @@ import ( ) func TestResolveStaticCall(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, @@ -41,21 +41,21 @@ func TestResolveStaticCall(t *testing.T) { } func TestResolveStaticPropertyFetch(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, }, &ast.ExprStaticPropertyFetch{ - Class: nameBC, - Property: &ast.Identifier{Value: []byte("foo")}, + Class: nameBC, + Prop: &ast.Identifier{Value: []byte("foo")}, }, }, } @@ -71,21 +71,21 @@ func TestResolveStaticPropertyFetch(t *testing.T) { } func TestResolveClassConstFetch(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, }, &ast.ExprClassConstFetch{ - Class: nameBC, - ConstantName: &ast.Identifier{Value: []byte("FOO")}, + Class: nameBC, + Const: &ast.Identifier{Value: []byte("FOO")}, }, }, } @@ -101,14 +101,14 @@ func TestResolveClassConstFetch(t *testing.T) { } func TestResolveNew(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, @@ -130,20 +130,20 @@ func TestResolveNew(t *testing.T) { } func TestResolveInstanceOf(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, }, &ast.ExprInstanceOf{ - Expr: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Expr: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, Class: nameBC, }, }, @@ -160,20 +160,20 @@ func TestResolveInstanceOf(t *testing.T) { } func TestResolveInstanceCatch(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} - nameDE := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("D")}, &ast.NameNamePart{Value: []byte("E")}}} - nameF := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("F")}}} + nameDE := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("D")}, &ast.NamePart{Value: []byte("E")}}} + nameF := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("F")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Use: nameDE, Alias: &ast.Identifier{Value: []byte("F")}, }, @@ -187,7 +187,7 @@ func TestResolveInstanceCatch(t *testing.T) { nameBC, nameF, }, - Var: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Var: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, Stmts: []ast.Vertex{}, }, }, @@ -207,15 +207,15 @@ func TestResolveInstanceCatch(t *testing.T) { } func TestResolveFunctionCall(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Type: &ast.Identifier{Value: []byte("function")}, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, @@ -237,15 +237,15 @@ func TestResolveFunctionCall(t *testing.T) { } func TestResolveConstFetch(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ + &ast.StmtUseList{ Type: &ast.Identifier{Value: []byte("const")}, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, @@ -267,32 +267,32 @@ func TestResolveConstFetch(t *testing.T) { } func TestResolveGroupUse(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBD := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("D")}}} - nameE := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("E")}}} - nameC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("C")}}} - nameF := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("F")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBD := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("D")}}} + nameE := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("E")}}} + nameC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("C")}}} + nameF := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("F")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Prefix: nameAB, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Type: &ast.Identifier{Value: []byte("Function")}, Use: nameF, }, - &ast.StmtUseDeclaration{ + &ast.StmtUse{ Type: &ast.Identifier{Value: []byte("const")}, Use: nameC, }, }, }, - &ast.StmtGroupUse{ + &ast.StmtGroupUseList{ Prefix: nameBD, Type: &ast.Identifier{Value: []byte("Function")}, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameE, }, }, @@ -322,20 +322,20 @@ func TestResolveGroupUse(t *testing.T) { } func TestResolveTraitUse(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}}} - nameD := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("D")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}}} + nameD := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("D")}}} - fullyQualifiedNameB := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}}} - fullyQualifiedNameBC := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} - relativeNameB := &ast.NameRelative{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}}} - relativeNameBC := &ast.NameRelative{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + fullyQualifiedNameB := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}}} + fullyQualifiedNameBC := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} + relativeNameB := &ast.NameRelative{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}}} + relativeNameBC := &ast.NameRelative{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAB, }, }, @@ -382,12 +382,12 @@ func TestResolveTraitUse(t *testing.T) { } func TestResolveClassName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} class := &ast.StmtClass{ - ClassName: &ast.Identifier{Value: []byte("A")}, - Extends: nameAB, + Name: &ast.Identifier{Value: []byte("A")}, + Extends: nameAB, Implements: []ast.Vertex{ nameBC, }, @@ -412,11 +412,11 @@ func TestResolveClassName(t *testing.T) { } func TestResolveInterfaceName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} interfaceNode := &ast.StmtInterface{ - InterfaceName: &ast.Identifier{Value: []byte("A")}, + Name: &ast.Identifier{Value: []byte("A")}, Extends: []ast.Vertex{ nameAB, nameBC, @@ -443,8 +443,8 @@ func TestResolveInterfaceName(t *testing.T) { func TestResolveTraitName(t *testing.T) { traitNode := &ast.StmtTrait{ - TraitName: &ast.Identifier{Value: []byte("A")}, - Stmts: []ast.Vertex{}, + Name: &ast.Identifier{Value: []byte("A")}, + Stmts: []ast.Vertex{}, } stxTree := &ast.StmtStmtList{ @@ -464,15 +464,15 @@ func TestResolveTraitName(t *testing.T) { } func TestResolveFunctionName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} functionNode := &ast.StmtFunction{ - FunctionName: &ast.Identifier{Value: []byte("A")}, + Name: &ast.Identifier{Value: []byte("A")}, Params: []ast.Vertex{ &ast.Parameter{ Type: nameAB, - Var: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Var: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, }, }, ReturnType: &ast.Nullable{Expr: nameBC}, @@ -498,15 +498,15 @@ func TestResolveFunctionName(t *testing.T) { } func TestResolveMethodName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} methodNode := &ast.StmtClassMethod{ - MethodName: &ast.Identifier{Value: []byte("A")}, + Name: &ast.Identifier{Value: []byte("A")}, Params: []ast.Vertex{ &ast.Parameter{ Type: nameAB, - Var: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Var: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, }, }, ReturnType: &ast.Nullable{Expr: nameBC}, @@ -527,14 +527,14 @@ func TestResolveMethodName(t *testing.T) { } func TestResolveClosureName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameBC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("B")}, &ast.NameNamePart{Value: []byte("C")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameBC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("B")}, &ast.NamePart{Value: []byte("C")}}} closureNode := &ast.ExprClosure{ Params: []ast.Vertex{ &ast.Parameter{ Type: nameAB, - Var: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Var: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, }, }, ReturnType: &ast.Nullable{Expr: nameBC}, @@ -553,7 +553,7 @@ func TestResolveClosureName(t *testing.T) { } func TestResolveConstantsName(t *testing.T) { - nameAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} + nameAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} constantB := &ast.StmtConstant{ Name: &ast.Identifier{Value: []byte("B")}, @@ -590,13 +590,13 @@ func TestResolveConstantsName(t *testing.T) { } func TestResolveNamespaces(t *testing.T) { - namespaceAB := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - namespaceCD := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("C")}, &ast.NameNamePart{Value: []byte("D")}}} + namespaceAB := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + namespaceCD := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("C")}, &ast.NamePart{Value: []byte("D")}}} - nameAC := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("C")}}} - nameCF := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("C")}, &ast.NameNamePart{Value: []byte("F")}}} - nameFG := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("F")}, &ast.NameNamePart{Value: []byte("G")}}} - relativeNameCE := &ast.NameRelative{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("C")}, &ast.NameNamePart{Value: []byte("E")}}} + nameAC := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("C")}}} + nameCF := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("C")}, &ast.NamePart{Value: []byte("F")}}} + nameFG := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("F")}, &ast.NamePart{Value: []byte("G")}}} + relativeNameCE := &ast.NameRelative{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("C")}, &ast.NamePart{Value: []byte("E")}}} constantB := &ast.StmtConstant{ Name: &ast.Identifier{Value: []byte("B")}, @@ -628,9 +628,9 @@ func TestResolveNamespaces(t *testing.T) { &ast.StmtNamespace{ Name: namespaceCD, Stmts: []ast.Vertex{ - &ast.StmtUse{ - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ + &ast.StmtUseList{ + Uses: []ast.Vertex{ + &ast.StmtUse{ Use: nameAC, }, }, @@ -666,7 +666,7 @@ func TestResolveStaticCallDinamicClassName(t *testing.T) { stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.ExprStaticCall{ - Class: &ast.ExprVariable{VarName: &ast.Identifier{Value: []byte("foo")}}, + Class: &ast.ExprVariable{Name: &ast.Identifier{Value: []byte("foo")}}, Call: &ast.Identifier{Value: []byte("foo")}, }, }, @@ -681,23 +681,23 @@ func TestResolveStaticCallDinamicClassName(t *testing.T) { } func TestDoNotResolveReservedConstants(t *testing.T) { - namespaceName := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}} + namespaceName := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}} - constantTrue := &ast.NameName{ + constantTrue := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("True")}, + &ast.NamePart{Value: []byte("True")}, }, } - constantFalse := &ast.NameName{ + constantFalse := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("False")}, + &ast.NamePart{Value: []byte("False")}, }, } - constantNull := &ast.NameName{ + constantNull := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("NULL")}, + &ast.NamePart{Value: []byte("NULL")}, }, } @@ -738,91 +738,91 @@ func TestDoNotResolveReservedConstants(t *testing.T) { func TestDoNotResolveReservedNames(t *testing.T) { - nameInt := &ast.NameName{ + nameInt := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("int")}, + &ast.NamePart{Value: []byte("int")}, }, } - nameFloat := &ast.NameName{ + nameFloat := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("float")}, + &ast.NamePart{Value: []byte("float")}, }, } - nameBool := &ast.NameName{ + nameBool := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("bool")}, + &ast.NamePart{Value: []byte("bool")}, }, } - nameString := &ast.NameName{ + nameString := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("string")}, + &ast.NamePart{Value: []byte("string")}, }, } - nameVoid := &ast.NameName{ + nameVoid := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("void")}, + &ast.NamePart{Value: []byte("void")}, }, } - nameIterable := &ast.NameName{ + nameIterable := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("iterable")}, + &ast.NamePart{Value: []byte("iterable")}, }, } - nameObject := &ast.NameName{ + nameObject := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("object")}, + &ast.NamePart{Value: []byte("object")}, }, } function := &ast.StmtFunction{ - FunctionName: &ast.Identifier{Value: []byte("bar")}, + Name: &ast.Identifier{Value: []byte("bar")}, Params: []ast.Vertex{ &ast.Parameter{ Type: nameInt, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Int")}, + Name: &ast.Identifier{Value: []byte("Int")}, }, }, &ast.Parameter{ Type: nameFloat, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Float")}, + Name: &ast.Identifier{Value: []byte("Float")}, }, }, &ast.Parameter{ Type: nameBool, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Bool")}, + Name: &ast.Identifier{Value: []byte("Bool")}, }, }, &ast.Parameter{ Type: nameString, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("String")}, + Name: &ast.Identifier{Value: []byte("String")}, }, }, &ast.Parameter{ Type: nameVoid, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Void")}, + Name: &ast.Identifier{Value: []byte("Void")}, }, }, &ast.Parameter{ Type: nameIterable, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Iterable")}, + Name: &ast.Identifier{Value: []byte("Iterable")}, }, }, &ast.Parameter{ Type: nameObject, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("Object")}, + Name: &ast.Identifier{Value: []byte("Object")}, }, }, }, @@ -831,9 +831,9 @@ func TestDoNotResolveReservedNames(t *testing.T) { stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtNamespace{ - Name: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Foo")}, + &ast.NamePart{Value: []byte("Foo")}, }, }, }, @@ -860,26 +860,26 @@ func TestDoNotResolveReservedNames(t *testing.T) { func TestDoNotResolveReservedSpecialNames(t *testing.T) { - nameSelf := &ast.NameName{ + nameSelf := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Self")}, + &ast.NamePart{Value: []byte("Self")}, }, } - nameStatic := &ast.NameName{ + nameStatic := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Static")}, + &ast.NamePart{Value: []byte("Static")}, }, } - nameParent := &ast.NameName{ + nameParent := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Parent")}, + &ast.NamePart{Value: []byte("Parent")}, }, } cls := &ast.StmtClass{ - ClassName: &ast.Identifier{Value: []byte("Bar")}, + Name: &ast.Identifier{Value: []byte("Bar")}, Stmts: []ast.Vertex{ &ast.StmtExpression{ Expr: &ast.ExprStaticCall{ @@ -905,9 +905,9 @@ func TestDoNotResolveReservedSpecialNames(t *testing.T) { stxTree := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtNamespace{ - Name: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Foo")}, + &ast.NamePart{Value: []byte("Foo")}, }, }, }, @@ -928,9 +928,9 @@ func TestDoNotResolveReservedSpecialNames(t *testing.T) { assert.DeepEqual(t, expected, nsResolver.ResolvedNames) } func TestResolvePropertyTypeName(t *testing.T) { - nameSimple := &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameRelative := &ast.NameRelative{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} - nameFullyQualified := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("A")}, &ast.NameNamePart{Value: []byte("B")}}} + nameSimple := &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameRelative := &ast.NameRelative{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} + nameFullyQualified := &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("A")}, &ast.NamePart{Value: []byte("B")}}} propertyNodeSimple := &ast.StmtPropertyList{ Type: nameSimple, @@ -945,7 +945,7 @@ func TestResolvePropertyTypeName(t *testing.T) { } classNode := &ast.StmtClass{ - ClassName: &ast.Identifier{Value: []byte("Bar")}, + Name: &ast.Identifier{Value: []byte("Bar")}, Stmts: []ast.Vertex{ propertyNodeSimple, propertyNodeRelative, @@ -956,9 +956,9 @@ func TestResolvePropertyTypeName(t *testing.T) { stmts := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtNamespace{ - Name: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Foo")}, + &ast.NamePart{Value: []byte("Foo")}, }, }, }, diff --git a/pkg/visitor/null.go b/pkg/visitor/null.go index 2e15f24..e5edcc0 100644 --- a/pkg/visitor/null.go +++ b/pkg/visitor/null.go @@ -214,15 +214,15 @@ func (v *Null) StmtUnset(_ *ast.StmtUnset) { // do nothing } -func (v *Null) StmtUse(_ *ast.StmtUse) { +func (v *Null) StmtUse(_ *ast.StmtUseList) { // do nothing } -func (v *Null) StmtGroupUse(_ *ast.StmtGroupUse) { +func (v *Null) StmtGroupUse(_ *ast.StmtGroupUseList) { // do nothing } -func (v *Null) StmtUseDeclaration(_ *ast.StmtUseDeclaration) { +func (v *Null) StmtUseDeclaration(_ *ast.StmtUse) { // do nothing } @@ -626,7 +626,7 @@ func (v *Null) ScalarString(_ *ast.ScalarString) { // do nothing } -func (v *Null) NameName(_ *ast.NameName) { +func (v *Null) NameName(_ *ast.Name) { // do nothing } @@ -638,6 +638,6 @@ func (v *Null) NameRelative(_ *ast.NameRelative) { // do nothing } -func (v *Null) NameNamePart(_ *ast.NameNamePart) { +func (v *Null) NameNamePart(_ *ast.NamePart) { // do nothing } diff --git a/pkg/visitor/printer/printer.go b/pkg/visitor/printer/printer.go index fca712b..76e230e 100644 --- a/pkg/visitor/printer/printer.go +++ b/pkg/visitor/printer/printer.go @@ -190,10 +190,10 @@ func (p *printer) StmtCatch(n *ast.StmtCatch) { func (p *printer) StmtClass(n *ast.StmtClass) { p.printList(n.Modifiers) p.printToken(n.ClassTkn, []byte("class")) - p.printNode(n.ClassName) - p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Arguments, []byte("("))) - p.printSeparatedList(n.Arguments, n.SeparatorTkns, []byte(",")) - p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Arguments, []byte(")"))) + p.printNode(n.Name) + p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Args, []byte("("))) + p.printSeparatedList(n.Args, n.SeparatorTkns, []byte(",")) + p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Args, []byte(")"))) p.printToken(n.ExtendsTkn, p.ifNode(n.Extends, []byte("extends"))) p.printNode(n.Extends) p.printToken(n.ImplementsTkn, p.ifNodeList(n.Implements, []byte("implements"))) @@ -214,7 +214,7 @@ func (p *printer) StmtClassMethod(n *ast.StmtClassMethod) { p.printList(n.Modifiers) p.printToken(n.FunctionTkn, []byte("function")) p.printToken(n.AmpersandTkn, nil) - p.printNode(n.MethodName) + p.printNode(n.Name) p.printToken(n.OpenParenthesisTkn, []byte("(")) p.printSeparatedList(n.Params, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseParenthesisTkn, []byte(")")) @@ -366,7 +366,7 @@ func (p *printer) StmtForeach(n *ast.StmtForeach) { func (p *printer) StmtFunction(n *ast.StmtFunction) { p.printToken(n.FunctionTkn, []byte("function")) p.printToken(n.AmpersandTkn, nil) - p.printNode(n.FunctionName) + p.printNode(n.Name) p.printToken(n.OpenParenthesisTkn, []byte("(")) p.printSeparatedList(n.Params, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseParenthesisTkn, []byte(")")) @@ -427,7 +427,7 @@ func (p *printer) StmtInlineHtml(n *ast.StmtInlineHtml) { func (p *printer) StmtInterface(n *ast.StmtInterface) { p.printToken(n.InterfaceTkn, []byte("interface")) - p.printNode(n.InterfaceName) + p.printNode(n.Name) p.printToken(n.ExtendsTkn, p.ifNodeList(n.Extends, []byte("extends"))) p.printSeparatedList(n.Extends, n.ExtendsSeparatorTkns, []byte(",")) p.printToken(n.OpenCurlyBracketTkn, []byte("{")) @@ -436,7 +436,7 @@ func (p *printer) StmtInterface(n *ast.StmtInterface) { } func (p *printer) StmtLabel(n *ast.StmtLabel) { - p.printNode(n.LabelName) + p.printNode(n.Name) p.printToken(n.ColonTkn, []byte(":")) } @@ -462,7 +462,7 @@ func (p *printer) StmtProperty(n *ast.StmtProperty) { func (p *printer) StmtPropertyList(n *ast.StmtPropertyList) { p.printList(n.Modifiers) p.printNode(n.Type) - p.printSeparatedList(n.Properties, n.SeparatorTkns, []byte(",")) + p.printSeparatedList(n.Props, n.SeparatorTkns, []byte(",")) p.printToken(n.SemiColonTkn, []byte(";")) } @@ -498,7 +498,7 @@ func (p *printer) StmtSwitch(n *ast.StmtSwitch) { p.printToken(n.ColonTkn, nil) p.printToken(n.OpenCurlyBracketTkn, p.ifNotToken(n.ColonTkn, []byte("{"))) p.printToken(n.CaseSeparatorTkn, nil) - p.printList(n.CaseList) + p.printList(n.Cases) p.printToken(n.CloseCurlyBracketTkn, p.ifNotToken(n.ColonTkn, []byte("}"))) p.printToken(n.EndSwitchTkn, p.ifToken(n.ColonTkn, []byte("endswitch"), nil)) p.printToken(n.SemiColonTkn, p.ifToken(n.ColonTkn, []byte(";"), nil)) @@ -512,7 +512,7 @@ func (p *printer) StmtThrow(n *ast.StmtThrow) { func (p *printer) StmtTrait(n *ast.StmtTrait) { p.printToken(n.TraitTkn, []byte("trait")) - p.printNode(n.TraitName) + p.printNode(n.Name) p.printToken(n.OpenCurlyBracketTkn, []byte("{")) p.printList(n.Stmts) p.printToken(n.CloseCurlyBracketTkn, []byte("}")) @@ -563,26 +563,26 @@ func (p *printer) StmtUnset(n *ast.StmtUnset) { p.printToken(n.SemiColonTkn, []byte(";")) } -func (p *printer) StmtUse(n *ast.StmtUse) { +func (p *printer) StmtUse(n *ast.StmtUseList) { p.printToken(n.UseTkn, []byte("use")) p.printNode(n.Type) - p.printSeparatedList(n.UseDeclarations, n.SeparatorTkns, []byte(",")) + p.printSeparatedList(n.Uses, n.SeparatorTkns, []byte(",")) p.printToken(n.SemiColonTkn, []byte(";")) } -func (p *printer) StmtGroupUse(n *ast.StmtGroupUse) { +func (p *printer) StmtGroupUse(n *ast.StmtGroupUseList) { p.printToken(n.UseTkn, []byte("use")) p.printNode(n.Type) p.printToken(n.LeadingNsSeparatorTkn, nil) p.printNode(n.Prefix) p.printToken(n.NsSeparatorTkn, []byte("\\")) p.printToken(n.OpenCurlyBracketTkn, []byte("{")) - p.printSeparatedList(n.UseDeclarations, n.SeparatorTkns, []byte(",")) + p.printSeparatedList(n.Uses, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseCurlyBracketTkn, []byte("}")) p.printToken(n.SemiColonTkn, []byte(";")) } -func (p *printer) StmtUseDeclaration(n *ast.StmtUseDeclaration) { +func (p *printer) StmtUseDeclaration(n *ast.StmtUse) { p.printNode(n.Type) p.printToken(n.NsSeparatorTkn, nil) p.printNode(n.Use) @@ -661,7 +661,7 @@ func (p *printer) ExprBrackets(n *ast.ExprBrackets) { func (p *printer) ExprClassConstFetch(n *ast.ExprClassConstFetch) { p.printNode(n.Class) p.printToken(n.DoubleColonTkn, []byte("::")) - p.printNode(n.ConstantName) + p.printNode(n.Const) } func (p *printer) ExprClone(n *ast.ExprClone) { @@ -676,10 +676,10 @@ func (p *printer) ExprClosure(n *ast.ExprClosure) { p.printToken(n.OpenParenthesisTkn, []byte("(")) p.printSeparatedList(n.Params, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseParenthesisTkn, []byte(")")) - p.printToken(n.UseTkn, p.ifNodeList(n.Use, []byte("use"))) - p.printToken(n.UseOpenParenthesisTkn, p.ifNodeList(n.Use, []byte("("))) - p.printSeparatedList(n.Use, n.UseSeparatorTkns, []byte(",")) - p.printToken(n.UseCloseParenthesisTkn, p.ifNodeList(n.Use, []byte(")"))) + p.printToken(n.UseTkn, p.ifNodeList(n.Uses, []byte("use"))) + p.printToken(n.UseOpenParenthesisTkn, p.ifNodeList(n.Uses, []byte("("))) + p.printSeparatedList(n.Uses, n.UseSeparatorTkns, []byte(",")) + p.printToken(n.UseCloseParenthesisTkn, p.ifNodeList(n.Uses, []byte(")"))) p.printToken(n.ColonTkn, p.ifNode(n.ReturnType, []byte(":"))) p.printNode(n.ReturnType) p.printToken(n.OpenCurlyBracketTkn, []byte("{")) @@ -725,7 +725,7 @@ func (p *printer) ExprExit(n *ast.ExprExit) { func (p *printer) ExprFunctionCall(n *ast.ExprFunctionCall) { p.printNode(n.Function) p.printToken(n.OpenParenthesisTkn, []byte("(")) - p.printSeparatedList(n.Arguments, n.SeparatorTkns, []byte(",")) + p.printSeparatedList(n.Args, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseParenthesisTkn, []byte(")")) } @@ -766,16 +766,16 @@ func (p *printer) ExprMethodCall(n *ast.ExprMethodCall) { p.printNode(n.Method) p.printToken(n.CloseCurlyBracketTkn, nil) p.printToken(n.OpenParenthesisTkn, []byte("(")) - p.printSeparatedList(n.Arguments, n.SeparatorTkns, []byte(",")) + p.printSeparatedList(n.Args, n.SeparatorTkns, []byte(",")) p.printToken(n.CloseParenthesisTkn, []byte(")")) } func (p *printer) ExprNew(n *ast.ExprNew) { p.printToken(n.NewTkn, []byte("new")) p.printNode(n.Class) - p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Arguments, []byte("("))) - p.printSeparatedList(n.Arguments, n.SeparatorTkns, []byte(",")) - p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Arguments, []byte(")"))) + p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Args, []byte("("))) + p.printSeparatedList(n.Args, n.SeparatorTkns, []byte(",")) + p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Args, []byte(")"))) } func (p *printer) ExprPostDec(n *ast.ExprPostDec) { @@ -807,7 +807,7 @@ func (p *printer) ExprPropertyFetch(n *ast.ExprPropertyFetch) { p.printNode(n.Var) p.printToken(n.ObjectOperatorTkn, []byte("->")) p.printToken(n.OpenCurlyBracketTkn, nil) - p.printNode(n.Property) + p.printNode(n.Prop) p.printToken(n.CloseCurlyBracketTkn, nil) } @@ -833,19 +833,19 @@ func (p *printer) ExprStaticCall(n *ast.ExprStaticCall) { p.printToken(n.OpenCurlyBracketTkn, nil) p.printNode(n.Call) p.printToken(n.CloseCurlyBracketTkn, nil) - p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Arguments, []byte("("))) - p.printSeparatedList(n.Arguments, n.SeparatorTkns, []byte(",")) - p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Arguments, []byte(")"))) + p.printToken(n.OpenParenthesisTkn, p.ifNodeList(n.Args, []byte("("))) + p.printSeparatedList(n.Args, n.SeparatorTkns, []byte(",")) + p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Args, []byte(")"))) } func (p *printer) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) { p.printNode(n.Class) p.printToken(n.DoubleColonTkn, []byte("::")) - p.printNode(n.Property) + p.printNode(n.Prop) } func (p *printer) ExprTernary(n *ast.ExprTernary) { - p.printNode(n.Condition) + p.printNode(n.Cond) p.printToken(n.QuestionTkn, []byte("?")) p.printNode(n.IfTrue) p.printToken(n.ColonTkn, []byte(":")) @@ -865,7 +865,7 @@ func (p *printer) ExprUnaryPlus(n *ast.ExprUnaryPlus) { func (p *printer) ExprVariable(n *ast.ExprVariable) { p.printToken(n.DollarTkn, nil) p.printToken(n.OpenCurlyBracketTkn, nil) - p.printNode(n.VarName) + p.printNode(n.Name) p.printToken(n.CloseCurlyBracketTkn, nil) } @@ -873,7 +873,7 @@ func (p *printer) ExprYield(n *ast.ExprYield) { p.printToken(n.YieldTkn, []byte("yield")) p.printNode(n.Key) p.printToken(n.DoubleArrowTkn, p.ifNode(n.Key, []byte("=>"))) - p.printNode(n.Value) + p.printNode(n.Val) } func (p *printer) ExprYieldFrom(n *ast.ExprYieldFrom) { @@ -1185,7 +1185,7 @@ func (p *printer) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) { func (p *printer) ScalarEncapsedStringVar(n *ast.ScalarEncapsedStringVar) { p.printToken(n.DollarOpenCurlyBracketTkn, []byte("${")) - p.printNode(n.VarName) + p.printNode(n.Name) p.printToken(n.OpenSquareBracketTkn, p.ifNode(n.Dim, []byte("["))) p.printNode(n.Dim) p.printToken(n.CloseSquareBracketTkn, p.ifNode(n.Dim, []byte("]"))) @@ -1217,7 +1217,7 @@ func (p *printer) ScalarString(n *ast.ScalarString) { p.printToken(n.StringTkn, n.Value) } -func (p *printer) NameName(n *ast.NameName) { +func (p *printer) NameName(n *ast.Name) { p.printSeparatedList(n.Parts, n.SeparatorTkns, []byte("\\")) } @@ -1232,6 +1232,6 @@ func (p *printer) NameRelative(n *ast.NameRelative) { p.printSeparatedList(n.Parts, n.SeparatorTkns, []byte("\\")) } -func (p *printer) NameNamePart(n *ast.NameNamePart) { +func (p *printer) NameNamePart(n *ast.NamePart) { p.printToken(n.StringTkn, n.Value) } diff --git a/pkg/visitor/printer/printer_php7_test.go b/pkg/visitor/printer/printer_php7_test.go index e0e274c..1039390 100644 --- a/pkg/visitor/printer/printer_php7_test.go +++ b/pkg/visitor/printer/printer_php7_test.go @@ -36,8 +36,8 @@ abstract class Bar extends Baz // change namespace - parts := &rootNode.(*ast.Root).Stmts[0].(*ast.StmtNamespace).Name.(*ast.NameName).Parts - *parts = append(*parts, &ast.NameNamePart{Value: []byte("Quuz")}) + parts := &rootNode.(*ast.Root).Stmts[0].(*ast.StmtNamespace).Name.(*ast.Name).Parts + *parts = append(*parts, &ast.NamePart{Value: []byte("Quuz")}) // print diff --git a/pkg/visitor/printer/printer_test.go b/pkg/visitor/printer/printer_test.go index 41c8f66..83a1adf 100644 --- a/pkg/visitor/printer/printer_test.go +++ b/pkg/visitor/printer/printer_test.go @@ -16,28 +16,28 @@ func TestPrinterPrintFile(t *testing.T) { n := &ast.Root{ Stmts: []ast.Vertex{ &ast.StmtNamespace{ - Name: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Foo")}, + &ast.NamePart{Value: []byte("Foo")}, }, }, }, &ast.StmtClass{ Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("abstract")}}, - ClassName: &ast.NameName{ + Name: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Bar")}, + &ast.NamePart{Value: []byte("Bar")}, }, }, - Extends: &ast.NameName{ + Extends: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{Value: []byte("Baz")}, + &ast.NamePart{Value: []byte("Baz")}, }, }, Stmts: []ast.Vertex{ &ast.StmtClassMethod{ - Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, - MethodName: &ast.Identifier{Value: []byte("greet")}, + Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, + Name: &ast.Identifier{Value: []byte("greet")}, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtEcho{ @@ -122,7 +122,7 @@ func TestPrinterPrintParameter(t *testing.T) { n := &ast.Parameter{ Type: &ast.NameFullyQualified{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, }, @@ -131,7 +131,7 @@ func TestPrinterPrintParameter(t *testing.T) { Value: []byte("..."), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, DefaultValue: &ast.ScalarString{ Value: []byte("'default'"), @@ -155,7 +155,7 @@ func TestPrinterPrintNullable(t *testing.T) { Expr: &ast.Parameter{ Type: &ast.NameFullyQualified{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, }, @@ -164,7 +164,7 @@ func TestPrinterPrintNullable(t *testing.T) { Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, DefaultValue: &ast.ScalarString{ Value: []byte("'default'"), @@ -190,7 +190,7 @@ func TestPrinterPrintArgument(t *testing.T) { Value: []byte("..."), }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -211,7 +211,7 @@ func TestPrinterPrintArgumentByRef(t *testing.T) { Value: []byte("&"), }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -230,7 +230,7 @@ func TestPrinterPrintNameNamePart(t *testing.T) { o := bytes.NewBufferString("") p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) - n := &ast.NameNamePart{ + n := &ast.NamePart{ Value: []byte("foo"), } n.Accept(p) @@ -247,12 +247,12 @@ func TestPrinterPrintNameName(t *testing.T) { o := bytes.NewBufferString("") p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) - n := &ast.NameName{ + n := &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Bar"), }, }, @@ -273,10 +273,10 @@ func TestPrinterPrintNameFullyQualified(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.NameFullyQualified{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Bar"), }, }, @@ -297,10 +297,10 @@ func TestPrinterPrintNameRelative(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.NameRelative{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Bar"), }, }, @@ -393,7 +393,7 @@ func TestPrinterPrintScalarEncapsed(t *testing.T) { Parts: []ast.Vertex{ &ast.ScalarEncapsedStringPart{Value: []byte("hello ")}, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, &ast.ScalarEncapsedStringPart{Value: []byte(" world")}, }, @@ -416,7 +416,7 @@ func TestPrinterPrintScalarHeredoc(t *testing.T) { Parts: []ast.Vertex{ &ast.ScalarEncapsedStringPart{Value: []byte("hello ")}, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, &ast.ScalarEncapsedStringPart{Value: []byte(" world\n")}, }, @@ -455,10 +455,10 @@ func TestPrinterPrintAssign(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssign{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -477,10 +477,10 @@ func TestPrinterPrintReference(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignReference{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -499,10 +499,10 @@ func TestPrinterPrintAssignBitwiseAnd(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignBitwiseAnd{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -521,10 +521,10 @@ func TestPrinterPrintAssignBitwiseOr(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignBitwiseOr{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -543,10 +543,10 @@ func TestPrinterPrintAssignBitwiseXor(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignBitwiseXor{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -565,10 +565,10 @@ func TestPrinterPrintAssignCoalesce(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignCoalesce{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -587,10 +587,10 @@ func TestPrinterPrintAssignConcat(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignConcat{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -609,10 +609,10 @@ func TestPrinterPrintAssignDiv(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignDiv{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -631,10 +631,10 @@ func TestPrinterPrintAssignMinus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignMinus{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -653,10 +653,10 @@ func TestPrinterPrintAssignMod(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignMod{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -675,10 +675,10 @@ func TestPrinterPrintAssignMul(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignMul{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -697,10 +697,10 @@ func TestPrinterPrintAssignPlus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignPlus{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -719,10 +719,10 @@ func TestPrinterPrintAssignPow(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignPow{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -741,10 +741,10 @@ func TestPrinterPrintAssignShiftLeft(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignShiftLeft{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -763,10 +763,10 @@ func TestPrinterPrintAssignShiftRight(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprAssignShiftRight{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -787,10 +787,10 @@ func TestPrinterPrintBinaryBitwiseAnd(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryBitwiseAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -809,10 +809,10 @@ func TestPrinterPrintBinaryBitwiseOr(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryBitwiseOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -831,10 +831,10 @@ func TestPrinterPrintBinaryBitwiseXor(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryBitwiseXor{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -853,10 +853,10 @@ func TestPrinterPrintBinaryBooleanAnd(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryBooleanAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -875,10 +875,10 @@ func TestPrinterPrintBinaryBooleanOr(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryBooleanOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -897,10 +897,10 @@ func TestPrinterPrintBinaryCoalesce(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryCoalesce{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -919,10 +919,10 @@ func TestPrinterPrintBinaryConcat(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryConcat{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -941,10 +941,10 @@ func TestPrinterPrintBinaryDiv(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryDiv{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -963,10 +963,10 @@ func TestPrinterPrintBinaryEqual(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -985,10 +985,10 @@ func TestPrinterPrintBinaryGreaterOrEqual(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryGreaterOrEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1007,10 +1007,10 @@ func TestPrinterPrintBinaryGreater(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryGreater{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1029,10 +1029,10 @@ func TestPrinterPrintBinaryIdentical(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryIdentical{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1051,10 +1051,10 @@ func TestPrinterPrintBinaryLogicalAnd(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryLogicalAnd{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1073,10 +1073,10 @@ func TestPrinterPrintBinaryLogicalOr(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryLogicalOr{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1095,10 +1095,10 @@ func TestPrinterPrintBinaryLogicalXor(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryLogicalXor{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1117,10 +1117,10 @@ func TestPrinterPrintBinaryMinus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryMinus{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1139,10 +1139,10 @@ func TestPrinterPrintBinaryMod(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryMod{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1161,10 +1161,10 @@ func TestPrinterPrintBinaryMul(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryMul{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1183,10 +1183,10 @@ func TestPrinterPrintBinaryNotEqual(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryNotEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1205,10 +1205,10 @@ func TestPrinterPrintBinaryNotIdentical(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryNotIdentical{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1227,10 +1227,10 @@ func TestPrinterPrintBinaryPlus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryPlus{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1249,10 +1249,10 @@ func TestPrinterPrintBinaryPow(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryPow{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1271,10 +1271,10 @@ func TestPrinterPrintBinaryShiftLeft(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryShiftLeft{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1293,10 +1293,10 @@ func TestPrinterPrintBinaryShiftRight(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinaryShiftRight{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1315,10 +1315,10 @@ func TestPrinterPrintBinarySmallerOrEqual(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinarySmallerOrEqual{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1337,10 +1337,10 @@ func TestPrinterPrintBinarySmaller(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinarySmaller{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1359,10 +1359,10 @@ func TestPrinterPrintBinarySpaceship(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBinarySpaceship{ Left: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Right: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -1383,7 +1383,7 @@ func TestPrinterPrintArray(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastArray{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1402,7 +1402,7 @@ func TestPrinterPrintBool(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastBool{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1421,7 +1421,7 @@ func TestPrinterPrintDouble(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastDouble{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1440,7 +1440,7 @@ func TestPrinterPrintInt(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastInt{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1459,7 +1459,7 @@ func TestPrinterPrintObject(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastObject{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1478,7 +1478,7 @@ func TestPrinterPrintString(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastString{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1497,7 +1497,7 @@ func TestPrinterPrintUnset(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprCastUnset{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1518,7 +1518,7 @@ func TestPrinterPrintExprArrayDimFetch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprArrayDimFetch{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, Dim: &ast.ScalarLnumber{Value: []byte("1")}, } @@ -1539,7 +1539,7 @@ func TestPrinterPrintExprArrayItemWithKey(t *testing.T) { n := &ast.ExprArrayItem{ Key: &ast.ScalarString{Value: []byte("'Hello'")}, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, } n.Accept(p) @@ -1558,7 +1558,7 @@ func TestPrinterPrintExprArrayItem(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, } n.Accept(p) @@ -1580,7 +1580,7 @@ func TestPrinterPrintExprArrayItem_Reference(t *testing.T) { Value: []byte("&"), }, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, } n.Accept(p) @@ -1602,7 +1602,7 @@ func TestPrinterPrintExprArrayItemUnpack(t *testing.T) { Value: []byte("..."), }, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, } n.Accept(p) @@ -1627,7 +1627,7 @@ func TestPrinterPrintExprArray(t *testing.T) { &ast.ExprArrayItem{ Key: &ast.ScalarString{Value: []byte("'Hello'")}, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, }, &ast.ExprArrayItem{ @@ -1636,12 +1636,12 @@ func TestPrinterPrintExprArray(t *testing.T) { Value: []byte("&"), }, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, }, @@ -1662,7 +1662,7 @@ func TestPrinterPrintExprBitwiseNot(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBitwiseNot{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1681,7 +1681,7 @@ func TestPrinterPrintExprBooleanNot(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBooleanNot{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1700,7 +1700,7 @@ func TestPrinterPrintExprBracket(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprBooleanNot{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1719,9 +1719,9 @@ func TestPrinterPrintExprClassConstFetch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprClassConstFetch{ Class: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, - ConstantName: &ast.Identifier{ + Const: &ast.Identifier{ Value: []byte("CONST"), }, } @@ -1741,7 +1741,7 @@ func TestPrinterPrintExprClone(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprClone{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1760,7 +1760,7 @@ func TestPrinterPrintExprClosureUse(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprClosureUse{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$foo")}, + Name: &ast.Identifier{Value: []byte("$foo")}, }, } n.Accept(p) @@ -1782,7 +1782,7 @@ func TestPrinterPrintExprClosureUse_Reference(t *testing.T) { Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$foo")}, + Name: &ast.Identifier{Value: []byte("$foo")}, }, } n.Accept(p) @@ -1809,31 +1809,31 @@ func TestPrinterPrintExprClosure(t *testing.T) { Params: []ast.Vertex{ &ast.Parameter{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, }, - Use: []ast.Vertex{ + Uses: []ast.Vertex{ &ast.ExprClosureUse{ AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.ExprClosureUse{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, ReturnType: &ast.NameFullyQualified{ - Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}, + Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}, }, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, } @@ -1865,15 +1865,15 @@ func TestPrinterPrintExprArrowFunction(t *testing.T) { Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, }, ReturnType: &ast.NameFullyQualified{ - Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}, + Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}, }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, } @@ -1892,7 +1892,7 @@ func TestPrinterPrintExprConstFetch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprConstFetch{ - Const: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("null")}}}, + Const: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("null")}}}, } n.Accept(p) @@ -1910,7 +1910,7 @@ func TestPrinterPrintEmpty(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprEmpty{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1929,7 +1929,7 @@ func TestPrinterPrettyPrinterrorSuppress(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprErrorSuppress{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1948,7 +1948,7 @@ func TestPrinterPrintEval(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprEval{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1967,7 +1967,7 @@ func TestPrinterPrintExit(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprExit{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -1989,7 +1989,7 @@ func TestPrinterPrintDie(t *testing.T) { Value: []byte("die"), }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2008,15 +2008,15 @@ func TestPrinterPrintFunctionCall(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprFunctionCall{ Function: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ AmpersandTkn: &token.Token{ Value: []byte("&"), }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.Argument{ @@ -2024,12 +2024,12 @@ func TestPrinterPrintFunctionCall(t *testing.T) { Value: []byte("..."), }, Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, }, }, @@ -2084,9 +2084,9 @@ func TestPrinterPrintInstanceOf(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprInstanceOf{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, - Class: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Class: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, } n.Accept(p) @@ -2105,10 +2105,10 @@ func TestPrinterPrintIsset(t *testing.T) { n := &ast.ExprIsset{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, } @@ -2130,7 +2130,7 @@ func TestPrinterPrintList(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.ExprArrayItem{ @@ -2138,12 +2138,12 @@ func TestPrinterPrintList(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, }, }, @@ -2167,18 +2167,18 @@ func TestPrinterPrintMethodCall(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprMethodCall{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$foo")}, + Name: &ast.Identifier{Value: []byte("$foo")}, }, Method: &ast.Identifier{Value: []byte("bar")}, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -2198,22 +2198,22 @@ func TestPrinterPrintNew(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprNew{ - Class: &ast.NameName{ + Class: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, }, }, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -2234,7 +2234,7 @@ func TestPrinterPrintPostDec(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPostDec{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2253,7 +2253,7 @@ func TestPrinterPrintPostInc(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPostInc{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2272,7 +2272,7 @@ func TestPrinterPrintPreDec(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPreDec{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2291,7 +2291,7 @@ func TestPrinterPrintPreInc(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPreInc{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2310,7 +2310,7 @@ func TestPrinterPrintPrint(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPrint{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2329,9 +2329,9 @@ func TestPrinterPrintPropertyFetch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprPropertyFetch{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$foo")}, + Name: &ast.Identifier{Value: []byte("$foo")}, }, - Property: &ast.Identifier{Value: []byte("bar")}, + Prop: &ast.Identifier{Value: []byte("bar")}, } n.Accept(p) @@ -2385,7 +2385,7 @@ func TestPrinterPrintShellExec(t *testing.T) { Parts: []ast.Vertex{ &ast.ScalarEncapsedStringPart{Value: []byte("hello ")}, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, &ast.ScalarEncapsedStringPart{Value: []byte("!")}, }, @@ -2409,7 +2409,7 @@ func TestPrinterPrintExprShortArray(t *testing.T) { &ast.ExprArrayItem{ Key: &ast.ScalarString{Value: []byte("'Hello'")}, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$world")}, + Name: &ast.Identifier{Value: []byte("$world")}, }, }, &ast.ExprArrayItem{ @@ -2418,12 +2418,12 @@ func TestPrinterPrintExprShortArray(t *testing.T) { Value: []byte("&"), }, Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, }, @@ -2449,7 +2449,7 @@ func TestPrinterPrintShortList(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.ExprArrayItem{ @@ -2457,12 +2457,12 @@ func TestPrinterPrintShortList(t *testing.T) { Items: []ast.Vertex{ &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, &ast.ExprArrayItem{ Val: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, }, }, @@ -2490,15 +2490,15 @@ func TestPrinterPrintStaticCall(t *testing.T) { n := &ast.ExprStaticCall{ Class: &ast.Identifier{Value: []byte("Foo")}, Call: &ast.Identifier{Value: []byte("bar")}, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -2519,8 +2519,8 @@ func TestPrinterPrintStaticPropertyFetch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprStaticPropertyFetch{ Class: &ast.Identifier{Value: []byte("Foo")}, - Property: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$bar")}, + Prop: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$bar")}, }, } n.Accept(p) @@ -2538,11 +2538,11 @@ func TestPrinterPrintTernary(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprTernary{ - Condition: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Cond: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$a")}, }, IfFalse: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, } n.Accept(p) @@ -2560,14 +2560,14 @@ func TestPrinterPrintTernaryFull(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprTernary{ - Condition: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Cond: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$a")}, }, IfTrue: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, IfFalse: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, } n.Accept(p) @@ -2586,7 +2586,7 @@ func TestPrinterPrintUnaryMinus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprUnaryMinus{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2605,7 +2605,7 @@ func TestPrinterPrintUnaryPlus(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprUnaryPlus{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2629,8 +2629,8 @@ func TestPrinterPrintVariable(t *testing.T) { OpenCurlyBracketTkn: &token.Token{ Value: []byte("{"), }, - VarName: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$var")}, }, CloseCurlyBracketTkn: &token.Token{ Value: []byte("}"), @@ -2652,7 +2652,7 @@ func TestPrinterPrintYieldFrom(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprYieldFrom{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2670,8 +2670,8 @@ func TestPrinterPrintYield(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprYield{ - Value: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Val: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2690,10 +2690,10 @@ func TestPrinterPrintYieldFull(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.ExprYield{ Key: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$k")}, + Name: &ast.Identifier{Value: []byte("$k")}, }, - Value: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Val: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -2714,7 +2714,7 @@ func TestPrinterPrintAltElseIf(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2722,7 +2722,7 @@ func TestPrinterPrintAltElseIf(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -2743,7 +2743,7 @@ func TestPrinterPrintAltElseIfEmpty(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2771,7 +2771,7 @@ func TestPrinterPrintAltElse(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -2813,17 +2813,17 @@ func TestPrinterPrintAltFor(t *testing.T) { n := &ast.StmtFor{ Init: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, Cond: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, Loop: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, }, ColonTkn: &token.Token{ @@ -2832,7 +2832,7 @@ func TestPrinterPrintAltFor(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }}, }, }, @@ -2853,13 +2853,13 @@ func TestPrinterPrintAltForeach(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, Key: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$key")}, + Name: &ast.Identifier{Value: []byte("$key")}, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$val")}, + Name: &ast.Identifier{Value: []byte("$val")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2867,7 +2867,7 @@ func TestPrinterPrintAltForeach(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }}, }, }, @@ -2888,16 +2888,16 @@ func TestPrinterPrintAltForeach_Reference(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, Key: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$key")}, + Name: &ast.Identifier{Value: []byte("$key")}, }, AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$val")}, + Name: &ast.Identifier{Value: []byte("$val")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2905,7 +2905,7 @@ func TestPrinterPrintAltForeach_Reference(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }}, }, }, @@ -2926,7 +2926,7 @@ func TestPrinterPrintAltIf(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2934,14 +2934,14 @@ func TestPrinterPrintAltIf(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }}, }, }, ElseIf: []ast.Vertex{ &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2949,14 +2949,14 @@ func TestPrinterPrintAltIf(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, }, &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -2971,7 +2971,7 @@ func TestPrinterPrintAltIf(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -2993,17 +2993,17 @@ func TestPrinterPrintStmtAltSwitch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtSwitch{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, ColonTkn: &token.Token{ Value: []byte(":"), }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Cond: &ast.ScalarString{Value: []byte("'a'")}, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -3011,7 +3011,7 @@ func TestPrinterPrintStmtAltSwitch(t *testing.T) { Cond: &ast.ScalarString{Value: []byte("'b'")}, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -3033,7 +3033,7 @@ func TestPrinterPrintAltWhile(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtWhile{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, ColonTkn: &token.Token{ Value: []byte(":"), @@ -3041,7 +3041,7 @@ func TestPrinterPrintAltWhile(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -3081,11 +3081,11 @@ func TestPrinterPrintStmtCase(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtCase{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, } @@ -3105,7 +3105,7 @@ func TestPrinterPrintStmtCaseEmpty(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtCase{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmts: []ast.Vertex{}, } @@ -3125,15 +3125,15 @@ func TestPrinterPrintStmtCatch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtCatch{ Types: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Exception")}}}, - &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("RuntimeException")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Exception")}}}, + &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("RuntimeException")}}}, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$e")}, + Name: &ast.Identifier{Value: []byte("$e")}, }, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, } @@ -3156,34 +3156,34 @@ func TestPrinterPrintStmtClassMethod(t *testing.T) { AmpersandTkn: &token.Token{ Value: []byte("&"), }, - MethodName: &ast.Identifier{Value: []byte("foo")}, + Name: &ast.Identifier{Value: []byte("foo")}, Params: []ast.Vertex{ &ast.Parameter{ - Type: &ast.Nullable{Expr: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("int")}}}}, + Type: &ast.Nullable{Expr: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("int")}}}}, AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, - DefaultValue: &ast.ExprConstFetch{Const: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("null")}}}}, + DefaultValue: &ast.ExprConstFetch{Const: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("null")}}}}, }, &ast.Parameter{ VariadicTkn: &token.Token{ Value: []byte("..."), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, - ReturnType: &ast.NameName{ - Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("void")}}, + ReturnType: &ast.Name{ + Parts: []ast.Vertex{&ast.NamePart{Value: []byte("void")}}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -3210,29 +3210,29 @@ func TestPrinterPrintStmtAbstractClassMethod(t *testing.T) { AmpersandTkn: &token.Token{ Value: []byte("&"), }, - MethodName: &ast.Identifier{Value: []byte("foo")}, + Name: &ast.Identifier{Value: []byte("foo")}, Params: []ast.Vertex{ &ast.Parameter{ - Type: &ast.Nullable{Expr: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("int")}}}}, + Type: &ast.Nullable{Expr: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("int")}}}}, AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, - DefaultValue: &ast.ExprConstFetch{Const: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("null")}}}}, + DefaultValue: &ast.ExprConstFetch{Const: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("null")}}}}, }, &ast.Parameter{ VariadicTkn: &token.Token{ Value: []byte("..."), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, - ReturnType: &ast.NameName{ - Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("void")}}, + ReturnType: &ast.Name{ + Parts: []ast.Vertex{&ast.NamePart{Value: []byte("void")}}, }, Stmt: &ast.StmtNop{}, } @@ -3252,11 +3252,11 @@ func TestPrinterPrintStmtClass(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtClass{ Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("abstract")}}, - ClassName: &ast.Identifier{Value: []byte("Foo")}, - Extends: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, + Name: &ast.Identifier{Value: []byte("Foo")}, + Extends: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, Implements: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Quuz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Quuz")}}}, }, Stmts: []ast.Vertex{ &ast.StmtClassConstList{ @@ -3289,22 +3289,22 @@ func TestPrinterPrintStmtAnonymousClass(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtClass{ Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("abstract")}}, - Arguments: []ast.Vertex{ + Args: []ast.Vertex{ &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.Argument{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, - Extends: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, + Extends: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, Implements: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Quuz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Quuz")}}}, }, Stmts: []ast.Vertex{ &ast.StmtClassConstList{ @@ -3498,7 +3498,7 @@ func TestPrinterPrintStmtDefalut(t *testing.T) { n := &ast.StmtDefault{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, } @@ -3537,7 +3537,7 @@ func TestPrinterPrintStmtDo_Expression(t *testing.T) { Cond: &ast.ScalarLnumber{Value: []byte("1")}, Stmt: &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, } @@ -3560,7 +3560,7 @@ func TestPrinterPrintStmtDo_StmtList(t *testing.T) { Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -3584,10 +3584,10 @@ func TestPrinterPrintStmtEchoHtmlState(t *testing.T) { &ast.StmtEcho{ Exprs: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -3610,10 +3610,10 @@ func TestPrinterPrintStmtEchoPhpState(t *testing.T) { n := &ast.StmtEcho{ Exprs: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, } @@ -3633,7 +3633,7 @@ func TestPrinterPrintStmtElseIfStmts(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ @@ -3657,7 +3657,7 @@ func TestPrinterPrintStmtElseIfExpr(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtExpression{Expr: &ast.ScalarString{Value: []byte("'bar'")}}, } @@ -3677,7 +3677,7 @@ func TestPrinterPrintStmtElseIfNop(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtNop{}, } @@ -3752,7 +3752,7 @@ func TestPrinterPrintExpression(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, } n.Accept(p) @@ -3791,26 +3791,26 @@ func TestPrinterPrintStmtFor(t *testing.T) { n := &ast.StmtFor{ Init: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, Cond: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }, }, Loop: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$e")}, + Name: &ast.Identifier{Value: []byte("$e")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$f")}, + Name: &ast.Identifier{Value: []byte("$f")}, }, }, Stmt: &ast.StmtStmtList{ @@ -3835,13 +3835,13 @@ func TestPrinterPrintStmtForeach(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Key: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$k")}, + Name: &ast.Identifier{Value: []byte("$k")}, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$v")}, + Name: &ast.Identifier{Value: []byte("$v")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ @@ -3865,16 +3865,16 @@ func TestPrinterPrintStmtForeach_Reference(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtForeach{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Key: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$k")}, + Name: &ast.Identifier{Value: []byte("$k")}, }, AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$v")}, + Name: &ast.Identifier{Value: []byte("$v")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ @@ -3900,19 +3900,19 @@ func TestPrinterPrintStmtFunction(t *testing.T) { AmpersandTkn: &token.Token{ Value: []byte("&"), }, - FunctionName: &ast.Identifier{Value: []byte("foo")}, + Name: &ast.Identifier{Value: []byte("foo")}, Params: []ast.Vertex{ &ast.Parameter{ AmpersandTkn: &token.Token{ Value: []byte("&"), }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, }, }, ReturnType: &ast.NameFullyQualified{ - Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}, + Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}, }, Stmts: []ast.Vertex{ &ast.StmtNop{}, @@ -3935,10 +3935,10 @@ func TestPrinterPrintStmtGlobal(t *testing.T) { n := &ast.StmtGlobal{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, } @@ -3990,23 +3990,23 @@ func TestPrinterPrintIfExpression(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, ElseIf: []ast.Vertex{ &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$d")}, + Name: &ast.Identifier{Value: []byte("$d")}, }, }, }, @@ -4014,7 +4014,7 @@ func TestPrinterPrintIfExpression(t *testing.T) { }, &ast.StmtElseIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$e")}, + Name: &ast.Identifier{Value: []byte("$e")}, }, Stmt: &ast.StmtNop{}, }, @@ -4022,7 +4022,7 @@ func TestPrinterPrintIfExpression(t *testing.T) { Else: &ast.StmtElse{ Stmt: &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$f")}, + Name: &ast.Identifier{Value: []byte("$f")}, }, }, }, @@ -4043,13 +4043,13 @@ func TestPrinterPrintIfStmtList(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -4071,7 +4071,7 @@ func TestPrinterPrintIfNop(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtIf{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtNop{}, } @@ -4111,20 +4111,20 @@ func TestPrinterPrintInterface(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtInterface{ - InterfaceName: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Name: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Extends: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, }, Stmts: []ast.Vertex{ &ast.StmtClassMethod{ - Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, - MethodName: &ast.Identifier{Value: []byte("foo")}, - Params: []ast.Vertex{}, + Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, + Name: &ast.Identifier{Value: []byte("foo")}, + Params: []ast.Vertex{}, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -4146,7 +4146,7 @@ func TestPrinterPrintLabel(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtLabel{ - LabelName: &ast.Identifier{Value: []byte("FOO")}, + Name: &ast.Identifier{Value: []byte("FOO")}, } n.Accept(p) @@ -4163,7 +4163,7 @@ func TestPrinterPrintNamespace(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtNamespace{ - Name: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Name: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, } n.Accept(p) @@ -4180,10 +4180,10 @@ func TestPrinterPrintNamespaceWithStmts(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtNamespace{ - Name: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Name: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, } @@ -4221,23 +4221,23 @@ func TestPrinterPrintPropertyList(t *testing.T) { &ast.Identifier{Value: []byte("public")}, &ast.Identifier{Value: []byte("static")}, }, - Type: &ast.NameName{ + Type: &ast.Name{ Parts: []ast.Vertex{ - &ast.NameNamePart{ + &ast.NamePart{ Value: []byte("Foo"), }, }, }, - Properties: []ast.Vertex{ + Props: []ast.Vertex{ &ast.StmtProperty{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ScalarString{Value: []byte("'a'")}, }, &ast.StmtProperty{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -4258,7 +4258,7 @@ func TestPrinterPrintProperty(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtProperty{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ScalarLnumber{Value: []byte("1")}, } @@ -4295,7 +4295,7 @@ func TestPrinterPrintStaticVar(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Expr: &ast.ScalarLnumber{Value: []byte("1")}, } @@ -4317,12 +4317,12 @@ func TestPrinterPrintStatic(t *testing.T) { Vars: []ast.Vertex{ &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, }, &ast.StmtStaticVar{ Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, }, @@ -4344,10 +4344,10 @@ func TestPrinterPrintStmtList(t *testing.T) { n := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, } @@ -4368,17 +4368,17 @@ func TestPrinterPrintStmtListNested(t *testing.T) { n := &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$c")}, + Name: &ast.Identifier{Value: []byte("$c")}, }}, }, }, @@ -4402,14 +4402,14 @@ func TestPrinterPrintStmtSwitch(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtSwitch{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, - CaseList: []ast.Vertex{ + Cases: []ast.Vertex{ &ast.StmtCase{ Cond: &ast.ScalarString{Value: []byte("'a'")}, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -4417,7 +4417,7 @@ func TestPrinterPrintStmtSwitch(t *testing.T) { Cond: &ast.ScalarString{Value: []byte("'b'")}, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -4439,7 +4439,7 @@ func TestPrinterPrintStmtThrow(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtThrow{ Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$var")}, + Name: &ast.Identifier{Value: []byte("$var")}, }, } n.Accept(p) @@ -4457,7 +4457,7 @@ func TestPrinterPrintStmtTraitUseAlias(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtTraitUseAlias{ - Trait: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Trait: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Method: &ast.Identifier{Value: []byte("a")}, Modifier: &ast.Identifier{Value: []byte("public")}, Alias: &ast.Identifier{Value: []byte("b")}, @@ -4477,11 +4477,11 @@ func TestPrinterPrintStmtTraitUsePrecedence(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtTraitUsePrecedence{ - Trait: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Trait: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Method: &ast.Identifier{Value: []byte("a")}, Insteadof: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, }, } n.Accept(p) @@ -4500,8 +4500,8 @@ func TestPrinterPrintStmtTraitUse(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtTraitUse{ Traits: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, }, } n.Accept(p) @@ -4520,12 +4520,12 @@ func TestPrinterPrintStmtTraitAdaptations(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtTraitUse{ Traits: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Bar")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Bar")}}}, }, Adaptations: []ast.Vertex{ &ast.StmtTraitUseAlias{ - Trait: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Trait: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Method: &ast.Identifier{Value: []byte("a")}, Alias: &ast.Identifier{Value: []byte("b")}, }, @@ -4546,16 +4546,16 @@ func TestPrinterPrintTrait(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtTrait{ - TraitName: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Name: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Stmts: []ast.Vertex{ &ast.StmtClassMethod{ - Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, - MethodName: &ast.Identifier{Value: []byte("foo")}, - Params: []ast.Vertex{}, + Modifiers: []ast.Vertex{&ast.Identifier{Value: []byte("public")}}, + Name: &ast.Identifier{Value: []byte("foo")}, + Params: []ast.Vertex{}, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, @@ -4579,21 +4579,21 @@ func TestPrinterPrintStmtTry(t *testing.T) { n := &ast.StmtTry{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, Catches: []ast.Vertex{ &ast.StmtCatch{ Types: []ast.Vertex{ - &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Exception")}}}, - &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("RuntimeException")}}}, + &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Exception")}}}, + &ast.NameFullyQualified{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("RuntimeException")}}}, }, Var: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$e")}, + Name: &ast.Identifier{Value: []byte("$e")}, }, Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }}, }, }, @@ -4621,10 +4621,10 @@ func TestPrinterPrintStmtUnset(t *testing.T) { n := &ast.StmtUnset{ Vars: []ast.Vertex{ &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$b")}, + Name: &ast.Identifier{Value: []byte("$b")}, }, }, } @@ -4642,15 +4642,15 @@ func TestPrinterPrintUse(t *testing.T) { o := bytes.NewBufferString("") p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) - n := &ast.StmtUse{ + n := &ast.StmtUseList{ Type: &ast.Identifier{Value: []byte("function")}, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Alias: &ast.Identifier{Value: []byte("Bar")}, }, - &ast.StmtUseDeclaration{ - Use: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, + &ast.StmtUse{ + Use: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, }, }, } @@ -4668,16 +4668,16 @@ func TestPrinterPrintStmtGroupUse(t *testing.T) { o := bytes.NewBufferString("") p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) - n := &ast.StmtGroupUse{ + n := &ast.StmtGroupUseList{ Type: &ast.Identifier{Value: []byte("function")}, - Prefix: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, - UseDeclarations: []ast.Vertex{ - &ast.StmtUseDeclaration{ - Use: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Prefix: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, + Uses: []ast.Vertex{ + &ast.StmtUse{ + Use: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Alias: &ast.Identifier{Value: []byte("Bar")}, }, - &ast.StmtUseDeclaration{ - Use: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Baz")}}}, + &ast.StmtUse{ + Use: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Baz")}}}, }, }, } @@ -4695,9 +4695,9 @@ func TestPrinterPrintUseDeclaration(t *testing.T) { o := bytes.NewBufferString("") p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) - n := &ast.StmtUseDeclaration{ + n := &ast.StmtUse{ Type: &ast.Identifier{Value: []byte("function")}, - Use: &ast.NameName{Parts: []ast.Vertex{&ast.NameNamePart{Value: []byte("Foo")}}}, + Use: &ast.Name{Parts: []ast.Vertex{&ast.NamePart{Value: []byte("Foo")}}}, Alias: &ast.Identifier{Value: []byte("Bar")}, } n.Accept(p) @@ -4716,12 +4716,12 @@ func TestPrinterPrintWhileStmtList(t *testing.T) { p := printer.NewPrinter(o).WithState(printer.PrinterStatePHP) n := &ast.StmtWhile{ Cond: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }, Stmt: &ast.StmtStmtList{ Stmts: []ast.Vertex{ &ast.StmtExpression{Expr: &ast.ExprVariable{ - VarName: &ast.Identifier{Value: []byte("$a")}, + Name: &ast.Identifier{Value: []byte("$a")}, }}, }, }, diff --git a/pkg/visitor/traverser/traverser.go b/pkg/visitor/traverser/traverser.go index 128f7ea..8cc0e30 100644 --- a/pkg/visitor/traverser/traverser.go +++ b/pkg/visitor/traverser/traverser.go @@ -85,8 +85,8 @@ func (t *Traverser) StmtClass(n *ast.StmtClass) { for _, nn := range n.Modifiers { nn.Accept(t) } - t.Traverse(n.ClassName) - for _, nn := range n.Arguments { + t.Traverse(n.Name) + for _, nn := range n.Args { nn.Accept(t) } t.Traverse(n.Extends) @@ -115,7 +115,7 @@ func (t *Traverser) StmtClassMethod(n *ast.StmtClassMethod) { for _, nn := range n.Modifiers { nn.Accept(t) } - t.Traverse(n.MethodName) + t.Traverse(n.Name) for _, nn := range n.Params { nn.Accept(t) } @@ -230,7 +230,7 @@ func (t *Traverser) StmtForeach(n *ast.StmtForeach) { func (t *Traverser) StmtFunction(n *ast.StmtFunction) { n.Accept(t.v) - t.Traverse(n.FunctionName) + t.Traverse(n.Name) for _, nn := range n.Params { nn.Accept(t) } @@ -276,7 +276,7 @@ func (t *Traverser) StmtInlineHtml(n *ast.StmtInlineHtml) { func (t *Traverser) StmtInterface(n *ast.StmtInterface) { n.Accept(t.v) - t.Traverse(n.InterfaceName) + t.Traverse(n.Name) for _, nn := range n.Extends { nn.Accept(t) } @@ -288,7 +288,7 @@ func (t *Traverser) StmtInterface(n *ast.StmtInterface) { func (t *Traverser) StmtLabel(n *ast.StmtLabel) { n.Accept(t.v) - t.Traverse(n.LabelName) + t.Traverse(n.Name) } func (t *Traverser) StmtNamespace(n *ast.StmtNamespace) { @@ -318,7 +318,7 @@ func (t *Traverser) StmtPropertyList(n *ast.StmtPropertyList) { nn.Accept(t) } t.Traverse(n.Type) - for _, nn := range n.Properties { + for _, nn := range n.Props { nn.Accept(t) } } @@ -356,7 +356,7 @@ func (t *Traverser) StmtSwitch(n *ast.StmtSwitch) { n.Accept(t.v) t.Traverse(n.Cond) - for _, nn := range n.CaseList { + for _, nn := range n.Cases { nn.Accept(t) } } @@ -370,7 +370,7 @@ func (t *Traverser) StmtThrow(n *ast.StmtThrow) { func (t *Traverser) StmtTrait(n *ast.StmtTrait) { n.Accept(t.v) - t.Traverse(n.TraitName) + t.Traverse(n.Name) for _, nn := range n.Stmts { nn.Accept(t) } @@ -426,26 +426,26 @@ func (t *Traverser) StmtUnset(n *ast.StmtUnset) { } } -func (t *Traverser) StmtUse(n *ast.StmtUse) { +func (t *Traverser) StmtUse(n *ast.StmtUseList) { n.Accept(t.v) t.Traverse(n.Type) - for _, nn := range n.UseDeclarations { + for _, nn := range n.Uses { nn.Accept(t) } } -func (t *Traverser) StmtGroupUse(n *ast.StmtGroupUse) { +func (t *Traverser) StmtGroupUse(n *ast.StmtGroupUseList) { n.Accept(t.v) t.Traverse(n.Type) t.Traverse(n.Prefix) - for _, nn := range n.UseDeclarations { + for _, nn := range n.Uses { nn.Accept(t) } } -func (t *Traverser) StmtUseDeclaration(n *ast.StmtUseDeclaration) { +func (t *Traverser) StmtUseDeclaration(n *ast.StmtUse) { n.Accept(t.v) t.Traverse(n.Type) @@ -514,7 +514,7 @@ func (t *Traverser) ExprClassConstFetch(n *ast.ExprClassConstFetch) { n.Accept(t.v) t.Traverse(n.Class) - t.Traverse(n.ConstantName) + t.Traverse(n.Const) } func (t *Traverser) ExprClone(n *ast.ExprClone) { @@ -529,7 +529,7 @@ func (t *Traverser) ExprClosure(n *ast.ExprClosure) { for _, nn := range n.Params { nn.Accept(t) } - for _, nn := range n.Use { + for _, nn := range n.Uses { nn.Accept(t) } t.Traverse(n.ReturnType) @@ -578,7 +578,7 @@ func (t *Traverser) ExprFunctionCall(n *ast.ExprFunctionCall) { n.Accept(t.v) t.Traverse(n.Function) - for _, nn := range n.Arguments { + for _, nn := range n.Args { nn.Accept(t) } } @@ -623,7 +623,7 @@ func (t *Traverser) ExprMethodCall(n *ast.ExprMethodCall) { t.Traverse(n.Var) t.Traverse(n.Method) - for _, nn := range n.Arguments { + for _, nn := range n.Args { nn.Accept(t) } } @@ -632,7 +632,7 @@ func (t *Traverser) ExprNew(n *ast.ExprNew) { n.Accept(t.v) t.Traverse(n.Class) - for _, nn := range n.Arguments { + for _, nn := range n.Args { nn.Accept(t) } } @@ -671,7 +671,7 @@ func (t *Traverser) ExprPropertyFetch(n *ast.ExprPropertyFetch) { n.Accept(t.v) t.Traverse(n.Var) - t.Traverse(n.Property) + t.Traverse(n.Prop) } func (t *Traverser) ExprRequire(n *ast.ExprRequire) { @@ -699,7 +699,7 @@ func (t *Traverser) ExprStaticCall(n *ast.ExprStaticCall) { t.Traverse(n.Class) t.Traverse(n.Call) - for _, nn := range n.Arguments { + for _, nn := range n.Args { nn.Accept(t) } } @@ -708,13 +708,13 @@ func (t *Traverser) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) { n.Accept(t.v) t.Traverse(n.Class) - t.Traverse(n.Property) + t.Traverse(n.Prop) } func (t *Traverser) ExprTernary(n *ast.ExprTernary) { n.Accept(t.v) - t.Traverse(n.Condition) + t.Traverse(n.Cond) t.Traverse(n.IfTrue) t.Traverse(n.IfFalse) } @@ -734,14 +734,14 @@ func (t *Traverser) ExprUnaryPlus(n *ast.ExprUnaryPlus) { func (t *Traverser) ExprVariable(n *ast.ExprVariable) { n.Accept(t.v) - t.Traverse(n.VarName) + t.Traverse(n.Name) } func (t *Traverser) ExprYield(n *ast.ExprYield) { n.Accept(t.v) t.Traverse(n.Key) - t.Traverse(n.Value) + t.Traverse(n.Val) } func (t *Traverser) ExprYieldFrom(n *ast.ExprYieldFrom) { @@ -1105,7 +1105,7 @@ func (t *Traverser) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) { func (t *Traverser) ScalarEncapsedStringVar(n *ast.ScalarEncapsedStringVar) { n.Accept(t.v) - t.Traverse(n.VarName) + t.Traverse(n.Name) t.Traverse(n.Dim) } @@ -1135,7 +1135,7 @@ func (t *Traverser) ScalarString(n *ast.ScalarString) { n.Accept(t.v) } -func (t *Traverser) NameName(n *ast.NameName) { +func (t *Traverser) NameName(n *ast.Name) { n.Accept(t.v) for _, nn := range n.Parts { @@ -1159,6 +1159,6 @@ func (t *Traverser) NameRelative(n *ast.NameRelative) { } } -func (t *Traverser) NameNamePart(n *ast.NameNamePart) { +func (t *Traverser) NameNamePart(n *ast.NamePart) { n.Accept(t.v) }