Пример #1
0
        protected internal override CapnpModule VisitModule(CapnpModule module)
        {
            if (mActiveModule != null && mActiveModule != module) return module;

             mCurrentScope = module;
             var m = base.VisitModule(module);
             mCurrentScope = m;
             return m;
        }
        protected internal override CapnpModule VisitModule(CapnpModule module)
        {
            if (mActiveModule != null && mActiveModule != module)
            {
                return(module);
            }

            mCurrentScope = module;
            var m = base.VisitModule(module);

            mCurrentScope = m;
            return(m);
        }
Пример #3
0
        protected internal virtual CapnpModule VisitModule(CapnpModule module)
        {
            // An imported module has already been processed.
             if (mActiveModule != null && mActiveModule != module) return module;
             mActiveModule = module;

             module.Structs = module.Structs.Select(s => VisitStruct(s)).ToArray();
             module.Interfaces = module.Interfaces.Select(i => VisitInterface(i)).ToArray();
             module.Constants = module.Constants.Select(c => VisitConst(c)).ToArray();
             module.Enumerations = module.Enumerations.Select(e => VisitEnum(e)).ToArray();
             module.AnnotationDefs = module.AnnotationDefs.Select(a => VisitAnnotationDecl(a)).ToArray();
             module.Usings = module.Usings.Select(u => VisitUsing(u)).ToArray();
             module.Annotations = module.Annotations.Select(a => VisitAnnotation(a)).ToArray();
             return module;
        }
 public ReferenceResolutionVisitor(CapnpModule module)
     : base()
 {
     _mModule = module;
 }
Пример #5
0
 protected internal override CapnpModule VisitModule(CapnpModule module)
 {
     if (_mModule != null) return module; // the case e.g. in using T = import "x"
      _mModule = module;
      return base.VisitModule(module);
 }