annotate trunk/src/cmd/ImportGraph.d @ 364:1059295c2727

- Every command module has an execute method now. - Added module cmd.ImportGraph. - Renamed ModuleName to ModuleFQN. - Added module dil.Module. - Added member 'imports' to class Parser.
author aziz
date Fri, 31 Aug 2007 00:53:00 +0000
parents
children ed67acc82268
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
364
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
1 /++
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
2 Author: Aziz Köksal
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
3 License: GPL3
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
4 +/
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
5 module cmd.ImportGraph;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
6 import dil.SyntaxTree;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
7 import dil.Declarations;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
8 import dil.Token;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
9 import dil.Parser, dil.Lexer;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
10 import dil.File;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
11 import dil.Module;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
12
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
13 void execute(string fileName)
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
14 {
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
15 auto mod = new Module(fileName);
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
16 auto root = mod.root;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
17
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
18 Module[] modules;
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
19
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
20 foreach (decl; root.children)
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
21 {
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
22
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
23 }
1059295c2727 - Every command module has an execute method now.
aziz
parents:
diff changeset
24 }