← All docs
fscanf() — internals
Compiler internals for fscanf(): lowering path, type checks, and runtime helpers.
fscanf() — internals
Where it lives
- Signature:
src/builtins/io/fscanf.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:2936 (lower_fscanf) - Function symbol:
lower_fscanf()
Lowering notes
- Lowers
fscanf(stream, format)through__rt_fgetsand__rt_sscanf.
Runtime helpers
The following runtime helpers are referenced:
__rt_fgets__rt_sscanf
Signature summary
function fscanf(resource $stream, string $format, ...$vars): array
What the type checker enforces
- Arity: takes exactly 2 arguments.
- Variadic: collects excess arguments into
$vars.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/fscanf.rs(eval_builtin!) - Dispatch hooks:
direct,values - Variadic: collects excess arguments into
$vars.