Ë
    ¾lÔh¢  ã                   óÔ  — d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ dZdZddlZdd	lmZ d
dlmZ   e!e «      D � cg c]  } | d   dk7  sŒ| ‘Œ c} g d¢z   Z"[ e#e$e$f   Z%e#e$e&e%e%e&f   Z'i ejP                  e“ejR                  e“ejT                  e“ejV                  e“ejX                  e“ejZ                  e“ej\                  e“ej^                  e“ej`                  e“ejb                  e“ejd                  e“ejf                  e“ejh                  e“ejj                  e“ejl                  e“ejn                  e“ejp                  e“ejr                  eejt                  eejv                  eejx                  ei¥Z= G d„ de>«      Z?dej€                  de&deej€                     dej€                  fd„ZAdde&dee   dee'   fd„ZBde$de&de%de%de&ddfd„ZCeDdk(  rl eEejŒ                  «      d
kD  r* eB eGejŒ                  d
   «      j‘                  «       «      ZIn  eBej”                  j‘                  «       «      ZIeID ]  ZK eCeKŽ  Œ	 yyc c} w )aÀ  Tokenization help for Python programs.

generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens.  It accepts a readline-like method which is called
repeatedly to get the next line of input (or "" for EOF).  It generates
5-tuples with these members:

    the token type (see token.py)
    the token (a string)
    the starting (row, column) indices of the token (a 2-tuple of ints)
    the ending (row, column) indices of the token (a 2-tuple of ints)
    the original line (string)

It is designed to match the working of the Python tokenizer exactly, except
that it produces COMMENT tokens for comments and gives type OP for all
operators

Older entry points
    tokenize_loop(readline, tokeneater)
    tokenize(readline, tokeneater=printtoken)
are the same, except instead of generating tokens, tokeneater is a callback
function to which the 5 fields described above are passed as 5 arguments,
each time a new token is found.é    N)ÚIterator)ÚOptional)ÚGrammar)ÚASYNCÚAWAITÚCOMMENTÚDEDENTÚ	ENDMARKERÚ
ERRORTOKENÚFSTRING_ENDÚFSTRING_MIDDLEÚFSTRING_STARTÚINDENTÚNAMEÚNEWLINEÚNLÚNUMBERÚOPÚSTRINGÚtok_namezKa-Ping Yee <ping@lfw.org>z@GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, Skip Montanaro)Ú	TokenTypeé   )ÚtokenÚ_)ÚtokenizeÚgenerate_tokensÚ
untokenizec                   ó   — e Zd Zy)Ú
TokenErrorN)Ú__name__Ú
__module__Ú__qualname__© ó    úl/home/josh/.local/share/pipx/venvs/python-lsp-server/lib/python3.12/site-packages/blib2to3/pgen2/tokenize.pyr   r   b   s   … r$   r   r   ÚsourceÚ
prev_tokenÚreturnc           
      óæ  — | j                   t        j                  k(  �rR|��O|j                   t        j                  t        j                  fv�r"|| j
                  | j                   }|j                  d«      rkt        j                  t        j                  | j
                  | j
                  dz   | j                  | j                  | j                  | j                  dz   «      S |j                  d«      s|j                  d«      rkt        j                  t        j                  | j
                  | j
                  dz   | j                  | j                  | j                  | j                  dz   «      S | S )a
  
    Black treats `\\\n` at the end of a line as a 'NL' token, while it
    is ignored as whitespace in the regular Python parser.
    But, only the first one. If there's a `\\\n` following it
    (as in, a \ just by itself on a line), that is not made into NL.
    z\
é   z\
z\é   )Útyper   Ú
whitespaceÚnlÚnewlineÚstart_indexÚ	end_indexÚ
startswithÚpytokensÚTokenÚ
start_lineÚ	start_col)r   r&   r'   Ú	token_strs       r%   Útransform_whitespacer8   e   s'  € ð 	�
‰
”i×*Ñ*Ó*ØÑ"Ø�O‰O¤I§L¡L´)×2CÑ2CÐ#DÒDà˜5×,Ñ,¨u¯©Ð?ˆ	Ø×Ñ Ô)Ü—>‘>Ü—‘Ø×!Ñ!Ø×!Ñ! AÑ%Ø× Ñ Ø—‘Ø× Ñ Ø—‘ !Ñ#óð ð ×!Ñ! &Ô)¨Y×-AÑ-AÀ&Ô-IÜ—>‘>Ü—‘Ø×!Ñ!Ø×!Ñ! AÑ%Ø× Ñ Ø—‘Ø× Ñ Ø—‘ !Ñ#óð ð €Lr$   Úgrammarc              #   ó>  K  — | j                  d«      }|dgz  }d\  }}d }	 t        j                  | «      D �]  }t        || |«      }|j                  |j
                  }}|j                  t        j                  k(  rŒG| |j                  |j                   }|j                  t        j                  k(  r|dk(  r|}Œ…||j                  dz
     }|j                  t        j                  k(  rJ|dv rF|dk(  rt        nt        ||j                  |j
                  f|j                  |j                   f|f–— �n|j                  t        j"                  k(  r |dk(  r›|j                  |j                  k(  sJ ‚|j                   |j
                  dz   k(  sJ ‚d	}t%        |j
                  |j
                  dz   «      D ]9  }	|	dz   }
t&        |j                     ||j                  |	f|j                  |
f|f–— Œ; nFt&        |j                     ||j                  |j
                  f|j                  |j                   f|f–— |}�Œ y # t        j(                  $ r t+        d
||f«      ‚t        j,                  $ r)}t+        dt        |«      j.                  › �||f«      ‚d }~ww xY w­w)Nú
Ú )r   r   r   )ÚasyncÚawaitr=   z...r*   ú.z&Unexpected EOF in multi-line statementzFailed to parse: )Úsplitr3   r   r8   r5   r6   r,   r   r-   r0   r1   r/   Ú
identifierr   r   Úend_lineÚend_colÚopÚrangeÚTOKEN_TYPE_MAPÚUnexpectedEOFr   ÚTokenizeErrorr    )r&   r9   ÚlinesÚlineÚcolumnr'   r   r7   Úsource_liner6   rC   Úexcs               r%   r   r   Œ   s„  è ø€ Ø�L‰L˜Ó€EØ	ˆbˆT�M€EØ�L€Dˆ&à+/€Jð7SÜ×&Ñ& vÓ.ó 1	ˆEÜ(¨°¸
ÓCˆEà ×+Ñ+¨U¯_©_�&ˆDØ�z‰zœY×1Ñ1Ò1Øà˜u×0Ñ0°5·?±?ÐCˆIà�z‰zœY×.Ñ.Ò.°9À²?ð #�
Øà × 0Ñ 0°1Ñ 4Ñ5ˆKà�z‰zœY×1Ñ1Ò1°iÐCUÑ6Uð '¨'Ò1•E´uØØ×%Ñ% u§¡Ð7Ø—^‘^ U§]¡]Ð3Øðô ð —‘œyŸ|™|Ò+°	¸UÒ0Bà×'Ñ'¨5¯>©>Ò9Ð9Ð9Ø—}‘}¨¯©¸!Ñ(;Ò;Ð;Ð;à�	Ü!& u§¡¸¿¹È!Ñ8KÓ!Lò �IØ'¨!™m�Gä& u§z¡zÑ2Ø!Ø×)Ñ)¨9Ð5ØŸ™¨Ð1Ø#ðó ñô # 5§:¡:Ñ.ØØ×%Ñ% u§¡Ð7Ø—^‘^ U§]¡]Ð3Øðò ð ŠJñc1	øôf ×!Ñ!ò SÜÐAÀDÈ&À>ÓRÐRÜ×!Ñ!ò SÜÐ,¬T°#«Y×-?Ñ-?Ð,@ÐAÀDÈ&À>ÓRÐRûðSüs)   ‚J¢HH> È=JÈ>3JÉ1$JÊJÊJr,   Úsrow_colÚerow_colrJ   c                 ó^   — |\  }}|\  }}t        |› d|› d|› d|› dt        |    › d|›�«       y )Nú,ú-z:	ú	)Úprintr   )	r,   r   rN   rO   rJ   ÚsrowÚscolÚerowÚecols	            r%   Ú
printtokenrY   Ì   sF   € ð �L€Tˆ4Ø�L€Tˆ4Ü	ˆTˆF�!�D�6˜˜4˜&  $  s¬8°D©>Ð*:¸"¸U¸IÐ
FÕGr$   Ú__main__)N)LÚ__doc__ÚsysÚcollections.abcr   Útypingr   Úblib2to3.pgen2.grammarr   Úblib2to3.pgen2.tokenr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   Ú
__author__Ú__credits__r3   r   r<   r   Ú_tokenÚdirÚ__all__ÚtupleÚintÚCoordÚstrÚ	TokenInfoÚindentÚdedentr/   r.   ÚcommentÚ	semicolonÚlparenÚrparenÚlbracketÚrbracketÚlbraceÚrbraceÚcolonrD   rA   ÚnumberÚstringÚfstring_startÚfstring_middleÚfstring_endÚ	endmarkerrF   Ú	Exceptionr   r4   r8   r   rY   r    ÚlenÚargvÚopenÚreadÚtoken_iteratorÚstdinÚtok)Úxs   0r%   ú<module>r…      s  ðñ#ó0 Ý $Ý å *÷÷ ÷ ÷ õ ð( *€
ØP€ã Ý å á˜&“kÖ
1� Q q¡T¨S£[Š1Ò
1ò 5ñ €ð
 àˆc�3ˆh‰€Ø�#�s˜E 5¨#Ð-Ñ.€	ðØ×Ñ�fðà×Ñ�fðð ×Ñ�wðð ‡L�L�"ð	ð
 ×Ñ�wðð ×Ñ˜ðð ×Ñ�bðð ×Ñ�bðð ×Ñ˜ðð ×Ñ˜ðð ×Ñ�bðð ×Ñ�bðð ‡O�O�Rðð ‡L�L�"ðð ×Ñ˜$ðð  ×Ñ�fð!ð" ×Ñ�fð#ð$ ×Ñ˜]Ø×Ñ˜nØ×Ñ˜;Ø×Ñ˜ñ+€ô2 !�Ô  ð$Ø�>‰>ð$Ø#&ð$Ø4<¸X¿^¹^Ñ4Lð$à‡^�^ó$ñN=S�Sð =S 8¨GÑ#4ð =SÀÈÑ@Só =Sð@HØ
ðHØðHØ%*ðHØ6;ðHØCFðHà	óHð ˆzÒÙ
ˆ3�8‰8ƒ}�qÒÙ!¡$ s§x¡x°¡{Ó"3×"8Ñ"8Ó":Ó;‰á! #§)¡)§.¡.Ó"2Ó3ˆàò ˆÙ�CÒñð ùòk 2s   ÁI%Á+I%