[fine] Many more import-related shuffles
This commit is contained in:
parent
994268abb6
commit
a3ae4339cf
8 changed files with 159 additions and 67 deletions
|
|
@ -661,7 +661,8 @@ fn compile_load_declaration(c: &mut Compiler, t: TreeRef, declaration: &Declarat
|
|||
// Must be a static don't worry about it.
|
||||
Declaration::Class { .. } => return OK,
|
||||
|
||||
Declaration::Import { .. } => todo!(),
|
||||
// fix later
|
||||
Declaration::Import { .. } => ice!(c, t, "import compile not supported"),
|
||||
};
|
||||
|
||||
c.push(instruction);
|
||||
|
|
@ -1000,6 +1001,7 @@ fn compile_statement(c: &mut Compiler, t: TreeRef, gen_value: bool) {
|
|||
let cr = match tree.kind {
|
||||
TreeKind::Error => None,
|
||||
|
||||
TreeKind::Import => compile_import_statement(c, gen_value),
|
||||
TreeKind::Block => compile_block_statement(c, t, gen_value),
|
||||
TreeKind::ClassDecl => compile_class_declaration(c, t, tree, gen_value),
|
||||
TreeKind::ExpressionStatement => compile_expression_statement(c, tree, gen_value),
|
||||
|
|
@ -1288,3 +1290,10 @@ fn compile_for_statement(c: &mut Compiler, tree: &Tree, gen_value: bool) -> CR {
|
|||
|
||||
OK
|
||||
}
|
||||
|
||||
fn compile_import_statement(c: &mut Compiler, gen_value: bool) -> CR {
|
||||
if gen_value {
|
||||
c.push(Instruction::PushNothing);
|
||||
}
|
||||
OK
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue