Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setSourceType example
if
(
$this
->sourceType === \Peast\Peast::SOURCE_TYPE_MODULE
)
{
$this
->scanner->
setStrictMode
(
true
)
;
$body
=
$this
->
parseModuleItemList
(
)
;
}
else
{
$body
=
$this
->
parseStatementList
(
true
)
;
}
$node
=
$this
->
createNode
(
"Program",
$body
?:
$this
->scanner->
getPosition
(
)
)
;
$node
->
setSourceType
(
$this
->sourceType
)
;
if
(
$body
)
{
$node
->
setBody
(
$body
)
;
}
$program
=
$this
->
completeNode
(
$node
)
;
if
(
$this
->scanner->
getToken
(
)
)
{
$this
->
error
(
)
;
}
//Execute scanner end operations
$this
->scanner->
consumeEnd
(
)
;