irx.analysis.normalization

irx.analysis.normalization

Source: packages/irx/src/irx/analysis/normalization.py

title: Semantic normalization helpers.
summary: >-
  Normalize raw AST operator and flag information into the structured semantic
  records used by later analysis and codegen.

Functions

normalize_flags(node: astx.AST, *, lhs_type: astx.DataType | None=None, rhs_type: astx.DataType | None=None) -> SemanticFlags

title: Normalize semantic flags from the raw AST node.
parameters:
  node:
    type: astx.AST
  lhs_type:
    type: astx.DataType | None
  rhs_type:
    type: astx.DataType | None
returns:
  type: SemanticFlags

normalize_operator(op_code: str, *, result_type: astx.DataType | None, lhs_type: astx.DataType | None=None, rhs_type: astx.DataType | None=None, flags: SemanticFlags | None=None) -> ResolvedOperator

title: Create a normalized operator record.
parameters:
  op_code:
    type: str
  result_type:
    type: astx.DataType | None
  lhs_type:
    type: astx.DataType | None
  rhs_type:
    type: astx.DataType | None
  flags:
    type: SemanticFlags | None
returns:
  type: ResolvedOperator