PHP codegen can generate PHP classes

This commit is contained in:
Andreas Rumpf
2016-02-05 13:49:52 +01:00
parent 35567a1eb9
commit 9b44ca17c2
4 changed files with 275 additions and 60 deletions

View File

@@ -156,16 +156,16 @@ proc SetConstr() {.varargs, asmNoStackFrame, compilerproc.} =
asm """
$args = func_get_args();
$result = array();
foreach ($args as $key=>$x) {
if (is_array(($val)) {
foreach ($args as $x) {
if (is_array($x)) {
for ($j = $x[0]; $j <= $x[1]; $j++) {
result[$j] = true;
$result[$j] = true;
}
} else {
result[$x] = true;
$result[$x] = true;
}
}
return result;
return $result;
"""
else:
asm """