Cliteral¶

- class ccg.expressions.Cliteral.CLiteral(literal, c_type=None, literal_format=None)¶
Bases:
ccg.expressions.Cexpression.CExpressionLiteral Value
- Parameters
literal (Union[int, float]) –
c_type (Optional[ccg.types.CstdTypes.CIntegerType]) –
literal_format (Optional[ccg.expressions.Cliteral.CLiteral.Format]) –
- class Format(value)¶
Bases:
enum.EnumFormatting Choice
- decimal = 10¶
- octal = 8¶
- hexadecimal = 16¶
- binary = 2¶
- float_decimals = -1¶
- float_scientific = -2¶
- boolean = -10¶
- format_prefix()¶
Prefix of the literal according to the format