Mercurial > projects > dang
comparison dang/compiler.d @ 176:dc9bf56b7ace
Can now use & as a unary operator and take an AddressOf
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Thu, 24 Jul 2008 23:03:18 +0200 |
parents | 7982eb63c0eb |
children | 08f68d684047 |
comparison
equal
deleted
inserted
replaced
175:c8e26556c24d | 176:dc9bf56b7ace |
---|---|
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 void checkFiles(char[][] *files) | 44 void checkFiles(char[][] *files) |
45 { | 45 { |
46 GC.disable(); | 46 // GC.disable(); |
47 bool non_existant_files = false; | 47 bool non_existant_files = false; |
48 bool duplicate_files = false; | 48 bool duplicate_files = false; |
49 | 49 |
50 char[][] validFiles; | 50 char[][] validFiles; |
51 | 51 |
114 "what-to-do", Opt.Action.StoreConst, "dot") | 114 "what-to-do", Opt.Action.StoreConst, "dot") |
115 .help("Output the AST in the dot format"); | 115 .help("Output the AST in the dot format"); |
116 argParse.addOption(["--ast-dump-code"], | 116 argParse.addOption(["--ast-dump-code"], |
117 "what-to-do", Opt.Action.StoreConst, "code") | 117 "what-to-do", Opt.Action.StoreConst, "code") |
118 .help("Output the AST as code"); | 118 .help("Output the AST as code"); |
119 argParse.addOption(["--semantic-only"], | |
120 "what-to-do", Opt.Action.StoreConst, "exit") | |
121 .help("Exit after semantics and before codegen"); | |
119 argParse.addOption(["--gen-llvm"], | 122 argParse.addOption(["--gen-llvm"], |
120 "what-to-do", Opt.Action.StoreConst, "gen-llvm") | 123 "what-to-do", Opt.Action.StoreConst, "gen-llvm") |
121 .help("Compile to LLVM code (default)"); | 124 .help("Compile to LLVM code (default)"); |
122 argParse.addOption(["-c"], | 125 argParse.addOption(["-c"], |
123 "what-to-do", Opt.Action.StoreConst, "compile") | 126 "what-to-do", Opt.Action.StoreConst, "compile") |
216 foreach ( m ; modules ) | 219 foreach ( m ; modules ) |
217 if (m.outputModule) | 220 if (m.outputModule) |
218 print.print(m); | 221 print.print(m); |
219 timings ~= Measurement("Converting AST to text", w.stop); | 222 timings ~= Measurement("Converting AST to text", w.stop); |
220 }); | 223 }); |
224 else if (what == "exit") | |
225 postSema.attach( | |
226 (Module[] modules, SourceManager sm) { | |
227 }); | |
221 StopWatch total; | 228 StopWatch total; |
222 total.start; | 229 total.start; |
223 | 230 |
224 Module[] modules; | 231 Module[] modules; |
225 | 232 |