示例#1
0
文件: infer.js 项目: 81218wbh/core
 "ObjectInit(inits)", function(b) {
     var v = instantiate(lookupValue("es5:Object"));
     b.inits.filter('PropertyInit(prop, e)', function(b) {
       scope.inferValues(b.e).forEach(function(val) {
         v.fieldHint(b.prop.value, val);
       });
     });
     values = [v];
   },
示例#2
0
文件: infer.js 项目: 81218wbh/core
 vs.forEach(function(fn) {
   var value = instantiate(fn);
   var fargs = fn.getFargs();
   var funScope = handleFunction(fn, scope, value);
   for(var i = 0; i < b.args.length; i++) {
     scope.inferValues(b.args[i]).forEach(function(v) {
       funScope.hint(fargs[i].value, v);
     });
   }
   inferAllTypes(funScope, fn.getBody());
   values.push(value);
 });
示例#3
0
文件: infer.js 项目: 81218wbh/core
 "Array(_)", function() {
     values = [instantiate(lookupValue("es5:Array"))];
     return this;
   },
示例#4
0
文件: infer.js 项目: 81218wbh/core
 "False()", function() {
     values = [instantiate(lookupValue("es5:Boolean"))];
     return this;
   },
示例#5
0
文件: infer.js 项目: 81218wbh/core
 "Num(_)", function() {
     values = [instantiate(lookupValue("es5:Number"))];
     return this;
   },
示例#6
0
文件: infer.js 项目: 81218wbh/core
 "String(_)", function() {
     values = [instantiate(lookupValue("es5:String"))];
     return this;
   },
示例#7
0
文件: infer.js 项目: 81218wbh/core
 vs.forEach(function(v) {
   v.fieldHint(b.prop.value, instantiate(lookupValue("es5:Function")));
 });