[ZPT] CVS: Releases/Zope/lib/python/TAL - DummyEngine.py:1.35 ITALES.py:1.3 TALInterpreter.py:1.75

Evan Simpson evan@zope.com
Wed, 9 Oct 2002 10:40:34 -0400


Update of /cvs-repository/Releases/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv20619/lib/python/TAL

Modified Files:
	DummyEngine.py ITALES.py TALInterpreter.py 
Log Message:
Fix Collector #372


=== Releases/Zope/lib/python/TAL/DummyEngine.py 1.34 => 1.35 ===
--- Releases/Zope/lib/python/TAL/DummyEngine.py:1.34	Tue Oct  1 11:52:56 2002
+++ Releases/Zope/lib/python/TAL/DummyEngine.py	Wed Oct  9 10:40:33 2002
@@ -62,6 +62,9 @@
     def getCompilerError(self):
         return CompilerError
 
+    def getCompiler(self):
+        return self
+
     def setSourceFile(self, source_file):
         self.source_file = source_file
 


=== Releases/Zope/lib/python/TAL/ITALES.py 1.2 => 1.3 ===
--- Releases/Zope/lib/python/TAL/ITALES.py:1.2	Wed Sep 18 11:12:48 2002
+++ Releases/Zope/lib/python/TAL/ITALES.py	Wed Oct  9 10:40:33 2002
@@ -41,6 +41,9 @@
     ITALESCompiler.compile().
     """
 
+    def getCompiler():
+        """Return an object that supports ITALESCompiler."""
+
     def getDefault():
         """Return the value of the 'default' TALES expression.
 


=== Releases/Zope/lib/python/TAL/TALInterpreter.py 1.74 => 1.75 ===
--- Releases/Zope/lib/python/TAL/TALInterpreter.py:1.74	Sun Oct  6 13:21:09 2002
+++ Releases/Zope/lib/python/TAL/TALInterpreter.py	Wed Oct  9 10:40:33 2002
@@ -594,7 +594,7 @@
 
     def insertHTMLStructure(self, text, repldict):
         from HTMLTALParser import HTMLTALParser
-        gen = AltTALGenerator(repldict, self.engine, 0)
+        gen = AltTALGenerator(repldict, self.engine.getCompiler(), 0)
         p = HTMLTALParser(gen) # Raises an exception if text is invalid
         p.parseString(text)
         program, macros = p.getCode()
@@ -602,7 +602,7 @@
 
     def insertXMLStructure(self, text, repldict):
         from TALParser import TALParser
-        gen = AltTALGenerator(repldict, self.engine, 0)
+        gen = AltTALGenerator(repldict, self.engine.getCompiler(), 0)
         p = TALParser(gen)
         gen.enable(0)
         p.parseFragment('<!DOCTYPE foo PUBLIC "foo" "bar"><foo>')