|
|
@ -54,7 +54,13 @@ impl Parser { |
|
|
|
/// Parses a single string from the GUI and turns it into a neatly packaged TokenResult for processing
|
|
|
|
/// Parses a single string from the GUI and turns it into a neatly packaged TokenResult for processing
|
|
|
|
/// by the engine.
|
|
|
|
/// by the engine.
|
|
|
|
pub fn parse(s: &str) -> Result<TokenResult, &'static str> { |
|
|
|
pub fn parse(s: &str) -> Result<TokenResult, &'static str> { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Remove the /n from the end
|
|
|
|
|
|
|
|
|
|
|
|
let tokens: Vec<&str> = s.split_whitespace().collect::<Vec<&str>>(); |
|
|
|
let tokens: Vec<&str> = s.split_whitespace().collect::<Vec<&str>>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Parse things based on the token, probably need a special function for each token based on a switch
|
|
|
|
|
|
|
|
// of tokens[0].
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|