0
0

🎉 halt command

This commit is contained in:
DrMaxNix 2022-10-02 16:19:46 +02:00
parent f457c83553
commit 14443943da

20
src/command/halt.js Normal file
View File

@ -0,0 +1,20 @@
Juicescript.command_define({
name: "halt",
alias: ["stop"],
validate: function(runner){
// count
runner.argument_validate_count(0);
},
execute: function(runner){
// MOVE COMMAND COUNTER TO END OF ROOT SCOPE //
// move to root scope
runner.stack = [{
scope: null
}];
// set command counter to end
runner.counter = runner.scope_tree.command.length;
}
});