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

Add JavaScript keyword "let" #166

Closed Phanx closed 8 years ago

Phanx commented 8 years ago

This keyword was added in ES6/ES2015.

const was also new in ES6, but for some reason it was already listed in Notepad2, dating all the way back to the initial SVN import in 2010.

QWp6t commented 8 years ago

Also class, Symbol, exports, default, and I'm sure there are more.

Phanx commented 8 years ago

Symbol doesn't matter, since Notepad2 doesn't highlight things like Date either.

The other keywords you mentioned are already listed.

QWp6t commented 8 years ago

Well, like i said, "I'm sure there are more." And there are: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords

As for Symbol vs Date, there's a difference. While both are intrinsic objects, Symbol is a wrapper for a primitive type whereas Date is just a reference type.

The primitive wrapper objects should probably be added to the list of highlighted keywords: Boolean, Number, String, Symbol,

undefined and null don't have wrapper objects, but are still primitive values. For some reason, though, only null is currently highlighted.

There are some slight inconsistencies with JS highlighting, but maybe I'm just making a big deal out of nothing.

XhmikosR commented 8 years ago

I guess we can merge this safely. I don't use ES6 yet so I don't know how well the lexer behaves. But that would be an issue upstream for Scintilla anyway.

On Aug 17, 2016 10:12, "QWp6t" notifications@github.com wrote:

Well, like i said, "I'm sure there are more." And there are: https://developer.mozilla.org/en-US/docs/Web/JavaScript/ Reference/Lexical_grammar#Keywords

As for Symbol vs Date, there's a difference. While both are intrinsic objects, Symbol is a wrapper for a primitive type whereas Date is just a reference type.

The primitive wrapper objects should probably be added to the list of highlighted keywords: Boolean, Number, String, Symbol,

undefined and null don't have wrapper objects, but are still primitive values. For some reason, though, only null is currently highlighted.

There are some slight inconsistencies with JS highlighting, but maybe I'm just making a big deal out of nothing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/XhmikosR/notepad2-mod/pull/166#issuecomment-240331772, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVVtScsLMUepKuobuPO02TeOdhwtcL_ks5qgrRkgaJpZM4JlBEj .