Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setConsequent example
(
$consequent
=
$this
->
parseStatement
(
)
)
||
(
!
$this
->scanner->
getStrictMode
(
)
&&
$consequent
=
$this
->
parseFunctionOrGeneratorDeclaration
(
false, false
)
)
)
)
{
$node
=
$this
->
createNode
(
"IfStatement",
$token
)
;
$node
->
setTest
(
$test
)
;
$node
->
setConsequent
(
$consequent
)
;
if
(
$this
->scanner->
consume
(
"else"
)
)
{
if
(
(
$alternate
=
$this
->
parseStatement
(
)
)
||
(
!
$this
->scanner->
getStrictMode
(
)
&&
$alternate
=
$this
->
parseFunctionOrGeneratorDeclaration
(
false, false
)
)
)
{
$node
->
setAlternate
(
$alternate
)
;
return
$this
->
completeNode
(
$node
)
;
}
}