refactor: add Rust infrastructure: Option, Result and panic

This commit is contained in:
2025-06-23 16:22:55 +08:00
parent 28ff7008a8
commit 3abd0969c0
10 changed files with 297 additions and 11 deletions

View File

@ -0,0 +1,24 @@
#pragma once
#include "../macro/feature_probe.hpp"
#include "../string/parse.hpp"
#include "panic.hpp"
#include "result.hpp"
#define NS_YYCC_STRING_PARSE ::yycc::string::parse
namespace yycc::rust::parse {
#if defined(YYCC_CPPFEAT_EXPECTED)
using Error = NS_YYCC_STRING_PARSE::ParseError;
// template<typename T>
// using Result = std::expected<T, Error>;
#endif
}
#undef NS_YYCC_STRING_PARSE