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

Breadcrumb

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

function Scanner::isStrictModeKeyword

Checks if the given token is a keyword in the current strict mode state

Parameters

Token $token Token to checks:

Return value

bool

File

vendor/mck89/peast/lib/Peast/Syntax/Scanner.php, line 524

Class

Scanner
Base class for scanners.

Namespace

Peast\Syntax

Code

public function isStrictModeKeyword($token) {
    return $token->type === Token::TYPE_KEYWORD && (in_array($token->value, $this->keywords) || $this->strictMode && in_array($token->value, $this->strictModeKeywords));
}

API Navigation

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