diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-27 06:39:31 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-27 06:39:31 +0000 |
commit | 497fae9d1f23135ffddd5295f16777acc85af89f (patch) | |
tree | baf5d60ee18537bf73d692a7ae4bfdf1a79690dd /Zend/zend_highlight.c | |
parent | ef08c58664b87d5f07b2850532eb18c07d35404c (diff) | |
download | php-git-497fae9d1f23135ffddd5295f16777acc85af89f.tar.gz |
Fixed bug #35411 (Regression with \{$ handling).
Fixed bug #35382 (Comment in end of file produces fatal error).
Diffstat (limited to 'Zend/zend_highlight.c')
-rw-r--r-- | Zend/zend_highlight.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index cbd269ed29..d32b79c7b5 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -164,6 +164,8 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini if (token.type == IS_STRING) { switch (token_type) { + case EOF: + goto done; case T_OPEN_TAG: case T_OPEN_TAG_WITH_ECHO: case T_CLOSE_TAG: @@ -180,6 +182,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini } token.type = 0; } +done: if (last_color != syntax_highlighter_ini->highlight_html) { zend_printf("</span>\n"); } @@ -208,6 +211,9 @@ ZEND_API void zend_strip(TSRMLS_D) case T_DOC_COMMENT: token.type = 0; continue; + + case EOF: + return; case T_END_HEREDOC: { char *ptr = LANG_SCNG(yy_text); |