[Checkins] SVN: Sandbox/malthe/chameleon.core/ Add target_language to scope symbols; this ensures that it gets passed with macro calls.

Malthe Borch mborch at gmail.com
Fri Nov 14 05:30:23 EST 2008


Log message for revision 92920:
  Add target_language to scope symbols; this ensures that it gets passed with macro calls.

Changed:
  U   Sandbox/malthe/chameleon.core/CHANGES.txt
  U   Sandbox/malthe/chameleon.core/src/chameleon/core/translation.py

-=-
Modified: Sandbox/malthe/chameleon.core/CHANGES.txt
===================================================================
--- Sandbox/malthe/chameleon.core/CHANGES.txt	2008-11-14 08:22:19 UTC (rev 92919)
+++ Sandbox/malthe/chameleon.core/CHANGES.txt	2008-11-14 10:30:22 UTC (rev 92920)
@@ -4,6 +4,8 @@
 HEAD
 ~~~~
 
+- Pass `target_language` when using macros. [malthe]
+
 1.0b6 (released 13/11/2008)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Modified: Sandbox/malthe/chameleon.core/src/chameleon/core/translation.py
===================================================================
--- Sandbox/malthe/chameleon.core/src/chameleon/core/translation.py	2008-11-14 08:22:19 UTC (rev 92919)
+++ Sandbox/malthe/chameleon.core/src/chameleon/core/translation.py	2008-11-14 10:30:22 UTC (rev 92920)
@@ -338,7 +338,7 @@
             # compute macro function arguments and create argument string
             if 'xmlns' in self.element.attrib:
                 kwargs.append(('include_ns_attribute', repr(True)))
-                
+
             arguments = ", ".join(
                 tuple("%s=%s" % (arg, arg) for arg in \
                       itertools.chain(*self.stream.scope))+
@@ -626,7 +626,10 @@
 
         # initialize variable scope
         stream.scope.append(set(
-            (stream.symbols.out, stream.symbols.write, stream.symbols.scope) + \
+            (stream.symbols.out,
+             stream.symbols.write,
+             stream.symbols.scope,
+             stream.symbols.language) + \
             tuple(parameters)))
 
         # output XML headers, if applicable



More information about the Checkins mailing list