App Designer JavaScript parser not liking single line commen

Posted by riche on 27-Mar-2015 09:58

Does anyone else have this problem? It's not like it is stopping me, but it hides "real" issues.

With a recent update there are two issues with it failing to parse the rest of the file correctly due to it not handling them properly.

1. single line comments:

2. Functions using regular expressions:

Posted by egarcia on 27-Mar-2015 11:00

Hello,

It looks like the lint tool used by the JavaScritpt editor has some issues parsing some constructions.

From what I can see in your code, using single line comment from within an object definition and using regular expressions.

(However, it looks like it is combination of some constructions not necessarily just regular expressions.)

I would suggest to report this issue to Technical Support.

A possible workaround for the issue with regular expressions would be to use new RegExp(pattern [, flags]) instead of using the syntax for a regular expression.

I hope this helps.

All Replies

Posted by egarcia on 27-Mar-2015 11:00

Hello,

It looks like the lint tool used by the JavaScritpt editor has some issues parsing some constructions.

From what I can see in your code, using single line comment from within an object definition and using regular expressions.

(However, it looks like it is combination of some constructions not necessarily just regular expressions.)

I would suggest to report this issue to Technical Support.

A possible workaround for the issue with regular expressions would be to use new RegExp(pattern [, flags]) instead of using the syntax for a regular expression.

I hope this helps.

Posted by riche on 27-Mar-2015 11:51

Thanks for the info. Yes, I can use new RegExp to get rid of it and change to /* */ comment syntax for workarounds.

I submitted a ticket.

This thread is closed