Esempio n. 1
0
        public override IAnalysisSet Call(Node node, AnalysisUnit unit, IAnalysisSet @this, IAnalysisSet[] args)
        {
            if (_index < args.Length)
            {
                IAnalysisSet[] callbackArgs = new IAnalysisSet[_args.Length];
                for (int i = 0; i < _args.Length; i++)
                {
                    if (_types[i] == null)
                    {
                        _types[i] = LazyPropertyFunctionValue.ResolveMember(
                            node,
                            unit,
                            _args[i].Module,
                            _args[i].Member
                            ).Call(node, unit, null, ExpressionEvaluator.EmptySets);
                    }
                    callbackArgs[i] = _types[i];
                }
                args[_index].Call(node, unit, null, callbackArgs);
            }

            return(base.Call(node, unit, @this, args));
        }
 public NodejsModuleBuilder(string filename, JsAnalyzer analyzer) {
     _all = _serializer.DeserializeObject(File.ReadAllText(filename));
     _analyzer = analyzer;
     _readableStream = new LazyPropertyFunctionValue(_analyzer._builtinEntry, "readable", "stream");
     _writableStream = new LazyPropertyFunctionValue(_analyzer._builtinEntry, "writable", "stream");
 }