-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to access the syntax tree #482
Comments
Found it. It's hidden by the IFluidTemplate interface. The concrete implementation has a 'Statements' property which exposes the AST. |
I was also looking for it, a little statement explaining that in the documentation would be nice. |
@guillaume86 Can you try to add that to the doc in a PR? |
Add a note in the README about accessing the cst. Fixes sebastienros#482.
Add a note in the README about accessing the cst. Fixes #482.
Note that this PR contains an updated AST and a visitor pattern which allows to detect specific elements in the template and also modify it. |
Could someone please clarify this section of the readme:
"Parses templates in a concrete syntax tree that lets you cache, analyze and alter the templates before they are rendered."
How can I access the syntax tree of a parsed template? I would like to analyze which values/props are being accessed.
Thanks
The text was updated successfully, but these errors were encountered: