+ chg: HTML JS VB: shared keyword-lists

This commit is contained in:
RaiKoHoff 2020-02-13 16:12:46 +01:00
parent 19792492ca
commit fa0534d18a
6 changed files with 34 additions and 24 deletions

View File

@ -137,6 +137,29 @@ extern EDITLEXER lexHTML; // Web Source Code
extern EDITLEXER lexXML; // XML Document
extern EDITLEXER lexYAML; // YAML
// -----------------------------------------------------------------------------
// common defines
// -----------------------------------------------------------------------------
#define NP3_LEXER_JS_KEYWORD_LIST \
"abstract as async await boolean break byte case catch char class const continue debugger default delete do double "\
"each else enum export extends false final finally float for from function get goto if implements import in instanceof int "\
"interface let long native new null of package private protected public return set short static super switch "\
"synchronized this throw throws transient true try typeof var void volatile while with yield"
#define NP3_LEXER_VB_KEYWORD_LIST \
"addhandler addressof alias and andalso ansi any as assembly attribute auto begin boolean byref byte byval "\
"call case catch cbool cbyte cchar cdate cdbl cdec char cint class clng cobj compare const continue cshort csng cstr ctype currency "\
"date decimal declare default delegate dim directcast do double each else elseif empty end enum eqv erase error event "\
"exit explicit externalsource false finally for friend function get gettype global gosub goto handles if "\
"imp implement implements imports in inherits integer interface is let lib like load long loop lset me mid mod module mustinherit "\
"mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable null object on option "\
"optional or orelse overloads overridable overrides paramarray preserve private property protected public "\
"raiseevent randomize readonly redim rem removehandler resume return rset select set shadows shared short "\
"single static step stop strict string structure sub synclock then throw to true try type typeof unicode unload until "\
"variant wend when while with withevents writeonly xor"
// -----------------------------------------------------------------------------
#endif // _EDIT_LEXER_H_

View File

@ -34,17 +34,9 @@ KEYWORDLIST KeyWords_HTML = {
"translate tt type typemustmatch u ul usemap valign value valuetype var version video vlink vspace wbr "
"width wrap xml xmlns",
// JavaScript keywords (sync with lexJS::KeyWords_JS)
"abstract as async await boolean break byte case catch char class const continue debugger default delete do double "
"each else enum export extends false final finally float for from function get goto if implements import in instanceof int "
"interface let long native new null of package private protected public return set short static super switch "
"synchronized this throw throws transient true try typeof var void volatile while with yield",
NP3_LEXER_JS_KEYWORD_LIST,
// VBScript keywords
"alias and as attribute begin boolean byref byte byval call case class compare const continue currency date "
"declare dim do double each else elseif empty end enum eqv erase error event exit explicit false for "
"friend function get global gosub goto if imp implement in integer is let lib load long loop lset me mid "
"mod module new next not nothing null object on option optional or preserve private property public "
"raiseevent redim rem resume return rset select set single static stop string sub then to true type unload "
"until variant wend while with withevents xor",
NP3_LEXER_VB_KEYWORD_LIST,
// Python keywords
"",
// PHP keywords

View File

@ -4,10 +4,7 @@
// JavaScript keywords (sync with lexHTML::KeyWords_HTML for embedded JS)
KEYWORDLIST KeyWords_JS = {
"abstract as async await boolean break byte case catch char class const continue debugger default delete do double "
"each else enum export extends false final finally float for from function get goto if implements import in instanceof int "
"interface let long native new null of package private protected public return set short static super switch "
"synchronized this throw throws transient true try typeof var void volatile while with yield",
NP3_LEXER_JS_KEYWORD_LIST,
NULL,
};

View File

@ -3,16 +3,7 @@
// ----------------------------------------------------------------------------
KEYWORDLIST KeyWords_VB = {
"addhandler addressof alias and andalso ansi any as assembly auto boolean byref byte byval call case catch "
"cbool cbyte cchar cdate cdbl cdec char cint class clng cobj compare const cshort csng cstr ctype date "
"decimal declare default delegate dim directcast do double each else elseif end enum erase error event "
"exit explicit externalsource false finally for friend function get gettype gosub goto handles if "
"implements imports in inherits integer interface is let lib like long loop me mid mod module mustinherit "
"mustoverride mybase myclass namespace new next not nothing notinheritable notoverridable object on option "
"optional or orelse overloads overridable overrides paramarray preserve private property protected public "
"raiseevent randomize readonly redim rem removehandler resume return select set shadows shared short "
"single static step stop strict string structure sub synclock then throw to true try typeof unicode until "
"variant when while with withevents writeonly xor",
NP3_LEXER_VB_KEYWORD_LIST,
NULL,
};

View File

@ -0,0 +1,7 @@
var x;
const y;
let z;
for (let el of arr) {
console.log(el);
}