Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   General Discussion (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=7)
-   -   ES6 Syntax Highlighting (http://www.mirthcorp.com/community/forums/showthread.php?t=218991)

akathol 03-08-2019 06:33 AM

ES6 Syntax Highlighting
 
Any chance that with the 3.7 addition of the ES6 Javascript update that we'll also get a Javascript syntax highlighting to match the new capabilities?

Any way to implement this manually?

akathol 03-08-2019 08:11 AM

Also, I don't seem to be able to use all of the expected ES6 functionality. Has anyone asked this at one of the developer Q&A sessions?

Arrow functions [yes]
Use of let and const [yes]
Template literals [no]
Default parameters in functions [no]


When I try to use a template literal in a javascript filter/transform like this:
Quote:

logger.error(`testing`);
I get this validation error:
Quote:

Error in connector "sourceConnector" at filter rule 0 ("null"):
Error on line 12: illegal character: ` (a0fce48c-3f3c-4e1b-b04a-af285ac058ec#12).

When I try to create the following function:
Quote:

function testFunc(a, b = 3) {
return a+b;
}
logger.error(testFunc(4,6));
logger.error(testFunc(3));
I get this error:
Quote:

Error in connector "sourceConnector" at filter rule 0 ("null"):
Error on line 12: missing ) after formal parameters (801ba5ac-9ee5-46d0-9ca4-ec0277e5e68b#12).

mdehoog 05-28-2019 02:27 AM

Seems Rhino does not support the Template literals.


All times are GMT -8. The time now is 08:06 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation