summaryrefslogtreecommitdiff
path: root/src/macro_processor/main.rs
diff options
context:
space:
mode:
authorQrius <[email protected]>2024-09-26 00:11:05 +0200
committerQrius <[email protected]>2024-09-26 00:11:05 +0200
commit541f983def407f1f2a3ebed859e37d9f00c83111 (patch)
tree62516313334e83f67edf612579bf0e76f895022e /src/macro_processor/main.rs
downloadskaldpress-541f983def407f1f2a3ebed859e37d9f00c83111.tar.gz
skaldpress-541f983def407f1f2a3ebed859e37d9f00c83111.zip
Initial commit
Diffstat (limited to 'src/macro_processor/main.rs')
-rw-r--r--src/macro_processor/main.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/macro_processor/main.rs b/src/macro_processor/main.rs
new file mode 100644
index 0000000..5575aa6
--- /dev/null
+++ b/src/macro_processor/main.rs
@@ -0,0 +1,12 @@
+use std::env;
+use std::fs;
+use skaldpress::macro_processor::MacroProcessor;
+
+fn main() {
+ let args: Vec<String> = env::args().collect();
+ let input_file = fs::read_to_string(&args[1]).expect("Failed to read input file");
+
+ let mut macro_processor = MacroProcessor::new();
+ let final_output = macro_processor.process_input(&input_file);
+ println!("{}", final_output);
+}