summaryrefslogtreecommitdiff
path: root/pygments/lexer.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexer.py')
-rw-r--r--pygments/lexer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py
index 53ea5ac1..33427ae3 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -439,7 +439,7 @@ class RegexLexerMeta(LexerMeta):
def __call__(cls, *args, **kwds):
"""Instantiate cls after preprocessing its token definitions."""
- if not hasattr(cls, '_tokens'):
+ if '_tokens' not in cls.__dict__:
cls._all_tokens = {}
cls._tmpname = 0
if hasattr(cls, 'token_variants') and cls.token_variants: