Esempio n. 1
0
def test_unary_op():
    tree = ast.Not(ast.Or("a", ast.And("b", "c")))

    assert tree.gencode() == "!(a || (b && c))"
Esempio n. 2
0
def _expression_logicalor(expr, parameters):
    return coffee.Or(*[expression(c, parameters) for c in expr.children])
Esempio n. 3
0
def test_unary_op():
    tree = ast.Not(ast.Or("a", ast.And("b", "c")))

    assert tree.gencode() == "!((a) || (((b) && (c))))"