You are here

private function CssParser::elementID in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/CssParser.php \CssParser::elementID()
  2. 7.2 QueryPath/CssParser.php \CssParser::elementID()
1 call to CssParser::elementID()
CssParser::simpleSelectors in QueryPath/CssParser.php

File

QueryPath/CssParser.php, line 244

Class

CssParser

Code

private function elementID() {
  if ($this->DEBUG) {
    print "ELEMENT ID\n";
  }
  if ($this->scanner->token == CssToken::octo) {
    $this->scanner
      ->nextToken();
    if ($this->scanner->token !== CssToken::char) {
      throw new CssParseException("Expected string after #");
    }
    $id = $this->scanner
      ->getNameString();
    $this->handler
      ->elementID($id);
  }
}