Plato on Github
Report Home
lang/compiler/codegen/program.js
Maintainability
126.15
Lines of code
25
Difficulty
8.25
Estimated Errors
0.14
Function weight
By Complexity
By SLOC
(function(sc) { "use strict"; require("./codegen"); var CodeGen = sc.lang.compiler.CodeGen; CodeGen.addGenerateMethod("Program", function(node) { if (!node.body.length) { return []; } var body = this.withFunction([ "" ], function() { // "" compiled as $ return this.generateStatements(node.body); }); var result = [ "(", body, ")" ]; if (!this.opts.bare) { result = [ "SCScript", result, ";" ]; } return result; }); })(sc);