Fixing more errors.

This commit is contained in:
Tom Alexander
2023-09-03 12:23:18 -04:00
parent fdf35ba23c
commit 3bdb24ad88
15 changed files with 62 additions and 29 deletions

View File

@@ -14,6 +14,7 @@ use nom::sequence::tuple;
use super::org_source::OrgSource;
use super::util::get_consumed;
use crate::context::parser_with_context;
use crate::context::ContextElement;
use crate::context::RefContext;
use crate::error::CustomError;
use crate::error::MyError;
@@ -33,7 +34,8 @@ pub fn comment<'r, 's>(
"Cannot nest objects of the same element".into(),
))));
}
let parser_context = context.with_additional_node(ContextElement::Context("comment"));
let parser_context = ContextElement::Context("comment");
let parser_context = context.with_additional_node(&parser_context);
let comment_line_matcher = parser_with_context!(comment_line)(&parser_context);
let exit_matcher = parser_with_context!(exit_matcher_parser)(&parser_context);
let (remaining, _first_line) = comment_line_matcher(input)?;