Ignore:
Timestamp:
03/26/06 17:57:23 (9 years ago)
Author:
xi
Message:

Parser now provides style information. Allow empty plain scalars if a tag or anchor is given.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/branches/working-on-emitter/lib/yaml/events.py

    r122 r127  
    2121 
    2222class ScalarEvent(NodeEvent): 
    23     def __init__(self, anchor, tag, value, start_mark=None, end_mark=None): 
     23    def __init__(self, anchor, tag, value, start_mark=None, end_mark=None, 
     24            implicit=None, style=None): 
    2425        self.anchor = anchor 
    2526        self.tag = tag 
     
    2728        self.start_mark = start_mark 
    2829        self.end_mark = end_mark 
     30        self.implicit = implicit 
     31        self.style = style 
    2932 
    3033class CollectionEvent(NodeEvent): 
    31     def __init__(self, anchor, tag, start_mark=None, end_mark=None): 
     34    def __init__(self, anchor, tag, start_mark=None, end_mark=None, 
     35            flow=None, compact=None): 
    3236        self.anchor = anchor 
    3337        self.tag = tag 
    3438        self.start_mark = start_mark 
    3539        self.end_mark = end_mark 
     40        self.flow = flow 
     41        self.compact = compact 
    3642 
    3743class SequenceEvent(CollectionEvent): 
     
    4551 
    4652class DocumentStartEvent(Event): 
    47     pass 
     53    def __init__(self, start_mark=None, end_mark=None, 
     54            indent=None, implicit=None, version=None, tags=None, 
     55            canonical=None): 
     56        self.start_mark = start_mark 
     57        self.end_mark = end_mark 
     58        self.indent = indent 
     59        self.implicit = implicit 
     60        self.version = version 
     61        self.tags = tags 
     62        self.canonical = canonical 
    4863 
    4964class DocumentEndEvent(Event): 
     
    5166 
    5267class StreamStartEvent(Event): 
    53     pass 
     68    def __init__(self, start_mark=None, end_mark=None, 
     69            encoding=None): 
     70        self.start_mark = start_mark 
     71        self.end_mark = end_mark 
     72        self.encoding = encoding 
    5473 
    5574class StreamEndEvent(Event): 
Note: See TracChangeset for help on using the changeset viewer.