Make parameters order uniform.

This commit is contained in:
Stephen Chung
2022-11-04 21:47:09 +08:00
parent 0756994038
commit 35b02ce9b7
14 changed files with 284 additions and 265 deletions

View File

@@ -260,7 +260,7 @@ impl Engine {
);
let result = if eval_ast && !statements.is_empty() {
let r = self.eval_global_statements(scope, global, caches, statements, lib, 0);
let r = self.eval_global_statements(global, caches, lib, 0, scope, statements);
if rewind_scope {
scope.rewind(orig_scope_len);
@@ -279,16 +279,16 @@ impl Engine {
if let Some(fn_def) = ast.shared_lib().get_script_fn(name, args.len()) {
self.call_script_fn(
scope,
global,
caches,
lib,
0,
scope,
&mut this_ptr,
fn_def,
&mut args,
rewind_scope,
Position::NONE,
0,
)
} else {
Err(ERR::ErrorFunctionNotFound(name.into(), Position::NONE).into())
@@ -306,7 +306,7 @@ impl Engine {
if self.debugger.is_some() {
global.debugger.status = crate::eval::DebuggerStatus::Terminate;
let node = &crate::ast::Stmt::Noop(Position::NONE);
self.run_debugger(scope, global, lib, &mut this_ptr, node, 0)?;
self.run_debugger(global, caches, lib, 0, scope, &mut this_ptr, node)?;
}
Ok(result)