Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
pseudoElementFound example
$result
,
$pseudoElement
]
=
$this
->
parseSimpleSelector
(
$stream
)
;
while
(
true
)
{
$stream
->
skipWhitespace
(
)
;
$peek
=
$stream
->
getPeek
(
)
;
if
(
$peek
->
isFileEnd
(
)
||
$peek
->
isDelimiter
(
[
','
]
)
)
{
break
;
}
if
(
null !==
$pseudoElement
)
{
throw
SyntaxErrorException::
pseudoElementFound
(
$pseudoElement
, 'not at the end of a selector'
)
;
}
if
(
$peek
->
isDelimiter
(
[
'+', '>', '~'
]
)
)
{
$combinator
=
$stream
->
getNext
(
)
->
getValue
(
)
;
$stream
->
skipWhitespace
(
)
;
}
else
{
$combinator
= ' ';
}
[
$nextSelector
,
$pseudoElement
]
=
$this
->
parseSimpleSelector
(
$stream
)
;
$result
=
new
Node\
CombinedSelectorNode
(
$result
,
$combinator
,
$nextSelector
)
;
}