(name, args, cast, type)
| 144404 | }; |
| 144405 | function Functions(codegen1) { |
| 144406 | function fncall(name, args, cast, type) { |
| 144407 | let obj = codegen1(args[0]); |
| 144408 | if (cast) { |
| 144409 | obj = cast + "(" + obj + ")"; |
| 144410 | if (cast.lastIndexOf("new ", 0) === 0) obj = "(" + obj + ")"; |
| 144411 | } |
| 144412 | return obj + "." + name + (type < 0 ? "" : type === 0 ? "()" : "(" + args.slice(1).map(codegen1).join(",") + ")"); |
| 144413 | } |
| 144414 | function fn(name, cast, type) { |
| 144415 | return (args)=>fncall(name, args, cast, type); |
| 144416 | } |