Parse opaque references

This commit is contained in:
ayazhafiz 2022-02-19 21:28:39 -05:00
parent a38f1d1e8d
commit 6104a27b45
22 changed files with 206 additions and 25 deletions

View file

@ -37,7 +37,8 @@ impl<'a> Formattable for Expr<'a> {
| MalformedIdent(_, _)
| MalformedClosure
| GlobalTag(_)
| PrivateTag(_) => false,
| PrivateTag(_)
| OpaqueRef(_) => false,
// These expressions always have newlines
Defs(_, _) | When(_, _) => true,
@ -204,7 +205,7 @@ impl<'a> Formattable for Expr<'a> {
buf.indent(indent);
buf.push_str(string);
}
GlobalTag(string) | PrivateTag(string) => {
GlobalTag(string) | PrivateTag(string) | OpaqueRef(string) => {
buf.indent(indent);
buf.push_str(string)
}

View file

@ -30,6 +30,7 @@ impl<'a> Formattable for Pattern<'a> {
Pattern::Identifier(_)
| Pattern::GlobalTag(_)
| Pattern::PrivateTag(_)
| Pattern::OpaqueRef(_)
| Pattern::Apply(_, _)
| Pattern::NumLiteral(..)
| Pattern::NonBase10Literal { .. }
@ -56,7 +57,7 @@ impl<'a> Formattable for Pattern<'a> {
buf.indent(indent);
buf.push_str(string)
}
GlobalTag(name) | PrivateTag(name) => {
GlobalTag(name) | PrivateTag(name) | OpaqueRef(name) => {
buf.indent(indent);
buf.push_str(name);
}