Haxe code generator model

141 views
Skip to first unread message

daniel

unread,
Dec 20, 2016, 6:04:43 AM12/20/16
to Haxe

According to the book "code generation in action" there exist 6 categories of code generator models: Code munger, Inline code expander, Mixed code generator, Partial class generator, Tier generator and Full-domain language.

In my opinion Haxe compilers are Code mungers that transform  an input file written in Haxe to different languages but I am not sure.

I was wondering how the code transformation within Haxe is done?

Which class of generators corresponds to the Haxe generator?

Benjamin Dubois

unread,
Dec 20, 2016, 2:20:18 PM12/20/16
to Haxe
​If you don't want to go to the sources
you can still have an introduction here

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Hugh

unread,
Dec 20, 2016, 11:16:26 PM12/20/16
to Haxe
I'm not sure about your classifications, but haxe performs the maximum amount of code re-writing possible. It fully understands the source code and can create new classes and move code around if it so desires.  So it is much more than a "munger" - I guess "full-domain".

Hugh

Seb

unread,
Dec 21, 2016, 9:15:10 AM12/21/16
to Haxe
Hi,
in my opinion haxe is not a code generation tool, its a transpiler.
but macros in haxe can be used as code generation
Reply all
Reply to author
Forward
0 new messages