aboutsummaryrefslogtreecommitdiff
path: root/mammoth/styles/parser/tokeniser.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-24 22:01:35 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-24 22:01:58 +0000
commit507700470b46329ea8b1f8191e48fa69a24a8deb (patch)
tree035d5c2dcd4560a81067a4b9a7ff28762f06d3c4 /mammoth/styles/parser/tokeniser.py
parent7e3ef0ebd0c3453ce351af70ccdb25e93de1d7a9 (diff)
Add style mapping parser
Diffstat (limited to 'mammoth/styles/parser/tokeniser.py')
-rw-r--r--mammoth/styles/parser/tokeniser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mammoth/styles/parser/tokeniser.py b/mammoth/styles/parser/tokeniser.py
index c9eb4cf..7366cfe 100644
--- a/mammoth/styles/parser/tokeniser.py
+++ b/mammoth/styles/parser/tokeniser.py
@@ -12,6 +12,7 @@ class TokenType(object):
STRING = "string"
UNTERMINATED_STRING = "unterminated string"
INTEGER = "integer"
+ END = "end"
@@ -33,7 +34,7 @@ def regex_tokeniser(rules):
# Should be impossible
raise Exception("Remaining: " + value[index:])
- tokens.append(Token(index, "end", ""))
+ tokens.append(Token(index, TokenType.END, ""))
return tokens