Fix bug in template compilation where a trailing semicolon causes incorrect code to be generated.

This commit is contained in:
Charles Haley 2012-03-16 20:05:40 +01:00
parent 00ffb87d2e
commit d93c5f39ef

View File

@ -210,11 +210,11 @@ class _CompileParser(_Parser):
return val return val
if not self.token_op_is_a_semicolon(): if not self.token_op_is_a_semicolon():
return val return val
if self.compile_text:
self.compile_text += "\targs[%d] = list()\n"%(level,)
self.consume() self.consume()
if self.token_is_eof(): if self.token_is_eof():
return val return val
if self.compile_text:
self.compile_text += "\targs[%d] = list()\n"%(level,)
def expr(self, level): def expr(self, level):
if self.compile_text: if self.compile_text: