|
From: | Urs Liska |
Subject: | Re: Having trouble understanding optional and variable amount of arguments |
Date: | Thu, 8 Mar 2018 16:52:34 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Am 08.03.2018 um 16:42 schrieb Stefano
Troncaro:
I have forgotten one thing that I've only halfway completed by now: "accepted" properties without type checking. Currently, if the "strict" flag is set, only keys present in the rules are accepted. But these are also expected, so what's still missing is a way to specify rules as optional so we can filter unknown properties but still have optional ones. I've started on it and I think I know how to do it but I had to leave the computer.
If I'm not mistaken completely this part may seem somewhat ambigous. If you simply type some characters (in LilyPond) they are initially a string. But if you make the parser "expect" something at a given point it will parse it like that. if you define an argument for a define-something-function as symbol? then plain characters will be parsed as a symbol. But in the key=value parts of a \with block they are parsed as string. This is something one just has to know - just like the fact that you have to enclose a string in quotes if it contains spaces or similar issues. Best Urs
|
[Prev in Thread] | Current Thread | [Next in Thread] |