mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-22 09:31:43 +00:00
Merge pull request #7497 from smores56/new-interpolation-syntax
Move to new interpolation syntax
This commit is contained in:
commit
528d1d2b69
66 changed files with 630 additions and 596 deletions
|
@ -911,8 +911,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,
|
||||
|
@ -921,7 +921,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