Haxe error: "invalid escape sequence"

371 views
Skip to first unread message

Daniel Glazman

unread,
Mar 5, 2014, 9:22:29 AM3/5/14
to haxe...@googlegroups.com
I would like to come back to an old message [1] posted here, back in
2007:

>> Haxe compiler 1.10 throws "invalid escape sequence" at the following
>> string escape sequences
>>
>> \f
>> \b
>> \v
>>
>> but this are valid escape sequences in javascript and I need to use them
>> in haxe (flash) for some communication and data conversion to the dojo
>> javascript framework
>>
>> is this a bug in haxe or does there exist a way to create strings which
>> accept this escape seqeunces ?
>
> This is not a bug, simply a choice not to include these rarely used
> sequences. Try using the following instead :
>
> \x09 for \b
> \x0B for \v
> \x0C for \f

If I understand the rationale for \b, I think the decision
above should be reverted for \f for \v. \f is ubiquitous when you start
writing a parser of some arbitrary language, whether your parser
is based on regexps or not. \v is super-common too.

[1] http://lists.motion-twin.com/pipermail/haxe/2007-January/005765.html

</Daniel>

Juraj Kirchheim

unread,
Mar 5, 2014, 10:41:25 AM3/5/14
to haxe...@googlegroups.com
Personally, I haven't heard about these escape sequences (let alone
used those characters) until now, so with the data available to me I
favor of the current decision. Maybe you could point us to some
examples (on github or whatever) that put these escape sequences to
good use.

Regards,
Juraj
> --
> 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/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages