Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
parseJSXAttributes example
$nextToken
=
$this
->scanner->
getNextToken
(
)
;
if
(
$nextToken
&&
$nextToken
->value === "/"
)
{
return
null;
}
$this
->scanner->
consumeToken
(
)
;
if
(
!
(
$name
=
$this
->
parseJSXIdentifierOrMemberExpression
(
)
)
)
{
$this
->
error
(
)
;
}
$attributes
=
$this
->
parseJSXAttributes
(
)
;
$selfClosing
=
$this
->scanner->
consume
(
"/"
)
;
$endOpeningToken
=
$this
->scanner->
reconsumeCurrentTokenInJSXMode
(
)
;
if
(
!
$endOpeningToken
||
$endOpeningToken
->value !== ">"
)
{
$this
->
error
(
)
;
}
$this
->scanner->
consumeToken
(
)
;
if
(
!
$selfClosing
)
{