Use overlay ID for module import lookup (#4514)

* Add id to import pattern

* Finish testing importing in a block
This commit is contained in:
Jakub Žádník
2022-02-18 03:58:24 +02:00
committed by GitHub
parent c7c427723b
commit bccce0ab46
6 changed files with 53 additions and 12 deletions

View File

@ -1,4 +1,4 @@
use crate::{span, Span};
use crate::{span, OverlayId, Span};
use std::collections::HashSet;
#[derive(Debug, Clone)]
@ -11,6 +11,7 @@ pub enum ImportPatternMember {
#[derive(Debug, Clone)]
pub struct ImportPatternHead {
pub name: Vec<u8>,
pub id: Option<OverlayId>,
pub span: Span,
}
@ -28,6 +29,7 @@ impl ImportPattern {
ImportPattern {
head: ImportPatternHead {
name: vec![],
id: None,
span: Span { start: 0, end: 0 },
},
members: vec![],