diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index ec141753207..3d2482c734e 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -173,6 +173,67 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini zend_printf(""); } + + +ZEND_API void zend_strip(TSRMLS_D) +{ + zval token; + int token_type; + + token.type = 0; + while ((token_type=lex_scan(&token TSRMLS_CC))) { + switch (token_type) { + case T_COMMENT: + token.type = 0; + break; + + case T_WHITESPACE: + if (token.type) { + putchar(' '); + token.type = 0; + } + continue; + } + + switch (token_type) { + case 349: + break; + + default: { + char c, *ptr=LANG_SCNG(yy_text), *end=LANG_SCNG(yy_text)+LANG_SCNG(yy_leng); + while (ptr