diff options
Diffstat (limited to '')
| -rw-r--r-- | src/moonc.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/moonc.cpp b/src/moonc.cpp index 02d5275..4498bee 100644 --- a/src/moonc.cpp +++ b/src/moonc.cpp | |||
| @@ -22,14 +22,13 @@ int main(int narg, const char** args) { | |||
| 22 | " -p Write output to standard out\n" | 22 | " -p Write output to standard out\n" |
| 23 | " -b Dump compile time (doesn't write output)\n" | 23 | " -b Dump compile time (doesn't write output)\n" |
| 24 | " -l Write line numbers from source codes\n" | 24 | " -l Write line numbers from source codes\n" |
| 25 | " -a Allow expression list not in the end of body block\n" | ||
| 26 | " -s Use space over tab\n" | ||
| 27 | " -v Print version\n"; | 25 | " -v Print version\n"; |
| 28 | if (narg == 0) { | 26 | if (narg == 0) { |
| 29 | std::cout << help; | 27 | std::cout << help; |
| 30 | return 0; | 28 | return 0; |
| 31 | } | 29 | } |
| 32 | MoonP::MoonConfig config; | 30 | MoonP::MoonConfig config; |
| 31 | config.reserveLineNumber = false; | ||
| 33 | bool writeToFile = true; | 32 | bool writeToFile = true; |
| 34 | bool dumpCompileTime = false; | 33 | bool dumpCompileTime = false; |
| 35 | std::string targetPath; | 34 | std::string targetPath; |
| @@ -37,18 +36,9 @@ int main(int narg, const char** args) { | |||
| 37 | std::list<std::string> files; | 36 | std::list<std::string> files; |
| 38 | for (int i = 1; i < narg; ++i) { | 37 | for (int i = 1; i < narg; ++i) { |
| 39 | switch (hash(args[i])) { | 38 | switch (hash(args[i])) { |
| 40 | case "-a"_id: | ||
| 41 | config.allowExprNotInTheEndOfBody = true; | ||
| 42 | break; | ||
| 43 | case "-s"_id: | ||
| 44 | config.spaceOverTab = true; | ||
| 45 | break; | ||
| 46 | case "-l"_id: | 39 | case "-l"_id: |
| 47 | config.reserveLineNumber = true; | 40 | config.reserveLineNumber = true; |
| 48 | break; | 41 | break; |
| 49 | case "-r"_id: | ||
| 50 | config.reuseVariable = true; | ||
| 51 | break; | ||
| 52 | case "-p"_id: | 42 | case "-p"_id: |
| 53 | writeToFile = false; | 43 | writeToFile = false; |
| 54 | break; | 44 | break; |
