pub fn lexer_as_str(text: &str) -> Vec<Token>
Expand description

Converts a string to tokens
Input:: text: &str
Return -> Vec
This is comonnly used for debugging and testing.
Example

pub use lexical_scanner::*;
pub use enums::*;
let text = "The number 5.0 is > 1;";
let token_list = lexical_scanner::lexer_as_str(text);
 
//Display tokens
for (i, token) in token_list.iter().enumerate(){
    println!("{}. {:?}", i, token);
}