
    ڏDjM                     2    d dl mZ d dlmZ  G d de      Zy)   )VisitorTransform)StatListNodec                   "    e Zd ZdZd Zd Zd Zy)ExtractPxdCodea  
    Finds nodes in a pxd file that should generate code, and
    returns them in a StatListNode.

    The result is a tuple (StatListNode, ModuleScope), i.e.
    everything that is needed from the pxd after it is processed.

    A purer approach would be to separately compile the pxd code,
    but the result would have to be slightly more sophisticated
    than pure strings (functions + wanted interned strings +
    wanted utility code + wanted cached objects) so for now this
    approach is taken.
    c                     g | _         | j                  |       t        |j                  | j                         |j                  fS )N)stats)funcsvisitchildrenr   posscope)selfroots     bC:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\site-packages\Cython/Compiler/CodeGeneration.py__call__zExtractPxdCode.__call__   s5    
4 TXXTZZ8$**EE    c                 <    | j                   j                  |       |S N)r	   appendr   nodes     r   visit_FuncDefNodez ExtractPxdCode.visit_FuncDefNode   s    

$ r   c                 (    | j                  |       |S r   )r
   r   s     r   
visit_NodezExtractPxdCode.visit_Node   s    4 r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r      s    F
r   r   N)Visitorr   Nodesr   r   r   r   r   <module>r!      s    % % r   