root/trunk/minidc.d

Revision 227, 1.8 kB (checked in by JarrettBillingsley, 10 months ago)

Updated minidc to actually say the version instead of 'beta'. Also verified to work with DMD 1.023

Line 
1 /******************************************************************************
2 License:
3 Copyright (c) 2007 Jarrett Billingsley
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the
7 use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it freely,
11 subject to the following restrictions:
12
13     1. The origin of this software must not be misrepresented; you must not
14     claim that you wrote the original software. If you use this software in a
15     product, an acknowledgment in the product documentation would be
16     appreciated but is not required.
17
18     2. Altered source versions must be plainly marked as such, and must not
19     be misrepresented as being the original software.
20
21     3. This notice may not be removed or altered from any source distribution.
22 ******************************************************************************/
23
24 module minidc;
25
26 import minid.compiler;
27 import minid.types;
28 import minid.utils;
29
30 import tango.io.Stdout;
31
32 void printUsage()
33 {
34     Stdout.formatln("MiniD Compiler v{}.{}", MiniDVersion >> 16, MiniDVersion & 0xFFFF).newline;
35     Stdout.newline;
36     Stdout("Usage:").newline;
37     Stdout("\tminidc filename").newline;
38     Stdout.newline;
39     Stdout("This program is very straightforward.  You give it the name of a .md").newline;
40     Stdout("file, and it will compile the module and write it to a binary .mdm file.").newline;
41     Stdout("The output file will have the same name as the input file but with the").newline;
42     Stdout(".mdm extension.").newline;
43 }
44
45 void main(char[][] args)
46 {
47     if(args.length != 2)
48     {
49         printUsage();
50         return;
51     }
52
53     compileModule(args[1]).writeToFile(args[1] ~ "m");
54 }
Note: See TracBrowser for help on using the browser.