]> granicus.if.org Git - php/commitdiff
- Changed here-docs to <<< followed by whitespace.
authorAndi Gutmans <andi@php.net>
Fri, 9 Apr 1999 20:47:29 +0000 (20:47 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 9 Apr 1999 20:47:29 +0000 (20:47 +0000)
Zend/zend-scanner.l

index 3b359dd3b175bb82c5c3f2fccb5faf5402c10c65..173e06b7efd45ce9cbfcf0f697e4f0290f393b1d 100644 (file)
@@ -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;
 }