+
     h;  c                   s*    ^RI Ht R tR tR tR tR# )i   )c_astc                st   \        V P                  \        P                  4      '       g   V # \        P                  ! . V P                  P                  4      pRpV P                  P
                  ;'       g    .  F  p\        V\        P                  \        P                  34      '       dF   VP
                  P                  V4       \        W1P
                  4       VP
                  R,          pKx  Vf   VP
                  P                  V4       K  VP                  P                  V4       K  	  Wn        V # )a  The 'case' statements in a 'switch' come out of parsing with one
child node, so subsequent statements are just tucked to the parent
Compound. Additionally, consecutive (fall-through) case statements
come out messy. This is a peculiarity of the C grammar. The following:

    switch (myvar) {
        case 10:
            k = 10;
            p = k + 1;
            return 10;
        case 20:
        case 30:
            return 20;
        default:
            break;
    }

Creates this tree (pseudo-dump):

    Switch
        ID: myvar
        Compound:
            Case 10:
                k = 10
            p = k + 1
            return 10
            Case 20:
                Case 30:
                    return 20
            Default:
                break

The goal of this transform is to fix this mess, turning it into the
following:

    Switch
        ID: myvar
        Compound:
            Case 10:
                k = 10
                p = k + 1
                return 10
            Case 20:
            Case 30:
                return 20
            Default:
                break

A fixed AST node is returned. The argument may be modified.
N)
isinstanceZstmtr    ZCompoundZcoordZblock_itemsCaseDefaultappend_extract_nested_casestmts)Zswitch_nodeZnew_compoundZ	last_caseZchild   &   =/usr/lib/python3.14/site-packages/pycparser/ast_transforms.pyfix_switch_casesr
      s    h k&&77 >>"k&6&6&<&<=L I
 ""..44"4eejj%--899
 $$++E2 (@(@A$004I  ((//6&&u- 5" $    c                s   \        V P                  ^ ,          \        P                  \        P                  34      '       d?   VP                  V P                  P                  4       4       \        VR,          V4       R# R# )zsRecursively extract consecutive Case statements that are made nested
by the parser and add them to the stmts_list.
Nr   )r   r   r    r   r   r   Zpopr   )Z	case_nodeZ
stmts_lists   &&r	   r   r   c   sV     )//!$uzz5==&ABB)//--/0Z^Z8 Cr   c                sx    \        V 4      w  rV'       d   K   T p\        T\        P                  4      '       g    TP                  pK/  RTP                  9   d-   RT P                  9  d   T P                  P                  R4       TP                  f   T P                  Tn        T #   \
         d    T u # i ; i)a&  Atomic specifiers like _Atomic(type) are unusually structured,
conferring a qualifier upon the contained type.

This function fixes a decl with atomic specifiers to have a sane AST
structure, by removing spurious Typename->TypeDecl pairs and attaching
the _Atomic qualifier in the right place.
_Atomic)
_fix_atomic_specifiers_oncer   r    ZTypeDecltypeAttributeErrorqualsr   ZdeclnameZname)declZfoundZtyps   &  r	   fix_atomic_specifiersr   l   s     1$7u
 Cenn--	((C CII)4::"=

)$
||yyK  	K	s   B) )B98B9c                s   T pRpV P                   pVeF   \        V\        P                  4      '       d   RVP                  9   d   M TpTpVP                   pKI  VP                   Vn         RVP                   P                  9  d&   VP                   P                  P                  R4       V R3#   \
         d    T R3u # i ; i)zvPerforms one 'fix' round of atomic specifiers.
Returns (modified_decl, found) where found is True iff a fix was made.
Nr   FT)r   r   r    ZTypenamer   r   r   )r   ZparentZgrandparentZnoder   r	   r   r      s     FK99D

dENN++	TZZ0G	 KF99D yyK		'		y):  	 ;		s   B/ /C CN)Z r    r
   r   r   r   ) r   r	   <module>r      s!    Sl9@r   