mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-02 22:01:20 +00:00
Make sure to use keyword rather than word for parsing keywords
This commit is contained in:
parent
9e6c249dca
commit
59fe0f06ea
6 changed files with 40 additions and 30 deletions
|
|
@ -0,0 +1 @@
|
|||
Expr(Type(TInParens(End(@5), @2), @2), @0)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
s:(s
|
||||
wherem
|
||||
implementsF)A
|
||||
_
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
(
|
||||
i :
|
||||
a #
|
||||
where w implements I
|
||||
i : a #
|
||||
wherew implementsI
|
||||
e
|
||||
)
|
||||
|
|
@ -4,46 +4,48 @@
|
|||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
EitherIndex(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@1-26,
|
||||
@1-4,
|
||||
@8-26,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Annotation(
|
||||
@1-2 Identifier {
|
||||
ident: "i",
|
||||
},
|
||||
@3-26 Where(
|
||||
@3-4 SpaceAfter(
|
||||
BoundVariable(
|
||||
"a",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
@3-4 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
Stmt(
|
||||
@8-26 Apply(
|
||||
@8-14 Var {
|
||||
module_name: "",
|
||||
ident: "wherew",
|
||||
},
|
||||
[
|
||||
@13-26 ImplementsClause {
|
||||
var: @13-14 "w",
|
||||
abilities: [
|
||||
@25-26 Apply(
|
||||
"",
|
||||
"I",
|
||||
[],
|
||||
),
|
||||
],
|
||||
@15-26 Var {
|
||||
module_name: "",
|
||||
ident: "implementsI",
|
||||
},
|
||||
],
|
||||
Space,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ mod test_snapshots {
|
|||
fail/when_over_indented_int.expr,
|
||||
fail/when_over_indented_underscore.expr,
|
||||
fail/where_type_variable.expr,
|
||||
fail/wherem_implementsf.expr,
|
||||
fail/wild_case_arrow.expr,
|
||||
malformed/bad_opaque_ref.expr,
|
||||
malformed/malformed_pattern_field_access.expr, // See https://github.com/roc-lang/roc/issues/399
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue