1 2 /* Compiler implementation of the D programming language 3 * Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved 4 * written by Walter Bright 5 * http://www.digitalmars.com 6 * Distributed under the Boost Software License, Version 1.0. 7 * http://www.boost.org/LICENSE_1_0.txt 8 * https://github.com/dlang/dmd/blob/master/src/dmd/compiler.h 9 */ 10 11 #pragma once 12 13 #include "root/array.h" 14 15 // This file contains a data structure that describes a back-end compiler 16 // and implements compiler-specific actions. 17 18 class Expression; 19 class Module; 20 class Type; 21 struct Scope; 22 struct UnionExp; 23 24 // DMD-generated module `__entrypoint` where the C main resides 25 extern Module *entrypoint; 26 // Module in which the D main is 27 extern Module *rootHasMain; 28 29 struct Compiler 30 { 31 // CTFE support for cross-compilation. 32 static Expression *paintAsType(UnionExp *, Expression *, Type *); 33 // Backend 34 static void loadModule(Module *); 35 static void genCmain(Scope *); 36 static bool onImport(Module *); 37 }; 38