Skip to content

Is there a way to parse a template to AST without registering all functions et.al? #540

Answered by ericmorand
adambrgmn asked this question in Q&A
Discussion options

You must be logged in to vote

@adambrgmn , I've faced this issue as well and I think it is a bad design decision from the language itself to allow for global functions: they create a confusion between the language semantic and the context passed at runtime.

Anyway, I have been wanting for long to add an option to the parser to prevent it from throwing an error when an unknown function or filter is found. I think it is time.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ericmorand
Comment options

Answer selected by ericmorand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants