From 5ce2a006b6d45d29be15e4562ae3ab4fc1b8e97c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 11 Mar 2022 12:22:27 +0100 Subject: Consistent block naming --- src/parse/incremental.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/parse/incremental.rs') diff --git a/src/parse/incremental.rs b/src/parse/incremental.rs index 4736845f..759b3a68 100644 --- a/src/parse/incremental.rs +++ b/src/parse/incremental.rs @@ -136,8 +136,8 @@ impl Reparser<'_> { let superseded_span = pos.offset .. pos.offset + prev_len; let func: Option = match child.kind() { - NodeKind::Template => Some(ReparseMode::Template), - NodeKind::Block => Some(ReparseMode::Block), + NodeKind::CodeBlock => Some(ReparseMode::Code), + NodeKind::TemplateBlock => Some(ReparseMode::Template), _ => None, }; @@ -211,7 +211,7 @@ impl Reparser<'_> { } let (newborns, terminated, amount) = match mode { - ReparseMode::Block => reparse_block( + ReparseMode::Code => reparse_block( &prefix, &self.src[newborn_span.start ..], newborn_span.len(), @@ -292,9 +292,9 @@ impl SearchState { /// Which reparse function to choose for a span of elements. #[derive(Clone, Copy, Debug, PartialEq)] enum ReparseMode { - /// Reparse a code block with its braces. - Block, - /// Reparse a template, including its square brackets. + /// Reparse a code block, including its braces. + Code, + /// Reparse a template block, including its square brackets. Template, /// Reparse elements of the markup. The variant carries whether the node is /// `at_start` and the minimum indent of the containing markup node. -- cgit v1.2.3