Skip to content

Implement HIR builder #64

@DaniPopes

Description

@DaniPopes

Describe the feature

Implement a HIR builder that constructs HIR nodes using a bunch of helper methods.

Example:

pub struct HirBuilder<'hir> { /* ... */ }
impl<'hir> HirBuilder<'hir> {
    pub fn expr(&self, kind: hir::ExprKind<'hir>) -> hir::Expr<'hir> { /* ... */ }
}

An initial goal for this would be to replace the manual HIR node construction when desugaring loops and creating variables' getter functions, adding the necessary methods along the way.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-semaArea: semantic analysisC-enhancementCategory: an issue proposing an enhancement or a PR with oneE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-mediumMedium priority

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions