xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/d/dmd/aliasthis.h (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1*627f7eb2Smrg 
2*627f7eb2Smrg /* Compiler implementation of the D programming language
3*627f7eb2Smrg  * Copyright (C) 2009-2019 by The D Language Foundation, All Rights Reserved
4*627f7eb2Smrg  * written by Walter Bright
5*627f7eb2Smrg  * http://www.digitalmars.com
6*627f7eb2Smrg  * Distributed under the Boost Software License, Version 1.0.
7*627f7eb2Smrg  * http://www.boost.org/LICENSE_1_0.txt
8*627f7eb2Smrg  * https://github.com/dlang/dmd/blob/master/src/aliasthis.h
9*627f7eb2Smrg  */
10*627f7eb2Smrg 
11*627f7eb2Smrg #pragma once
12*627f7eb2Smrg 
13*627f7eb2Smrg #include "dsymbol.h"
14*627f7eb2Smrg 
15*627f7eb2Smrg /**************************************************************/
16*627f7eb2Smrg 
17*627f7eb2Smrg class AliasThis : public Dsymbol
18*627f7eb2Smrg {
19*627f7eb2Smrg public:
20*627f7eb2Smrg    // alias Identifier this;
21*627f7eb2Smrg     Identifier *ident;
22*627f7eb2Smrg 
23*627f7eb2Smrg     AliasThis(Loc loc, Identifier *ident);
24*627f7eb2Smrg 
25*627f7eb2Smrg     Dsymbol *syntaxCopy(Dsymbol *);
26*627f7eb2Smrg     void semantic(Scope *sc);
27*627f7eb2Smrg     const char *kind() const;
isAliasThis()28*627f7eb2Smrg     AliasThis *isAliasThis() { return this; }
accept(Visitor * v)29*627f7eb2Smrg     void accept(Visitor *v) { v->visit(this); }
30*627f7eb2Smrg };
31