Ignore:
Timestamp:
04/03/06 14:20:25 (9 years ago)
Author:
xi
Message:

Add style information to events generated by Parser.

File:
1 edited

Legend:

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

    r118 r130  
    7272        if self.parser.check(ScalarEvent): 
    7373            node = self.compose_scalar_node() 
    74         elif self.parser.check(SequenceEvent): 
     74        elif self.parser.check(SequenceStartEvent): 
    7575            node = self.compose_sequence_node() 
    76         elif self.parser.check(MappingEvent): 
     76        elif self.parser.check(MappingStartEvent): 
    7777            node = self.compose_mapping_node() 
    7878        if anchor is not None: 
     
    8888        start_event = self.parser.get() 
    8989        value = [] 
    90         while not self.parser.check(CollectionEndEvent): 
     90        while not self.parser.check(SequenceEndEvent): 
    9191            value.append(self.compose_node()) 
    9292        end_event = self.parser.get() 
     
    9797        start_event = self.parser.get() 
    9898        value = {} 
    99         while not self.parser.check(CollectionEndEvent): 
     99        while not self.parser.check(MappingEndEvent): 
    100100            key_event = self.parser.peek() 
    101101            item_key = self.compose_node() 
Note: See TracChangeset for help on using the changeset viewer.