feat: add repos DSL, index format, and kappa index command
- Add repos { } block to system config with named repos, channels,
mirrors, and priority
- Add index "name" { } file format for package indexes
- Add kappa index <dir> subcommand that scans .kap files and
generates index.kap
- parse_index() and build_index() in DSL module
- format_index() roundtrip support in tools module
- validate and format subcommands handle all three formats
(package, config, index) with automatic detection
- Backward compatible: remotes = [...] still works unchanged
This commit is contained in:
@@ -33,6 +33,8 @@ static const std::unordered_map<std::string_view, TokenType> keywords = {
|
||||
{"uninstall", TokenType::KwUninstall},
|
||||
{"true", TokenType::KwTrue},
|
||||
{"false", TokenType::KwFalse},
|
||||
{"index", TokenType::KwIndex},
|
||||
{"repos", TokenType::KwRepos},
|
||||
};
|
||||
|
||||
std::string_view token_name(TokenType type) {
|
||||
@@ -74,6 +76,8 @@ std::string_view token_name(TokenType type) {
|
||||
case TokenType::KwUninstall: return "uninstall";
|
||||
case TokenType::KwTrue: return "true";
|
||||
case TokenType::KwFalse: return "false";
|
||||
case TokenType::KwIndex: return "index";
|
||||
case TokenType::KwRepos: return "repos";
|
||||
}
|
||||
return "?";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user