comparison vendor/symfony/css-selector/Parser/TokenStream.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
27 class TokenStream 27 class TokenStream
28 { 28 {
29 /** 29 /**
30 * @var Token[] 30 * @var Token[]
31 */ 31 */
32 private $tokens = array(); 32 private $tokens = [];
33 33
34 /** 34 /**
35 * @var Token[] 35 * @var Token[]
36 */ 36 */
37 private $used = array(); 37 private $used = [];
38 38
39 /** 39 /**
40 * @var int 40 * @var int
41 */ 41 */
42 private $cursor = 0; 42 private $cursor = 0;
140 } 140 }
141 141
142 /** 142 /**
143 * Returns nex identifier or star delimiter token. 143 * Returns nex identifier or star delimiter token.
144 * 144 *
145 * @return null|string The identifier token value or null if star found 145 * @return string|null The identifier token value or null if star found
146 * 146 *
147 * @throws SyntaxErrorException If next token is not an identifier or a star delimiter 147 * @throws SyntaxErrorException If next token is not an identifier or a star delimiter
148 */ 148 */
149 public function getNextIdentifierOrStar() 149 public function getNextIdentifierOrStar()
150 { 150 {
152 152
153 if ($next->isIdentifier()) { 153 if ($next->isIdentifier()) {
154 return $next->getValue(); 154 return $next->getValue();
155 } 155 }
156 156
157 if ($next->isDelimiter(array('*'))) { 157 if ($next->isDelimiter(['*'])) {
158 return; 158 return;
159 } 159 }
160 160
161 throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next); 161 throw SyntaxErrorException::unexpectedToken('identifier or "*"', $next);
162 } 162 }