mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-22 17:41:45 +00:00
Move to new interpolation syntax
This commit is contained in:
parent
a69a326161
commit
eb1b5ffa26
68 changed files with 665 additions and 633 deletions
|
@ -922,8 +922,8 @@ fn format_str_segment(seg: &StrSegment, buf: &mut Buf) {
|
|||
buf.push(escaped.to_parsed_char());
|
||||
}
|
||||
Interpolated(loc_expr) => {
|
||||
buf.push_str("$(");
|
||||
// e.g. (name) in "Hi, $(name)!"
|
||||
buf.push_str("${");
|
||||
// e.g. {name} in "Hi, ${name}!"
|
||||
let min_indent = buf.cur_line_indent() + INDENT;
|
||||
loc_expr.value.format_with_options(
|
||||
buf,
|
||||
|
@ -932,7 +932,7 @@ fn format_str_segment(seg: &StrSegment, buf: &mut Buf) {
|
|||
min_indent,
|
||||
);
|
||||
buf.indent(min_indent);
|
||||
buf.push(')');
|
||||
buf.push('}');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue