[refactoring] update ast structure of "Throw" node
This commit is contained in:
913
internal/php5/php5.go
generated
913
internal/php5/php5.go
generated
File diff suppressed because it is too large
Load Diff
@@ -1167,15 +1167,14 @@ unticked_statement:
|
||||
}
|
||||
| T_THROW expr ';'
|
||||
{
|
||||
$$ = &ast.StmtThrow{ast.Node{}, $2}
|
||||
|
||||
// save position
|
||||
$$.GetNode().Position = position.NewTokensPosition($1, $3)
|
||||
|
||||
// save comments
|
||||
yylex.(*Parser).setFreeFloating($$, token.Start, $1.SkippedTokens)
|
||||
yylex.(*Parser).setFreeFloating($$, token.Expr, $3.SkippedTokens)
|
||||
yylex.(*Parser).setToken($$, token.SemiColon, $3.SkippedTokens)
|
||||
$$ = &ast.StmtThrow{
|
||||
Node: ast.Node{
|
||||
Position: position.NewTokensPosition($1, $3),
|
||||
},
|
||||
ThrowTkn: $1,
|
||||
Expr: $2,
|
||||
SemiColonTkn: $3,
|
||||
}
|
||||
}
|
||||
| T_GOTO T_STRING ';'
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user