Ignore:
Timestamp:
03/18/06 08:37:09 (8 years ago)
Author:
xi
Message:

Back to work :). Rename markers to marks.

File:
1 edited

Legend:

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

    r52 r116  
    11 
    22class Token: 
    3     def __init__(self, start_marker, end_marker): 
    4         self.start_marker = start_marker 
    5         self.end_marker = end_marker 
     3    def __init__(self, start_mark, end_mark): 
     4        self.start_mark = start_mark 
     5        self.end_mark = end_mark 
    66    def __repr__(self): 
    77        attributes = [key for key in self.__dict__ 
    8                 if not key.endswith('_marker')] 
     8                if not key.endswith('_mark')] 
    99        attributes.sort() 
    1010        arguments = ', '.join(['%s=%r' % (key, getattr(self, key)) 
     
    1717class DirectiveToken(Token): 
    1818    id = '<directive>' 
    19     def __init__(self, name, value, start_marker, end_marker): 
     19    def __init__(self, name, value, start_mark, end_mark): 
    2020        self.name = name 
    2121        self.value = value 
    22         self.start_marker = start_marker 
    23         self.end_marker = end_marker 
     22        self.start_mark = start_mark 
     23        self.end_mark = end_mark 
    2424 
    2525class DocumentStartToken(Token): 
     
    6767class AliasToken(Token): 
    6868    id = '<alias>' 
    69     def __init__(self, value, start_marker, end_marker): 
     69    def __init__(self, value, start_mark, end_mark): 
    7070        self.value = value 
    71         self.start_marker = start_marker 
    72         self.end_marker = end_marker 
     71        self.start_mark = start_mark 
     72        self.end_mark = end_mark 
    7373 
    7474class AnchorToken(Token): 
    7575    id = '<anchor>' 
    76     def __init__(self, value, start_marker, end_marker): 
     76    def __init__(self, value, start_mark, end_mark): 
    7777        self.value = value 
    78         self.start_marker = start_marker 
    79         self.end_marker = end_marker 
     78        self.start_mark = start_mark 
     79        self.end_mark = end_mark 
    8080 
    8181class TagToken(Token): 
    8282    id = '<tag>' 
    83     def __init__(self, value, start_marker, end_marker): 
     83    def __init__(self, value, start_mark, end_mark): 
    8484        self.value = value 
    85         self.start_marker = start_marker 
    86         self.end_marker = end_marker 
     85        self.start_mark = start_mark 
     86        self.end_mark = end_mark 
    8787 
    8888class ScalarToken(Token): 
    8989    id = '<scalar>' 
    90     def __init__(self, value, plain, start_marker, end_marker): 
     90    def __init__(self, value, plain, start_mark, end_mark): 
    9191        self.value = value 
    9292        self.plain = plain 
    93         self.start_marker = start_marker 
    94         self.end_marker = end_marker 
     93        self.start_mark = start_mark 
     94        self.end_mark = end_mark 
    9595 
Note: See TracChangeset for help on using the changeset viewer.