mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DEV: Fill in the include and import opcode generation.
This commit is contained in:
parent
100d963f41
commit
44178b601c
@ -269,8 +269,15 @@ impl AST {
|
||||
ops[idx] = Op::Func(jptr as i32);
|
||||
}
|
||||
Expression::FuncOp(_) => unimplemented!("FuncOp expressions are not implmented yet"),
|
||||
Expression::Import(_) => unimplemented!("Import expressions are not implmented yet"),
|
||||
Expression::Include(_) => unimplemented!("Include expressions are not implmented yet"),
|
||||
Expression::Import(def) => {
|
||||
ops.push(Op::Val(Primitive::Str(def.path.fragment)));
|
||||
ops.push(Op::Runtime(Hook::Import));
|
||||
}
|
||||
Expression::Include(def) => {
|
||||
ops.push(Op::Val(Primitive::Str(def.typ.fragment)));
|
||||
ops.push(Op::Val(Primitive::Str(def.path.fragment)));
|
||||
ops.push(Op::Runtime(Hook::Include));
|
||||
}
|
||||
Expression::Module(def) => {
|
||||
let argset = def.arg_set;
|
||||
let out_expr = def.out_expr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user