Tweak whitespace in generated character set functions
This commit is contained in:
parent
9d9eb2234f
commit
6ae04051e7
2 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,8 @@
|
|||
use std::ops::Range;
|
||||
|
||||
/// A set of characters represented as a balanced binary tree of comparisons.
|
||||
/// This is used as an intermediate step in generating efficient code for
|
||||
/// matching a given character set.
|
||||
#[derive(PartialEq, Eq)]
|
||||
pub enum CharacterTree {
|
||||
Yes,
|
||||
|
|
|
|||
|
|
@ -720,14 +720,12 @@ impl Generator {
|
|||
info.index
|
||||
);
|
||||
indent!(self);
|
||||
add_line!(self, "return");
|
||||
indent!(self);
|
||||
add_whitespace!(self);
|
||||
add!(self, "return ");
|
||||
let tree = CharacterTree::from_ranges(&info.ranges);
|
||||
self.add_character_tree(tree.as_ref());
|
||||
add!(self, ";\n");
|
||||
dedent!(self);
|
||||
dedent!(self);
|
||||
add_line!(self, "}}");
|
||||
add_line!(self, "");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue