Permalink
Browse files

Fix HEREDOC bug

Summary:
Heredocs weren't scanning properly in XHP 1.2.1. This fixes that

Test Plan:
$foo = <<<HERE
HERE;

Reviewed By: epriestley

Revert: OK
  • Loading branch information...
1 parent c577a2d commit 8e7221668a5d36e4b9bb5af13ce569f19fb572ff @laverdet laverdet committed Sep 29, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −1 ext.hpp
  2. +1 −0 xhp/scanner.l
View
@@ -4,7 +4,7 @@
#endif
#include "php.h"
-#define PHP_XHP_VERSION "1.2.1"
+#define PHP_XHP_VERSION "1.2.2"
#define PHP_XHP_EXTNAME "xhp"
extern zend_module_entry xhp_module_entry;
View
@@ -444,6 +444,7 @@ NEWLINE ("\r\n"|"\n"|"\r")
}
++yyextra->lineno;
yyextra->heredoc_yyleng = yyleng;
+ yymore();
}
[^\r\n]+ {
set_state(PHP_HEREDOC_DATA);

0 comments on commit 8e72216

Please sign in to comment.