mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-24 13:34:52 +00:00
Handle Lambda Expression
This commit is contained in:
parent
f5ce4a6cc3
commit
830f208371
1 changed files with 5 additions and 0 deletions
|
@ -2126,6 +2126,11 @@ impl Compiler {
|
|||
|
||||
let name = "<lambda>".to_owned();
|
||||
let mut funcflags = self.enter_function(&name, args)?;
|
||||
|
||||
self.current_codeinfo()
|
||||
.constants
|
||||
.insert_full(ConstantData::None);
|
||||
|
||||
self.compile_expression(body)?;
|
||||
self.emit(Instruction::ReturnValue);
|
||||
let code = self.pop_code_object();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue