# Parser bug

**URL:** https://www.finalbuilder.com/forums/t/parser-bug/4641
**Category:** Bugs
**Created:** [March 13, 2007, 12:20pm UTC](https://www.finalbuilder.com/forums/t/parser-bug/4641 "2007-03-13T12:20:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [March 13, 2007, 12:20pm UTC](https://www.finalbuilder.com/forums/t/parser-bug/4641/1 "2007-03-13T12:20:37Z")

</div>

Hello everyone,  
  
The parser ahs a bug with escape sequences in Javascript. When you try to enter   
  
&nbsp;&nbsp;&nbsp; somestring.substr(somestring.lastIndexOf("\")+1);  
  
the parser will treat the tail of the expression as an unterminated string.&nbsp; 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!

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [March 14, 2007, 12:30pm UTC](https://www.finalbuilder.com/forums/t/parser-bug/4641/2 "2007-03-14T12:30:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [March 16, 2007, 11:47am UTC](https://www.finalbuilder.com/forums/t/parser-bug/4641/3 "2007-03-16T11:47:42Z")

</div>

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 🙂  
  
Cheers!

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [March 20, 2007, 4:35am UTC](https://www.finalbuilder.com/forums/t/parser-bug/4641/4 "2007-03-20T04:35:13Z")

</div>

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