Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
 }
 public ReferenceResolutionVisitor(CapnpModule module)
     : base()
 {
     _mModule = module;
 }