ó
´Z]c        
   @  s  d  d l  m Z d  d l Z d  d l Z d  d l j j Z d  d l m	 Z	 d d d d d d	 d
 d d d g
 Z
 e a g  Z e ƒ  Z d e f d „  ƒ  YZ e j e ƒ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d „  Z e j j d ƒ Z d „  Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ e d e j e ƒ Z  e d  e j! e" ƒ d! e f d" „  ƒ  YZ# e# d# ƒ d$ e f d% „  ƒ  YZ$ e$ d& ƒ d' e f d( „  ƒ  YZ% e% d) ƒ d* e f d+ „  ƒ  YZ& e& d, ƒ d- e f d. „  ƒ  YZ' e' d/ ƒ d0 e f d1 „  ƒ  YZ( e( d2 ƒ e d3 ƒ e d4 ƒ d5 e f d6 „  ƒ  YZ) e) d7 ƒ d8 e f d9 „  ƒ  YZ* d: e f d; „  ƒ  YZ+ e+ ƒ  Z, e d< ƒ e d= ƒ e d> ƒ e d? ƒ e d4 ƒ e d3 ƒ e d@ ƒ e dA ƒ e a dB „  Z- dC „  Z. d S(D   iÿÿÿÿ(   t   print_functionN(   t   literal_evalt    t   insensitive_t   hover_t   idle_t	   activate_t	   selected_t   selected_insensitive_t   selected_hover_t   selected_idle_t   selected_activate_t
   Positionalc           B  s   e  Z d  Z d „  Z RS(   s?   
    This represents a positional parameter to a function.
    c         C  s#   | |  _  t r t j |  ƒ n  d  S(   N(   t   namet   parsert   add(   t   selfR   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   __init__>   s    	(   t   __name__t
   __module__t   __doc__R   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   9   s   t   Keywordc           B  s   e  Z d  Z d „  Z RS(   sF   
    This represents an optional keyword parameter to a function.
    c         C  s:   | |  _  t d t f j | ƒ t r6 t j |  ƒ n  d  S(   NR   (   R   t
   propertiest   FalseR   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   N   s    	(   R   R   R   R   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   I   s   t   Stylec           B  s   e  Z d  Z d „  Z RS(   s:   
    This represents a style parameter to a function.
    c         C  s=   | |  _  t d t f j |  j  ƒ t r9 t j |  ƒ n  d  S(   NR   (   R   R   t   TrueR   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   \   s    	(   R   R   R   R   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   W   s   t   PrefixStylec           B  s   e  Z d  Z d „  Z RS(   sC   
    This represents a prefixed style parameter to a function.
    c         C  sF   | |  _  | |  _ t | t f j |  j ƒ t rB t j |  ƒ n  d  S(   N(   t   prefixR   R   R   R   R   (   R   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   j   s
    		(   R   R   R   R   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   e   s   t   Parserc           B  s•   e  Z d  Z e d „ Z d „  Z d „  Z e e d „ Z d „  Z	 d „  Z
 e e e e e d „ Z d „  Z d	 „  Z d
 „  Z d „  Z d d „ Z RS(   t   manyc         C  sM   | |  _  g  |  _ i  |  _ i  |  _ t |  _ | rC t j |  ƒ n  |  a d  S(   N(	   R   t
   positionalt   keywordt   childrenR   t   variablet   all_statementst   appendR   (   R   R   t	   statement(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   {   s    					c         C  s   d |  j  j |  j f S(   Ns   <%s: %s>(   t	   __class__R   R   (   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   __repr__   s    c         C  s  t  | t ƒ r1 x | D] } |  j | ƒ q Wd St  | t ƒ rS |  j j | ƒ n¹ t  | t ƒ ru | |  j | j <n— t  | t	 ƒ r¬ x… t
 D] } | |  j | | j <q‹ Wn` t  | t ƒ rê xN t
 D]! } | |  j | j | | j <qÂ Wn" t  | t ƒ r| |  j | j <n  d S(   s/   
        Adds a clause to this parser.
        N(   t
   isinstancet   listR   R   R   R#   R   R   R   R   t   STYLE_PREFIXESR   R   R   R    (   R   t   it   j(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   ’   s     "c         C  sƒ   | j  ƒ  p | j d ƒ } | r{ | |  j k r{ | rX |  j | j | | |  | ƒ } n |  j | j | | |  | ƒ } | Sd  Sd  S(   Ns   \$(   t   wordt   matchR    t   parse_layoutt   parset   None(   R   t   loct   lt   layout_modeR   R,   t   c(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   parse_statement®   s    "c         C  s   | j  d |  j ƒ d  S(   NsE   The %s statement cannot be used as a container for the has statement.(   t   errorR   (   R   R1   R2   t   parentR   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR.   »   s    c         C  s   t  d ƒ ‚ d S(   s(  
        This is expected to parse a function statement, and to return
        a list of python ast statements.

        `loc`
            The location of the current statement.

        `l`
            The lexer.

        `parent`
            The parent Parser of the current statement.
        s   Not ImplementedN(   t	   Exception(   R   R1   R2   R7   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   ¾   s    c           sš  t  ƒ  ‰ t ‰  ‡  ‡ ‡ ‡ ‡ ‡ f d †  } | rV | j ƒ  | j ˆ j ƒ t ‰  nv xs t rË | j d ƒ r’ | j ƒ  | j ˆ j ƒ t ‰  Pn  | j ƒ  r¸ | j ˆ j ƒ t ‰  Pn  | | d t ƒ qY Wg  }	 ˆ  rî |	 j	 | j
 ƒ  ƒ n  | r|	 j	 | ƒ n  x|	 D]‡} x~| j ƒ  r‘| j ƒ  }
 | j ƒ  } | j d ƒ rÞ| s]| j d ƒ n  ˆ j ƒ  ry| j d ƒ n  ˆ j | | d t d ˆ ƒ} | d k r³| j d	 ƒ n  ˆ j j	 | ƒ | j ƒ  rt ‰ qqn  ˆ j | | ƒ } t | t j ƒ rqn  | d k	 r?ˆ j j	 | ƒ | j ƒ  rt ‰ qqn  | j |
 ƒ | j ƒ  sk| | d
 t ƒ n  x  | j ƒ  s| | d t ƒ qnWqWqWd S(   s3  
        Parses the remainder of the current line of `l`, and all of its subblock,
        looking for keywords and children.

        `layout_mode`
            If true, parsing continues to the end of `l`, rather than stopping
            with the end of the first logical line.

        `can_has`
            If true, we should parse layouts.

        `can_tag`
            If true, we should parse the ``tag`` keyword, as it's used by
            screens.

        `block_only`
            If true, only parse the block and not the initial properties.
        c           s4  |  j  ƒ  } | d  k r( |  j | ƒ n  ˆ rŒ | d k rŒ ˆ j d  k	 rf |  j d | ˆ j f ƒ n  |  j |  j  ƒ ˆ _ |  j | ƒ t Sˆ j ræ | d k ræ ˆ j d  k	 rÊ |  j d ˆ j f ƒ n  |  j |  j  ƒ ˆ _ d  Sn  | ˆ j	 k r|  j d | ˆ j f ƒ n  | ˆ k r;|  j d | ˆ j f ƒ n  ˆ j
 | ƒ | d k r²ˆ  r²|  j	 d ƒ r²|  j d ƒ |  j ƒ  |  j d	 ƒ t j j |  j ƒ  ƒ } | ˆ _ d  S|  j ƒ  } ˆ rt j j ry t | ƒ Wq|  j d
 | | f ƒ qXn  ˆ j	 j | | f ƒ | s0|  j | ƒ n  d  S(   Nt   tags=   keyword argument %r appears more than once in a %s statement.t   ass4   an as clause may only appear once in a %s statement.sA   %r is not a keyword argument or valid child for the %s statement.t   att	   transformt   :s	   ATL blocksQ   a non-constant keyword argument like '%s %s' is not allowed after a python block.(   R,   R0   R6   R9   R   t   requiret   expect_noblockR   R!   R   R   t
   expect_eolt   expect_blockt   renpyt   atlt	   parse_atlt   subblock_lexert   atl_transformt   comma_expressiont   configt   keyword_after_pythonR   R#   (   R2   t   expectt
   first_lineR   t   expr(   t   blockt   can_tagR   t   seen_keywordsR   t   target(    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   parse_keywordç   sH    	!
	R=   s3   expected a keyword argument, colon, or end of line.t   hass&   The has statement is not allowed here.sC   The has statement may not be given after a child has been supplied.R3   R   s   Has expects a child statement.s/   expected a keyword argument or child statement.s+   expected a keyword argument or end of line.N(   t   setR   R@   RA   R   R   R-   t   eolR?   R#   RE   t   advancet
   checkpointt   get_locationR   R6   t   has_noncondition_childR5   R0   R    t
   has_pythonR'   t   slastt   SLPasst   revert(   R   R2   RP   R3   t   can_hasRN   t
   block_onlyR   RQ   t   lexerst   stateR1   R4   (    (   RM   RN   R   RO   R   RP   sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   parse_contentsÏ   sh    	3
		
		c         C  s   |  a  t | ƒ |  S(   N(   R   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   add_positionaln  s    
c         C  s   |  a  t | ƒ |  S(   N(   R   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   add_propertyu  s    
c         C  s   |  a  t | ƒ |  S(   N(   R   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   add_style_property|  s    
c         C  s   |  a  t | | ƒ |  S(   N(   R   R   (   R   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   add_prefix_style_propertyƒ  s    R   c         C  sˆ   |  a  | t j j j k r3 t d j | ƒ ƒ ‚ n  xN t j j j | D]9 } t | t ƒ rp t | | j	 ƒ qG t
 | | j	 ƒ qG W|  S(   Ns#   {!r} is not a known property group.(   R   RB   t   sl2t   slpropertiest   property_groupsR8   t   formatR'   R   R   R   (   R   t   groupR   t   prop(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   add_property_groupŠ  s    (   R   R   t	   nchildrenR   R   R&   R   R   R5   R.   R/   Ra   Rb   Rc   Rd   Re   Rl   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   t   s   				Ÿ				c         C  s   t  j |  ƒ d  S(   N(   R   R   (   t   thing(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   š  s    R   c          O  s{   t  |  | Ž  } x t D] } | j | ƒ q Wt j | ƒ | j d k rw t j | ƒ x t D] } | j | ƒ q] Wn  | S(   sá  
    :doc: custom_sl class
    :args: (name, displayable, style, nchildren=0, scope=False, replaces=False, default_keywords={})

    Registers a screen language statement that creates a displayable.

    `name`
        The name of the screen language statement, a string containing a Ren'Py
        keyword. This keyword is used to introduce the new statement.

    `displayable`
        This is a function that, when called, returns a displayable
        object. All position arguments, properties, and style properties
        are passed as arguments to this function. Other keyword arguments
        are also given to this function, a described below.

        This must return a Displayable. If it returns multiple displayables,
        the _main attribute of the outermost displayable should be set to
        the "main" displayable - the one that children should be added
        to.

    `style`
        The base name of the style of this displayable. If the style property
        is not given, this will have the style prefix added to it. The
        computed style is passed to the `displayable` function as the
        ``style`` keyword argument.

    `nchildren`
        The number of children of this displayable. One of:

        0
            The displayable takes no children.
        1
            The displayable takes 1 child. If more than one child is given,
            the children are placed in a Fixed.
        "many"
            The displayable takes more than one child.


    The following arguments should be passed in using keyword arguments:

    `replaces`
        If true, and the displayable replaces a prior displayable, that displayable
        is passed as a parameter to the new displayable.

    `default_keywords`
        The default set of keyword arguments to supply to the displayable.

    Returns an object that can have positional arguments and properties
    added to it by calling the following methods. Each of these methods
    returns the object it is called on, allowing methods to be chained
    together.

    .. method:: add_positional(name)

        Adds a positional argument with `name`

    .. method:: add_property(name)

        Adds a property with `name`. Properties are passed as keyword
        arguments.

    .. method:: add_style_property(name)

        Adds a family of properties, ending with `name` and prefixed with
        the various style property prefixes. For example, if called with
        ("size"), this will define size, idle_size, hover_size, etc.

    .. method:: add_prefix_style_property(prefix, name)

        Adds a family of properties with names consisting of `prefix`,
        a style property prefix, and `name`. For example, if called
        with a prefix of `text_` and a name of `size`, this will
        create text_size, text_idle_size, text_hover_size, etc.

    .. method:: add_property_group(group, prefix='')

        Adds a group of properties, prefixed with `prefix`. `Group` may
        be one of the strings:

        * "bar"
        * "box"
        * "button"
        * "position"
        * "text"
        * "window"

        These correspond to groups of :ref:`style-properties`. Group can
        also be "ui", in which case it adds the :ref:`common ui properties <common-properties>`.
    i    (   t   DisplayableParsert   childbearing_statementsR   t   screen_parserRm   R"   (   t   argst   kwargst   rvR*   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   register_sl_displayable¢  s    \Ro   c        	   B  s>   e  Z d  e e e e i  e e d „ Z d „  Z e d „ Z RS(   i    c         C  sè   t  t |  ƒ j | ƒ | |  _ | d k r4 t } n  | |  _ | d k rY t j |  ƒ n  | |  _ | |  _	 | |  _
 | |  _ |
 |  _ | |  _ |	 |  _ t |  _ t d ƒ t d ƒ | rä t t j j j ƒ t t j j j ƒ n  d S(   sß  
        `scope`
            If true, the scope is passed into the displayable functionas a keyword
            argument named "scope".

        `pass_context`
            If true, the context is passed as the first positional argument of the
            displayable.

        `imagemap`
            If true, the displayable is treated as defining an imagemap. (The imagemap
            is added to and removed from renpy.ui.imagemap_stack as appropriate.)

        `hotspot`
            If true, the displayable is treated as a hotspot. (It needs to be
            re-created if the imagemap it belongs to has changed.)

        `default_properties`
            If true, the ui and positional properties are added by default.
        R   i    t	   argumentsR   N(   t   superRo   R   t   displayableR   Rm   Rp   R   t   stylet   scopet   pass_contextt   imagemapt   hotspott   replacest   default_keywordsR   R!   R   RB   Rf   Rg   t   ui_propertiest   position_properties(   R   R   Rx   Ry   Rm   Rz   R{   R|   R~   R   R}   t   default_properties(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR     s(    											

c         C  s   |  j  | | | | d t ƒS(   NR3   (   R/   R   (   R   R1   R2   R7   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR.   F  s    c         C  sR  t  j | |  j d |  j d |  j d k d |  j d |  j d |  j d |  j d |  j	 d	 |  j
 ƒ} x= |  j D]2 } | j ƒ  } | d  k r Pn  | j j | ƒ qm W|  j d k }	 |  j | | d
 | d |	 d t ƒt | j ƒ t |  j ƒ k rNxY | j D] }
 |
 d d k rü Pqü qü W| j d j |  j t |  j ƒ t | j ƒ ƒ ƒ n  | S(   NRz   t   child_or_fixedi   Ry   R{   R|   R~   R   R}   R3   R]   RN   i    Rv   s5   {} statement expects {} positional arguments, got {}.(   RZ   t   SLDisplayableRx   Rz   Rm   Ry   R{   R|   R~   R   R}   R   t   simple_expressionR0   R#   Ra   R   t   lenR   R6   Ri   R   (   R   R1   R2   R7   R   R3   Rt   t   _iRL   R]   R*   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   I  s0    							"4(   R   R   R   R   R   R.   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyRo     s
   4	t   IfParserc           B  s   e  Z d  „  Z d „  Z RS(   c         C  sB   t  t |  ƒ j | ƒ | |  _ | |  _ | s> t j |  ƒ n  d S(   sã   
        `node_type`
            The type of node to create.

        `parent_contents`
            If true, our children must be children of our parent. Otherwise,
            our children must be children of ourself.
        N(   Rw   Rˆ   R   t	   node_typet   parent_contentsRp   R   (   R   R   R‰   RŠ   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   o  s
    
		c   
      C  s¯  |  j  r | } n |  } |  j | ƒ } | j | j ƒ } | j d ƒ t j | ƒ } | j | | d t ƒ| j j	 | | f ƒ | j
 ƒ  }	 x| j ƒ  rª| j ƒ  } | j d ƒ r&| j | j ƒ } | j d ƒ t j | ƒ } | j | | d t d | ƒ| j j	 | | f ƒ | j
 ƒ  }	 q | j d ƒ r™d  } | j d ƒ t j | ƒ } | j | | d t d | ƒ| j j	 | | f ƒ | j
 ƒ  }	 Pq | j |	 ƒ Pq W| S(   NR=   R^   t   elifR   t   else(   RŠ   R‰   R>   t   python_expressionRZ   t   SLBlockRa   R   t   entriesR#   RV   RU   RW   R   R0   R\   (
   R   R1   R2   R7   R   t   contents_fromRt   t	   conditionRM   R`   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/     s<    		(   R   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyRˆ   m  s   	t   ift   showift	   ForParserc           B  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C  s'   t  t |  ƒ j | ƒ t j |  ƒ d  S(   N(   Rw   R”   R   Rp   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   À  s    c         C  s­   d } t } xs t r | j d ƒ rI |  j | ƒ } | j d ƒ t } n | j ƒ  } | d k re Pn  | j d ƒ r} t } q Pq W| rŒ d S| d k	 rœ | S| j d ƒ d S(   s‹   
        Matches either a name or a tuple pattern. If a single name is being
        matched, returns it. Otherwise, returns None.
        s   \(s   \)t   ,s#   expected variable or tuple pattern.N(   R0   R   R   R-   t   name_or_tuple_patternR>   R   R6   (   R   R2   R   t   pattern(    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR–   Ä  s$    			c         C  s$  | j  ƒ  | j } |  j | ƒ } | sg d } | j | | j !} | d | } t j j | | ƒ }	 n d  }	 | j d ƒ r‘ | j	 | j
 ƒ }
 n d  }
 | j	 d ƒ | j	 | j ƒ } | j	 d ƒ | j ƒ  t j | | | |
 ƒ } |	 r
| j j t j | |	 ƒ ƒ n  |  j | | d t ƒ| S(   Nt   _sl2_is    = t   indext   inR=   R^   (   t   skip_whitespacet   posR–   t   textRB   t   astt   PyCodeR0   R-   R>   t   say_expressionR   R@   RZ   t   SLForR    R#   t   SLPythonRa   R   (   R   R1   R2   R7   R   t   tuple_startR   R—   t   stmtt   codet   index_expressiont
   expressionRt   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   æ  s*    
	
(   R   R   R   R–   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR”   ¾  s   		"t   fort   OneLinePythonParserc           B  s   e  Z d  „  Z RS(   c         C  sZ   | j  ƒ  } | j | j ƒ } | j ƒ  | j d ƒ t j j | | ƒ } t j	 | | ƒ S(   Ns   one-line python(
   RW   R>   t   rest_statementR@   R?   RB   Rž   RŸ   RZ   R¢   (   R   R1   R2   R7   R   t   sourceR¥   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/     s    
(   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR©     s   t   $t   MultiLinePythonParserc           B  s   e  Z d  „  Z RS(   c         C  sa   | j  ƒ  } | j d ƒ | j ƒ  | j d ƒ | j ƒ  } t j j | | ƒ } t j	 | | ƒ S(   NR=   s   python block(
   RW   R>   R@   RA   t   python_blockRB   Rž   RŸ   RZ   R¢   (   R   R1   R2   R7   R   R«   R¥   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   !  s    
(   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR­     s   t   pythont
   PassParserc           B  s   e  Z d  „  Z RS(   c         C  s   | j  ƒ  t j | ƒ S(   N(   R@   RZ   R[   (   R   R1   R2   R7   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   5  s    
(   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR°   3  s   t   passt   DefaultParserc           B  s   e  Z d  „  Z RS(   c         C  sU   | j  | j ƒ } | j  d ƒ | j ƒ  } | j ƒ  | j d ƒ t j | | | ƒ S(   Nt   =s   default statement(   R>   R,   t   restR@   R?   RZ   t	   SLDefault(   R   R1   R2   R7   R   R   R´   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   A  s    
(   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR²   ?  s   t   defaultt	   UseParserc           B  s   e  Z d  „  Z d „  Z RS(   c         C  s'   t  t |  ƒ j | ƒ t j |  ƒ d  S(   N(   Rw   R·   R   Rp   R   (   R   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   R  s    c   	      C  s  | j  d ƒ r1 | j | j ƒ } | j  d ƒ n | j | j ƒ } t j j | ƒ } | j  d ƒ rs | j ƒ  } n d  } | j d ƒ rÍ | j	 ƒ  | j
 d ƒ t j | ƒ } |  j | | d t d t ƒn | j	 ƒ  | j d ƒ d  } t j | | | | | ƒ S(   NR§   R±   t   idR=   s   use statementR]   R^   (   R   R>   R…   R,   RB   R   t   parse_argumentsR0   R-   R@   RA   RZ   RŽ   Ra   R   R?   t   SLUse(	   R   R1   R2   R7   R   RP   Rr   t   id_exprRM   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   V  s"    

(   R   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR·   P  s   	t   uset   style_prefixt   style_groupt   TranscludeParserc           B  s   e  Z d  „  Z RS(   c         C  s   | j  ƒ  t j | ƒ S(   N(   R@   RZ   t   SLTransclude(   R   R1   R2   R7   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   |  s    
(   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR¿   z  s   t
   transcludet   CustomParserc           B  s)   e  Z d  Z d d d d „ Z d „  Z RS(   sâ  
    :doc: custom_sl class
    :name: renpy.register_sl_statement

    Registers a custom screen language statement with Ren'Py.

    `name`
        This must be a word. It's the name of the custom screen language
        statement.

    `positional`
        The number of positional parameters this statement takes.

    `children`
        The number of children this custom statement takes. This should
        be 0, 1, or "many", which means zero or more.

    `screen`
        The screen to use. If not given, defaults to `name`.

    Returns an object that can have positional arguments and properties
    added to it. This object has the same .add_ methods as the objects
    returned by :class:`renpy.register_sl_displayable`.
    i    R   c         C  sÊ   t  j |  | ƒ | d k r% t } n  x t D] } | j |  ƒ q, Wt j |  ƒ | |  _ |  j d k r– t j |  ƒ x t D] } |  j | ƒ q| Wn  d  a	 | d  k	 r´ | |  _
 n	 | |  _
 | |  _ d  S(   NR   i    (   R   R   R   Rp   R   Rq   Rm   R"   R0   R   t   screenR   (   R   R   R   R    RÃ   R*   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   ž  s     			c         C  sÞ   g  } x< t  |  j ƒ D]+ } | j | j ƒ } | j d  | f ƒ q Wt j | ƒ } |  j d k }	 |  j	 | | d |	 d t
 ƒ| j | j ƒ g  | _ t j j | d  d  ƒ }
 | j sÂ d  } n  t j | |  j |
 d  | ƒ S(   Ni   R]   RN   (   t   rangeR   R>   R…   R#   R0   RZ   RŽ   Rm   Ra   R   t   extendR   RB   Rž   t   ArgumentInfoR    Rº   RÃ   (   R   R1   R2   R7   R   Rv   R‡   RL   RM   R]   Rr   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   ½  s    			N(   R   R   R   R0   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyRÂ   „  s   t   ScreenParserc           B  s    e  Z d  „  Z d e d „ Z RS(   c         C  s    t  t |  ƒ j d d t ƒd  S(   NRÃ   R$   (   Rw   RÇ   R   R   (   R   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR   Û  s    t   _namec         C  sà   t  j | ƒ } | j | j ƒ | _ t j j | ƒ | _ |  j	 | | d t
 ƒt | j ƒ } | j d d ƒ | _ | j d d ƒ | _ | j d d ƒ | _ | j d d ƒ | _ | j d	 d
 ƒ | _ | j d d ƒ | _ | S(   NRN   t   modalR   t   zordert   0t   variantR0   t   predictt   layers	   'screens't	   sensitiveR   (   RZ   t   SLScreenR>   R,   R   RB   R   t   parse_parameterst
   parametersRa   R   t   dictR   t   getRÉ   RÊ   RÌ   RÍ   RÎ   RÏ   (   R   R1   R2   R7   R   R   RÃ   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyR/   Þ  s    (   R   R   R   R   R/   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyRÇ   Ù  s   	RÉ   RÊ   RÌ   RÍ   RÎ   RÏ   c          C  sK   t  j t ƒ x7 t D]/ }  |  t k r6 |  j t ƒ q |  j t ƒ q Wd  S(   N(   Rq   R   R"   Rp   t   if_statement(   R*   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   initÿ  s
    c         C  s   t  j | |  d ƒ S(   s&   
    Parses the screen statement.
    N(   Rq   R/   R0   (   R2   R1   (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   parse_screen
  s    (/   t
   __future__R    t   collectionst	   renpy.sl2RB   t   renpy.sl2.slastRf   RZ   Rž   R   R)   R0   R   R"   RS   Rp   t   objectR   t   defaultdictR   R   R   R   R   R   t   SentinelR   Ru   Ro   Rˆ   t   SLIfR   RÕ   t   SLShowIfR   R”   R©   R­   R°   R²   R·   R¿   RÂ   RÇ   Rq   RÖ   R×   (    (    (    sk   C:\Users\romet\Desktop\TwistedScarlett Patreon Pack #13\FriendshipwithBenefits-0.1-pc\renpy\sl2\slparser.pyt   <module>   sz   		ÿ '		l_MM


	

%



U	







	