mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Pretty-print laayouts when PRETTY_PRINT_IR_SYMBOLS is true
This commit is contained in:
parent
abe42781d5
commit
103e85f339
1 changed files with 13 additions and 10 deletions
|
@ -1632,16 +1632,19 @@ impl<'a> Stmt<'a> {
|
|||
use Stmt::*;
|
||||
|
||||
match self {
|
||||
Let(symbol, expr, _layout, cont) => alloc
|
||||
.text("let ")
|
||||
.append(symbol_to_doc(alloc, *symbol))
|
||||
//.append(" : ")
|
||||
//.append(alloc.text(format!("{:?}", _layout)))
|
||||
.append(" = ")
|
||||
.append(expr.to_doc(alloc))
|
||||
.append(";")
|
||||
.append(alloc.hardline())
|
||||
.append(cont.to_doc(alloc)),
|
||||
Let(symbol, expr, layout, cont) => {
|
||||
let mut doc = alloc.text("let ").append(symbol_to_doc(alloc, *symbol));
|
||||
if PRETTY_PRINT_IR_SYMBOLS {
|
||||
doc = doc
|
||||
.append(" : ")
|
||||
.append(alloc.text(format!("{:?}", layout)));
|
||||
}
|
||||
doc.append(" = ")
|
||||
.append(expr.to_doc(alloc))
|
||||
.append(";")
|
||||
.append(alloc.hardline())
|
||||
.append(cont.to_doc(alloc))
|
||||
}
|
||||
|
||||
Refcounting(modify, cont) => modify
|
||||
.to_doc(alloc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue