2 /* Compiler implementation of the D programming language
3 * Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved
4 * written by Walter Bright
5 * https://www.digitalmars.com
6 * Distributed under the Boost Software License, Version 1.0.
7 * https://www.boost.org/LICENSE_1_0.txt
8 * https://github.com/dlang/dmd/blob/master/src/dmd/import.h
20 class Import final
: public Dsymbol
23 /* static import aliasId = pkg1.pkg2.id : alias1 = name1, alias2 = name2;
26 DArray
<Identifier
*> packages
; // array of Identifier's representing packages
27 Identifier
*id
; // module Identifier
29 int isstatic
; // !=0 if static import
30 Visibility visibility
;
32 // Pairs of alias=name to bind into current namespace
37 Package
*pkg
; // leftmost package/module
39 AliasDeclarations aliasdecls
; // corresponding AliasDeclarations for alias=name pairs
41 const char *kind() const override
;
42 Visibility
visible() override
;
43 Import
*syntaxCopy(Dsymbol
*s
) override
; // copy only syntax trees
44 Dsymbol
*toAlias() override
;
45 bool overloadInsert(Dsymbol
*s
) override
;
47 Import
*isImport() override
{ return this; }
48 void accept(Visitor
*v
) override
{ v
->visit(this); }