From f1dfd489ae835d131da19319e640a2e5f3b9aa1c Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 22 May 2012 22:32:47 +0200 Subject: Fixed broken infloop subcompiler. --- stupid_template_engine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stupid_template_engine.php b/stupid_template_engine.php index de6a89b..a8eba06 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -715,7 +715,7 @@ $ste_builtins = array( }, "infloop" => function($ast) { - return "while(True)\n{\n" . loopbody(indent_code(_transcompile($ast->sub)) . "\n}") . "\n"; + return "while(True)\n{\n" . indent_code(loopbody(indent_code(_transcompile($ast->sub)))) . "\n}\n"; }, "break" => function($ast) { @@ -1308,7 +1308,7 @@ class STECore $content = precompile($content); try { - $ast = parse($content, $tpl, 0); + $ast = parse($content, $tpl); $transc = transcompile($ast); } catch(ParseCompileError $e) -- cgit v1.2.3-70-g09d2