This ticket is to make `DebugLexer.tokenize()` look visibly much more the
same as `Lexer.tokenize()`, and in particular simpler. One advantage is
that it will be more obvious on inspection that `DebugLexer` acts the same
as `Lexer`. Another advantage is that it will be easier to keep the two
implementations in step when applying optimizations to `Lexer`. It will be
more maintainable and less likely to introduce bugs if the implementations
for the two lexers don't diverge too much.
The idea will become more clear once the PR is posted.
--
Ticket URL: <https://code.djangoproject.com/ticket/33002>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/14753
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:1>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:3>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:5>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"b2be7e12cce8e62eeee512fbea4a32503d048120" b2be7e1]:
{{{
#!CommitTicketReference repository=""
revision="b2be7e12cce8e62eeee512fbea4a32503d048120"
Refs #33002 -- Made template_tests.tests.py's tests test both Lexer and
DebugLexer.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f0776a558c4bee8524aa698c8dbe36790918152b" f0776a55]:
{{{
#!CommitTicketReference repository=""
revision="f0776a558c4bee8524aa698c8dbe36790918152b"
Fixed #33002 -- Made DebugLexer.tokenize() more closely parallel
Lexer.tokenize().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:10>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"6fedd868e1d50421204ea0c05cc8d2200dcb3cb0" 6fedd868]:
{{{
#!CommitTicketReference repository=""
revision="6fedd868e1d50421204ea0c05cc8d2200dcb3cb0"
Refs #33002 -- Renamed variable from bit to token_string in
Lexer.tokenize().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:9>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"65ed96fa394f3d9d548c6d9d8144bbb51c4c68ff" 65ed96fa]:
{{{
#!CommitTicketReference repository=""
revision="65ed96fa394f3d9d548c6d9d8144bbb51c4c68ff"
Refs #33002 -- Added DebugLexer/Lexer.tokenize() test for trailing text
token.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:7>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"6242c22a2f062f1b55f8a612b75063966937bc5d" 6242c22]:
{{{
#!CommitTicketReference repository=""
revision="6242c22a2f062f1b55f8a612b75063966937bc5d"
Refs #33002 -- Optimized Lexer.tokenize() by skipping computing lineno
when not needed.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33002#comment:8>