Closed daykin closed 4 years ago
This input is not valid YAM!. You need some quotes.
Here's the fixed file below.
defmacro:
name: foo
args: [fooarg1, fooarg2, fooarg3]
value:
"{{fooarg1}}_{{fooarg2}}_{{fooarg3}}":
- something: "cool"
somethingelse: "neat"
---
defmacro:
name: bar
args: [arg1, arg2, newArg]
value:
"{{arg1}}_{{arg2}}":
- thisistoplevel: "OK"
- {foo: {fooarg1: "{{arg1}}", fooarg2: "{{arg2}}", fooarg3: nested}}
---
- { bar: {arg1: bogus, arg2: example, newArg: 1}}
Here's output
- bogus_example:
- thisistoplevel: OK
- bogus_example_nested:
- something: cool
somethingelse: neat
Please try the newest incarnation of this program here: goyamp It's faster and better :-) and runs the yamp code unchanged.
Let's say I want to do something like this:
I get an error attempting this, presumably because it doesn't actually perform macro expansion in the nested invocation:
Is this possible? I see a blurb about 'nesting' here but maybe that's a different use case than what I'm imagining.