[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] syntax: javascript: add newer keywords/syntax

From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] syntax: javascript: add newer keywords/syntax
Date: Mon, 25 Dec 2017 16:25:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Op 19-12-17 om 19:58 schreef Benno Schulenberg:
Op 18-12-17 om 20:26 schreef Mike Frysinger:
-color green "\<(const|function|let|this|typeof|var|void)\>" +color green "\<(async|await|class|const|export|extends|function|import|let|this|typeof|var|void)\>" color brightyellow "\<(for|if|while|with|do|else|case|default|switch)\>" color brightyellow "\<(export|try|throw|catch|new|delete)\>"

This duplicates the word "export". I'm guessing that "import" and "export" should preferably have the same color. So... should "import" be moved to the
brightyellow, or should "export" be removed from it?

Looking at vim and Emacs and Geany, the latter two color most keywords in
a single color.  But vim distinguishes two groups, and colors "import" and
"export" the same way.  So I have done that for nano too.

Also, "await" seems to belong in the same group as "import" and "export",
so I have moved it there -- it is not a `declarational` keyword but an
`active` one.

In subsequent patches I have added some more keywords, changed the color
of strings (to distinguish them from keywords), have removed the coloring
of uppercase words and of some special single-quoted strings whose purpose
I did not understand -- they seemed to want to color octal and hexadecimal
numbers, plus something mysterious -- and have put in another method of
coloring octal/decimal/hexadecimal numbers.

Looking at, there
appear to be still some more keywords: instanceof, super...  And the three
other editors color "true" and "false" specially too.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]