예제 #1
0
파일: JSAstVisitor.cs 프로젝트: xen2/JSIL
            public static VisitorCache Get(JSAstVisitor visitor)
            {
                var visitorType = visitor.GetType();

                return(VisitorCaches.GetOrCreate(
                           visitorType, () => new VisitorCache(visitorType)
                           ));
            }
예제 #2
0
            public static VisitorCache Get(JSAstVisitor visitor)
            {
                var visitorType = visitor.GetType();
                var vc          = VisitorCaches.Value;

                VisitorCache result;

                if (!vc.TryGetValue(visitorType, out result))
                {
                    vc.Add(visitorType, result = new VisitorCache(visitorType));
                }

                return(result);
            }
예제 #3
0
 public void Visit(JSAstVisitor @this, JSNode node)
 {
     Method((TVisitor)@this, (TNode)node);
 }
예제 #4
0
파일: JSAstVisitor.cs 프로젝트: ilmsg/JSIL
            public static VisitorCache Get(JSAstVisitor visitor)
            {
                var visitorType = visitor.GetType();

                return(VisitorCaches.GetOrCreate(visitorType, CreateCacheEntry));
            }