PHP codegen can generate PHP classes
This commit is contained in:
parent
35567a1eb9
commit
9b44ca17c2
4 changed files with 275 additions and 60 deletions
|
|
@ -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 """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue