mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
Document Fixup
This commit is contained in:
parent
131c4b2bb1
commit
107f37219f
1 changed files with 9 additions and 0 deletions
|
@ -1046,6 +1046,15 @@ fn parse_defs_end<'a>(
|
||||||
|
|
||||||
pub enum Next<'a> {
|
pub enum Next<'a> {
|
||||||
Continue(SingleDef<'a>, State<'a>),
|
Continue(SingleDef<'a>, State<'a>),
|
||||||
|
/// When we encounter a Body def, we have to check to see if there was an
|
||||||
|
/// Annotation def right before it. If so, we merge the two into an AnnotatedBody.
|
||||||
|
///
|
||||||
|
/// So when parse_single_def returns a Fixup, it means that:
|
||||||
|
/// 1. This is a Body def.
|
||||||
|
/// 2. If we're parsing multiple things, we should check whether an Annotation def preceded it.
|
||||||
|
/// 3. If so, we should merge them into an AnnotatedBody.
|
||||||
|
///
|
||||||
|
/// This needs to store the raw Loc<Pattern> and Loc<Expr>.
|
||||||
Fixup(
|
Fixup(
|
||||||
Loc<Pattern<'a>>,
|
Loc<Pattern<'a>>,
|
||||||
Loc<Expr<'a>>,
|
Loc<Expr<'a>>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue