Skip to content

Commit dd97834

Browse files
committed
Initial spec with end of heredoc.
The closing identifier may be indented by space or tab, in which case the indentation will be stripped from all lines in the doc string. Prior to PHP 7.3.0, the closing identifier must begin in the first column of the line. The possibility to haven initial space is implemented
1 parent 6a15487 commit dd97834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scanner.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,8 +2269,8 @@ NONLopt [^\n]*
22692269
yyextra->delimiter = &yytext[1];
22702270
BEGIN(HereDocEnd);
22712271
}
2272-
<HereDocEnd>^{ID} { // id at start of the line could mark the end of the block
2273-
if (yyextra->delimiter==yytext) // it is the end marker
2272+
<HereDocEnd>^{Bopt}{ID} { // id at start of the line could mark the end of the block
2273+
if (yyextra->delimiter==QCString(yytext).stripWhiteSpace()) // it is the end marker
22742274
{
22752275
BEGIN(yyextra->lastHereDocContext);
22762276
}

0 commit comments

Comments
 (0)