refactor: 完成语法域入口点迁移,收紧内部方法可见性
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
impl Compiler {
|
||||
pub(in crate::counter) fn count_object_expression(&self, expr: &Expression, ctx: &mut CompileCtx) {
|
||||
fn count_object_expression(&self, expr: &Expression, ctx: &mut CompileCtx) {
|
||||
let Expression::ObjectExpression(obj) = expr else {
|
||||
return;
|
||||
};
|
||||
@@ -25,7 +25,7 @@ impl Compiler {
|
||||
}
|
||||
}
|
||||
|
||||
pub(in crate::counter) fn count_array_expression(&self, expr: &Expression, ctx: &mut CompileCtx) {
|
||||
fn count_array_expression(&self, expr: &Expression, ctx: &mut CompileCtx) {
|
||||
let Expression::ArrayExpression(arr) = expr else {
|
||||
return;
|
||||
};
|
||||
@@ -42,4 +42,12 @@ impl Compiler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(in crate::counter) fn count_object_domain(&self, expr: &Expression, ctx: &mut CompileCtx) {
|
||||
match expr {
|
||||
Expression::ObjectExpression(_) => self.count_object_expression(expr, ctx),
|
||||
Expression::ArrayExpression(_) => self.count_array_expression(expr, ctx),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user