diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-16 21:14:16 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-16 21:14:16 -0700 |
commit | 3a787ca752d2b931c71ed6f34a5aecbf40b8be23 (patch) | |
tree | e8fd9aa26ae02f35012a9f4b3e7f8506c76c6080 /cpp/011load | |
parent | 37e4573b9382707a0c345246d7507dc269bd0df3 (diff) | |
download | mu-3a787ca752d2b931c71ed6f34a5aecbf40b8be23.tar.gz |
935 - permit '{' and '}' as legal labels
Diffstat (limited to 'cpp/011load')
-rw-r--r-- | cpp/011load | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/011load b/cpp/011load index 0891a247..9806bfd0 100644 --- a/cpp/011load +++ b/cpp/011load @@ -70,9 +70,8 @@ bool next_instruction(istream& in, instruction* curr) { return false; // end of recipe } - if (words.size() == 1 && *(words[0].end()-1) == ':') { + if (words.size() == 1 && !isalnum(words[0][0])) { curr->is_label = true; - words[0].erase(words[0].end()-1); curr->label = words[0]; trace("parse") << "label: " << curr->label; return !in.eof(); @@ -153,9 +152,9 @@ void skip_comma(istream& in) { :(scenario parse_label) recipe main [ - foo: + +foo ] -+parse: label: foo ++parse: label: +foo -parse: instruction: 1 :(scenario parse_multiple_products) |