Import all from_list in one __import__ call

This commit is contained in:
Aviv Palivoda 2019-06-13 20:41:37 +03:00
parent e85f8b18df
commit a932b729d8
3 changed files with 55 additions and 25 deletions

View file

@ -50,7 +50,7 @@ pub enum NameScope {
pub enum Instruction {
Import {
name: String,
symbol: Option<String>,
symbols: Vec<String>,
},
ImportStar {
name: String,
@ -330,7 +330,7 @@ impl Instruction {
}
match self {
Import { name, symbol } => w!(Import, name, format!("{:?}", symbol)),
Import { name, symbols } => w!(Import, name, format!("{:?}", symbols)),
ImportStar { name } => w!(ImportStar, name),
LoadName { name, scope } => w!(LoadName, name, format!("{:?}", scope)),
StoreName { name, scope } => w!(StoreName, name, format!("{:?}", scope)),