Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var DefaultValue = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
}).methods({
param: function(fmparams) {
var self = this;
if(fmparams.name() == JsNode.FMPARAMS && fmparams.size()) {
var fnbody = fmparams.next().next().next().nid();
fmparams.leaves().forEach(function(sgname) {
if(sgname.name() == JsNode.SINGLENAME && sgname.size() == 2) {
var init = sgname.last();
if(init.name() == JsNode.INITLZ) {
define(function(require, exports, module){var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var Template = Class(function(jsdc) {
this.jsdc = jsdc;
}).methods({
parse: function(t) {
this.jsdc.ignore(t, 'template1');
var s = t.content();
var res = '"';
var has = false;
outer:
for(var i = 1; i < s.length - 1; i++) {
var c = s.charAt(i);
if(c == '\\') {
res += '\\';
define(function(require, exports, module){var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var ArrayCmph = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
}).methods({
parse: function(node, start) {
var self = this;
//忽略[]
if(start) {
self.hash[node.nid()] = {
id: '',
f: 0
};
define(function(require, exports, module){var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var DefaultValue = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
}).methods({
param: function(fmparams) {
var self = this;
if(fmparams.name() == JsNode.FMPARAMS && fmparams.size()) {
var fnbody = fmparams.next().next().next().nid();
fmparams.leaves().forEach(function(sgname) {
if(sgname.name() == JsNode.SINGLENAME && sgname.size() == 2) {
var init = sgname.last();
if(init.name() == JsNode.INITLZ) {
var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var Template = Class(function(jsdc) {
this.jsdc = jsdc;
}).methods({
parse: function(t) {
this.jsdc.ignore(t, 'template1');
var s = t.content();
var res = '"';
var has = false;
outer:
for(var i = 1; i < s.length - 1; i++) {
var c = s.charAt(i);
if(c == '\\') {
res += '\\';
var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var Forof = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
this.hash2 = {};
this.pos = {};
this.destruct = {};
}).methods({
parse: function(node, start) {
//有可能被Generator中改写过
if(node.gen) {
return;
define(function(require, exports, module){var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var Forof = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
this.hash2 = {};
this.pos = {};
this.destruct = {};
}).methods({
parse: function(node, start) {
//有可能被Generator中改写过
if(node.gen) {
return;
define(function(require, exports, module){var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var Obj = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
this.method = {};
this.temp = {};
}).methods({
propt: function(node, start) {
var objltr = node.parent();
if(objltr.name() == JsNode.OBJLTR) {
var prmr = objltr.parent();
var parent = prmr.parent();
var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('Token');
var Class = require('./util/Class');
var join = require('./join');
var Obj = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
this.method = {};
this.temp = {};
}).methods({
propt: function(node, start) {
var objltr = node.parent();
if(objltr.name() == JsNode.OBJLTR) {
var prmr = objltr.parent();
var parent = prmr.parent();
var homunculus = require('homunculus');
var JsNode = homunculus.getClass('Node', 'es6');
var Token = homunculus.getClass('token');
var Class = require('./util/Class');
var join = require('./join');
var eventbus = require('./eventbus');
var Generator = Class(function(jsdc) {
this.jsdc = jsdc;
this.hash = {};
this.star = {};
this.stmt = {};
}).methods({
parse: function(node, start) {
var self = this;
if(start) {
self.jsdc.ignore(node.leaf(1), 'gen1');