source: branches/pyyaml3000/lib/yaml/tokens.py @ 46

Revision 46, 2.0 KB checked in by xi, 8 years ago (diff)

Some renaming.

RevLine 
[46]1
2class Token:
3    def __init__(self, start_marker, end_marker):
4        self.start_marker = start_marker
5        self.end_marker = end_marker
6
7class DirectiveToken(Token):
8    pass
9
10class 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
16
17class TagDirectiveToken(DirectiveToken):
18    pass
19
20class 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
25
26class DocumentStartToken(Token):
27    pass
28
29class DocumentEndToken(Token):
30    pass
31
32class EndToken(Token):
33    pass
34
35class BlockSequenceStartToken(Token):
36    pass
37
38class BlockMappingStartToken(Token):
39    pass
40
41class BlockEndToken(Token):
42    pass
43
44class FlowSequenceStartToken(Token):
45    pass
46
47class FlowMappingStartToken(Token):
48    pass
49
50class FlowSequenceEndToken(Token):
51    pass
52
53class FlowMappingEndToken(Token):
54    pass
55
56class KeyToken(Token):
57    pass
58
59class ValueToken(Token):
60    pass
61
62class EntryToken(Token):
63    pass
64
65class 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
70
71class 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
76
77class 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
82
83class 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
89
Note: See TracBrowser for help on using the repository browser.