Coverage for /Library/Python/2.7/site-packages/PyYAML-3.10-py2.7-macosx-10.8-intel.egg/yaml/composer : 82%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Drop the STREAM-START event. if self.check_event(StreamStartEvent): self.get_event()
# If there are more documents available? return not self.check_event(StreamEndEvent)
# Get the root node of the next document. if not self.check_event(StreamEndEvent): return self.compose_document()
# Drop the STREAM-START event.
# Compose a document if the stream is not empty.
# Ensure that the stream contains no more documents. event = self.get_event() raise ComposerError("expected a single document in the stream", document.start_mark, "but found another document", event.start_mark)
# Drop the STREAM-END event.
# Drop the DOCUMENT-START event.
# Compose the root node.
# Drop the DOCUMENT-END event.
event = self.get_event() anchor = event.anchor if anchor not in self.anchors: raise ComposerError(None, None, "found undefined alias %r" % anchor.encode('utf-8'), event.start_mark) return self.anchors[anchor] if anchor in self.anchors: raise ComposerError("found duplicate anchor %r; first occurence" % anchor.encode('utf-8'), self.anchors[anchor].start_mark, "second occurence", event.start_mark)
event.start_mark, event.end_mark, style=event.style) self.anchors[anchor] = node
start_event.start_mark, None, flow_style=start_event.flow_style) self.anchors[anchor] = node
start_event.start_mark, None, flow_style=start_event.flow_style) self.anchors[anchor] = node #key_event = self.peek_event() #if item_key in node.value: # raise ComposerError("while composing a mapping", start_event.start_mark, # "found duplicate key", key_event.start_mark) #node.value[item_key] = item_value
|