XhmikosR / notepad2-mod

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting
https://xhmikosr.github.io/notepad2-mod/
Other
1.45k stars 270 forks source link

"short" is not a javascript keyword #219

Open ghost opened 6 years ago

ghost commented 6 years ago

seen here

https://github.com/XhmikosR/notepad2-mod/blob/30364fb5afb4e653bb6f7f42f1c7122cbe7ddf33/src/Styles.c#L616-L622

here is a sane list:

https://github.com/zufuliu/notepad2/blob/efe02fd4f532ba6159defcc1be54694d1ccdb68b/src/EditLexers/stlJavaScript.c#L8-L10

rsvargas commented 6 years ago

short was a future reserved word in EcmaScript version 3 and so were int, byte, char, goto, long, final, float, short, double, native, throws, boolean, abstract, volatile, transient, and synchronized. So it may be a good idea to mantain them...

(https://www-archive.mozilla.org/js/language/E262-3.pdf)

ghost commented 6 years ago

@rsvargas current EcmaScript doesnt define it, so it may be a bad idea to maintain it:

short
ReferenceError: short is not defined [Learn More]
zufuliu commented 6 years ago

Many of these reserved words are abandoned in ECMAScript 4 and above, they are just Java keywords or reserved words, and most modern browsers/clients supports at least ECMAScript 5 (2009), most developers write scripts target this version and above, that's why they are commented out in line 16:

// ECMAScript 1 till 3
//"abstract boolean byte char double final float goto int long native short synchronized throws transient volatile "
ghost commented 6 years ago

@zufuliu you should clarify that they are commented out with your version, not this one - cheers