Added some basic parsing ability, need to add the network calls

This commit is contained in:
2026-04-06 03:21:28 +01:00
parent 0fc9a31de9
commit c87949bc4b
11 changed files with 155 additions and 1 deletions
+17 -1
View File
@@ -1,3 +1,19 @@
use std::fs;
use std::collections::HashMap;
mod parsing;
mod character;
fn main() {
println!("Hello, world!");
let mut characters = HashMap::<String, character::Character>::new();
let file_contents: String = fs::read_to_string("stories/story.ha").unwrap();
// Split the file contents into tokens
let tokens: Vec<&str> = file_contents
.split_whitespace()
.collect();
// Run the parsing process
match parsing::token_parse(&tokens, &mut characters) {
Ok(()) => println!("Program exited successfully"),
Err(error) => println!("{}", error),
}
}