Ignore:
Timestamp:
03/20/06 18:31:07 (9 years ago)
Author:
xi
Message:

Add a skeleton of the emitter.

File:
1 edited

Legend:

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

    r121 r122  
    11 
    22class Token: 
    3     def __init__(self, start_mark, end_mark): 
     3    def __init__(self, start_mark=None, end_mark=None): 
    44        self.start_mark = start_mark 
    55        self.end_mark = end_mark 
     
    1717class DirectiveToken(Token): 
    1818    id = '<directive>' 
    19     def __init__(self, name, value, start_mark, end_mark): 
     19    def __init__(self, name, value, start_mark=None, end_mark=None): 
    2020        self.name = name 
    2121        self.value = value 
     
    7070class AliasToken(Token): 
    7171    id = '<alias>' 
    72     def __init__(self, value, start_mark, end_mark): 
     72    def __init__(self, value, start_mark=None, end_mark=None): 
    7373        self.value = value 
    7474        self.start_mark = start_mark 
     
    7777class AnchorToken(Token): 
    7878    id = '<anchor>' 
    79     def __init__(self, value, start_mark, end_mark): 
     79    def __init__(self, value, start_mark=None, end_mark=None): 
    8080        self.value = value 
    8181        self.start_mark = start_mark 
     
    8484class TagToken(Token): 
    8585    id = '<tag>' 
    86     def __init__(self, value, start_mark, end_mark): 
     86    def __init__(self, value, start_mark=None, end_mark=None): 
    8787        self.value = value 
    8888        self.start_mark = start_mark 
     
    9191class ScalarToken(Token): 
    9292    id = '<scalar>' 
    93     def __init__(self, value, plain, start_mark, end_mark): 
     93    def __init__(self, value, plain, start_mark=None, end_mark=None): 
    9494        self.value = value 
    9595        self.plain = plain 
Note: See TracChangeset for help on using the changeset viewer.