mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix normalization of strings with overflowing unicode
This commit is contained in:
parent
0d182fbd28
commit
4e3df6bde2
6 changed files with 44 additions and 4 deletions
|
@ -360,8 +360,8 @@ impl<'a> Input<'a> {
|
|||
* * * AST after formatting:\n{:#?}\n\n",
|
||||
self.as_str(),
|
||||
output.as_ref().as_str(),
|
||||
actual,
|
||||
reparsed_ast
|
||||
ast_normalized,
|
||||
reparsed_ast_normalized
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
m "\u(FFFFFF)" s
|
|
@ -0,0 +1,27 @@
|
|||
@0-14 SpaceAfter(
|
||||
Apply(
|
||||
@0-1 Var {
|
||||
module_name: "",
|
||||
ident: "m",
|
||||
},
|
||||
[
|
||||
@1-13 Str(
|
||||
Line(
|
||||
[
|
||||
Unicode(
|
||||
@5-11 "FFFFFF",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@13-14 Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
m"\u(FFFFFF)"s
|
|
@ -708,6 +708,7 @@ mod test_snapshots {
|
|||
pass/underscore_backpassing.expr,
|
||||
pass/underscore_expr_in_def.expr,
|
||||
pass/underscore_in_assignment_pattern.expr,
|
||||
pass/unicode_overflow_str.expr,
|
||||
pass/value_def_confusion.expr,
|
||||
pass/var_else.expr,
|
||||
pass/var_if.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue