Ejemplo n.º 1
0
            public AbstractType Visit(DModule mod)
            {
                if (typeBase != null && typeBase.ToString() != mod.ModuleName)
                {
                    var pack = ctxt.ParseCache.LookupPackage(typeBase.ToString()).FirstOrDefault();
                    if (pack != null)
                    {
                        return(new PackageSymbol(pack, typeBase));
                    }
                }

                return(new ModuleSymbol(mod, typeBase));
            }
Ejemplo n.º 2
0
        public ulong Accept(ISyntaxRegion sr)
        {
            if (sr is INode)
            {
                return((sr as INode).Accept(this));
            }
            if (sr is IExpression)
            {
                return((ulong)sr.ToString().GetHashCode());                // Temporary bypass
                //return (sr as IExpression).Accept(this);
            }
            if (sr is IStatement)
            {
                return((sr as IStatement).Accept(this));
            }
            if (sr is ITypeDeclaration)
            {
                return((sr as ITypeDeclaration).Accept(this));
            }
            if (sr is DAttribute)
            {
                return((sr as DAttribute).Accept(this));
            }

            throw new InvalidOperationException();
        }