summaryrefslogtreecommitdiff
path: root/note_compiler/main.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-06 23:31:51 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-06 23:31:51 +0100
commit892c323f7851c76bf678369987c5c7a361626ea2 (patch)
tree4393d75c4e9755defa41519488f335dcff9b2c59 /note_compiler/main.cpp
parente78131ccbbcb81da94e5992f788c6ea291a2050d (diff)
Added a rudimentary CLI to the note compiler + bugfix
Diffstat (limited to 'note_compiler/main.cpp')
-rw-r--r--note_compiler/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/note_compiler/main.cpp b/note_compiler/main.cpp
index 3015551..38302ef 100644
--- a/note_compiler/main.cpp
+++ b/note_compiler/main.cpp
@@ -802,9 +802,17 @@ void generate_source()
int main(int argc, char** argv)
{
- prog=parse("../../filtertest.prog");
+ try
+ {
+ cerr << "parsing '"<<argv[1]<<"'..." << endl;
+ prog=parse(argv[1]);
- generate_source();
+ generate_source();
+ }
+ catch(string err)
+ {
+ cerr << "FATAL: "<<err<<endl;
+ }
return 0;
}