diff options
Diffstat (limited to 'Zend/zend_highlight.c')
-rw-r--r-- | Zend/zend_highlight.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index 5e94df0a99..168a51ca30 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -85,13 +85,14 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini { zval token; int token_type; + zend_ast_loc loc; char *last_color = syntax_highlighter_ini->highlight_html; char *next_color; zend_printf("<code>"); zend_printf("<span style=\"color: %s\">\n", last_color); /* highlight stuff coming back from zendlex() */ - while ((token_type=lex_scan(&token, NULL))) { + while ((token_type = lex_scan(&token, NULL, &loc))) { switch (token_type) { case T_INLINE_HTML: next_color = syntax_highlighter_ini->highlight_html; @@ -174,10 +175,11 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini ZEND_API void zend_strip(void) { zval token; + zend_ast_loc loc; int token_type; int prev_space = 0; - while ((token_type=lex_scan(&token, NULL))) { + while ((token_type = lex_scan(&token, NULL, &loc))) { switch (token_type) { case T_WHITESPACE: if (!prev_space) { @@ -193,7 +195,7 @@ ZEND_API void zend_strip(void) case T_END_HEREDOC: zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); /* read the following character, either newline or ; */ - if (lex_scan(&token, NULL) != T_WHITESPACE) { + if (lex_scan(&token, NULL, &loc) != T_WHITESPACE) { zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); } zend_write("\n", sizeof("\n") - 1); |