do not set an underscore on parse and only prefix in formatter

This commit is contained in:
rvcas 2020-11-18 08:25:40 -05:00
parent f471d5bbe1
commit 72c85009c6
4 changed files with 9 additions and 7 deletions

View file

@ -128,7 +128,10 @@ impl<'a> Formattable<'a> for Pattern<'a> {
StrLiteral(literal) => {
todo!("Format string literal: {:?}", literal);
}
Underscore(name) => buf.push_str(name),
Underscore(name) => {
buf.push('_');
buf.push_str(name);
}
// Space
SpaceBefore(sub_pattern, spaces) => {