refactoring: update ast structure of "IncludeOnce" node

This commit is contained in:
Vadym Slizov
2020-12-26 22:44:14 +02:00
parent 616fd4448e
commit 115d481a57
10 changed files with 21 additions and 21 deletions

View File

@@ -35182,7 +35182,7 @@ func TestExprInclude_Once(t *testing.T) {
StartPos: 3,
EndPos: 18,
},
IncludeTkn: &token.Token{
IncludeOnceTkn: &token.Token{
ID: token.T_INCLUDE_ONCE,
Value: []byte("include_once"),
Position: &position.Position{

6
internal/php5/php5.go generated
View File

@@ -8132,9 +8132,9 @@ yydefault:
// line internal/php5/php5.y:5534
{
yyVAL.node = &ast.ExprIncludeOnce{
Position: yylex.(*Parser).builder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node),
IncludeTkn: yyDollar[1].token,
Expr: yyDollar[2].node,
Position: yylex.(*Parser).builder.NewTokenNodePosition(yyDollar[1].token, yyDollar[2].node),
IncludeOnceTkn: yyDollar[1].token,
Expr: yyDollar[2].node,
}
}
case 510:

View File

@@ -5533,9 +5533,9 @@ internal_functions_in_yacc:
| T_INCLUDE_ONCE expr
{
$$ = &ast.ExprIncludeOnce{
Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2),
IncludeTkn: $1,
Expr: $2,
Position: yylex.(*Parser).builder.NewTokenNodePosition($1, $2),
IncludeOnceTkn: $1,
Expr: $2,
}
}
| T_EVAL '(' expr ')'