~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to tools/moltemplate/src/ttree_lex.py

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
917
917
        every tree, so that if a syntax error or broken link in that node
918
918
        is discovered, an error message can be provided to the user.
919
919
 
920
 
        "order"
921
 
            Later on, during development, the "order" member was added.  Why:
922
 
        If you want to know whether block of text comes before or after a
923
 
        different block of text, unfortunately you can not just compare the 
924
 
        corresponding line numbers of the files they come from because the 
925
 
        files may differ, and multiple short blocks of text may occupy the 
926
 
        same line.  Consequently, "OSrcLoc" also maintains an internal 
927
 
        counter which keeps track of how many OSrcLoc() objects have been
928
 
        created so far.  (This can be useful if the user requests that 
929
 
        variables and commands be assigned in a non-standard order.)
930
 
        The "order" member is assigned to this counter.
931
 
        Most of the time, the "order" member can be ignored.
932
 
 
933
920
    """
934
921
 
935
 
    __slots__=["infile","lineno","order"]
936
 
 
 
922
    __slots__ = ["infile","lineno","order"]
937
923
    count = 0
938
924
 
939
925
    def __init__(self, infile='', lineno=-1):
1073
1059
                 nptr      = None,
1074
1060
                 value     = None,
1075
1061
                 refs      = None,
1076
 
                 order     = None,
 
1062
                 order     = -1,
1077
1063
                 category  = None):
1078
1064
        self.full_name = full_name
1079
1065
        self.nptr      = nptr