Пример #1
0
def test_unary_op():
    tree = ast.Not(ast.Or("a", ast.And("b", "c")))

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

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