]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add comment for Lily_lexer::set_identifier.
authorJoe Neeman <joeneeman@gmail.com>
Sun, 10 Jan 2010 01:43:01 +0000 (12:43 +1100)
committerJoe Neeman <joeneeman@gmail.com>
Sun, 10 Jan 2010 01:51:29 +0000 (12:51 +1100)
lily/include/lily-lexer.hh
lily/lily-lexer.cc

index b660eb88315e18ee5cd08b0c7bc39f0006274c8a..1854252e7460c55a5749d475c0b0ef99d42ad271 100644 (file)
@@ -110,7 +110,7 @@ public:
   void push_note_state (SCM tab);
   void pop_state ();
   void LexerError (char const *);
-  void set_identifier (SCM name_string, SCM);
+  void set_identifier (SCM path, SCM val);
   int get_state () const;
   bool is_note_state () const;
   bool is_chord_state () const;
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);
     }