Ignore:
Timestamp:
07/03/06 07:29:45 (8 years ago)
Author:
xi
Message:

To make porting easier, rewrite Parser not using generators.

Fix handling of unexpected block mapping values, like

: foo

Remove obsolete and unused __iter__ functions.

File:
1 edited

Legend:

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

    r191 r198  
    137137            self.tokens_taken += 1 
    138138            return self.tokens.pop(0) 
    139  
    140     def __iter__(self): 
    141         # Iterator protocol. 
    142         while self.need_more_tokens(): 
    143             self.fetch_more_tokens() 
    144         while self.tokens: 
    145             self.tokens_taken += 1 
    146             yield self.tokens.pop(0) 
    147             while self.need_more_tokens(): 
    148                 self.fetch_more_tokens() 
    149139 
    150140    # Private methods. 
Note: See TracChangeset for help on using the changeset viewer.