Dynamic name attributes #818
Unanswered
ragnaroktomorrow
asked this question in
Pattern Language Q&A
Replies: 1 comment
-
Related: WerWolv/PatternLanguage#16 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to use the name attribute dynamically? Using constant, hard coded strings works ([[name("name")]], but whenever I use anything else in the parentheses, such as a std::format() or a reference to string data, the interpreter responds with "Expected ']]' after attribute, got Separator (()".
The reported syntax error isn't quite accurate since even when using a constant string, the name attribute will be followed by an open-parentheses. This makes me wonder if it might already be possible to do this but the interpreter is just hitting an edge case since not all attributes have arguments.
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions