Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Parser.php

function Parser::parseLiteral

Same name in this branch
  1. 11.1.x vendor/mck89/peast/lib/Peast/Syntax/Parser.php \Peast\Syntax\Parser::parseLiteral()

Parses a literal value

Return value

array|null

Throws

Exception

1 call to Parser::parseLiteral()
Parser::parseSelectorPartAttribute in vendor/mck89/peast/lib/Peast/Selector/Parser.php
Parses an attribute selector part

File

vendor/mck89/peast/lib/Peast/Selector/Parser.php, line 350

Class

Parser
Selector parser class

Namespace

Peast\Selector

Code

protected function parseLiteral() {
    if (($literal = $this->parseLiteralBoolNull()) !== 0 || ($literal = $this->parseLiteralString()) !== null || ($literal = $this->parseLiteralNumber()) !== null) {
        return array(
            $literal,
            false,
        );
    }
    elseif ($literal = $this->parseLiteralRegex()) {
        return array(
            $literal,
            true,
        );
    }
    return null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal