[haXe] no empty statements?

Nicolas Cannasse ncannasse at motion-twin.com
Fri Apr 21 10:39:11 CEST 2006


> Hi Mike - and group...
> 
> Speaking of automatic code generation - any chances of something like a 
> "#line" directive, so:
>    #line 117 "foo.bar"
>    Math.sin("a string");
> gives me:
>    foo.bar:117: : characters 11-21 String should be Float
>    For function argument 'value'

Are you working on some kind of code generator targeting haXe ? :)
I don't see the usefulness of this feature for the standard haXe coder.

> A related point, the error messages in haXe are pretty good, and I like 
> the character position when I end up making large unwieldy lines. 
> Unfortunately, my editor prefers to count columns (ie with tab character 
> interpretation) instead of characters.  How about a -tabs <n> option for 
> haXe that interprets tab characters and changes the error message to:
>    foo.bar:117: : columns 18-28 String should be Float
>    For function argument 'value'

Unfortunately, haXe uses the positions reported by the OCaml lexer and
there is no way to change its behavior the way you want. The only
possibility would be to recount all characters by hand but that would be
a lot of work for a given specific problem.

I guess you should ask your editor author (or modify the
sources/configure it by yourself) to have which is IMHO a more correct
behavior, that is counting 1 char for one tab.

Nicolas



More information about the Haxe mailing list