Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] RFC: Templates preprocessor syntax proposal

> On 05 Aug 2016, at 18:04, Doug Schaefer <dschaefer@xxxxxxxxxxxxxx> wrote:
> 
> ... Freemarker which probably does what you need.

hi Doug, thank you for the hint. 

unfortunately Freemarker introduces yet another xml-like language, while I would like to keep my templates in C/C++, and be able to reformat them at any time.

not to mention that as a principle I find difficult to understand why would someone invent a new scripting language when there is JavaScript.

when you'll be back in office, please read the details of my proposal at http://xcdl.github.io/work/preprocessor/

actually I would like to move more functionality to JavaScript, like the main template.xml, which, in my wizards, already reached a complexity level that makes it almost impossible to manage.

here is, for example, the STM32F4 template:

https://github.com/gnuarmeclipse/plug-ins/blob/develop/ilg.gnuarmeclipse.templates.stm/templates/stm32f4xx_exe_c_project/template.xml

I need to do some experiments, but I guess that a JavaScript version of it would be significantly shorter and easier to read. performance shouldn't be an issue, templates are instantiated rarely.

as I said, I think that the future belongs to JSON and JavaScript.

regards,

Liviu




Back to the top