File: //usr/lib/python3/dist-packages/sphinx/domains/__pycache__/rst.cpython-310.pyc
o
�$�a+( � @ s� d Z ddlZddlmZmZmZmZmZmZm Z ddl
mZ ddlm
Z
ddlmZ ddlmZmZ ddlmZ dd lmZ dd
lmZ ddlmZmZ ddlmZ dd
lmZm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z&m'Z' ddl(m)Z) e$�*e+�Z,e�-d�Z.G dd� dee/ �Z0de/dee/e/f fdd�Z1G dd� de0�Z2G dd� de0�Z3G dd� de0�Z4G dd � d e�Z5d!edee/ef fd"d#�Z6dS )$z�
sphinx.domains.rst
~~~~~~~~~~~~~~~~~~
The reStructuredText domain.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�Any�Dict�Iterator�List�Optional�Tuple�cast)�Element)�
directives)�addnodes)�desc_signature�pending_xref)�Sphinx)�Builder)�ObjectDescription)�Domain�ObjType)�BuildEnvironment)�_�__)�XRefRole)�logging)�make_id�make_refnode)�
OptionSpecz\.\. (.+?)::(.*)$c @ sR e Zd ZdZdedededdfdd�Zd ededefd
d�Zdedefdd
�ZdS )�
ReSTMarkupz-
Description of generic reST markup.
�name�sig�signode�returnNc C s� t | j| jj| j|�}|d �|� | �|�}|| jjjvr+||d vr+|d �|� | jj�|� t t
| j�d��}|j| j|||d� | �
| j|�}|r]| jd �d||dd f� d S d S )N�ids�rst��location�entries�single� )r �env�state�document�objtype�append�make_old_idr �note_explicit_targetr �
ReSTDomain�
get_domain�note_object�get_index_text� indexnode)�selfr r r �node_id�old_node_id�domain� indextext� r8 �4/usr/lib/python3/dist-packages/sphinx/domains/rst.py�add_target_and_index( s
�zReSTMarkup.add_target_and_index�
objectnamec C s dS )Nr&