]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-lexer.cc
Add comment for Lily_lexer::set_identifier.
[lilypond.git] / lily / lily-lexer.cc
index 3d51d54903c8a29f553eb3271c5421ce3927a14d..1af201d43495e1d70cf67f86794c0197b2d5635d 100644 (file)
@@ -270,11 +270,13 @@ Lily_lexer::new_input (string str, Sources *ss)
   Includable_lexer::new_input (str, ss);
 }
 
+// PATH is either a single symbol (or string) or a list of symbols
+// giving the path to a nested property.  A symbol is treated the same
+// as a list of length 1.
 void
-Lily_lexer::set_identifier (SCM path, SCM s)
+Lily_lexer::set_identifier (SCM path, SCM val)
 {
   SCM sym = path;
-  SCM val = s;
   if (scm_is_string (path))
     sym = scm_string_to_symbol (path);
   else if (scm_is_pair (path))
@@ -297,7 +299,7 @@ Lily_lexer::set_identifier (SCM path, SCM s)
        {
          SCM prev = scm_module_lookup (mod, sym);
          if (prev != SCM_UNDEFINED)
-           val = nested_property_alist (prev, path, s);
+           val = nested_property_alist (prev, path, val);
        }
       scm_module_define (mod, sym, val);
     }