freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <daniel.dek...@gmail.com>
Subject Re: Freemarker template Introspection and ParserPlugin
Date Thu, 22 Oct 2020 11:43:07 GMT
I think at this point you might as well use the AST API that we have.
Generally (didn't check the thread) my concern was that if the AST API-s
are published, then they can't be refactored. But, they won't be in 2.x
anyway. I didn't even dare to do basic clean up there (like just rename
classes to have more helpful names), because someone might depends on the
classes that are public, but are documented to be internal API-s.

On Thu, Oct 22, 2020 at 10:38 AM Christoph Rüger <c.rueger@synesty.com>
wrote:

> Hi,
> i found this discussion
> https://sourceforge.net/p/freemarker/mailman/message/34258954/ and this
> repo https://github.com/cwong15/freemarker-introspection
>
> I wanted to ask the following things:
>
> 1. Where did this discussion go? Is there already something where one can
> get the AST for a template?
>
> We are currently investigating how we can access the AST to build a
> graphical visualization of an IF/ELSE Statement.
>
> Example:
> Imagine the user can enter something like "<#if (product.category == "foo"
> && product.price < 100)>true<#else>false</#if>
> We would like to extract the used variables and the operators to display
> this in a more visual way.
>
> I am looking for some kind of starting point for this.
>
> Thanks for hints,
> Christoph
>
> --
> Synesty GmbH
> Moritz-von-Rohr-Str. 1a
> 07745 Jena
> Tel.: +49 3641
> 5596493Internet: https://synesty.com <https://synesty.com>
> Informationen
> zum Datenschutz: https://synesty.com/datenschutz
> <https://synesty.com/datenschutz>
>
> Geschäftsführer: Christoph Rüger
> Unternehmenssitz: Jena
> Handelsregister B beim Amtsgericht: Jena
> Handelsregister-Nummer: HRB 508766
> Ust-IdNr.: DE287564982
>


-- 
Best regards,
Daniel Dekany

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message