Snowfakery icon indicating copy to clipboard operation
Snowfakery copied to clipboard

More forgiving parsing of functions

Open prescod opened this issue 4 years ago • 0 comments

Snowfakery represents functions with keyword arguments as a dict with a single key/value pair like this:

choice:
            when: ${{HomePhone!=NULL}}
            pick: Home

Which is the YAML equivalent of:

{choice: {"when": "${{HomePhone!=NULL}}", "pick", "Home"}}

Because Snowfakery often left-align keys, users often try to type:

choice:
when: ${{HomePhone!=NULL}}
pick: Home

This patch allows that syntax.

prescod avatar Jul 14 '21 21:07 prescod