From a462dd2be30a10cc26322dc0b2f202ca3eb5dd3e Mon Sep 17 00:00:00 2001 From: John Date: Thu, 25 Jul 2024 07:05:57 -0500 Subject: [PATCH] stdlib: Use Conlang module layout --- stdlib/{lib.cl => std.cl} | 4 +++- stdlib/{ => std}/num.cl | 0 stdlib/std/str.cl | 4 ++++ stdlib/{ => std}/test.cl | 0 4 files changed, 7 insertions(+), 1 deletion(-) rename stdlib/{lib.cl => std.cl} (64%) rename stdlib/{ => std}/num.cl (100%) create mode 100644 stdlib/std/str.cl rename stdlib/{ => std}/test.cl (100%) diff --git a/stdlib/lib.cl b/stdlib/std.cl similarity index 64% rename from stdlib/lib.cl rename to stdlib/std.cl index 2aafa77..910d940 100644 --- a/stdlib/lib.cl +++ b/stdlib/std.cl @@ -1,10 +1,12 @@ //! # The Conlang Standard Library pub mod preamble { - pub use super::num::*; + pub use super::{num::*, str::str}; } pub mod num; +pub mod str; + #[cfg("test")] mod test; diff --git a/stdlib/num.cl b/stdlib/std/num.cl similarity index 100% rename from stdlib/num.cl rename to stdlib/std/num.cl diff --git a/stdlib/std/str.cl b/stdlib/std/str.cl new file mode 100644 index 0000000..cdd71fe --- /dev/null +++ b/stdlib/std/str.cl @@ -0,0 +1,4 @@ +//! TODO: give conland a string type +use super::num::u8; + +type str = [u8]; diff --git a/stdlib/test.cl b/stdlib/std/test.cl similarity index 100% rename from stdlib/test.cl rename to stdlib/std/test.cl