refactor(compiler): remove statement count helpers

This commit is contained in:
爱特每羊队
2026-08-05 01:03:42 +08:00
parent 638da1f481
commit 3ce7fd587d
11 changed files with 4 additions and 92 deletions
@@ -3,11 +3,6 @@ use oxide_bytecode::opcode::{self, OpCode};
use oxide_parser::Statement;
impl Compiler {
pub(crate) fn count_throw_statement(&self, stmt: &oxide_parser::ThrowStatement<'_>, ctx: &mut CompileCtx) {
self.count_expression(&stmt.argument, ctx);
ctx.projected_pc += 1;
}
pub(crate) fn emit_throw_statement(&self, stmt: &Statement, ctx: &mut CompileCtx) -> Result<Option<u8>, String> {
let Statement::ThrowStatement(ts) = stmt else {
return Ok(None);