mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Pull out alias header as its own struct
This commit is contained in:
parent
dae94f4aaa
commit
11da888c07
5 changed files with 53 additions and 28 deletions
|
@ -225,6 +225,12 @@ pub struct PrecedenceConflict<'a> {
|
|||
pub expr: &'a Loc<Expr<'a>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct AliasHeader<'a> {
|
||||
pub name: &'a str,
|
||||
pub vars: &'a [Loc<&'a str>],
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Def<'a> {
|
||||
// TODO in canonicalization, validate the pattern; only certain patterns
|
||||
|
@ -280,7 +286,7 @@ pub enum TypeAnnotation<'a> {
|
|||
As(
|
||||
&'a Loc<TypeAnnotation<'a>>,
|
||||
&'a [CommentOrNewline<'a>],
|
||||
(&'a str, &'a [Loc<&'a str>]),
|
||||
AliasHeader<'a>,
|
||||
),
|
||||
|
||||
Record {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue