On Sun, 07 Jun 2015 23:09:31 -0700, <d...@gnu.org> wrote:

So your problem appears to be that you understand the code but it does
something you did not expect.  Cross-check from the user end with the
"Extending LilyPond" guide's explanation of optional arguments.

It is Extending section 2.2.2.  Yuck.  A comment pointing to Extending-2.2.2 
would help.

The behavior in the parser is forced because LilyPond uses no delimiters for 
the arguments to a function.  Scheme has delimiters so you know where the end 
of the argument list is, so we could use a simpler rule for optional arguments 
in Scheme interface.

Or you could scan arguments using a recursive-descent method in C, so the 
parallel with the parser is maybe a bit more clear.

Or maybe advance through 'signature' to the next non-optional argument 
immediately upon using a default value, rather than setting 'skipping'.

The re-structuring I suggested was intended also to change the if-else 
branching so that you don't need the 'continue's.

https://codereview.appspot.com/244840043/


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to