Changeset 118 for pyyaml/trunk/lib/yaml/scanner.py
- Timestamp:
- 03/19/06 08:00:38 (7 years ago)
- File:
-
- 1 edited
-
pyyaml/trunk/lib/yaml/scanner.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pyyaml/trunk/lib/yaml/scanner.py
r117 r118 1 1 2 2 # Scanner produces tokens of the following types: 3 # STREAM-START 4 # STREAM-END 3 5 # DIRECTIVE(name, value) 4 6 # DOCUMENT-START 5 7 # DOCUMENT-END 6 # STREAM-END7 8 # BLOCK-SEQUENCE-START 8 9 # BLOCK-MAPPING-START … … 69 70 self.tokens = [] 70 71 72 # Add the STREAM-START token. 73 self.fetch_stream_start() 74 71 75 # Number of tokens that were emitted through the `get_token` method. 72 76 self.tokens_taken = 0 … … 369 373 # Fetchers. 370 374 375 def fetch_stream_start(self): 376 # We always add STREAM-START as the first token and STREAM-END as the 377 # last token. 378 379 # Read the token. 380 mark = self.reader.get_mark() 381 382 # Add STREAM-END. 383 self.tokens.append(StreamStartToken(mark, mark)) 384 385 371 386 def fetch_stream_end(self): 372 387 … … 381 396 mark = self.reader.get_mark() 382 397 383 # Add END.398 # Add STREAM-END. 384 399 self.tokens.append(StreamEndToken(mark, mark)) 385 400
Note: See TracChangeset
for help on using the changeset viewer.
