6.16.9. Tcl Tangler

Start python section to interscript/tanglers/tcl.py[1 /2 ] Next Last
     1: #line 468 "tanglers.ipk"
     2: from interscript.tanglers.base import tangler_base
     3: from interscript.tanglers.cpp import hash_comment_tangler
End python section to interscript/tanglers/tcl.py[1]
Start python section to interscript/tanglers/tcl.py[2 /2 ] Prev First
     4: #line 471 "tanglers.ipk"
     5: 
     6: class tcl_tangler(tangler_base):
     7:   def __init__(self,sink,weaver):
     8:     tangler_base.__init__(self,sink,weaver)
     9:     self.language = 'tcl'
    10: 
    11:   def write_comment(self,line):
    12:     self._writeline('# '+line)
    13: 
    14:   def start_section(self, file, count):
    15:     data = 'line '+str(count)+' '+'"'+file+'"'
    16:     self._writeline(data)
    17:     if self.weaver:
    18:       self.weaver.echotangle(self.sink.lines_written,data)
    19: 
    20:   def get_comment_tangler(self):
    21:     return hash_comment_tangler(self.sink,weaver, '# ')
    22: 
    23:   def get_string_tangler(self,eol,width=0):
    24:     # This is _wrong_ and needs to be fixed!
    25:     return c_string_tangler(self.sink,self.weaver,eol,width)
    26: 
    27: 
End python section to interscript/tanglers/tcl.py[2]