Revision 5378
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
1121 | 1121 |
''' |
1122 | 1122 |
@param sub_func See regexp.sub_recursive() sub_func param |
1123 | 1123 |
''' |
1124 |
return simplify_parens(regexp.sub_recursive(
|
|
1125 |
lambda s: sub_func(simplify_parens(s)), expr))
|
|
1124 |
return regexp.sub_recursive(lambda s: sub_func(simplify_parens(s)), expr)
|
|
1125 |
# simplify_parens() is also done at end in final iteration
|
|
1126 | 1126 |
|
1127 | 1127 |
def simplify_expr(expr): |
1128 | 1128 |
def simplify_logic_ops(expr): |
Also available in: Unified diff
sql_gen.py: simplify_parens(): Removed extra simplify_parens() at end because it is done in the final iteration that performs no other replacements, so it is not necessary to also do it explicitly