
    Rǻi                     N    d dl mZmZ d dlmZmZ  G d de      Z G d d      Zy)    )Enumauto)ListOptionalc                   6    e Zd Z e       Z e       Z e       Zy)ContextValuesN)__name__
__module____qualname__r   
OBJECT_KEYOBJECT_VALUEARRAY     V/opt/lhia/marcimex/agent/venv/lib/python3.12/site-packages/json_repair/json_context.pyr   r      s    J6LFEr   r   c                   ,    e Zd ZddZdeddfdZddZy)JsonContextreturnNc                 .    g | _         d | _        d| _        y )NT)contextcurrentemptyselfs    r   __init__zJsonContext.__init__   s    ,.04
r   valuec                 V    | j                   j                  |       || _        d| _        y)z
        Set a new context value.

        Args:
            value (ContextValues): The context value to be added.

        Returns:
            None
        FN)r   appendr   r   )r   r   s     r   setzJsonContext.set   s$     	E"
r   c                     	 | j                   j                          | j                   d   | _        y# t        $ r d| _        d| _        Y yw xY w)zZ
        Remove the most recent context value.

        Returns:
            None
        NT)r   popr   
IndexErrorr   r   s    r   resetzJsonContext.reset   sD    	LL<<+DL 	DLDJ	s   .1 A
A)r   N)r	   r
   r   r   r   r   r$   r   r   r   r   r      s     
 4 r   r   N)enumr   r   typingr   r   r   r   r   r   r   <module>r'      s!     !D    r   