mirror of https://github.com/vitalif/openscad
bugfix: dump of list comprehension if expression was buggy
parent
0fa6154bbb
commit
b03345ec18
|
@ -375,7 +375,7 @@ std::string Expression::toString() const
|
||||||
stream << "for(" << c->call_arguments << ") ";
|
stream << "for(" << c->call_arguments << ") ";
|
||||||
c = c->children[0];
|
c = c->children[0];
|
||||||
} else if (c->call_funcname == "if") {
|
} else if (c->call_funcname == "if") {
|
||||||
stream << "if(" << c->children[0] << ") ";
|
stream << "if(" << *c->children[0] << ") ";
|
||||||
c = c->children[1];
|
c = c->children[1];
|
||||||
} else if (c->call_funcname == "let") {
|
} else if (c->call_funcname == "let") {
|
||||||
stream << "let(" << c->call_arguments << ") ";
|
stream << "let(" << c->call_arguments << ") ";
|
||||||
|
|
|
@ -29,4 +29,4 @@ z = (j);
|
||||||
aa = k ? l : m;
|
aa = k ? l : m;
|
||||||
bb = n[o];
|
bb = n[o];
|
||||||
cc = let(a=1) a;
|
cc = let(a=1) a;
|
||||||
dd = [for (a=[0,1]) a];
|
dd = [for (a=[0,1]) let(b=a) if (true) b];
|
||||||
|
|
|
@ -29,5 +29,5 @@ z = j;
|
||||||
aa = (k ? l : m);
|
aa = (k ? l : m);
|
||||||
bb = n[o];
|
bb = n[o];
|
||||||
cc = let(a = 1) a;
|
cc = let(a = 1) a;
|
||||||
dd = [for(a = [0, 1]) a];
|
dd = [for(a = [0, 1]) let(b = a) if(true) b];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue