1 /// Author: Aziz Köksal
2 /// License: GPL3
3 /// $(Maturity high)
4 module dil.Version;
5 
6 import dil.String : itoa;
7 
8 version(D2)
9   immutable VERSION_MAJOR_DEFAULT = 2;
10 else
11   immutable VERSION_MAJOR_DEFAULT = 1;
12 
13 /// The major version number of this compiler.
14 immutable VERSION_MAJOR = VERSION_MAJOR_DEFAULT;
15 /// The minor version number of this compiler.
16 immutable VERSION_MINOR = 0;
17 /// The optional suffix.
18 immutable VERSION_SUFFIX = "";
19 /// The compiler version formatted as a string.
20 immutable VERSION = (
21   (V => V[0] ~ "." ~ V[1..4])(itoa(VERSION_MAJOR*1000 + VERSION_MINOR)) ~
22   (VERSION_SUFFIX.length ? "-" ~ VERSION_SUFFIX : "")
23 ).idup;
24 /// The name of the compiler.
25 immutable VENDOR = "DIL";