Parser bug

Hello everyone,

The parser ahs a bug with escape sequences in Javascript. When you try to enter

    somestring.substr(somestring.lastIndexOf("\")+1);

the parser will treat the tail of the expression as an unterminated string.  Javascript reference specifies that \ is a valid escape sequence.

Is there a valid workaround for this, other than trying to fetch an ascii code?

Hope to hear from you guys soon!

Hi Ignace,

You will probably find that this is just a bug in the syntax highlighting in the editor. Even though the highlighting is wrong, the script will still run fine.

If you want the rest of your scripts to highlight properly in the editor, a valid workaround is to put the “\” on another line, ie:

var backslash = “\”;
somestring.substr(somestring.lastIndexOf(backslash)+1);

We’ll look into fixing the highlighting some time soon.

Regards,

Angus


Yes, I found this out by myself and I’m pleased to say that the \ is not problematic during execution, but I just thought I’d mention it :slight_smile:

Cheers!

Hi ignace,

This bug has now been fixed. The fix will be available as of the next Automise 2 beta build.

Regards,


Angus