mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-27 11:59:05 +00:00
feat: add as
operator
This commit is contained in:
parent
1c6a6b2ec8
commit
daf01f3cf2
14 changed files with 119 additions and 12 deletions
|
@ -1452,6 +1452,11 @@ impl PyCodeGenerator {
|
|||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::private("#in_operator"));
|
||||
}
|
||||
// (x as T) == x
|
||||
TokenKind::AsOp => {
|
||||
self.emit_expr(*bin.lhs);
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
let lhs_t = bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue