sai-language
Version:
An object-oriented language designed to afford code comprehension and maintenance. Transpiles in-place to Javascript.
52 lines (48 loc) • 1.77 kB
JavaScript
// Javascript source for Heredoc transipled by SAI
//
;
var prototype=new function() {
this.Constructor=function(){};
this.__tobelocked=[];
this.__tobefrozen=[];
this.__contracts=[];
this.__unverified=true;
this.isof={};
return this;
}();
var $AI=require("sai-library");
// Generated code follows
var __context={"name":"Heredoc","loader":"SAI.GetSourceFromPaths","path":"sample/Misc/Heredoc.sai","mtime":"2018-03-01T16:33:34.486Z","fetched":"2018-03-01T16:33:36.390Z"};
var isa = prototype.isa = 'Heredoc';
var $bindfail = function(m) {
throw new Error("SAI: A call to " + m + " on object " + isa + " has come unbound from any instance of that object. (If this is not in error, mark the declaration of " + m + " as unbound.)");
}
prototype.isof['Heredoc'] = {
version: '0.0.0-unspecified',
isa: isa,
context: __context
};
prototype.__tobelocked = prototype.__tobelocked.concat(["'Instantiate'", "isa"]);
prototype.__tobefrozen = prototype.__tobefrozen.concat(["isof"]);
var $1g = prototype['Instantiate'] || function() {};
prototype['Instantiate'] = function(p) {
var $6, $5, $4, $3, _a, $ = this['Instantiate'] ? this : $bindfail('Instantiate'); {
_a = [];
var $5 = [1, 2];
if (undefined === $5) $5 = [];
var $2 = $5.length;
if ($2) {
var $3, $4 = 0;
for (; $4 < $2; $4++) {
$3 = $5[$4];
_a = $AI.concat_op(_a, 'a fine thing ' + $3, true);
}
}
}
};
$AI.finalizePrototype(prototype);
if (prototype.isof[prototype.isa].type === "singleton") { prototype.Constructor(); prototype.Instantiate(); }
var result=prototype.isof[prototype.isa].type === "main" ? prototype.constructor() : prototype;
exports=result; try { module.exports=result; } catch(e) {};
return result;