Refs -- Added assertion for token start in Lexer.create_token().
This adds an assertion in the code path where the method would otherwise
return None, which isn't allowed.
@@ -383,7 +383,7 @@ class Lexer:
if block_content[:9] in ('verbatim', 'verbatim '):
self.verbatim = 'end%s' % block_content
return Token(TokenType.BLOCK, block_content, position, lineno)
- elif token_start == COMMENT_TAG_START:
+ assert token_start == COMMENT_TAG_START
content = token_string[2:-2].strip()
return Token(TokenType.COMMENT, content, position, lineno)
else:
