Gracefully handle yet another typo.
This commit is contained in:
Kartik K. Agaram 2016-11-29 18:33:46 -08:00
parent c76b0066fb
commit 07c594ebdd
3 changed files with 10 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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