History log of /PHP-8.2/ext/tokenizer/tests/bug77966.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
# 6600ad60 14-Jun-2021 Nikita Popov

Add some missing EXTENSIONS sections to misc tests


# b1019f46 09-Nov-2020 Nikita Popov

Rename PhpToken::getAll() to PhpToken::tokenize()

See https://externals.io/message/112189.
Fixes bug #80328.


# b03cafd1 05-Jun-2020 Nikita Popov

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier w

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier when
the lookahead token is already at the "as". This means that
zend_lex_tstring picks up the wrong identifier.

We solve this by actually assigning the identifier as the semantic
value on the parser stack -- as in almost all cases we will not
actually need the identifier, this is just an (offset, size)
reference, not a copy of the string.

Additionally, we need to teach the lexer feedback mechanism used
by tokenizer TOKEN_PARSE mode to apply feedback to something
other than the very last token. To that purpose we pass through
the token text and check the tokens in reverse order to find the
right one.

Closes GH-5668.

show more ...