Skip to content

Commit

Permalink
unquoted strings can contain '+'
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 9, 2024
1 parent b80c3a6 commit 5b1d834
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Latte/Compiler/TagLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function tokenizeCode(): void
(?<Php_NameFullyQualified> \\ (?&label) ( \\ (?&label) )* )|
(?<Php_NameQualified> (?&label) ( \\ (?&label) )+ )|
(?<Php_IdentifierFollowed> (?&label) (?= [ \t\r\n]* [(&=] ) )|
(?<Php_Identifier> (?&label)((--?|\.)[a-zA-Z0-9_\x80-\xff]+)* )|
(?<Php_Identifier> (?&label)((--?|\.|\+)[a-zA-Z0-9_\x80-\xff]+)* )|
(
(
(?<Php_ObjectOperator> -> )|
Expand Down
6 changes: 3 additions & 3 deletions tests/phpPrint/unquotedStrings.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ $test = <<<'XX'
a-b-c,
a--b--c,
/* dots */
a.b,
/* special chars */
a.b+c,
a . b,
/* usage */
Expand All @@ -43,7 +43,7 @@ __halt_compiler();
MD5,
'a-b-c',
'a--b--c',
'a.b',
'a.b+c',
'a' . 'b',
'a-b.c-d',
a.b(),
Expand Down

0 comments on commit 5b1d834

Please sign in to comment.