aix.io

aix.io

Source: packages/aix/src/aix/io.py

title: AIX compiler input buffer helpers.

Classes

AixBuffer

title: Shared source buffer used by lexer and CLI flows.
attributes:
  buffer:
    type: str
  position:
    type: int

Methods

clean(self) -> None
title: Reset buffer content and cursor.
write(self, text: str) -> None
title: Replace buffer content.
parameters:
  text:
    type: str
read(self) -> str
title: Return the next buffered character or EOF marker.
returns:
  type: str

AixIO

title: AIX input loading facade.
attributes:
  INPUT_FROM_STDIN:
    type: bool
  INPUT_FILE:
    type: str
  EOF:
    type: int
  buffer:
    type: AixBuffer

Methods

get_char(cls) -> str
title: Return one character from stdin or the shared buffer.
returns:
  type: str
file_to_buffer(cls, filename: str) -> None
title: Load one source file into the shared buffer.
parameters:
  filename:
    type: str
string_to_buffer(cls, value: str) -> None
title: Load one source string into the shared buffer.
parameters:
  value:
    type: str
load_input_to_buffer(cls) -> None
title: Load configured file or stdin into the shared buffer.

AixFile

title: Temporary file helpers used by backend flows.

Methods

create_tmp_file(content: str) -> str
title: Create a temporary C++ file with given content.
parameters:
  content:
    type: str
returns:
  type: str
delete_file(filename: str) -> int
title: Delete one file if present.
parameters:
  filename:
    type: str
returns:
  type: int