macro to provide dom code completion to ide's?

54 views
Skip to first unread message

Chris Anderson

unread,
Apr 30, 2015, 7:58:45 AM4/30/15
to haxe...@googlegroups.com
taking inspiration from http://blog.stroep.nl/2014/01/haxe-macros/, are there any existing macros that can assist ide's by providing code completion at least for elements with an id?

Timothy Farrell

unread,
May 1, 2015, 8:45:54 AM5/1/15
to haxe...@googlegroups.com
Chris,

This is absolutely possible but you need access to the HTML file in question first.  To summarize, the macro would:

1) Read the html file
2) Parse out the elements with IDs
3) Add static inline fields to the class just like the example does for files.

Step 2 might be the hardest, I'm not sure of the best tool to do that in Haxe.

Cheers,
-tim

Chris Anderson

unread,
May 1, 2015, 9:40:35 AM5/1/15
to haxe...@googlegroups.com
appreciate the info.  was hoping someone like franco might have had some edge with this type of logic.  if i find some free time might take a stab at it myself.  seems like it could boost js dev interest in haxe. 

currently most of my spare time is in learning the google's polymer project and attempting to tie it in with haxe (just a personal mission of sorts).  imagine some dom code completion plus typed js with haxe plus minject plus webcomponents.  would be real nice for app development.
Reply all
Reply to author
Forward
0 new messages