diff options
author | Tim Hatch <tim@timhatch.com> | 2014-10-28 19:52:48 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-10-28 19:52:48 -0700 |
commit | 676b291873c58283bda631115269d771a13bb0a4 (patch) | |
tree | dca7e632d25ed194292fdc2391a20ef9b28f6e26 | |
parent | bf24a5e0f926faa55bc2e2c99047b5b23b1b22a2 (diff) | |
download | pygments-676b291873c58283bda631115269d771a13bb0a4.tar.gz |
Improve comment around inherit handling.
-rw-r--r-- | pygments/lexer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py index e0230f1d..687d19e3 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -485,7 +485,9 @@ class RegexLexerMeta(LexerMeta): str(tdef))) continue if isinstance(tdef, _inherit): - # processed already + # should be processed already, but may not in the case of: + # 1. the state has no counterpart in any parent + # 2. the state includes more than one 'inherit' continue if isinstance(tdef, default): new_state = cls._process_new_state(tdef.state, unprocessed, processed) |