Fix negative float and non-base-10 literal patterns

This commit is contained in:
Joshua Warner 2025-01-11 21:58:04 -08:00
parent 962534e3d1
commit f08a0012ea
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 56 additions and 2 deletions

View file

@ -0,0 +1,47 @@
@0-11 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-9,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Annotation(
@1-7 PncApply(
@1-4 FloatLiteral(
"-8.",
),
[],
),
@8-9 Apply(
"",
"C",
[],
),
),
],
},
@10-11 SpaceBefore(
Var {
module_name: "",
ident: "p",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -550,6 +550,7 @@ mod test_snapshots {
pass/multiline_type_signature_with_comment.expr,
pass/multiple_fields.expr,
pass/multiple_operators.expr,
pass/neg_float_literal_pnc_apply_pat.expr,
pass/neg_inf_float.expr,
pass/neg_nested_parens.expr,
pass/neg_newline_four.expr,