nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
scan_core.hpp
1
// src/builtin/include/nk/builtin/scan_core.hpp
2
#pragma once
3
4
// Shared scan parse+shape core, exposed so the engine-coupled fscanf shim
5
// (relocated to the runtime layer) can reuse the same machinery as
6
// the pure sscanf. scanfEmit itself is pure — no Engine.
7
8
#include <nk/value/span.hpp>
9
#include <nk/value/value.hpp>
10
11
#include <cstddef>
12
#include <memory_resource>
13
#include <string>
14
15
namespace
nk::ops {
16
struct
SizeSpec
;
17
}
18
19
namespace
nk::builtin::detail {
20
21
// scanfCycle's run summary — matched-item count + input bytes consumed.
22
struct
ScanfOut
23
{
24
std::size_t count;
25
std::size_t bytesConsumed;
26
};
27
40
void
scanfEmit(
const
std::string &input,
const
std::string &fmt,
41
const ::nk::ops::SizeSpec &sz, std::size_t nargout,
42
Span<Value>
outs, std::pmr::memory_resource *mr,
ScanfOut
&r);
43
44
}
// namespace nk::builtin::detail
nk::Span
Definition
span.hpp:11
nk::builtin::detail::ScanfOut
Definition
scan_core.hpp:23
nk::ops::SizeSpec
Definition
io_helpers.hpp:25
src
builtin
include
nk
builtin
scan_core.hpp
Generated by
1.17.0