astx.classes_ext

astx.classes_ext

Source: packages/astx/src/astx/classes_ext.py

title: ASTx class AST nodes.
summary: >-
  Provide explicit class-type references and class-definition nodes that host
  compilers can use before higher-level surface syntax exists in Arx.

Classes

ClassType(AnyType)

title: Named class type reference.
attributes:
  name:
    type: str
  resolved_name:
    type: str | None
  module_key:
    type: str | None
  qualified_name:
    type: str | None
  ancestor_qualified_names:
    type: tuple[str, Ellipsis]

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a class type reference.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

ClassDefStmt(StructDeclStmt)

title: Explicit class definition statement.
summary: >-
  Represent one top-level class declaration with explicit base-class
  references and inherited struct-like member containers.
attributes:
  bases:
    type: astx.ASTNodes[ClassType]
  is_abstract:
    type: bool
  kind:
    type: astx.ASTKind

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a class definition.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

ClassConstruct(astx.DataType)

title: Low-level default class construction expression.
attributes:
  class_name:
    type: str
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for class construction.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

MethodCall(astx.DataType)

title: Instance method call expression.
attributes:
  receiver:
    type: astx.AST
  method_name:
    type: str
  args:
    type: tuple[astx.DataType, Ellipsis]
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for an instance method call.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

StaticMethodCall(astx.DataType)

title: Class-scoped static method call expression.
attributes:
  class_name:
    type: str
  method_name:
    type: str
  args:
    type: tuple[astx.DataType, Ellipsis]
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a static method call.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

StaticFieldAccess(astx.DataType)

title: Class-scoped static field access expression.
attributes:
  class_name:
    type: str
  field_name:
    type: str
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a static field access.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BaseFieldAccess(astx.DataType)

title: Explicit base-qualified instance field access expression.
attributes:
  receiver:
    type: astx.AST
  base_class_name:
    type: str
  field_name:
    type: str
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a base-qualified field access.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BaseMethodCall(astx.DataType)

title: Explicit base-qualified instance method call expression.
attributes:
  receiver:
    type: astx.AST
  base_class_name:
    type: str
  method_name:
    type: str
  args:
    type: tuple[astx.DataType, Ellipsis]
  type_:
    type: AnyType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a base-qualified method call.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct