ó
    Ð]j-  ã                  ó¨   • S SK Jr  S SKJr  S SKJr  S SKJr  \(       a  S SKJ	r	  SS jr
SS jrSS jrSS	 jrSS
 jrSS jrSS jrSS jrSS jrg)é    )Úannotations)ÚAST)ÚTYPE_CHECKING)ÚLastNodeError)ÚIteratorc                óJ   • U R                   R                  R                  5       $ )zbReturn the kind of an AST node.

Parameters:
    node: The AST node.

Returns:
    The node kind.
)Ú	__class__Ú__name__Úlower©Únodes    Ú^/home/mande/repo/quber/.venv/lib/python3.13/site-packages/griffe/_internal/agents/nodes/ast.pyÚast_kindr      s   € ð �>‰>×"Ñ"×(Ñ(Ó*Ð*ó    c              #  ó0  #   • U R                    Hq  n [        X5      n[        U[        5      (       a  Xl        Uv •  M0  [        U[        5      (       d  MG  U H$  n[        U[        5      (       d  M  Xl        Uv •  M&     Ms     g! [         a     Mƒ  f = f7f)ziReturn the children of an AST node.

Parameters:
    node: The AST node.

Yields:
    The node children.
N)Ú_fieldsÚgetattrÚAttributeErrorÚ
isinstancer   ÚparentÚlist)r   Ú
field_nameÚfieldÚchilds       r   Úast_childrenr      s~   é € ð —l”lˆ
ð	Ü˜DÓ-ˆEô �eœS×!Ñ!ØŒLØŒKÜ˜œt×$Ó$Û�Ü˜e¤S×)Ó)Ø#'”LØ”Kó ò #øô ó 	Úð	üs3   ‚B“Bž4BÁBÁ2BÂ
BÂBÂBÂBc              #  óX   #   • [        U R                  5       H  nXLa  Uv •  M    g   g7f)z�Return the previous siblings of this node, starting from the closest.

Parameters:
    node: The AST node.

Yields:
    The previous siblings.
N©r   r   )r   Úsiblings     r   Úast_previous_siblingsr   2   s(   é € ô   §¡Ö,ˆØÒØŒMáò	 -ùs   ‚(*c              #  ól   #   • [        U R                  5      nU H	  nX L d  M	    O   U Sh  v•N   g N7f)z‡Return the next siblings of this node, starting from the closest.

Parameters:
    node: The AST node.

Yields:
    The next siblings.
Nr   ©r   Úsiblingsr   s      r   Úast_next_siblingsr#   B   s2   é € ô ˜DŸK™KÓ(€HÛˆØŒ?Ùñ ð ×Óùs   ‚4£	4¬2­4c              #  ót   #   • [        U R                  5      nU H  nX La  Uv •  M    O   U Sh  v•N   g N7f)zbReturn the siblings of this node.

Parameters:
    node: The AST node.

Yields:
    The siblings.
Nr   r!   s      r   Úast_siblingsr%   R   s8   é € ô ˜DŸK™KÓ(€HÛˆØÒØŒMáñ	 ð
 ×Óùs   ‚.8°6±8c                óV   •  [        U 5      Gt pU$ ! [         a    [        S5      Sef = f)zµReturn the previous sibling of this node.

Parameters:
    node: The AST node.

Raises:
    LastNodeError: When the node does not have previous siblings.

Returns:
    The sibling.
zthere is no previous nodeN)r   Ú
ValueErrorr   )r   Ú_Úlasts      r   Úast_previousr*   d   s<   € ðCÜ(¨Ó.‰ˆð €Køô ó CÜÐ7Ó8¸dÐBðCús   ‚ ‘(c                ó`   •  [        [        U 5      5      $ ! [         a    [        S5      Sef = f)z­Return the next sibling of this node.

Parameters:
    node: The AST node.

Raises:
    LastNodeError: When the node does not have next siblings.

Returns:
    The sibling.
zthere is no next nodeN)Únextr#   ÚStopIterationr   r   s    r   Úast_nextr.   w   s5   € ð?ÜÔ% dÓ+Ó,Ð,øÜó ?ÜÐ3Ó4¸$Ð>ð?ús   ‚ –-c                óh   •  [        [        U 5      5      $ ! [         a  n[        S5      UeSnAff = f)z¥Return the first child of this node.

Parameters:
    node: The AST node.

Raises:
    LastNodeError: When the node does not have children.

Returns:
    The child.
úthere are no children nodeN)r,   r   r-   r   )r   Úerrors     r   Úast_first_childr2   ‰   s8   € ðEÜ”L Ó&Ó'Ð'øÜó EÜÐ8Ó9¸uÐDûðEús   ‚ –
1 ,¬1c                ó^   •  [        U 5      Gt pU$ ! [         a  n[        S5      UeSnAff = f)z¥Return the lasts child of this node.

Parameters:
    node: The AST node.

Raises:
    LastNodeError: When the node does not have children.

Returns:
    The child.
r0   N)r   r'   r   )r   r(   r)   r1   s       r   Úast_last_childr4   ›   s=   € ðEÜ Ó%‰ˆð €Køô ó EÜÐ8Ó9¸uÐDûðEús   ‚ ‘
,›'§,N)r   r   ÚreturnÚstr)r   r   r5   zIterator[AST])r   r   r5   r   )Ú
__future__r   Úastr   Útypingr   Úgriffe._internal.exceptionsr   Úcollections.abcr   r   r   r   r#   r%   r*   r.   r2   r4   © r   r   Ú<module>r=      sG   ðõ #å Ý  å 5æÝ(ô	+ô ô0ô ô ô$ô&?ô$Eõ$r   