From d02257ca88fcf63184fa904cf53be4fc9fc32a52 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 28 Jun 2010 00:21:45 +0200 Subject: [PATCH] read file to be compiled from command line arguments --- apps/mwcompiler/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mwcompiler/main.cpp b/apps/mwcompiler/main.cpp index 4932833a66..03cc5a62cd 100644 --- a/apps/mwcompiler/main.cpp +++ b/apps/mwcompiler/main.cpp @@ -17,7 +17,7 @@ int main (int argc, char **argv) Compiler::StreamErrorHandler errorHandler (std::cout); Compiler::FileParser parser (errorHandler, context); - std::ifstream file ("test.mwscript"); + std::ifstream file (argc>1 ? argv[1] : "test.mwscript"); Compiler::Scanner scanner (errorHandler, file); scanner.scan (parser);