Skip to content

Commit 5a79652

Browse files
danut007rofabpot
authored andcommitted
Ensure Lexer:: is always initialized
1 parent 7d2b814 commit 5a79652

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Lexer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ private function initialize()
7171
return;
7272
}
7373

74-
$this->isInitialized = true;
75-
7674
// 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
7775
$this->regexes = [
7876
// }}
@@ -160,6 +158,8 @@ private function initialize()
160158
'interpolation_start' => '{'.preg_quote($this->options['interpolation'][0], '#').'\s*}A',
161159
'interpolation_end' => '{\s*'.preg_quote($this->options['interpolation'][1], '#').'}A',
162160
];
161+
162+
$this->isInitialized = true;
163163
}
164164

165165
public function tokenize(Source $source): TokenStream

0 commit comments

Comments
 (0)