History log of /PHP-Parser/test/PhpParser/LexerTest.php (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# daaadc3b 03-Jun-2024 Jorg Adam Sowa

Adjust tests to be compatible with PHPUnit 10 (#998)

This avoids warnings on PHPUnit 10, without actually
switching to PHPUnit 10.


# d57da64d 31-May-2024 Jorg Adam Sowa

Add missing void return types (#997)


# ba851243 13-Aug-2023 Nikita Popov

Replace startLexing() with tokenize()

For now Lexer::getTokens() still exists, but should probably be
removed.


# 4b497045 29-Jul-2023 Nikita Popov

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This o

Move attribute handling into parser

The Lexer now only provides the tokens to the parser, while the
parser is responsible for determining which attributes are placed
on notes. This only needs to be done when the attributes are
actually needed, rather than for all tokens.

This removes the usedAttributes lexer option (and lexer options
entirely). The attributes are now enabled unconditionally. They
have less overhead now, and the need to explicitly enable them for
some use cases (e.g. formatting-preserving printing) doesn't seem
like a good tradeoff anymore.

There are some additional changes to the Lexer interface that
should be done after this, and the docs / upgrading guide haven't
been adjusted yet.

show more ...


# fb2c3ac9 20-May-2023 Nikita Popov

Fix emulative lexer with default error handler

If no error handler is provided, explicitly create one, so we don't
end up calling handleError() on null.


# a5033e38 29-Aug-2022 Nikita Popov

Format tests as well

The unnecessary parentheses for "new" are a bit annoying, but I
can live with it...


# c878d719 19-Jun-2022 Nikita Popov

Move token mapping from lexer to parser

This allows a different token mapping per parser.


# aff98bbf 04-Jun-2022 Nikita Popov

Use PHP 8.0 token representation

Migrate everything to use PhpToken-compatible token representation,
rather than the legacy array/string representation.


# 3aadc15e 09-Aug-2020 Nikita Popov

Support keywords in namespaced names


# acaf3fec 23-Jul-2020 Nikita Popov

Implement emulation of PHP 8 T_NAME_* tokens

Like comment emulation, this is unconditional, as it is required
for core functionality.


# 739b4b4c 22-Jul-2020 Nikita Popov

Fix handling of unterminated comment with trailing newline

Fixes #688.


# 4abc5312 27-Jun-2020 Nikita Popov

Canonicalize to PHP 8 comment token format

The trailing newline is no longer part of the comment token.


# 602af906 09-Feb-2020 Nikita Popov

Add end line / file position / token position to comments


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2, v4.2.1
# b7e63615 19-Jan-2019 Lars Moelleken

updates via "rectorphp/rector" (#573)

- "global" -> remove unused "use" statements
- "phpunit" -> fix "@covers" comments
- "phpunit" -> replace "->will($this->returnValue()" with "->

updates via "rectorphp/rector" (#573)

- "global" -> remove unused "use" statements
- "phpunit" -> fix "@covers" comments
- "phpunit" -> replace "->will($this->returnValue()" with "->willReturn()"
- "UseTest.php" -> add missing namespace
- "composer.json" -> use "autoload-dev"
- remove -> "require_once" usage in the tests (use autoload-dev via composer.json)

-> most of the changes are done automatically by "https://github.com/rectorphp/rector"

show more ...


Revision tags: v4.2.0, v4.1.1, v4.1.0
# d638dd9b 22-Sep-2018 Tomáš Votruba

Use methods instead of annotations for expected exceptions (#533)


Revision tags: v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4, v4.0.0alpha3, v3.1.3
# 83b95876 12-Dec-2017 Gabriel Caruso

Refactoring tests


Revision tags: v4.0.0alpha2
# 47c973b3 04-Nov-2017 Nikita Popov

Store start token position in comments


Revision tags: v3.1.2
# b58157f0 02-Nov-2017 TomasVotruba

add strict_types to tests + fix explode type


Revision tags: v4.0.0alpha1, v3.1.1
# af128074 13-Aug-2017 TomasVotruba

[cs] apply same to tests


Revision tags: v3.1.0, v3.0.6
# c28b8556 31-May-2017 Romain Neutron

Fix Lexer errorHandling when there is no tokens

I encounter an issue when no tokens exist. An error `Undefined offset -1` is triggered.


# 3c44785e 27-Apr-2017 Ekin

Bump phpunit version (#381)


Revision tags: v3.0.5, v3.0.4, v3.0.3, v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2
# f99a96e0 09-Oct-2016 Nikita Popov

Introduce ErrorHandler

Add ErrorHandler interface, as well as ErrorHandler\Throwing
and ErrorHandler\Collecting. The error handler is passed to
Parser::parse(). This supersedes the t

Introduce ErrorHandler

Add ErrorHandler interface, as well as ErrorHandler\Throwing
and ErrorHandler\Collecting. The error handler is passed to
Parser::parse(). This supersedes the throwOnError option.

NameResolver now accepts an ErrorHandler in the ctor.

show more ...


# c79ea6d1 30-Sep-2016 Nikita Popov

Support recovery from lexer errors

Lexer::startLexing() no longer throws, instead errors can be fetched
using Lexer::getErrors().

Lexer errors now also contain full line and pos

Support recovery from lexer errors

Lexer::startLexing() no longer throws, instead errors can be fetched
using Lexer::getErrors().

Lexer errors now also contain full line and position information.

show more ...


Revision tags: v3.0.0beta1, v2.1.1
# ec614c95 25-Jul-2016 Nikita Popov

Add hasLeadingNewline attribute to InlineHTML

Use this attribute to not print an extra newline if the original
code did not have it.


Revision tags: v3.0.0alpha1, v2.1.0
# 15a2388d 01-Apr-2016 Nikita Popov

Add start file offset to Comments


12