Added some basic parsing ability, need to add the network calls
This commit is contained in:
+17
-1
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user