Some renaming.
[pyyaml/python3.git] / lib / yaml / tokens.py
blob3bfa8b23476627188659f412157b08b61abb3ce4
2 class Token:
3 def __init__(self, start_marker, end_marker):
4 self.start_marker = start_marker
5 self.end_marker = end_marker
7 class DirectiveToken(Token):
8 pass
10 class YAMLDirectiveToken(DirectiveToken):
11 def __init__(self, major_version, minor_version, start_marker, end_marker):
12 self.major_version = major_version
13 self.minor_version = minor_version
14 self.start_marker = start_marker
15 self.end_marker = end_marker
17 class TagDirectiveToken(DirectiveToken):
18 pass
20 class ReservedDirectiveToken(DirectiveToken):
21 def __init__(self, name, start_marker, end_marker):
22 self.name = name
23 self.start_marker = start_marker
24 self.end_marker = end_marker
26 class DocumentStartToken(Token):
27 pass
29 class DocumentEndToken(Token):
30 pass
32 class EndToken(Token):
33 pass
35 class BlockSequenceStartToken(Token):
36 pass
38 class BlockMappingStartToken(Token):
39 pass
41 class BlockEndToken(Token):
42 pass
44 class FlowSequenceStartToken(Token):
45 pass
47 class FlowMappingStartToken(Token):
48 pass
50 class FlowSequenceEndToken(Token):
51 pass
53 class FlowMappingEndToken(Token):
54 pass
56 class KeyToken(Token):
57 pass
59 class ValueToken(Token):
60 pass
62 class EntryToken(Token):
63 pass
65 class AliasToken(Token):
66 def __init__(self, value, start_marker, end_marker):
67 self.value = value
68 self.start_marker = start_marker
69 self.end_marker = end_marker
71 class AnchorToken(Token):
72 def __init__(self, value, start_marker, end_marker):
73 self.value = value
74 self.start_marker = start_marker
75 self.end_marker = end_marker
77 class TagToken(Token):
78 def __init__(self, value, start_marker, end_marker):
79 self.value = value
80 self.start_marker = start_marker
81 self.end_marker = end_marker
83 class ScalarToken(Token):
84 def __init__(self, value, plain, start_marker, end_marker):
85 self.value = value
86 self.plain = plain
87 self.start_marker = start_marker
88 self.end_marker = end_marker