3
/*ä^+  ã               @   s$   d dl Z dd„ Zdd„ Zdd„ ZdS )é    Nc             C   sB   | r>t | dƒr| ntj}x$|D ]}|jt|ƒƒ |jdƒ qW dS )a’  
    Show the asm based on the showasm flag (or file object), writing to the
    appropriate stream depending on the type of the flag.

    :param showasm: Flag which determines whether the ingested code is
                    written to sys.stdout or not. (It is also to pass a file
                    like object, into which the asm will be written).
    :param tokens:  The asm tokens to show.
    ÚwriteÚ
N)ÚhasattrÚsysÚstdoutr   Ústr)ZshowasmÚtokensÚstreamÚt© r   úL/home/psgendb/BIRCHDEV/python/lib/python3.6/site-packages/uncompyle6/show.pyÚmaybe_show_asm   s
    

r   c             C   sl   | j rht| j dƒr| j }ntj}t| j tƒrP| j jddƒrPt| dƒrP| j|ƒ n|jt	|ƒƒ |jdƒ dS )aŽ  
    Show the ast based on the showast flag (or file object), writing to the
    appropriate stream depending on the type of the flag.

    :param show_tree: Flag which determines whether the parse tree is
                      written to sys.stdout or not. (It is also to pass a file
                      like object, into which the ast will be written).
    :param ast:     The ast to show.
    r   ZFullFÚstr_with_templater   N)
Zshowastr   r   r   Ú
isinstanceÚdictÚgetr   r   r   )ZwalkerÚastr	   r   r   r   Úmaybe_show_tree#   s    

r   c             C   sj   | rft | dƒr| ntj}|jdƒ |jd| ƒ |jdƒ |jt|ƒƒ |jdƒ |jdƒ |jdƒ dS )a-  
    Show a function parameter with default for an grammar-tree based on the show_tree flag
    (or file object), writing to the appropriate stream depending on the type
    of the flag.

    :param show_tree: Flag which determines whether the function parameter with
                      default is written to sys.stdout or not. (It is also to
                      pass a file like object, into which the ast will be
                      written).
    :param name:    The function parameter name.
    :param default: The function parameter default.
    r   r   z--N)r   r   r   r   r   )Z	show_treeÚnameÚdefaultr	   r   r   r   Úmaybe_show_tree_param_default:   s    



r   )r   r   r   r   r   r   r   r   Ú<module>   s   