You are here

public function Parser::parse in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/yaml/Parser.php \Symfony\Component\Yaml\Parser::parse()
  2. 8.0 vendor/sebastian/diff/src/Parser.php \SebastianBergmann\Diff\Parser::parse()
  3. 8.0 vendor/symfony/css-selector/Parser/Parser.php \Symfony\Component\CssSelector\Parser\Parser::parse()
  4. 8.0 vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php \Egulias\EmailValidator\Parser\Parser::parse()
Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/Parser/Parser.php \Symfony\Component\CssSelector\Parser\Parser::parse()

Parses given selector source into an array of tokens.

Parameters

string $source:

Return value

SelectorNode[]

Overrides ParserInterface::parse

File

vendor/symfony/css-selector/Parser/Parser.php, line 46

Class

Parser
CSS selector parser.

Namespace

Symfony\Component\CssSelector\Parser

Code

public function parse($source) {
  $reader = new Reader($source);
  $stream = $this->tokenizer
    ->tokenize($reader);
  return $this
    ->parseSelectorList($stream);
}