xref: /netbsd-src/external/gpl3/gcc/dist/gcc/d/dmd/staticassert.h (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 
2 /* Compiler implementation of the D programming language
3  * Copyright (C) 1999-2022 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/staticassert.h
9  */
10 
11 #pragma once
12 
13 #include "dsymbol.h"
14 
15 class Expression;
16 
17 class StaticAssert : public Dsymbol
18 {
19 public:
20     Expression *exp;
21     Expression *msg;
22 
23     StaticAssert *syntaxCopy(Dsymbol *s);
24     void addMember(Scope *sc, ScopeDsymbol *sds);
25     bool oneMember(Dsymbol **ps, Identifier *ident);
26     const char *kind() const;
isStaticAssert()27     StaticAssert *isStaticAssert() { return this; }
accept(Visitor * v)28     void accept(Visitor *v) { v->visit(this); }
29 };
30