refactoring: create "ExprBrackets" node
This commit is contained in:
@@ -11513,14 +11513,14 @@ func TestStmtContinue(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Expr: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 23,
|
||||
EndPos: 26,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -11530,7 +11530,7 @@ func TestStmtContinue(t *testing.T) {
|
||||
EndPos: 24,
|
||||
},
|
||||
},
|
||||
Child: &ast.ScalarLnumber{
|
||||
Expr: &ast.ScalarLnumber{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -11549,7 +11549,7 @@ func TestStmtContinue(t *testing.T) {
|
||||
},
|
||||
Value: []byte("3"),
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -12598,14 +12598,14 @@ func TestStmtEcho_Parenthesis(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Exprs: []ast.Vertex{
|
||||
&ast.ParserBrackets{
|
||||
&ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 7,
|
||||
EndPos: 11,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -12615,7 +12615,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) {
|
||||
EndPos: 8,
|
||||
},
|
||||
},
|
||||
Child: &ast.ExprVariable{
|
||||
Expr: &ast.ExprVariable{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -12642,7 +12642,7 @@ func TestStmtEcho_Parenthesis(t *testing.T) {
|
||||
Value: []byte("$a"),
|
||||
},
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -12694,14 +12694,14 @@ func TestStmtExpression(t *testing.T) {
|
||||
StartPos: 3,
|
||||
EndPos: 9,
|
||||
},
|
||||
Expr: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 3,
|
||||
EndPos: 8,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -12733,14 +12733,14 @@ func TestStmtExpression(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Child: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 4,
|
||||
EndPos: 7,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -12750,7 +12750,7 @@ func TestStmtExpression(t *testing.T) {
|
||||
EndPos: 5,
|
||||
},
|
||||
},
|
||||
Child: &ast.ScalarLnumber{
|
||||
Expr: &ast.ScalarLnumber{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -12769,7 +12769,7 @@ func TestStmtExpression(t *testing.T) {
|
||||
},
|
||||
Value: []byte("1"),
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -12780,7 +12780,7 @@ func TestStmtExpression(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -29993,14 +29993,14 @@ func TestStmtBreak(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Expr: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 20,
|
||||
EndPos: 23,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -30010,7 +30010,7 @@ func TestStmtBreak(t *testing.T) {
|
||||
EndPos: 21,
|
||||
},
|
||||
},
|
||||
Child: &ast.ScalarLnumber{
|
||||
Expr: &ast.ScalarLnumber{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -30029,7 +30029,7 @@ func TestStmtBreak(t *testing.T) {
|
||||
},
|
||||
Value: []byte("3"),
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -31402,14 +31402,14 @@ func TestExprClone_Brackets(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Expr: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 8,
|
||||
EndPos: 12,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -31419,7 +31419,7 @@ func TestExprClone_Brackets(t *testing.T) {
|
||||
EndPos: 9,
|
||||
},
|
||||
},
|
||||
Child: &ast.ExprVariable{
|
||||
Expr: &ast.ExprVariable{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -31446,7 +31446,7 @@ func TestExprClone_Brackets(t *testing.T) {
|
||||
Value: []byte("$a"),
|
||||
},
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
@@ -38335,14 +38335,14 @@ func TestExprPrint(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
Expr: &ast.ParserBrackets{
|
||||
Expr: &ast.ExprBrackets{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
StartPos: 8,
|
||||
EndPos: 12,
|
||||
},
|
||||
OpenBracketTkn: &token.Token{
|
||||
OpenParenthesisTkn: &token.Token{
|
||||
ID: token.ID(40),
|
||||
Value: []byte("("),
|
||||
Position: &position.Position{
|
||||
@@ -38352,7 +38352,7 @@ func TestExprPrint(t *testing.T) {
|
||||
EndPos: 9,
|
||||
},
|
||||
},
|
||||
Child: &ast.ExprVariable{
|
||||
Expr: &ast.ExprVariable{
|
||||
Position: &position.Position{
|
||||
StartLine: 1,
|
||||
EndLine: 1,
|
||||
@@ -38379,7 +38379,7 @@ func TestExprPrint(t *testing.T) {
|
||||
Value: []byte("$a"),
|
||||
},
|
||||
},
|
||||
CloseBracketTkn: &token.Token{
|
||||
CloseParenthesisTkn: &token.Token{
|
||||
ID: token.ID(41),
|
||||
Value: []byte(")"),
|
||||
Position: &position.Position{
|
||||
|
||||
Reference in New Issue
Block a user