Skip to content

Commit

Permalink
Don't return T_ERROR from token_get_all()
Browse files Browse the repository at this point in the history
This turned out to be rather inconvenient after all. Instead just
return the same output we did on PHP 5. If people want to have an
error, use TOKEN_PARSE.
  • Loading branch information
nikic committed Jul 9, 2015
1 parent fc5c7e6 commit a49ce7b
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 226 deletions.
4 changes: 4 additions & 0 deletions Zend/zend_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,10 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
again:
ZVAL_UNDEF(&zv);
retval = lex_scan(&zv);
if (EG(exception)) {
return T_ERROR;
}

switch (retval) {
case T_COMMENT:
case T_DOC_COMMENT:
Expand Down
Loading

0 comments on commit a49ce7b

Please sign in to comment.