diff options
Diffstat (limited to 'ext/tokenizer/tokenizer.c')
| -rw-r--r-- | ext/tokenizer/tokenizer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index a500f88712..7df3439b1e 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -272,6 +272,7 @@ static void tokenize(zval *return_value TSRMLS_DC) zval *keyword; int token_type; zend_bool destroy; + int token_line = 1; array_init(return_value); @@ -301,6 +302,7 @@ static void tokenize(zval *return_value TSRMLS_DC) } else { add_next_index_stringl(keyword, zendtext, zendleng, 1); } + add_next_index_long(keyword, token_line); add_next_index_zval(return_value, keyword); } else { add_next_index_stringl(return_value, zendtext, zendleng, 1); @@ -309,6 +311,8 @@ static void tokenize(zval *return_value TSRMLS_DC) zval_dtor(&token); } ZVAL_NULL(&token); + + token_line = CG(zend_lineno); } } |
