diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-11-29 18:33:46 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-11-29 18:33:46 -0800 |
commit | 07c594ebddbbe3fef8ba25fef19980c3e7e5f164 (patch) | |
tree | 88d61e2a19d4b5ff9b8e423b844b61b8cad09f7d | |
parent | c76b0066fb2ae01a28630662cb04a043cc5841cb (diff) | |
download | mu-07c594ebddbbe3fef8ba25fef19980c3e7e5f164.tar.gz |
3701
Gracefully handle yet another typo.
-rw-r--r-- | 011load.cc | 2 | ||||
-rw-r--r-- | 020run.cc | 1 | ||||
-rw-r--r-- | 047check_type_by_name.cc | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/011load.cc b/011load.cc index d3f938ca..451521f4 100644 --- a/011load.cc +++ b/011load.cc @@ -177,7 +177,7 @@ string next_word(istream& in) { } bool is_label_word(const string& word) { - assert(!word.empty()); + if (word.empty()) return false; // error raised elsewhere return !isalnum(word.at(0)) && string("$_*@&,=-[]()").find(word.at(0)) == string::npos; } diff --git a/020run.cc b/020run.cc index e72f5a4e..54b19c98 100644 --- a/020run.cc +++ b/020run.cc @@ -159,6 +159,7 @@ load_file_or_directory("core.mu"); :(before "End Commandline Parsing") // Check For .mu Files //? START_TRACING_UNTIL_END_OF_SCOPE +//? Dump_trace = true; if (argc > 1) { // skip argv[0] ++argv; diff --git a/047check_type_by_name.cc b/047check_type_by_name.cc index 96a703ce..83b80571 100644 --- a/047check_type_by_name.cc +++ b/047check_type_by_name.cc @@ -149,3 +149,11 @@ def main [ x/space:1 <- copy 35 ] $error: 0 + +:(scenario transform_handles_empty_reagents) +% Hide_errors = true; +def main [ + add * +] ++error: illegal name '*' +# no crash |