6.10.10.2.17. The Tangler Stack

6.10.10.2.17. The Tangler Stack

Interscript supports stacking of tanglers. The internal commands tangler_push, and tangler_pop push and pop the stack, while tangler_set changes the top of the stack.

These operations call the start and end section methods of the tangler objects as they become, or cease to become, the current tangler, this ensures correct source file references are inserted into the code files.

Start python section to interscript/frames/inputf.py[26]
   601: #line 890 "input_frame.ipk"
   602:   def tangler_push(self,f):
   603:     self.tangler_stack.append(self.tangler)
   604:     self.tangler = f
   605: 
   606:   def tangler_pop(self):
   607:     self.tangler = self.tangler_stack[-1]
   608:     del self.tangler_stack[-1]
   609: 
   610:   def tangler_set(self,f):
   611:     self.tangler = f
   612: 
End python section to interscript/frames/inputf.py[26]