예제 #1
0
 public virtual void VisitImport(ImportStatement.ImportBinding i)
 {
     if (i.Alias != null)
     {
         i.Alias.Accept(this);
     }
     if (i.Symbol != null)
     {
         i.Symbol.Accept(this);
     }
 }
예제 #2
0
        public ImportSymbolAlias(ImportStatement impStmt, ImportStatement.ImportBinding imp, IBlockNode parentNode)
            : base(impStmt, parentNode)
        {
            ImportBinding = imp;
            var sym = imp.Symbol;

            Name         = (imp.Alias ?? sym).Id;
            NameLocation = (imp.Alias ?? sym).Location;
            Location     = imp.Symbol.Location;

            Type = new IdentifierDeclaration(sym.Id)
            {
                Location         = sym.Location,
                EndLocation      = sym.EndLocation,
                InnerDeclaration = impStmt.ImportBindList.Module.ModuleIdentifier
            };
        }