Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-12-06 13:12:06 -06:00
commit 5577896856
1624 files changed
+43436

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
#! @file version.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#!
module std::semver;
#! Represents a semantic version.
pub struct version {
pub var major: u32;
pub var minor: u32;
pub var patch: u32;
pub var preview: string;
pub var build: string;
}
pub struct version::error {
}
pub enum version::error_kind {
}
# pub def version::parse(
# verstr: strview,
# alloc: maybe<&mut allocator> = nothing{}
# ): result<version, version::error> {
# return version {
# major = version::parse_number(verstr) else (e) { return e; },
# minor = version::parse_number(verstr) else (e) { return e; },
# patch = version::parse_number(verstr) else (e) { return e; },
# preview = version::parse_preview(verstr, alloc) else (e) { return e; },
# build = version::parse_build(verstr, alloc) else (e) { return e; }
# };
# }
# def version::parse_number(
# verstr: &mut strview
# ): result<u32, version::error> {
# }
# def version::parse_preview(
# verstr: &mut strview,
# alloc: maybe<&mut allocator>
# ): result<string, version::error> {
# }
# def version::parse_build(
# verstr: &mut strview,
# alloc: maybe<&mut allocator>
# ): result<string, version::error> {
# }