Пример #1
0
        protected internal override CapnpUsing VisitUsing(CapnpUsing @using)
        {
            if (@using.Target is CapnpImport)
            {
                @using.Target = _ResolveImport((CapnpImport)@using.Target);
                if (@using.Target == null)
                {
                    throw new Exception("failed to resolve import"); // todo
                }
            }

            return(base.VisitUsing(@using));
        }
Пример #2
0
 protected internal virtual CapnpUsing VisitUsing(CapnpUsing @using)
 {
     @using.Target = Visit(@using.Target);
     return(@using);
 }
Пример #3
0
        // This is OK, in case of using t = import "x"
        //private Boolean _mVisitingModule;

        //protected internal override CapnpModule VisitModule(CapnpModule module)
        //{
        //   if (_mVisitingModule) throw new InvalidOperationException("already visiting a module");
        //   _mVisitingModule = true;
        //   var m = base.VisitModule(module);
        //   _mVisitingModule = false;
        //   return m;
        //}

        protected internal override CapnpUsing VisitUsing(CapnpUsing @using)
        {
            return(base.VisitUsing(@using));
        }