elm_parser/
parser_helpers.rs

1#[derive(Debug, Default, Clone)]
2pub struct TagInfo {
3    pub id: usize,
4    pub name: String,
5    pub indent: usize,
6    pub is_self_closing: bool,
7    pub in_props: bool,
8}
9
10pub fn tag_stack_pop(tag_stack: &mut Vec<TagInfo>, indent: &usize) {
11    while let Some(last_tag_info) = tag_stack.last() {
12        if *indent <= last_tag_info.indent {
13            /* if last_tag_info.is_self_closing {
14                output.push_str("/>\n");
15            } else {
16                output.push_str(&format!("</{}>\n", last_tag_info.name));
17            } */
18            tag_stack.pop();
19        } else {
20            break;
21        }
22    }
23}