Skip to content

Commit

Permalink
remove debug prints and add version
Browse files Browse the repository at this point in the history
  • Loading branch information
yeti0904 committed Apr 2, 2024
1 parent 1974d40 commit e80a5c5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Flags:
-O - Enables optimisation (only works properly with programs without errors)
-v VER - Enables VER as a version
-b BACKEND - Uses the given backend (backends listed below)
--version - Shows the callisto version
Backends:
rm86 - Real mode x86
Expand All @@ -45,8 +46,6 @@ int main(string[] args) {
string[] versions;
CompilerBackend backend = new BackendRM86();

writeln(backend.GetVersions());

for (size_t i = 1; i < args.length; ++ i) {
if (args[i][0] == '-') {
switch (args[i]) {
Expand Down Expand Up @@ -106,7 +105,7 @@ int main(string[] args) {
}

versions ~= args[i];
break;
return 0;
}
case "-b": {
++ i;
Expand All @@ -129,6 +128,10 @@ int main(string[] args) {
}
break;
}
case "--version": {
writeln("Callisto compiler beta 0.1");
break;
}
default: {
stderr.writefln("Unknown flag '%s'", args[i]);
return 1;
Expand All @@ -145,8 +148,6 @@ int main(string[] args) {
}
}

writeln(backend.GetVersions());

if (file == "") {
stderr.writeln("No source files");
return 1;
Expand All @@ -161,8 +162,6 @@ int main(string[] args) {
compiler.backend.orgSet = orgSet;

versions ~= compiler.backend.GetVersions();

writeln(backend.GetVersions());

auto preproc = new Preprocessor();
preproc.includeDirs = includeDirs;
Expand Down

0 comments on commit e80a5c5

Please sign in to comment.