diff options
Diffstat (limited to 'mammoth/styles/parser/token_iterator.py')
| -rw-r--r-- | mammoth/styles/parser/token_iterator.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mammoth/styles/parser/token_iterator.py b/mammoth/styles/parser/token_iterator.py index 114ce28..027775b 100644 --- a/mammoth/styles/parser/token_iterator.py +++ b/mammoth/styles/parser/token_iterator.py @@ -1,4 +1,8 @@ # TODO: check indices +# TODO: proper tests for unexpected tokens + +from .errors import LineParseError + class TokenIterator(object): def __init__(self, tokens): @@ -46,4 +50,7 @@ class TokenIterator(object): self._index += 1 return True - + + def _unexpected_token_type(self, token_type, token): + raise LineParseError() + |
