This code will look strange because it is generated by the compiler
Code: Select all
; Generated by Coffee-AHK/0.0.49
global __rf_shell__ := Func("shell_6")
global __shell_module_2__ := (Func("shell_5")).Call()
global __shell_module_1__ := (Func("shell_3")).Call()
global __isFunction__ := __shell_module_1__
(Func("shell_1")).Call()
shell_1() {
result := __rf_shell__.Call(__isFunction__).Call(__isFunction__)
if !(result) {
throw 1
}
}
shell_2(__getType__, ipt) {
__type__ := __rf_shell__.Call(__getType__).Call(ipt)
if !(__type__ == "function") {
return false
}
return true
}
shell_3() {
__getType__ := __shell_module_2__
return Func("shell_2").Bind(__getType__)
}
shell_4(ipt) {
if ipt is Number
return "number"
if (IsFunc(ipt)) {
return "function"
}
if (IsObject(ipt)) {
if (ipt.Count() == ipt.Length()) {
if !(ipt.Length() >= 0) {
return "function"
}
return "array"
}
return "object"
}
return "string"
}
shell_5() {
return Func("shell_4")
}
shell_6(__fn__) {
if (IsFunc(__fn__)) {
return __fn__
}
throw Exception("invalid function")
}
Also, is there a more elegant way to provide the compiler with the ability to "determine if all functions exist when they are executed"?
I don't feel like my current injection method is a good choice