3 def __init__(self
, start_marker
, end_marker
):
4 self
.start_marker
= start_marker
5 self
.end_marker
= end_marker
7 class DirectiveToken(Token
):
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
):
20 class ReservedDirectiveToken(DirectiveToken
):
21 def __init__(self
, name
, start_marker
, end_marker
):
23 self
.start_marker
= start_marker
24 self
.end_marker
= end_marker
26 class DocumentStartToken(Token
):
29 class DocumentEndToken(Token
):
32 class EndToken(Token
):
35 class BlockSequenceStartToken(Token
):
38 class BlockMappingStartToken(Token
):
41 class BlockEndToken(Token
):
44 class FlowSequenceStartToken(Token
):
47 class FlowMappingStartToken(Token
):
50 class FlowSequenceEndToken(Token
):
53 class FlowMappingEndToken(Token
):
56 class KeyToken(Token
):
59 class ValueToken(Token
):
62 class EntryToken(Token
):
65 class AliasToken(Token
):
66 def __init__(self
, value
, start_marker
, end_marker
):
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
):
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
):
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
):
87 self
.start_marker
= start_marker
88 self
.end_marker
= end_marker