adding do support
This commit is contained in:
parent
b078155661
commit
5b50ea4907
@ -69,10 +69,13 @@ def _ast_if(node, children, obj):
|
|||||||
true = children.pop(0)
|
true = children.pop(0)
|
||||||
flse = children.pop(0)
|
flse = children.pop(0)
|
||||||
|
|
||||||
|
true = true if isinstance(true, list) else [true]
|
||||||
|
flse = flse if isinstance(flse, list) else [flse]
|
||||||
|
|
||||||
ret = ast.If(
|
ret = ast.If(
|
||||||
test=cond,
|
test=cond,
|
||||||
body=[true],
|
body=true,
|
||||||
orelse=[flse]
|
orelse=flse,
|
||||||
)
|
)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user