K iQ jdZddlmZmZmZmZmZmZmZm Z m Z ddl m Z ddl mZddlmZedZedZedZed Zd Zd ZGd d e ZGddeZGddeZGdde ZGdde ZGdde ZGdde ZGddeZGddeZy)z1 AST nodes specific to the C family of languages ) Attribute DeclarationNodeStringTokenTypenone FunctionCall CodeBlock)Basic)Tuple)sympifyvoidrestrictvolatilestaticc\tdt|trt|gS|gS)z9 Generate of FunctionCall instance for calling 'alignof' alignofr isinstancestrrargs Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/codegen/cnodes.pyrrs*  :c33GF3K#Q RRS#Q RRc\tdt|trt|gS|gS)a Generate of FunctionCall instance for calling 'sizeof' Examples ======== >>> from sympy.codegen.ast import real >>> from sympy.codegen.cnodes import sizeof >>> from sympy import ccode >>> ccode(sizeof(real)) 'sizeof(double)' sizeofrrs rrrs, *S#2F6#;"P QQC"P QQrceZdZdZdZy) CommaOperatorz$ Represents the comma operator in C c ftj|g|Dcgc] }t|c}Scc}wN)r __new__rclsargsrs rr"zCommaOperator.__new__*s(}}SBD#ASGCL#ABB#As. N)__name__ __module__ __qualname____doc__r"rrrr(s .Crrc4eZdZdZdxZZdeiZeZ e dZ y)Labela/ Label for use with e.g. goto statement. Examples ======== >>> from sympy import ccode, Symbol >>> from sympy.codegen.cnodes import Label, PreIncrement >>> print(ccode(Label('foo'))) foo: >>> print(ccode(Label('bar', [PreIncrement(Symbol('a'))]))) bar: ++(a); )namebodyr.c6t|tr|St|Sr!)rr )r$itrs r_construct_bodyzLabel._construct_bodyAs c9 %Jc? "rN) r&r'r(r) __slots___fieldsr defaultsr_construct_name classmethodr1r*rrr,r,.s3 +*I~HO##rr,ceZdZdZdxZZeZy)gotoz Represents goto in C )labelN)r&r'r(r)r2r3r,_construct_labelr*rrr8r8Is $$Irr8ceZdZdZdZy) PreDecrementz Represents the pre-decrement operator Examples ======== >>> from sympy.abc import x >>> from sympy.codegen.cnodes import PreDecrement >>> from sympy import ccode >>> ccode(PreDecrement(x)) '--(x)' Nr&r'r(r)nargsr*rrr<r<O  Err<ceZdZdZdZy) PostDecrementz Represents the post-decrement operator Examples ======== >>> from sympy.abc import x >>> from sympy.codegen.cnodes import PostDecrement >>> from sympy import ccode >>> ccode(PostDecrement(x)) '(x)--' r=Nr>r*rrrBrB_r@rrBceZdZdZdZy) PreIncrementz Represents the pre-increment operator Examples ======== >>> from sympy.abc import x >>> from sympy.codegen.cnodes import PreIncrement >>> from sympy import ccode >>> ccode(PreIncrement(x)) '++(x)' r=Nr>r*rrrDrDor@rrDceZdZdZdZy) PostIncrementz Represents the post-increment operator Examples ======== >>> from sympy.abc import x >>> from sympy.codegen.cnodes import PostIncrement >>> from sympy import ccode >>> ccode(PostIncrement(x)) '(x)++' r=Nr>r*rrrFrFr@rrFc4eZdZdZdxZZdeiZeZ e dZ y)structz Represents a struct in C )r- declarationsr-cJt|Dcgc] }t|c}Scc}wr!)r rr#s r_construct_declarationszstruct._construct_declarationss 48C{3'8998s N) r&r'r(r)r2r3r r4rr5r6rKr*rrrHrHs/$22I~HO::rrHceZdZdZdZy)unionz Represents a union in C r*N)r&r'r(r)r2r*rrrMrMs #IrrMN) r)sympy.codegen.astrrrrrrr r r sympy.core.basicr sympy.core.containersr sympy.core.sympifyrrrrrrrrr,r8r<rBrDrFrHrMr*rrrRs#'& F| Z  Z  8 S RCEC #D#65 5  E  5  E  :T:Fr