class_docstr: This is the central parsing class Jinja uses.  It's passed to
  extensions and can be used to parse expressions or statements.
class_docstr_tok: ["This","is","the","central","parsing","class","Jinja","uses",".","It","'s","passed","to","extensions","and","can","be","used","to","parse","expressions","or","statements","."]
docstr: Parse an if construct.
docstr_tok: ["Parse","an","if","construct","."]
code: def parse_if(self):
      """Parse an if construct."""
      node = result = nodes.If(
          lineno=self.stream.expect("name:if").lineno
      )
      while 1:
          node.test = self.parse_tuple(with_condexpr=False)
          node.body = self.parse_statements(
              ("name:elif", "name:else", "name:endif")
          )
          node.elif_ = []
          node.else_ = []
          token = next(self.stream)
          if token.test("name:elif"):
              node = nodes.If(lineno=self.stream.current.lineno)
              result.elif_.append(node)
              continue
          elif token.test("name:else"):
              result.else_ = self.parse_statements(
                  ("name:endif",), drop_needle=True
              )
          break
      return result
  
imports: from .None import nodes
  from ._compat import imap
  from .exceptions import TemplateAssertionError
  from .exceptions import TemplateSyntaxError
  from .lexer import describe_token
  from .lexer import describe_token_expr
label_desc: Use image node_id 12 for calling the Parser obj's underlying member method code with example usage: obj.parse_if() and returns: result