mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
improved malformed patterns
This commit is contained in:
parent
2ae993d695
commit
a87dfac7da
10 changed files with 316 additions and 126 deletions
|
@ -39,6 +39,7 @@ impl<'a> Formattable<'a> for Pattern<'a> {
|
|||
| Pattern::StrLiteral(_)
|
||||
| Pattern::Underscore(_)
|
||||
| Pattern::Malformed(_)
|
||||
| Pattern::MalformedIdent(_, _)
|
||||
| Pattern::QualifiedIdentifier { .. } => false,
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +158,7 @@ impl<'a> Formattable<'a> for Pattern<'a> {
|
|||
}
|
||||
|
||||
// Malformed
|
||||
Malformed(string) => buf.push_str(string),
|
||||
Malformed(string) | MalformedIdent(string, _) => buf.push_str(string),
|
||||
QualifiedIdentifier { module_name, ident } => {
|
||||
if !module_name.is_empty() {
|
||||
buf.push_str(module_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue