Mercurial > projects > dil
view src/dil/CompilerInfo.d @ 810:525ee3f848d9
Added modules cmd.Compile and dil.ModuleManager.
Added options -I, -release and -unittest to the compile command.
Tidied main.d up a bit.
Renamed start() methods of SemanticPass1 and 2 to run().
Moved function findModuleFilePath() to class ModuleManager.
Added msg CouldntLoadModule. Corrected two others.
Added member semanticPass to class Module.
Implemented visit(ImportDeclaration) in SemanticPass1.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 11 Mar 2008 02:48:01 +0100 |
parents | bcb74c9b895c |
children |
line wrap: on
line source
/++ Author: Aziz Köksal License: GPL3 +/ module dil.CompilerInfo; version(D2) /// The major version number of this compiler. const uint VERSION_MAJOR = 2; else /// The major version number of this compiler. const uint VERSION_MAJOR = 1; /// The minor version number of this compiler. const uint VERSION_MINOR = 0; private char[] toString(uint x) { char[] str; do str = cast(char)('0' + (x % 10)) ~ str; while (x /= 10) return str; } private char[] toString(uint x, uint pad) { char[] str = toString(x); if (pad < str.length) return str; for (uint i = pad-str.length; i; i--) str = "0" ~ str; return str; } /// The compiler version formatted as a string. const char[] VERSION = toString(VERSION_MAJOR)~"."~toString(VERSION_MINOR, 3); /// The name of the compiler. const char[] VENDOR = "dil"; /// The global, default alignment size for struct fields. const uint DEFAULT_ALIGN_SIZE = 4; version(DDoc) const uint PTR_SIZE = 0; /// The pointer size depending on the platform. else version(X86_64) const uint PTR_SIZE = 8; // Pointer size on 64-bit platforms. else const uint PTR_SIZE = 4; // Pointer size on 32-bit platforms.