Lines Matching defs:token
25 * Parse the token stream for a simple selector sequence,
33 $token = $this->lookahead(
44 while (isset($token)) {
45 if ($selector = $this->createSelector($token)) {
46 $this->read($token->type);
49 switch ($token->type) {
57 $sequence->simples[] = $this->createPseudoElement($token);
58 $this->read($token->type);
61 $this->read($token->type);
66 $this->read($token->type);
72 $token, $subSequence
77 $token = NULL;
80 $token = $this->lookahead(
96 private function createSelector(Scanner\Token $token) {
97 switch ($token->type) {
99 if (FALSE !== strpos($token->content, '|')) {
100 [$prefix, $name] = explode('|', $token->content);
103 $name = $token->content;
110 return new Ast\Selector\Simple\Id(substr($token->content, 1));
112 return new Ast\Selector\Simple\ClassName(substr($token->content, 1));
118 Scanner\Token $token,
121 switch (trim($token->content)) {
136 private function createPseudoElement($token): Ast\Selector\Simple\PseudoElement {
137 $name = substr($token->content, 2);
145 throw new PhpCss\Exception\UnknownPseudoElementException($token);