feat: 搭建 Iterator 与 for-of 语法基础设施

This commit is contained in:
2026-06-08 13:48:54 +08:00
parent 107cc1bc37
commit f8eb48ab80
12 changed files with 246 additions and 4 deletions
@@ -119,3 +119,10 @@ fn symbol_not_equals_string() {
let result = eval(&mut vm, "Symbol() === 'symbol'").unwrap();
assert!(!result.as_bool());
}
#[test]
fn symbol_iterator_exists() {
let mut vm = Vm::new();
let result = eval(&mut vm, "typeof Symbol.iterator").unwrap();
assert_eq!(to_str(&vm, result), "object");
}