Parse opaque types

This commit is contained in:
ayazhafiz 2022-02-19 18:38:31 -05:00
parent ab6019d402
commit fa24e51593
13 changed files with 201 additions and 113 deletions

View file

@ -257,6 +257,12 @@ pub enum Def<'a> {
ann: Loc<TypeAnnotation<'a>>,
},
/// An opaque type, wrapping its inner type. E.g. Age := U64.
Opaque {
header: TypeHeader<'a>,
typ: Loc<TypeAnnotation<'a>>,
},
// TODO in canonicalization, check to see if there are any newlines after the
// annotation; if not, and if it's followed by a Body, then the annotation
// applies to that expr! (TODO: verify that the pattern for both annotation and body match.)