Cliteral

Inheritance diagram of ccg.expressions.Cliteral.CLiteral
class ccg.expressions.Cliteral.CLiteral(literal, c_type=None, literal_format=None)

Bases: ccg.expressions.Cexpression.CExpression

Literal Value

Parameters
class Format(value)

Bases: enum.Enum

Formatting 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

format_literal(style)

Render the literal with the format selected.

Does not include prefix or suffix

Parameters

style (Style) –

Return type

str

render(style=<ccg.style.Style object>)
Parameters

style (Style) –

Return type

str