if_inline : if_then_part statements %prec ID
                  | if_then_part co_statements_co %prec NEWLINE
                  | if_then_part statements_co %prec NEWLINE
                  | if_then_part co_statements %prec ID
554620
def p_single_line_if(p):
    
    cond_ = p[1]
    stat_ = p[2]
    p[0] = make_sentence('IF', cond_, stat_, lineno=p.lineno(1))
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))
186780
def p_statements_statement(p):
    
    if len(p) == 2:
        p[0] = make_block(p[1])
    else:
        p[0] = make_block(p[1], p[2])
149259
def on_multi(*exps)
      result = [:multi]
      # This variable is true if the previous line was
      # (1) a control code and (2) contained indented content.
      prev_indent = false

      exps.each do |exp|
        if control?(exp)
          raise(Temple::FilterError, 'Explicit end statements are forbidden') if exp[2] =~ END_RE

          # Two control code in a row. If this one is *not*
          # an else block, we should close the previous one.
          append_end(result) if prev_indent && exp[2] !~ ELSE_RE

          # Indent if the control code starts a block.
          prev_indent = exp[2] =~ IF_RE
        elsif exp[0] != :newline && prev_indent
          # This is *not* a control code, so we should close the previous one.
          # Ignores newlines because they will be inserted after each line.
          append_end(result)
          prev_indent = false
        end

        result << compile(exp)
      end

      # The last line can be a control code too.
      prev_indent ? append_end(result) : result
    end
309636
def p_if_expr_header(p):
    
    global ENABLED

    IFDEFS.append((ENABLED, p.lineno(1)))
    ENABLED = bool(int(p[2])) if p[2].isdigit() else ID_TABLE.defined(p[2])
782050
function(str, pre, codeLines, start) {
    return str.split(/\n/).reduce((a, seg, i, arr) => {
      var line = i == arr.length - 1 && seg.length == 0 ? '' : pre + seg;
      if (line) {
        if (codeLines) {
          var codeLine = codeLines[start + i];
          if (codeLine.comment)
            line += codeLine.comment;
        }
        line += '\n';
      }
      return a + line;
    }, '');
  }
96654
@SuppressWarnings("fallthrough")
    protected DCText inlineWord() {
        int pos = bp;
        int depth = 0;
        loop:
        while (bp < buflen) {
            switch (ch) {
                case '\n':
                    newline = true;
                    // fallthrough

                case '\r': case '\f': case ' ': case '\t':
                    return m.at(pos).newTextTree(newString(pos, bp));

                case '@':
                    if (newline)
                        break loop;

                case '{':
                    depth++;
                    break;

                case '}':
                    if (depth == 0 || --depth == 0)
                        return m.at(pos).newTextTree(newString(pos, bp));
                    break;
            }
            newline = false;
            nextChar();
        }
        return null;
    }
1011086
def p_statement_switch(p):
    ''
    p[0] = ast.Switch(p[3], p[5], lineno=p.lineno(1))
913945
@SuppressWarnings("fallthrough")
    private void inlineContent() {

        skipWhitespace();
        int pos = bp;
        int depth = 1;

        loop:
        while (bp < buflen) {

            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    // fall through

                case ' ': case '\t':
                    nextChar();
                    break;

                case '&':
                    entity(null);
                    break;

                case '<':
                    newline = false;
                    html();
                    break;

                case '{':
                    newline = false;
                    depth++;
                    nextChar();
                    break;

                case '}':
                    newline = false;
                    if (--depth == 0) {
                        nextChar();
                        return;
                    }
                    nextChar();
                    break;

                case '@':
                    if (newline)
                        break loop;
                    // fallthrough

                default:
                    nextChar();
                    break;
            }
        }

    }
1274530
def p_if_statement_woelse(self, p):
        ''
        p[0] = IfStatement(p[3], p[5], None, lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
1294634
def p_statement_foreach(p):
    ''
    if p[6] is None:
        p[0] = ast.Foreach(p[3], None, p[5], p[8], lineno=p.lineno(1))
    else:
        p[0] = ast.Foreach(p[3], p[5], p[6], p[8], lineno=p.lineno(1))
188329
def p_if_statement_2(self, p):
        """"""
        p[0] = self.asttypes.If(
            predicate=p[3], consequent=p[5], alternative=p[7])
        p[0].setpos(p)
946044
def if_statement(self):
        
        self._process(Nature.IF)
        if_condition = self.logical_or_expr()
        if_body = self.compound()

        else_compound = None
        else_if_compounds = []
        while self.token.nature == Nature.ELSE:
            self._process(Nature.ELSE)

            if self.token.nature == Nature.IF:
                self._process(Nature.IF)
                else_if_compounds.append((self.logical_or_expr(), self.compound()))
            else:
                else_compound = (None, self.compound())

        return IfStatement(
            if_compound=(if_condition, if_body),
            else_if_compounds=else_if_compounds,
            else_compound=else_compound,
        )
1098256
def parse_inline(self):
        
        if self.inline_children:
            self.children = parser.parse_inline(self.children)
        elif isinstance(getattr(self, 'children', None), list):
            for child in self.children:
                if isinstance(child, BlockElement):
                    child.parse_inline()
740069
function(_content,_out){
        if (!_content) return;
        var _lines = _content.split('\n');
        if (!_lines||!_lines.length) return;
        for(var i=0,l=_lines.length,_line;i<l;i++){
            _line = _lines[i];
            if (!!_trim){
                _line = _line.trim();
                if (!_line) continue;
            } 
            _doParseSectionTextLine(_line,_out);
            if (!!_trim&&i<l-1) _out.push('__OUT.push(\'\\n\');');
        }
    }
811716
def _expect_inline_link(text, start):
    """"""
    if start >= len(text) or text[start] != '(':
        return None
    i = start + 1
    m = patterns.whitespace.match(text, i)
    if m:
        i = m.end()
    m = patterns.link_dest_1.match(text, i)
    if m:
        link_dest = m.start(), m.end(), m.group()
        i = m.end()
    else:
        open_num = 0
        escaped = False
        prev = i
        while i < len(text):
            c = text[i]
            if escaped:
                escaped = False
            elif c == '\\':
                escaped = True
            elif c == '(':
                open_num += 1
            elif c in string.whitespace:
                break
            elif c == ')':
                if open_num > 0:
                    open_num -= 1
                else:
                    break
            i += 1
        if open_num != 0:
            return None
        link_dest = prev, i, text[prev:i]
    link_title = i, i, None
    tail_re = re.compile(r'(?:\s+%s)?\s*\)' % patterns.link_title, flags=re.UNICODE)
    m = tail_re.match(text, i)
    if not m:
        return None
    if m.group('title'):
        link_title = m.start('title'), m.end('title'), m.group('title')
    return (link_dest, link_title, m.end())
455471
def p_elseif_elseiflist(p):
    
    label_, cond_ = p[1]
    then_ = p[2]
    else_ = p[3]
    p[0] = make_block(label_, make_sentence('IF', cond_, then_, else_, lineno=p.lineno(1)))