fn walk_pattern(
        &mut self,
        pattern: Spanned<Pattern<SharedSymbol>>,
        declare: bool,
    ) -> Spanned<Pattern<UniqueSymbol>> {
        let item = match pattern.item {
            Pattern::Symbol(name) => Pattern::Symbol(self.resolve_assign(name, declare)),
            Pattern::Lit(l) => Pattern::Lit(l),
            Pattern::Label(n, p) => Pattern::Label(
                // TODO: This is temoprary. Makes first use the definition.
                // Once we have types, change the following line to:
                // self.resolve_symbol(n, pattern.span.clone()),
                // until then, this will do:
                Spanned::new(self.resolve_assign(n.item, false), n.span),
                Box::new(self.walk_pattern(*p, declare)),
            ),
            Pattern::Tuple(t) => Pattern::Tuple(
                t.into_iter()
                    .map(|c| self.walk_pattern(c, declare))
                    .collect::<Vec<_>>(),
            ),
            Pattern::Chain(_) => todo!("Chained Patterns not yet implemented"),
        };

        return Spanned::new(item, pattern.span);
    }
Walks a pattern. If `declare` is true, we shadow
variables in existing scopes and creates a new
variable in the local scope.
passerine/src/compiler/hoist.rs