6.6.8. Tcl Tangler

6.6.8. Tcl Tangler

Start python section to interscript/tanglers/tcl.py[1]
     1: #line 376 "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]
     4: #line 379 "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 writeline(self,data,file,count,inhibit_sref=0):
    12:     tangler_base.writeline(self,data,file,count,inhibit_sref)
    13: 
    14:   def write_comment(self,line):
    15:     self._writeline('# '+line)
    16: 
    17:   def start_section(self, file, count):
    18:     data = 'line '+str(count)+' '+'"'+file+'"'
    19:     self._writeline(data)
    20:     if self.weaver:
    21:       self.weaver.echotangle(self.sink.lines_written,data)
    22: 
    23:   def get_comment_tangler(self):
    24:     return hash_comment_tangler(self.sink,weaver, '# ')
    25: 
    26:   def get_string_tangler(self,eol,width=0):
    27:     # This is _wrong_ and needs to be fixed!
    28:     return c_string_tangler(self.sink,self.weaver,eol,width)
    29: 
    30: 
End python section to interscript/tanglers/tcl.py[2]


6.6.8.1. Python Tangler
6.6.8.2. Python comment tangler
6.6.8.3. Perl Tangler