Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isSameJSXElementName example
$children
=
$this
->
parseJSXChildren
(
)
;
if
(
(
$startClosingToken
=
$this
->scanner->
consume
(
"<"
)
)
&&
$this
->scanner->
consume
(
"/"
)
&&
(
$closingName
=
$this
->
parseJSXIdentifierOrMemberExpression
(
)
)
&&
(
$endClosingToken
=
$this
->scanner->
reconsumeCurrentTokenInJSXMode
(
)
)
&&
(
$endClosingToken
->value === ">"
)
)
{
$this
->scanner->
consumeToken
(
)
;
if
(
!
$this
->
isSameJSXElementName
(
$name
,
$closingName
)
)
{
$this
->
error
(
"Closing tag does not match opening tag"
)
;
}
}
else
{
$this
->
error
(
)
;
}
}
//Opening tag
$openingNode
=
$this
->
createJSXNode
(
"JSXOpeningElement",