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

Add style information to events generated by Parser.

File:
1 edited

Legend:

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

    r118 r130  
    3131class StreamStartToken(Token): 
    3232    id = '<stream start>' 
     33    def __init__(self, start_mark=None, end_mark=None, 
     34            encoding=None): 
     35        self.start_mark = start_mark 
     36        self.end_mark = end_mark 
     37        self.encoding = encoding 
    3338 
    3439class StreamEndToken(Token): 
     
    9196class ScalarToken(Token): 
    9297    id = '<scalar>' 
    93     def __init__(self, value, plain, start_mark, end_mark): 
     98    def __init__(self, value, implicit, start_mark, end_mark, style=None): 
    9499        self.value = value 
    95         self.plain = plain 
     100        self.implicit = implicit 
    96101        self.start_mark = start_mark 
    97102        self.end_mark = end_mark 
     103        self.style = style 
    98104 
Note: See TracChangeset for help on using the changeset viewer.