diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-03-11 12:22:27 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-03-11 12:22:27 +0100 |
| commit | 5ce2a006b6d45d29be15e4562ae3ab4fc1b8e97c (patch) | |
| tree | 454b25e04530adcdf08a161e1ab09abb33c0644c /src/parse/incremental.rs | |
| parent | e6b532391deb1e30dc356c4d20dd48199f748f29 (diff) | |
Consistent block naming
Diffstat (limited to 'src/parse/incremental.rs')
| -rw-r--r-- | src/parse/incremental.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<ReparseMode> = 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. |
