diff --git a/crates/oxide_compiler/src/compiler.rs b/crates/oxide_compiler/src/compiler.rs
index 3944b7b8..9bf3ccf5 100644
--- a/crates/oxide_compiler/src/compiler.rs
+++ b/crates/oxide_compiler/src/compiler.rs
@@ -1280,14 +1280,8 @@ impl Compiler {
pub(crate) fn count_statement(&self, stmt: &Statement, ctx: &mut CompileCtx) {
match stmt {
- Statement::ExpressionStatement(_)
- | Statement::ReturnStatement(_)
- | Statement::BreakStatement(_)
- | Statement::ContinueStatement(_)
- | Statement::LabeledStatement(_) => self.count_basic(stmt, ctx),
- Statement::BlockStatement(_) => self.count_block_domain(stmt, ctx),
- Statement::VariableDeclaration(_) | Statement::FunctionDeclaration(_) | Statement::ClassDeclaration(_) => {
- self.count_declaration_domain(stmt, ctx)
+ Statement::BreakStatement(_) | Statement::ContinueStatement(_) | Statement::LabeledStatement(_) => {
+ self.count_basic(stmt, ctx)
}
Statement::IfStatement(_) => self.count_control_domain(stmt, ctx),
Statement::WhileStatement(_)
@@ -1296,7 +1290,7 @@ impl Compiler {
| Statement::ForInStatement(_)
| Statement::ForOfStatement(_) => self.count_iteration_domain(stmt, ctx),
Statement::SwitchStatement(_) => self.count_switch_domain(stmt, ctx),
- Statement::ThrowStatement(_) | Statement::TryStatement(_) => self.count_exception_domain(stmt, ctx),
+ Statement::TryStatement(_) => self.count_exception_domain(stmt, ctx),
_ => {}
}
}
diff --git a/crates/oxide_compiler/src/stmt/basic/expression.rs b/crates/oxide_compiler/src/stmt/basic/expression.rs
index f1767632..00861c22 100644
--- a/crates/oxide_compiler/src/stmt/basic/expression.rs
+++ b/crates/oxide_compiler/src/stmt/basic/expression.rs
@@ -2,12 +2,6 @@ use crate::compiler::{CompileCtx, Compiler};
use oxide_parser::Statement;
impl Compiler {
- pub(super) fn count_expression_statement(
- &self, stmt: &oxide_parser::ExpressionStatement<'_>, ctx: &mut CompileCtx,
- ) {
- self.count_expression(&stmt.expression, ctx);
- }
-
fn emit_expression_statement(&self, stmt: &Statement, ctx: &mut CompileCtx) -> Result