mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix negative float and non-base-10 literal patterns
This commit is contained in:
parent
962534e3d1
commit
f08a0012ea
5 changed files with 56 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
(-8.)() : C
|
||||
p
|
|
@ -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,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
(-8.)():C
|
||||
p
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue