core: reimplement assignment type inference and codegen + other minor changes & refactor #483

Merged
sb10q merged 4 commits from setitem-assign into master 2024-08-05 19:31:06 +08:00

4 Commits

Author SHA1 Message Date
lyken acaf09477a core/typecheck: fix missing ExprKind::Asterisk in fix_assignment_target_context 2024-08-05 11:19:32 +08:00
lyken 1b29844948 core/codegen: add missing comment 2024-08-05 11:18:45 +08:00
lyken 4b927fa62f core: reimplement assignment type inference and codegen
- distinguish between setitem and getitem
- allow starred assignment targets, but the assigned value would be a tuple
- allow both [...] and (...) to be target lists
2024-08-05 11:06:40 +08:00
lyken b20779a7f4 core/codegen: refactor gen_{for,comprehension} to match on iter type 2024-08-05 11:04:30 +08:00