You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use something along this line in my configuration. While I could manually expand $base_dir and $local_dir having to expand $name would require using an external template engine.
The problem I encountered is that the UCL parser creates a new temporary parser to parse the macro options into a UCL object passed to the registered macro callback. The temporary parser created on behalf of the macro doesn't inherit anything registered with the outer parser (variables, macros, undefined variable handlers, etc.). My preferred solution to this would be a new parser option to have the outer parser register anything registered with it with the temporary parser before having it parse the macro options unless there is a better way I missed.
The text was updated successfully, but these errors were encountered:
Crest
changed the title
Feature request: A parser option to expand variables inside marco variables.
Feature request: A parser flag to expand variables inside marco options.
Apr 13, 2023
I would like to use something along this line in my configuration. While I could manually expand
$base_dir
and$local_dir
having to expand$name
would require using an external template engine.The problem I encountered is that the UCL parser creates a new temporary parser to parse the macro options into a UCL object passed to the registered macro callback. The temporary parser created on behalf of the macro doesn't inherit anything registered with the outer parser (variables, macros, undefined variable handlers, etc.). My preferred solution to this would be a new parser option to have the outer parser register anything registered with it with the temporary parser before having it parse the macro options unless there is a better way I missed.
The text was updated successfully, but these errors were encountered: