public function CssParser::parse in QueryPath 7.2
Same name and namespace in other branches
- 6 QueryPath/CssParser.php \CssParser::parse()
- 7.3 QueryPath/CssParser.php \CssParser::parse()
File
- QueryPath/
CssParser.php, line 125
Class
Code
public function parse() {
$this->scanner
->nextToken();
while ($this->scanner->token !== FALSE) {
$position = $this->scanner
->position();
if ($this->DEBUG) {
print "PARSE " . $this->scanner->token . "\n";
}
$this
->selector();
$finalPosition = $this->scanner
->position();
if ($this->scanner->token !== FALSE && $finalPosition == $position) {
throw new CssParseException('CSS selector is not well formed.');
}
}
}