Populate the name field on elements.

This commit is contained in:
Tom Alexander
2023-10-04 21:21:26 -04:00
parent 5b308ea76f
commit 93fe46e4e7
15 changed files with 73 additions and 28 deletions

View File

@@ -22,6 +22,7 @@ use super::element_parser::element;
use super::keyword::affiliated_keyword;
use super::object_parser::standard_set_object;
use super::org_source::OrgSource;
use super::util::get_name;
use super::util::include_input;
use super::util::indentation_level;
use super::util::non_whitespace_character;
@@ -154,7 +155,7 @@ pub(crate) fn plain_list<'b, 'g, 'r, 's>(
remaining,
PlainList {
source: source.into(),
name: None, // TODO
name: get_name(&affiliated_keywords),
list_type: first_item_list_type.expect("Plain lists require at least one element."),
children: children.into_iter().map(|(_start, item)| item).collect(),
},