summaryrefslogtreecommitdiff
path: root/src/formats/mod.rs
diff options
context:
space:
mode:
authorBen Bridle <bridle.benjamin@gmail.com>2025-07-03 14:56:25 +1200
committerBen Bridle <ben@derelict.engineering>2025-07-03 21:22:31 +1200
commit21101c197643836184e754c60d5075ee5a2d3cdf (patch)
treecc4533251bfce394e913009473b7dd49b3bbb1ac /src/formats/mod.rs
downloadbedrock-asm-21101c197643836184e754c60d5075ee5a2d3cdf.zip
Initial commit
Diffstat (limited to 'src/formats/mod.rs')
-rw-r--r--src/formats/mod.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/formats/mod.rs b/src/formats/mod.rs
new file mode 100644
index 0000000..79b1c51
--- /dev/null
+++ b/src/formats/mod.rs
@@ -0,0 +1,23 @@
+mod clang;
+pub use clang::*;
+
+use crate::*;
+
+
+#[derive(Clone, Copy, PartialEq)]
+pub enum Format {
+ Raw,
+ Source,
+ Clang,
+}
+
+impl Format {
+ pub fn from_str(string: &str) -> Self {
+ match string {
+ "raw" => Self::Raw,
+ "source" => Self::Source,
+ "c" => Self::Clang,
+ _ => fatal!("Unknown format '{string}', expected 'raw', 'c', or 'source'"),
+ }
+ }
+}