You are here

protected function Twig_Lexer::popState in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Lexer.php \Twig_Lexer::popState()
  2. 7.2 vendor/Twig/Lexer.php \Twig_Lexer::popState()
4 calls to Twig_Lexer::popState()
Twig_Lexer::lexBlock in vendor/Twig/Lexer.php
Twig_Lexer::lexInterpolation in vendor/Twig/Lexer.php
Twig_Lexer::lexString in vendor/Twig/Lexer.php
Twig_Lexer::lexVar in vendor/Twig/Lexer.php

File

vendor/Twig/Lexer.php, line 401

Class

Twig_Lexer
Lexes a template string.

Code

protected function popState() {
  if (0 === count($this->states)) {
    throw new Exception('Cannot pop state without a previous state');
  }
  $this->state = array_pop($this->states);
}