web stats
ES6 Syntax Highlighting - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2019, 06:33 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 03-08-2019, 08:11 AM
akathol akathol is offline
Mirth Newb
 
Join Date: Sep 2014
Location: OR, USA
Posts: 10
akathol is on a distinguished road
Default

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).

Last edited by akathol; 03-08-2019 at 08:24 AM.
Reply With Quote
  #3  
Old 05-28-2019, 02:27 AM
mdehoog mdehoog is offline
Mirth Guru
 
Join Date: Mar 2011
Location: Apeldoorn the Netherlands
Posts: 284
mdehoog is on a distinguished road
Send a message via Skype™ to mdehoog
Default

Seems Rhino does not support the Template literals.
__________________
X Connections
https://documentor.email
https://www.x-connections.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:04 AM.


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