Use UppercaseIdent over PlatformRigids

This commit is contained in:
Richard Feldman 2022-01-23 11:09:29 -05:00
parent 620e3f2913
commit c1c0ffb25f
10 changed files with 157 additions and 51 deletions

View file

@ -4,6 +4,7 @@ use crate::{
Buf,
};
use roc_parse::ast::{AliasHeader, AssignedField, Expr, Tag, TypeAnnotation};
use roc_parse::ident::UppercaseIdent;
use roc_region::all::Loc;
/// Does an AST node need parens around it?
@ -107,6 +108,22 @@ where
}
}
impl<'a> Formattable for UppercaseIdent<'a> {
fn is_multiline(&self) -> bool {
false
}
fn format_with_options<'buf>(
&self,
buf: &mut Buf<'buf>,
_parens: Parens,
_newlines: Newlines,
_indent: u16,
) {
buf.push_str((*self).into())
}
}
impl<'a> Formattable for TypeAnnotation<'a> {
fn is_multiline(&self) -> bool {
use roc_parse::ast::TypeAnnotation::*;