Parser::parseArrayExpression()

parseArrayExpression()

Parser::parseArguments()

parseArguments() Parses arguments.

Parser::parse()

Node parse(TokenStream $stream, array $names = array()) Converts a token stream to a node tree. The valid names is an array where the values are the names that the user can use in an expression. If the variable name in the compiled PHP code must be different, define it as the key. For instance, ['this' => 'container'] means that the variable 'container' can be used in the expression but the compiled code will use 'this'. Parameters TokenStream $stream A token stream instanc

Parser::parse()

SelectorNode[] parse(string $source) Parses given selector source into an array of tokens. Parameters string $source Return Value SelectorNode[]

Parser

class Parser Parser parses YAML strings to convert them to PHP arrays. Constants TAG_PATTERN BLOCK_SCALAR_HEADER_PATTERN Methods __construct(int $offset, int|null $totalNumberOfLines = null, array $skippedLineNumbers = array()) Constructor. mixed parse(string $value, int $flags) Parses a YAML string to a PHP value. Details __construct(int $offset, int|null $totalNumberOfLines = null, array $skippedLineNumbers = array()) Construc

Parser

class Parser Parsers a token stream. This parser implements a "Precedence climbing" algorithm. Constants OPERATOR_LEFT OPERATOR_RIGHT Methods __construct(array $functions) Node parse(TokenStream $stream, array $names = array()) Converts a token stream to a node tree. parseExpression($precedence) parsePrimaryExpression() parseArrayExpression() parseHashExpression() parsePostfixExpression($node) parseArguments() Parses arguments. Detai

Parser

class Parser implements ParserInterface CSS selector parser. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect. Methods __construct(Tokenizer $tokenizer = null) Constructor. SelectorNode[] parse(string $source) Parses given selector source into an array of tokens. static array parseSeries(array $tokens) Parses the arguments for ":nth-child()" and friends. Details

ParseException

class ParseException extends RuntimeException Exception class thrown when an error occurs during parsing. Methods __construct(string $message, int $parsedLine = -1, int $snippet = null, string $parsedFile = null, Exception $previous = null) Constructor. string getSnippet() Gets the snippet of code near the error. setSnippet(string $snippet) Sets the snippet of code near the error. string getParsedFile() Gets the filename where the error occurred. setParsedFile(string

ParseException

class ParseException extends Exception implements ExceptionInterface ParseException is thrown when a CSS selector syntax is not valid. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

ParsedExpression

class ParsedExpression extends Expression Represents an already parsed expression. Methods __construct(string $expression, Node $nodes) Constructor. string __toString() Gets the expression. from Expression getNodes() Details __construct(string $expression, Node $nodes) Constructor. Parameters string $expression An expression Node $nodes A Node representing the expression string __toString()