mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-05-02 19:00:47 +08:00
📝 update docs
This commit is contained in:
@@ -1,13 +1,29 @@
|
||||
# runtime.nas
|
||||
# 2023 by ValKmjolnir
|
||||
# runtime gives us some functions that we could manage it manually.
|
||||
|
||||
# command line arguments
|
||||
var argv = func() {
|
||||
return globals.arg;
|
||||
}
|
||||
|
||||
var gc = {
|
||||
extend: func(type) {return __gcextd;},
|
||||
info: func() {return __gcinfo;}
|
||||
};
|
||||
# runtime.nas
|
||||
# 2023 by ValKmjolnir
|
||||
# runtime gives us some functions that we could manage it manually.
|
||||
|
||||
# command line arguments
|
||||
var argv = func() {
|
||||
return globals.arg;
|
||||
}
|
||||
|
||||
var _gc_extend = func(type) {
|
||||
return __gcextd;
|
||||
}
|
||||
|
||||
var gc = {
|
||||
extend: func(type, times = 1) {
|
||||
if (times<=0) {
|
||||
return nil;
|
||||
}
|
||||
if (times>16) {
|
||||
times = 16;
|
||||
}
|
||||
|
||||
for(var i = 0; i<times; i+=1) {
|
||||
_gc_extend(type);
|
||||
}
|
||||
return nil;
|
||||
},
|
||||
info: func() {return __gcinfo;}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user