summaryrefslogtreecommitdiff
path: root/Transcompiler.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-05-24 01:29:11 +0200
committerKevin Chabowski <kevin@kch42.de>2014-05-24 01:29:11 +0200
commitfdbe2e9521aa54ec6e0b70c1cb0f532248e531e4 (patch)
tree9648d9b90650adcf250c93e14a194ebad0edb7cb /Transcompiler.php
parent7a8dd0b67c207516ee6c4d597002e26574f5811f (diff)
downloadste-fdbe2e9521aa54ec6e0b70c1cb0f532248e531e4.tar.gz
ste-fdbe2e9521aa54ec6e0b70c1cb0f532248e531e4.tar.bz2
ste-fdbe2e9521aa54ec6e0b70c1cb0f532248e531e4.zip
Fixed ste:get
Didn't work at all before. The varname was not passed correctly. Also added the test case that showed this.
Diffstat (limited to 'Transcompiler.php')
-rw-r--r--Transcompiler.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/Transcompiler.php b/Transcompiler.php
index 26011f3..8b52fa2 100644
--- a/Transcompiler.php
+++ b/Transcompiler.php
@@ -342,8 +342,7 @@ class Transcompiler {
}
list($val, $pre) = self::_transcompile($ast->params["var"], true);
- $code .= $pre;
- return "\$outputstack[\$outputstack_i] .= \$ste->get_var_by_name(" . $val . ");";
+ return "$pre\$outputstack[\$outputstack_i] .= \$ste->get_var_by_name(" . $val . ");";
},
"calc" => function($ast) {
$code = "\$outputstack[] = '';\n\$outputstack_i++;\n";