There were a few problems, due to the documentation of that feature and inconsistent style of the compiler options of haxe.
Also I "Keyword" and "String" are nearly the only tokens I've used, I did not find anything that would fit semanticaly better, but probably you have an idea?
Another thing I cant figure out, if there is any official MIME-type for hxml, so i left it open.
Also I am neither a pythonist nor a hg-user, so I want to excuse for any flaws that come with this patch and created it as a new branch just to be carful, also I am used to this behaviour, since I am using git and github on a regular basis.
Let me know your name (or whether you prefer "nobbz") if you'd like to be included in AUTHORS. I've moved the code into a new commit since there were a bunch of stylistic things I needed to change anyway, and it prevented having to transplant.
(I'm trying to figure out what to do with the pull request itself, I think it'll technically be "declined.")