I am using Pebble version 3.2.2.
My goal is to implement a custom NodeVisitor for static analysis, such as collecting all variable names used within a template.
Pebble provides the NodeVisitor interface, which is perfect for this. However, there is no public API to access the AST's root node from a compiled PebbleTemplate. The implementation class, PebbleTemplateImpl, holds rootNode as a private field without a public getter.
This makes it impossible to initiate the AST traversal (i.e., rootNode.accept(myVisitor)), preventing the use of custom visitors.
To enable this powerful feature, could you please consider adding a public getter for the root node to PebbleTemplateImpl?
I am using Pebble version 3.2.2.
My goal is to implement a custom NodeVisitor for static analysis, such as collecting all variable names used within a template.
Pebble provides the NodeVisitor interface, which is perfect for this. However, there is no public API to access the AST's root node from a compiled PebbleTemplate. The implementation class, PebbleTemplateImpl, holds rootNode as a private field without a public getter.
This makes it impossible to initiate the AST traversal (i.e., rootNode.accept(myVisitor)), preventing the use of custom visitors.
To enable this powerful feature, could you please consider adding a public getter for the root node to PebbleTemplateImpl?