diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-11-15 23:29:19 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-11-15 23:29:19 -0800 |
commit | 4b424bb2451621f05d2a22af8ae2f323da128ba3 (patch) | |
tree | f1475608e78c712051e8adc753d03e2992f0e199 | |
parent | 195a846b8ca7b5360c7d19d5d29746f0cee27576 (diff) | |
download | mu-4b424bb2451621f05d2a22af8ae2f323da128ba3.tar.gz |
3678 - complain about string labels
Thanks Jack Couch for running into this.
-rw-r--r-- | 011load.cc | 2 | ||||
-rw-r--r-- | 038new_text.cc | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/011load.cc b/011load.cc index 9daf8fef..d3f938ca 100644 --- a/011load.cc +++ b/011load.cc @@ -178,7 +178,7 @@ string next_word(istream& in) { bool is_label_word(const string& word) { assert(!word.empty()); - return !isalnum(word.at(0)) && string("$_*@&,=-").find(word.at(0)) == string::npos; + return !isalnum(word.at(0)) && string("$_*@&,=-[]()").find(word.at(0)) == string::npos; } bool ends_with(const string& s, const char c) { diff --git a/038new_text.cc b/038new_text.cc index 2bda16cf..493c1b50 100644 --- a/038new_text.cc +++ b/038new_text.cc @@ -62,6 +62,15 @@ int new_mu_text(const string& contents) { return result; } +//: a new kind of typo + +:(scenario string_literal_without_instruction) +% Hide_errors = true; +def main [ + [abc] +] ++error: main: instruction '[abc]' has no recipe + //: stash recognizes strings :(scenario stash_string) |