feat: glob import (WIP)

This commit is contained in:
Shunsuke Shibayama 2024-08-16 23:08:17 +09:00
parent b5d68e5f1c
commit 06ec103b2e
12 changed files with 116 additions and 12 deletions

View file

@ -36,6 +36,7 @@ use crate::compile::{AccessKind, Name, StoreLoadKind};
use crate::context::ControlKind;
use crate::error::CompileError;
use crate::hir::DefaultParamSignature;
use crate::hir::GlobSignature;
use crate::hir::ListWithLength;
use crate::hir::{
Accessor, Args, BinOp, Block, Call, ClassDef, Def, DefBody, Expr, GuardClause, Identifier,
@ -1159,6 +1160,7 @@ impl PyCodeGenerator {
match def.sig {
Signature::Subr(sig) => self.emit_subr_def(None, sig, def.body),
Signature::Var(sig) => self.emit_var_def(sig, def.body),
Signature::Glob(sig) => self.emit_glob_def(sig, def.body),
}
}
@ -1473,6 +1475,8 @@ impl PyCodeGenerator {
}
}
fn emit_glob_def(&mut self, _sig: GlobSignature, _body: DefBody) {}
/// No parameter mangling is used
/// so that Erg functions can be called from Python with keyword arguments.
fn emit_params(