irx.analysis.file_io

irx.analysis.file_io

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

title: Focused semantic rules for single-owner native text files.

Functions

file_error(analyzer: SemanticAnalyzerCore, node: astx.AST, message: str) -> None

title: Report an actionable file contract violation.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.AST
  message:
    type: str

literal_nul(node: astx.AST) -> bool

title: Detect literal NUL in a string expression without evaluating calls.
parameters:
  node:
    type: astx.AST
returns:
  type: bool

supported_option(name: str, value: astx.DataType) -> bool

title: Recognize the supported constant optional arguments of open.
parameters:
  name:
    type: str
  value:
    type: astx.DataType
returns:
  type: bool

bind_file_arguments(analyzer: SemanticAnalyzerCore, node: astx.FunctionCall | astx.ClassConstruct | astx.MethodCall, entry: str) -> ResolvedFileOpen | None

title: Bind the restricted eight-argument open interface in source order.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.FunctionCall | astx.ClassConstruct | astx.MethodCall
  entry:
    type: str
returns:
  type: ResolvedFileOpen | None

resolve_file_open(analyzer: SemanticAnalyzerCore, node: astx.FunctionCall) -> None

title: Resolve the open adapter, preserving explicit low-level IRx use.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.FunctionCall

validate_file_method_arguments(analyzer: SemanticAnalyzerCore, node: astx.MethodCall, *, public: bool=False) -> bool

title: Preserve native method validation at public class call sites.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.MethodCall
  public:
    type: bool
returns:
  type: bool

resolve_file_method(analyzer: SemanticAnalyzerCore, node: astx.MethodCall) -> None

title: Resolve a native file method after visiting receiver and arguments.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.MethodCall

resolve_file_local(analyzer: SemanticAnalyzerCore, node: astx.VariableDeclaration | astx.InlineVariableDeclaration, symbol: SemanticSymbol) -> None

title: Transfer a fresh open result into one local owner.
parameters:
  analyzer:
    type: SemanticAnalyzerCore
  node:
    type: astx.VariableDeclaration | astx.InlineVariableDeclaration
  symbol:
    type: SemanticSymbol
Back to top