generated from OBJNULL/Dockerized-Rust
Update main.rs
This commit is contained in:
parent
d5ad3dab0a
commit
5bddf93ec8
1 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,29 @@
|
||||||
fn main() {
|
// Libraries
|
||||||
println!("Hello, world!");
|
mod action;
|
||||||
|
mod args;
|
||||||
|
mod parser;
|
||||||
|
mod reader;
|
||||||
|
|
||||||
|
use args::Arguments;
|
||||||
|
use parser::Parser;
|
||||||
|
use reader::Reader;
|
||||||
|
|
||||||
|
use std::io::Result;
|
||||||
|
|
||||||
|
// Entry-Point
|
||||||
|
fn main() -> Result<()> {
|
||||||
|
// Reading the Arguments
|
||||||
|
let args = Arguments::new();
|
||||||
|
|
||||||
|
// Creating a File Reader & Reading
|
||||||
|
let reader = Reader::new(&args.file_input.clone())?;
|
||||||
|
let text = reader.extract();
|
||||||
|
println!("Text Content: {}", text.clone());
|
||||||
|
|
||||||
|
// Creating a Parser to read the Text Content
|
||||||
|
let mut parser = Parser::new(text);
|
||||||
|
parser.start();
|
||||||
|
|
||||||
|
// It's ok!
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue