generate_if : IF LPAREN cond RPAREN gif_true_item ELSE gif_false_item
494288
def p_generate_if(self, p):
        ''
        p[0] = IfStatement(p[3], p[5], p[7], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
554620
def p_single_line_if(p):
    
    cond_ = p[1]
    stat_ = p[2]
    p[0] = make_sentence('IF', cond_, stat_, lineno=p.lineno(1))
925266
def p_if_statement_2(self, p):
        """"""
        p[0] = ast.If(predicate=p[3], consequent=p[5], alternative=p[7])
957647
Node createIf(Node cond, Node then) {
    return IR.ifNode(cond, then);
  }
369466
function maybe (options) {
  if (Math.round(Math.random())) {
    return options.fn(this);
  } else {
    return options.inverse(this);
  }
}
261084
def prompt_y_or_n(self, prompt):
        

        ch = self.prompt_input(prompt, key=True)
        if ch in (ord('Y'), ord('y')):
            return True
        elif ch in (ord('N'), ord('n'), None):
            return False
        else:
            self.flash()
            return False
262581
def conditional( a, b )
      if a.is_a?( Proc ) and b.is_a?( Proc )
        conditional a.call, b.call
      else
        GCCValue.new @function, "( #{self} ) ? ( #{a} ) : ( #{b} )"
      end
    end
1358636
def boolean_or_list(config_name, args, configs, alternative_names=[]):
    """"""

    # when argument flag present, set to wildcard regex
    for key in alternative_names + [config_name]:
        if hasattr(args, key) and getattr(args, key):
            setattr(args, config_name, ['.*'])
            return

    setattr(args, config_name, [])

    option = None
    alternative_names.insert(0, config_name)
    for key in alternative_names:
        if configs.has_option('settings', key):
            option = configs.get('settings', key)
            break

    if option is not None:
        if option.strip().lower() == 'true':
            setattr(args, config_name, ['.*'])
        elif option.strip().lower() != 'false':
            for pattern in option.split("\n"):
                if pattern.strip() != '':
                    getattr(args, config_name).append(pattern)
630151
def p_IfBlock(p):
    '''
    
    '''
    if isinstance(p[1], str):
        p[0] = IfBlock(None, p[2], p[4], p[5])
    else:
        p[0] = IfBlock(p[1], p[3], p[5], p[6])
498703
def p_ifdef_else(p):
    
    global ENABLED

    p[0] = p[1] + p[2]
    p[0] += ['#line %i "%s"' % (p.lineno(3) + 1, CURRENT_FILE[-1])]
    ENABLED = IFDEFS[-1][0]
    IFDEFS.pop()
210807
def p_ifdef(p):
    
    global ENABLED

    if ENABLED:
        p[0] = [p[2]] + p[3]
        p[0] += ['#line %i "%s"' % (p.lineno(4) + 1, CURRENT_FILE[-1])]
    else:
        p[0] = ['#line %i "%s"' % (p.lineno(4) + 1, CURRENT_FILE[-1])]

    ENABLED = IFDEFS[-1][0]
    IFDEFS.pop()
1295284
def prop_eq_or(default, key, value, dct):
    
    return dct[key] and dct[key] == value if key in dct else default
1116062
def condition_input(args, kwargs):
    '''
    
    '''
    ret = []
    for arg in args:
        if (six.PY3 and isinstance(arg, six.integer_types) and salt.utils.jid.is_jid(six.text_type(arg))) or \
        (six.PY2 and isinstance(arg, long)):  # pylint: disable=incompatible-py3-code,undefined-variable
            ret.append(six.text_type(arg))
        else:
            ret.append(arg)
    if isinstance(kwargs, dict) and kwargs:
        kw_ = {'__kwarg__': True}
        for key, val in six.iteritems(kwargs):
            kw_[key] = val
        return ret + [kw_]
    return ret
577342
def get_default_if():
    
    f = open ('/proc/net/route', 'r')
    for line in f:
        words = line.split()
        dest = words[1]
        try:
            if (int (dest) == 0):
                interf = words[0]
                break
        except ValueError:
            pass
    return interf
1112726
function ifCond(v1, v2, options) {
  if (arguments.length < 3) {
    throw new Error('Handlebars Helper \'ifCond\' needs 2 parameters');
  }
  if (v1.length > 0 || v2) {
    return options.fn(this);
  }
  return options.inverse(this);
}
119894
def visit_IfExp(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        with self.op_man(node):
            src = " if ".join((self.visit(node.body, dfltChaining=False),
                               " else ".join((self.visit(node.test),
                                              self.visit(node.orelse)))))
            return self.wrap_expr(src, dfltChaining)
1044160
def condition(*args, **kwds):
  
  if len(args) == 1 and len(kwds) == 0 and callable(args[0]):
    # used as `@decorator`
    func = args[0]
    return wraps(func)(FontBakeryCondition(func))
  else:
    # used as `@decorator()` maybe with args
    def wrapper(func):
      return wraps(func)(FontBakeryCondition(func, *args, **kwds))
  return wrapper