mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Parse "as" aliases into tag/args rather than arbitrary annotations
This commit is contained in:
parent
4ddb8e10fb
commit
2cd5bf8c03
8 changed files with 276 additions and 253 deletions
|
@ -576,11 +576,9 @@ impl<'a> RemoveSpaces<'a> for TypeAnnotation<'a> {
|
|||
),
|
||||
TypeAnnotation::Apply(a, b, c) => TypeAnnotation::Apply(a, b, c.remove_spaces(arena)),
|
||||
TypeAnnotation::BoundVariable(a) => TypeAnnotation::BoundVariable(a),
|
||||
TypeAnnotation::As(a, _, c) => TypeAnnotation::As(
|
||||
arena.alloc(a.remove_spaces(arena)),
|
||||
&[],
|
||||
arena.alloc(c.remove_spaces(arena)),
|
||||
),
|
||||
TypeAnnotation::As(a, _, c) => {
|
||||
TypeAnnotation::As(arena.alloc(a.remove_spaces(arena)), &[], c)
|
||||
}
|
||||
TypeAnnotation::Record { fields, ext } => TypeAnnotation::Record {
|
||||
fields: fields.remove_spaces(arena),
|
||||
ext: ext.remove_spaces(arena),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue