basic highlighting flow using MarkupNodes

This commit is contained in:
Anton-4 2022-03-04 20:19:05 +01:00
parent 853badf777
commit 37704323b1
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD
16 changed files with 269 additions and 301 deletions

View file

@ -1,4 +1,4 @@
use crate::{syntax_highlight::HighlightStyle};
use crate::{syntax_highlight::HighlightStyle, slow_pool::MarkNodeId};
use super::{attribute::Attributes, nodes, nodes::MarkupNode};
@ -138,3 +138,11 @@ pub fn new_comments_mn(
newlines_at_end,
}
}
pub fn assign_mn(val_name_mn_id: MarkNodeId, equals_mn_id: MarkNodeId, expr_mark_node_id: MarkNodeId) -> MarkupNode {
MarkupNode::Nested {
children_ids: vec![val_name_mn_id, equals_mn_id, expr_mark_node_id],
parent_id_opt: None,
newlines_at_end: 3,
}
}