Documentation

astx.literals.numeric

astx.literals.numeric

Source: packages/astx/src/astx/literals/numeric.py

title: ASTx Data Types module.

Classes

LiteralInt8(Literal)

title: LiteralInt8 data type class.
attributes:
  type_:
    type: Int8
  loc:
    type: SourceLocation
  value:
    type: int

LiteralInt16(Literal)

title: LiteralInt16 data type class.
attributes:
  type_:
    type: Int16
  loc:
    type: SourceLocation
  value:
    type: int

LiteralInt32(Literal)

title: LiteralInt32 data type class.
attributes:
  type_:
    type: Int32
  loc:
    type: SourceLocation
  value:
    type: int

LiteralInt64(Literal)

title: LiteralInt64 data type class.
attributes:
  type_:
    type: Int64
  loc:
    type: SourceLocation
  value:
    type: int

LiteralInt128(Literal)

title: LiteralInt128 data type class.
attributes:
  type_:
    type: Int128
  loc:
    type: SourceLocation
  value:
    type: int

LiteralUInt8(Literal)

title: LiteralUInt8 data type class.
attributes:
  type_:
    type: UInt8
  loc:
    type: SourceLocation
  value:
    type: int

LiteralUInt16(Literal)

title: LiteralUInt16 data type class.
attributes:
  type_:
    type: UInt16
  loc:
    type: SourceLocation
  value:
    type: int

LiteralUInt32(Literal)

title: LiteralUInt32 data type class.
attributes:
  type_:
    type: UInt32
  loc:
    type: SourceLocation
  value:
    type: int

LiteralUInt64(Literal)

title: LiteralUInt64 data type class.
attributes:
  type_:
    type: UInt64
  loc:
    type: SourceLocation
  value:
    type: int

LiteralUInt128(Literal)

title: LiteralUInt128 data type class.
attributes:
  type_:
    type: UInt128
  loc:
    type: SourceLocation
  value:
    type: int

LiteralFloat16(Literal)

title: LiteralFloat16 data type class.
attributes:
  type_:
    type: Float16
  loc:
    type: SourceLocation
  value:
    type: float

LiteralFloat32(Literal)

title: LiteralFloat32 data type class.
attributes:
  type_:
    type: Float32
  loc:
    type: SourceLocation
  value:
    type: float

LiteralFloat64(Literal)

title: LiteralFloat64 data type class.
attributes:
  type_:
    type: Float64
  loc:
    type: SourceLocation
  value:
    type: float

LiteralComplex(Literal)

title: Base class for literal complex numbers.
attributes:
  type_:
    type: Complex
  value:
    type: tuple[float, float]

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST representation for the complex literal.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

LiteralComplex32(LiteralComplex)

title: LiteralComplex32 data type class.
attributes:
  value:
    type: tuple[float, float]
  type_:
    type: Complex32

LiteralComplex64(LiteralComplex)

title: LiteralComplex64 data type class.
attributes:
  value:
    type: tuple[float, float]
  type_:
    type: Complex64

LiteralInteger(Literal)

title: Exact integer literal awaiting semantic contextualization.
summary: >-
  No concrete width is declared. Analysis must preserve value and record
  the chosen type and converted constant separately in semantic metadata.
attributes:
  value:
    type: int
  type_:
    type: DataType

LiteralFloat(Literal)

title: Exact decimal floating literal awaiting semantic contextualization.
summary: >-
  Accept decimal text or Decimal, never an already-rounded Python float.
  The finite Decimal payload is independent of the active decimal context.
  Analysis must preserve it and record the chosen binary format and rounded
  constant in semantic metadata. Typed LiteralFloat32 and related nodes
  instead express an explicitly chosen binary format.
attributes:
  value:
    type: Decimal
  type_:
    type: DataType

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Represent the exact value without introducing a JSON float.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

Search documentation

Type to search.