Changeset 249


Ignore:
Timestamp:
04/17/07 13:39:13 (7 years ago)
Author:
xi
Message:

Fixed a problem when the DOCUMENT-END event is not emitted until the beginning of the next document is available. Fixed #51. Thanks edward(at)sweetbytes.net for the bug report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/parser.py

    r235 r249  
    156156    def parse_document_start(self): 
    157157 
     158        # Parse any extra document end indicators. 
     159        while self.check_token(DocumentEndToken): 
     160            self.get_token() 
     161 
    158162        # Parse an explicit document. 
    159163        if not self.check_token(StreamEndToken): 
     
    187191        start_mark = end_mark = token.start_mark 
    188192        explicit = False 
    189         while self.check_token(DocumentEndToken): 
     193        if self.check_token(DocumentEndToken): 
    190194            token = self.get_token() 
    191195            end_mark = token.end_mark 
Note: See TracChangeset for help on using the changeset viewer.