6.23.10.2.20. 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.

Comienzo python section to interscript/frames/inputf.py[29 /41 ] Siguiente Previo Primero Ăšltimo
   793: #line 1083 "input_frame.ipk"
   794:   def tangler_push(self,f):
   795:     self.current_tangler_stack.append(self.current_tangler)
   796:     self.current_tangler = f
   797: 
   798:   def tangler_pop(self):
   799:     self.current_tangler = self.current_tangler_stack[-1]
   800:     del self.current_tangler_stack[-1]
   801: 
   802:   def tangler_set(self,f):
   803:     self.current_tangler = f
   804: 
   805:   def get_tangler(self):
   806:     return self.current_tangler
   807: 
End python section to interscript/frames/inputf.py[29]