mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 20:16:45 +00:00
Ensure Lexer:: is always initialized
This commit is contained in:
committed by
Fabien Potencier
parent
7d2b814e6c
commit
5a79652e7c
+2
-2
@@ -71,8 +71,6 @@ class Lexer
|
||||
return;
|
||||
}
|
||||
|
||||
$this->isInitialized = true;
|
||||
|
||||
// when PHP 7.3 is the min version, we will be able to remove the '#' part in preg_quote as it's part of the default
|
||||
$this->regexes = [
|
||||
// }}
|
||||
@@ -160,6 +158,8 @@ class Lexer
|
||||
'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A',
|
||||
'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A',
|
||||
];
|
||||
|
||||
$this->isInitialized = true;
|
||||
}
|
||||
|
||||
public function tokenize(Source $source): TokenStream
|
||||
|
||||
Reference in New Issue
Block a user