exit node: handle upper case die
This commit is contained in:
parent
3bbac39c9c
commit
3c6e40fbeb
971
parser/parser.go
971
parser/parser.go
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ package parser
|
||||
import (
|
||||
"io"
|
||||
"fmt"
|
||||
"strings"
|
||||
"github.com/z7zmey/php-parser/token"
|
||||
"github.com/z7zmey/php-parser/node"
|
||||
"github.com/z7zmey/php-parser/node/scalar"
|
||||
@ -876,7 +877,7 @@ expr_without_variable:
|
||||
| T_OBJECT_CAST expr { $$ = cast.NewCastObject($2) }
|
||||
| T_BOOL_CAST expr { $$ = cast.NewCastBool($2) }
|
||||
| T_UNSET_CAST expr { $$ = cast.NewCastUnset($2) }
|
||||
| T_EXIT exit_expr { $$ = expr.NewExit($2, $1.Value == "die") }
|
||||
| T_EXIT exit_expr { $$ = expr.NewExit($2, strings.EqualFold($1.Value, "die")) }
|
||||
| '@' expr { $$ = node.NewSimpleNode("Silence").Append($2); }
|
||||
| scalar { $$ = $1; }
|
||||
| '`' backticks_expr '`' { $$ = node.NewNodeExprShellExec($1, $2, $3) }
|
||||
|
Loading…
Reference in New Issue
Block a user