Newer
Older
use std::fs;
mod parser;
use parser::parser::Parser;
mod tests;
use tests::tests::{run_tests};
use tests::example_parser_tests::{run_example_parser_test};
mod examples;
use examples::example_programs::arithmetic::expression::Expr;
run_tests();
run_example_parser_test();
let source = "src/examples/example_programs/arithmetic/example1.txt";
let _file = fs::read_to_string(source).expect("File was not found or could not be read");
let res = Expr.parse(_file.as_str());
println!("{:#?}", res);
// if count == max {break};
// println!("{:#?}", Expr.parse(format!("221 + {} + 8 - 11077770", count).as_str()));
// }
println!("{:#?}", Expr.parse(format!("221 - {} + 8 + 11077770", 4).as_str()));