Passing the setupfile contents to the document parser.
This commit is contained in:
parent
ee02e07717
commit
c7d5c89a60
@ -34,6 +34,7 @@ use crate::context::GlobalSettings;
|
||||
use crate::context::List;
|
||||
use crate::context::RefContext;
|
||||
use crate::error::CustomError;
|
||||
use crate::error::MyError;
|
||||
use crate::error::Res;
|
||||
use crate::parser::comment::comment;
|
||||
use crate::parser::element_parser::element;
|
||||
@ -88,6 +89,11 @@ fn document_org_source<'b, 'g, 'r, 's>(
|
||||
.file_access
|
||||
.read_file(Into::<&str>::into(setup_file))
|
||||
.map_err(|err| nom::Err::<CustomError<OrgSource<'_>>>::Failure(err.into()))?;
|
||||
let parsed_setup_file = _document(context, setup_file_contents.as_str().into());
|
||||
if parsed_setup_file.is_err() {
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError("Failed to parse the setup file.".into()))));
|
||||
}
|
||||
let (_remaining, parsed_setup_file) = parsed_setup_file.expect("The if-statement proves this is ok.");
|
||||
|
||||
println!("TODO: Process setup_file: {}", setup_file);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user