Commit a67bcdcc authored by Evan Simpson's avatar Evan Simpson

Pass the raw use-macro attribute text.

parent c916c4bc
...@@ -258,7 +258,7 @@ class TALGenerator: ...@@ -258,7 +258,7 @@ class TALGenerator:
def emitUseMacro(self, expr): def emitUseMacro(self, expr):
cexpr = self.compileExpression(expr) cexpr = self.compileExpression(expr)
program = self.popProgram() program = self.popProgram()
self.emit("useMacro", cexpr, self.popSlots(), program) self.emit("useMacro", expr, cexpr, self.popSlots(), program)
def emitDefineSlot(self, slotName): def emitDefineSlot(self, slotName):
program = self.popProgram() program = self.popProgram()
......
...@@ -277,11 +277,11 @@ class TALInterpreter: ...@@ -277,11 +277,11 @@ class TALInterpreter:
def do_defineMacro(self, macroName, macro): def do_defineMacro(self, macroName, macro):
self.interpret(macro) self.interpret(macro)
def do_useMacro(self, macroName, compiledSlots, block): def do_useMacro(self, macroName, macroExpr, compiledSlots, block):
if not self.metal: if not self.metal:
self.interpret(block) self.interpret(block)
return return
macro = self.engine.evaluateMacro(macroName) macro = self.engine.evaluateMacro(macroExpr)
save = self.slots, self.currentMacro save = self.slots, self.currentMacro
self.slots = compiledSlots self.slots = compiledSlots
self.currentMacro = macroName self.currentMacro = macroName
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment