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

@@ -39864,7 +39864,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/php7/php7.go generated
View File

@@ -7006,9 +7006,9 @@ yydefault:
// line internal/php7/php7.y:4293
{
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 489:

View File

@@ -4292,9 +4292,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 ')'