feat: 实现 SequenceExpression + 带标签 break/continue + EmptyStatement

This commit is contained in:
2026-06-23 23:00:20 +08:00
parent 5de79b4253
commit 3ea2353194
11 changed files with 284 additions and 9 deletions
+14 -2
View File
@@ -32,8 +32,20 @@ pub(super) fn hash_statement(stmt: &Statement, h: &mut rustc_hash::FxHasher, inc
hash_statement(s, h, include_binding_names);
}
}
Statement::BreakStatement(_) => {}
Statement::ContinueStatement(_) => {}
Statement::BreakStatement(b) => {
if let Some(label) = &b.label {
label.name.as_str().hash(h);
}
}
Statement::ContinueStatement(c) => {
if let Some(label) = &c.label {
label.name.as_str().hash(h);
}
}
Statement::LabeledStatement(ls) => {
ls.label.name.as_str().hash(h);
hash_statement(&ls.body, h, include_binding_names);
}
Statement::DoWhileStatement(dw) => {
hash_statement(&dw.body, h, include_binding_names);
expression::hash_expression(&dw.test, h, include_binding_names);