ó
7…6ic        
   @   sd   d  d l  Z  i  Z e  j j ƒ  Z d d d d d d e e e d „	 Z d „  Z d „  Z	 d „  Z
 d S(   iÿÿÿÿNc
            s”   t  ˆ j ƒ  ƒ ‰ t d | d | d | d | d | d | ƒ t ˆ <‡  ‡ ‡ ‡ f d †  }
 t j j j ˆ |
 ƒ ‡ f d †  } t j ˆ | ƒ d	 S(
   s¾  
    :doc: statement_register
    :name: renpy.register_statement

    This registers a user-defined statement.

    `name`
        This is either a space-separated list of names that begin the statement, or the
        empty string to define a new default statement (the default statement will
        replace the say statement).

    `parse`
        This is a function that takes a Lexer object. This function should parse the
        statement, and return an object. This object is passed as an argument to all the
        other functions. The lexer argument has the following methods:

    `lint`
        This is called to check the statement. It is passed a single object, the
        argument returned from parse. It should call renpy.error to report errors.

    `execute`
        This is a function that is called when the statement executes. It is passed a
        single object, the argument returned from parse.

    `predict`
        This is a function that is called to predict the images used by the statement.
        It is passed a single object, the argument returned from parse. It should return
        a list of displayables used by the statement.

    `next`
        This is called to determine the next statement. It is passed a single object,
        the argument returned from parse. It should either return a label, or return
        None if execution should continue to the next statement.

    `scry`
        Used internally by Ren'Py.

    `block`
        True if this takes a block, false otherwise.

    `init`
        True if this statement should be run at init-time. (If the statement
        is not already inside an init block, it's automatically placed inside
        an init 0 block.)
    t   parset   lintt   executet   predictt   nextt   scryc            sÒ   t  j j |  j ƒ z| t  j j | |  j |  j ƒ } ˆ | _ ˆ  sj |  j	 d j
 ˆ ƒ d ƒ |  j ƒ  n$ |  j d j
 ˆ ƒ d ƒ |  j ƒ  Wd  t  j j ƒ  Xˆ rÎ |  j rÎ t  j j | | g d ƒ } n  | S(   Nt    s
    statementi    (   t   renpyt   exportst   push_error_handlert   errort   astt   UserStatementt   textt   subblockt   translatablet   expect_noblockt   joint   advancet   expect_blockt   pop_error_handlert   initt   Init(   t   lt   loct   rv(   t   blockR   t   nameR   (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt   parse_user_statementY   s    	c            s   ˆ  t  ˆ  d |  ƒ f S(   NR    (   t   registry(   R   (   R   (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt
   parse_dataq   s    N(	   t   tuplet   splitt   dictR   R   t   parsert
   statementst   addt   parsers(   R   R    R   R   R   R   R   R   R   R   R   R   (    (   R   R   R   R   s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt   register!   s    .c         C   s˜   |  j  |  j | | f g } t j j | ƒ } | j ƒ  t j j | j ƒ z9 t	 j
 | ƒ } | d  k rx | j d ƒ n  | | ƒ SWd  t j j ƒ  Xd  S(   Ns1   Could not find user-defined statement at runtime.(   t   filenamet
   linenumberR   R"   t   LexerR   R   R	   R
   R%   R    t   NoneR   (   t   nodet   lineR   R   R   t   pf(    (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyR    w   s    
c         O   s?   | \ } } t  | j |  ƒ }  |  d  k r/ d  S|  | | | Ž S(   N(   R   t   getR*   (   t   methodt   parsedt   argst   kwargsR   (    (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt   callŠ   s
    c         C   s   |  \ } } d j  | ƒ S(   NR   (   R   (   R0   R   t   _parsed(    (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt   get_name”   s    (   R   R   R"   t	   ParseTrieR%   R*   t   FalseR&   R    R3   R5   (    (    (    s_   Z:\home\souce\.local\share\Steam\steamapps\common\Doki Doki Literature Club\renpy\statements.pyt   <module>   s   $V		
