Add missing tokens file

This commit is contained in:
Oliver Marks 2018-11-03 14:18:29 +00:00
parent 5e8ec3015a
commit 87dc29dda3
1 changed files with 30 additions and 0 deletions

30
eorg/tokens.py Normal file
View File

@ -0,0 +1,30 @@
BLANK = 0
META = 1
HEADER = 2
BOLD = 10
ITALIC = 11
UNDERLINED = 12
VERBATIM = 13
LIST = 20
TEXT = 21
IMAGE = 22
LINK = 23
CAPTION = 24
SOURCE = 50
EXAMPLE = 51
RESULTS = 52
COMMENT = 53
class Token:
__slots__ = ["token", "value", "attrs"]
def __init__(self, token, value="", attrs=None):
self.token = token
self.value = value
self.attrs = attrs
def __repr__(self):
return f'Token(token="{self.token}", value="{self.value}", attrs="{self.attrs}")'