about summary refs log tree commit diff stats
path: root/cpp/011load.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/011load.cc')
-rw-r--r--cpp/011load.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/011load.cc b/cpp/011load.cc
index 9afe370e..df64cae7 100644
--- a/cpp/011load.cc
+++ b/cpp/011load.cc
@@ -91,7 +91,7 @@ bool next_instruction(istream& in, instruction* curr) {
     return false;  // end of recipe
   }
 
-  if (words.size() == 1 && !isalnum(words[0][0])) {
+  if (words.size() == 1 && !isalnum(words[0][0]) && words[0][0] != '$') {
     curr->is_label = true;
     curr->label = words[0];
     trace("parse") << "label: " << curr->label;
@@ -256,6 +256,12 @@ recipe main [
 ]
 +parse: label: +foo
 
+:(scenario parse_dollar_as_recipe_name)
+recipe main [
+  $foo
+]
++parse: instruction: $foo
+
 :(scenario parse_multiple_properties)
 recipe main [
   1:integer <- copy 23:literal/foo:bar:baz