es5 javascript syntax support

Browse, download and discuss plugins for Blumentals code editors

es5 javascript syntax support

Postby reslear » Sun Apr 09, 2017 10:47 am

add in to html and javascrip XS file:
Code: Select all
// es5 by ReSLeaR-

//var
sjsnormal2 'let'          sjsnormal tjsresword
sjsnormal2 'const'        sjsnormal tjsresword
sjsnormal 'let'          sjsnormal tjsresword
sjsnormal 'const'        sjsnormal tjsresword

//strings
sjsnormal   \`                    sjsstring2    tjsstring
sjsnormal2  \`                    sjsstring2    tjsstring
sjsstring2  [^\`]*                sjsstring2    tjsstring
sjsstring2  \`                    sjsnormal     tjsstring
sjsstring2  \`\`                  sjsstring2    tjsstring
sjsstring2  \\\\                  sjsstring2    tjsstring
sjsstring2  \\\`                  sjsstring2    tjsstring
sjsstring2  \\[^\\]               sjsstring2    tjsstring
sjsstring2  $                     sjsnormal     tjsstring


how to hightlight ${output} in

Image
Code: Select all
body: `Файл <b>${output}</b> скомпилирован, нажмите что бы открыть в проводнике.`,


and {dialog, shell} in

Code: Select all
const {dialog, shell} = require('electron');

Image

please help
reslear
 
Posts: 6
Joined: Sat Nov 12, 2016 10:46 am
Location: Belarus Minsk

Re: es5 javascript syntax support

Postby Aivars » Mon Apr 10, 2017 3:53 pm

The red line is because jslint does not support that syntax. I can't suggest any way to get rid of that except to disable JS error checking for now.

Thank you for JS syntax update suggestions, we were planning to do this, so we might as well use your modifications. Thanks again!
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1938
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: es5 javascript syntax support

Postby reslear » Tue Apr 11, 2017 12:27 am

eslint update is planned?
reslear
 
Posts: 6
Joined: Sat Nov 12, 2016 10:46 am
Location: Belarus Minsk

Re: es5 javascript syntax support

Postby Aivars » Tue Apr 11, 2017 10:00 am

The problem is that JSLint is a 3rd party application and it hasn't been updated. We need to be looking for a replacement. Any suggestions?
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1938
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: es5 javascript syntax support

Postby pmk65 » Tue Apr 11, 2017 5:43 pm

Aivars wrote:The problem is that JSLint is a 3rd party application and it hasn't been updated. We need to be looking for a replacement. Any suggestions?


JSHint. That's the "standard" Javascript Linter today. Much better than the original JSLint by Douglas Crockford.
It support ECMAScript 3 to 6 and development is active. http://jshint.com/about/

Only "problem" is that it requires Nodejs.. But maybe it's time to implement Nodejs support in WeBuilder? :roll:

I have written a JSHint plugin that can be used to check scripts for errors. (You'll need to integrate JSHint differently in order to check for syntax errors at runtime)
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 326
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: es5 javascript syntax support

Postby Aivars » Tue Apr 11, 2017 5:47 pm

The problem with node.js is the size. I'll look into it, maybe there's some compact way to do it.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 1938
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: es5 javascript syntax support

Postby pmk65 » Tue Apr 11, 2017 5:52 pm

Aivars wrote:The problem with node.js is the size. I'll look into it, maybe there's some compact way to do it.


The size of Nodejs installer is around 10Mb/11Mb so it's not that bad. https://nodejs.org/en/download/
And it's a 1-time installation.

The Nodejs script (like JSHint) are fairly small in size.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 326
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark


Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 1 guest