mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Use UppercaseIdent over PlatformRigids
This commit is contained in:
parent
620e3f2913
commit
c1c0ffb25f
10 changed files with 157 additions and 51 deletions
|
@ -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::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue