- System config parser (system/packages/services/boot/users blocks) - Boot block: kernel, init, efi, swap, bootloader, root partition - System-wide features, rollback config, swap partition - Service block: per-init variants (runit, s6, etc.), system init selection via boot.init - Feature-gated dependencies, config values accept numbers/bools/strings - CLI: parse-package, parse-config, validate subcommands - Rustc-style error diagnostics with source context, carets, help text - Diagnostic module with ANSI color output
32 lines
729 B
C++
32 lines
729 B
C++
#pragma once
|
|
|
|
#include <ostream>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace kappa::cli {
|
|
|
|
struct SourceLocation {
|
|
std::string_view file;
|
|
int line = 0;
|
|
int col = 0;
|
|
};
|
|
|
|
void print_error(std::ostream& os,
|
|
std::string_view source,
|
|
SourceLocation loc,
|
|
std::string_view message);
|
|
|
|
void print_error(std::ostream& os,
|
|
std::string_view source,
|
|
SourceLocation loc,
|
|
std::string_view message,
|
|
std::string_view help);
|
|
|
|
void print_note(std::ostream& os,
|
|
std::string_view source,
|
|
SourceLocation loc,
|
|
std::string_view message);
|
|
|
|
} // namespace kappa::cli
|