roc/compiler/parse/tests/snapshots/pass/ability_single_line.expr.result-ast
Ayaz Hafiz a3ac68a41f
Split up Defs into TypeDef and ValueDef
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00

51 lines
1.5 KiB
Text

Defs(
[
@0-37 Type(
Ability {
header: TypeHeader {
name: @0-4 "Hash",
vars: [],
},
loc_has: @5-8 Has,
members: [
AbilityMember {
name: @9-13 "hash",
typ: @21-37 Where(
@21-24 Function(
[
@16-17 BoundVariable(
"a",
),
],
@21-24 Apply(
"",
"U64",
[],
),
),
[
@27-37 HasClause {
var: @27-28 "a",
ability: @33-37 Apply(
"",
"Hash",
[],
),
},
],
),
},
],
},
),
],
@39-40 SpaceBefore(
Num(
"1",
),
[
Newline,
Newline,
],
),
)