Ignore:
Timestamp:
02/20/06 15:46:35 (8 years ago)
Author:
xi
Message:

Fix bugs in Resolver and add more tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pyyaml3000/lib/yaml/resolver.py

    r53 r54  
    3939        elif isinstance(node, SequenceNode): 
    4040            self.resolve_sequence(path, node) 
    41             for index in len(node.value): 
     41            for index in range(len(node.value)): 
    4242                self.resolve_node(path+[node, index], node.value[index]) 
    4343        elif isinstance(node, MappingNode): 
     
    4747                self.resolve_node(path+[node, key], value) 
    4848 
    49     def resolve_scalar(self, node): 
     49    def resolve_scalar(self, path, node): 
    5050        if node.tag is None: 
    5151            node.tag = self.detect_scalar(node.value) 
     
    5353            node.tag = self.DEFAULT_SCALAR_TAG 
    5454 
    55     def resolve_sequence(self, node): 
     55    def resolve_sequence(self, path, node): 
    5656        if node.tag is None or node.tag == u'!': 
    5757            node.tag = self.DEFAULT_SEQUENCE_TAG 
    5858 
    59     def resolve_mapping(self, node): 
     59    def resolve_mapping(self, path, node): 
    6060        if node.tag is None or node.tag == u'!': 
    6161            node.tag = self.DEFAULT_MAPPING_TAG 
Note: See TracChangeset for help on using the changeset viewer.