Browse Source

- Changed here-docs to <<< followed by whitespace.

migration/INITIAL
Andi Gutmans 28 years ago
parent
commit
906dc43ed7
  1. 12
      Zend/zend-scanner.l

12
Zend/zend-scanner.l

@ -990,9 +990,15 @@ TLS_VARS;
}
<IN_SCRIPTING>"<<"{LABEL}("\r")?"\n" {
CG(heredoc_len) = yyleng-2-1-(yytext[yyleng-2]=='\r'?1:0);
CG(heredoc) = estrndup(yytext+2, CG(heredoc_len));
<IN_SCRIPTING>"<<<"{TABS_AND_SPACES}{LABEL}("\r")?"\n" {
char *s;
CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0);
s = yytext+3;
while ((*s == ' ') || (*s == '\t')) {
s++;
CG(heredoc_len)--;
}
CG(heredoc) = estrndup(s, CG(heredoc_len));
BEGIN(HEREDOC);
return ZEND_HEREDOC;
}

Loading…
Cancel
Save