mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Get it all to compile!
This commit is contained in:
parent
555478cdf0
commit
8272ea876f
21 changed files with 217 additions and 21 deletions
|
@ -27,6 +27,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
Float(_)
|
||||
| Num(_)
|
||||
| NonBase10Int { .. }
|
||||
| SingleQuote(_)
|
||||
| Access(_, _)
|
||||
| AccessorFunction(_)
|
||||
| Var { .. }
|
||||
|
@ -228,6 +229,11 @@ impl<'a> Formattable<'a> for Expr<'a> {
|
|||
Num(string) | Float(string) | GlobalTag(string) | PrivateTag(string) => {
|
||||
buf.push_str(string)
|
||||
}
|
||||
SingleQuote(string) => {
|
||||
buf.push('\'');
|
||||
buf.push_str(string);
|
||||
buf.push('\'');
|
||||
}
|
||||
NonBase10Int {
|
||||
base,
|
||||
string,
|
||||
|
|
|
@ -35,6 +35,7 @@ impl<'a> Formattable<'a> for Pattern<'a> {
|
|||
| Pattern::NonBase10Literal { .. }
|
||||
| Pattern::FloatLiteral(_)
|
||||
| Pattern::StrLiteral(_)
|
||||
| Pattern::SingleQuote(_)
|
||||
| Pattern::Underscore(_)
|
||||
| Pattern::Malformed(_)
|
||||
| Pattern::MalformedIdent(_, _)
|
||||
|
@ -127,6 +128,11 @@ impl<'a> Formattable<'a> for Pattern<'a> {
|
|||
StrLiteral(literal) => {
|
||||
todo!("Format string literal: {:?}", literal);
|
||||
}
|
||||
SingleQuote(string) => {
|
||||
buf.push('\'');
|
||||
buf.push_str(string);
|
||||
buf.push('\'');
|
||||
}
|
||||
Underscore(name) => {
|
||||
buf.push('_');
|
||||
buf.push_str(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue