mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Parse deprecated interpolation syntax differently
This commit is contained in:
parent
7189104df8
commit
8ea38d3a04
9 changed files with 51 additions and 15 deletions
|
@ -974,7 +974,7 @@ fn to_str_report<'a>(
|
|||
suggestion("An escaped quote: ", "\\\""),
|
||||
suggestion("An escaped backslash: ", "\\\\"),
|
||||
suggestion("A unicode code point: ", "\\u(00FF)"),
|
||||
suggestion("An interpolated string: ", "\$(myVariable)"),
|
||||
suggestion("An interpolated string: ", "$(myVariable)"),
|
||||
])
|
||||
.indent(4),
|
||||
]);
|
||||
|
@ -1021,7 +1021,7 @@ fn to_str_report<'a>(
|
|||
alloc.region_with_subregion(lines.convert_region(surroundings), region),
|
||||
alloc.concat([
|
||||
alloc.reflow(r"You could change it to something like "),
|
||||
alloc.parser_suggestion("\"The count is \$(count\\)\""),
|
||||
alloc.parser_suggestion("\"The count is $(count)\""),
|
||||
alloc.reflow("."),
|
||||
]),
|
||||
]);
|
||||
|
@ -1099,7 +1099,7 @@ fn to_str_report<'a>(
|
|||
alloc.stack([
|
||||
alloc.concat([
|
||||
alloc.reflow("I am part way through parsing this scalar literal (character literal), "),
|
||||
alloc.reflow("but I encountered a string interpolation like \"\$(this)\", which is not "),
|
||||
alloc.reflow("but I encountered a string interpolation like \"$(this)\", which is not "),
|
||||
alloc.reflow("allowed in scalar literals."),
|
||||
]),
|
||||
alloc.region_with_subregion(lines.convert_region(surroundings), region),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue