Hacked By AnonymousFox
a
R�fs� � @ s� d Z ddlZddlT ddlmZmZ ddlmZmZ d`ddd �d
d�Z dd
� Z
dadd�dd�Zdd� Zdd� Z
dbdd�Zdd� Zdd� Zdcdd�Zdd � Zd!d"� Zdd#�d$d%�Zd&d'� ZG d(d)� d)e�ZG d*d+� d+e�Zeed,��sd-d.� Zd/d0� Zeee�e_eee�e_G d1d2� d2e �Z!d3d4� Z"G d5d6� d6ee!d7�Z#G d8d9� d9ee!d7�Z$G d:d;� d;ee!d7�Z%G d<d=� d=ee!d7�Z&G d>d?� d?ee!d7�Z'e#e(e)e*fe$e+fe%e,fe&e d�e-fe'e d@�fiZ.e#e-fiZ/e-d=e d�d=e(d6e)d6e*d6e+d9e,d;e d@�d?iZ0G dAdB� dBe1�Z2G dCdD� dDe2�Z3G dEdF� dFe2�Z4ee5dG��sFdHdI� Z6dJdK� Z7ee6e7�e5_8G dLdM� dMe9�Z:G dNdO� dOe;�Z<G dPdQ� dQe;�Z=G dRdS� dSe;�Z>dTe?ej@jAd � ZBG dUdV� dVe�ZCdWZDdXZEg eD�eE�R ZFG dYdZ� dZe�ZGd[d\� ZHd]d^� ZIeJd_k�r�eI� dS )daH
ast
~~~
The `ast` module helps Python applications to process trees of the Python
abstract syntax grammar. The abstract syntax itself might change with
each Python release; this module helps to find out programmatically what
the current grammar looks like and allows modifications of it.
An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as
a flag to the `compile()` builtin function or by using the `parse()`
function from this module. The result will be a tree of objects whose
classes all inherit from `ast.AST`.
A modified abstract syntax tree can be compiled into a Python code object
using the built-in `compile()` function.
Additionally various helper functions are provided that make working with
the trees simpler. The main intention of the helper functions and this
module in general is to provide an easy to use interface for libraries
that work tightly with the python syntax (template engines for example).
:copyright: Copyright 2008 by Armin Ronacher.
:license: Python License.
� N)�*)�contextmanager�nullcontext)�IntEnum�auto� <unknown>�execF)�
type_comments�feature_versionc C sF t }|r|tO }t|t�r(|\}}|}n|du r4d}t| ||||d�S )z�
Parse the source into an AST node.
Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
Pass type_comments=True to get back type comments where the syntax allows.
N���)�_feature_version)Z
PyCF_ONLY_ASTZPyCF_TYPE_COMMENTS�
isinstance�tuple�compile)�source�filename�moder r
�flags�major�minor� r �(/opt/alt/python39/lib64/python3.9/ast.py�parse! s
�r c s` t | t�rt| dd�} t | t�r&| j} dd� ��fdd���fdd��� ���fd d
�� � | �S )a
Safely evaluate an expression node or a string containing a Python
expression. The string or node provided may only consist of the following
Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
sets, booleans, and None.
�eval�r c S s t d| ����d S )Nzmalformed node or string: )�
ValueError��noder r r �_raise_malformed_nodeA s z+literal_eval.<locals>._raise_malformed_nodec s, t | t�rt| j�tttfvr&� | � | jS �N)r
�Constant�type�value�int�float�complexr )r r r �_convert_numC s z"literal_eval.<locals>._convert_numc sD t | t�r<t | jttf�r<� | j�}t | jt�r6|
S | S � | �S r )r
ZUnaryOp�op�UAdd�USub�operand)r r* )r&