Project

General

Profile

« Previous | Next » 

Revision 5360

sql.py: simplify_parens(): Use bool_re

View differences:

lib/sql.py
1030 1030
    return '(?:'+op_re+value_re+'|'+value_re+op_re+')'
1031 1031

  
1032 1032
def simplify_parens(expr):
1033
    return regexp.sub_nested(r'\((true|false|\([^()]*\))\)', r'\1', expr)
1033
    return regexp.sub_nested(r'\(('+bool_re+r'|\([^()]*\))\)', r'\1', expr)
1034 1034

  
1035 1035
def simplify_recursive(sub_func, expr):
1036 1036
    '''

Also available in: Unified diff