57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
#! @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> {
|
||
|
|
# }
|