summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-06 18:05:49 -0400
committerpommicket <pommicket@gmail.com>2023-07-06 18:05:49 -0400
commitd37c3727de8c4b69031f0640c0fe94f6669061aa (patch)
tree4518737447d9b19080b23510867a817738b32ac8
parentb39e98f7e8a340bb5777029b05fc84b2b5ba6c08 (diff)
remove highlighting for some rarely-used js window properties
-rw-r--r--keywords.h20
-rwxr-xr-xkeywords.py12
2 files changed, 17 insertions, 15 deletions
diff --git a/keywords.h b/keywords.h
index faf190e..40f3037 100644
--- a/keywords.h
+++ b/keywords.h
@@ -163,14 +163,14 @@ static const Keyword syntax_keywords_javascript_f[6] = {{"false", SYNTAX_CONSTAN
static const Keyword syntax_keywords_javascript_g[1] = {{"globalThis", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_javascript_h[1] = {{"history", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_javascript_i[8] = {{"if", SYNTAX_KEYWORD},{"import", SYNTAX_KEYWORD},{"in", SYNTAX_KEYWORD},{"innerHeight", SYNTAX_BUILTIN},{"innerWidth", SYNTAX_BUILTIN},{"instanceof", SYNTAX_KEYWORD},{"isFinite", SYNTAX_BUILTIN},{"isNaN", SYNTAX_BUILTIN}};
-static const Keyword syntax_keywords_javascript_l[5] = {{"length", SYNTAX_BUILTIN},{"let", SYNTAX_KEYWORD},{"localStorage", SYNTAX_BUILTIN},{"location", SYNTAX_BUILTIN},{"locationbar", SYNTAX_BUILTIN}};
+static const Keyword syntax_keywords_javascript_l[4] = {{"let", SYNTAX_KEYWORD},{"localStorage", SYNTAX_BUILTIN},{"location", SYNTAX_BUILTIN},{"locationbar", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_javascript_m[1] = {{"menubar", SYNTAX_BUILTIN}};
-static const Keyword syntax_keywords_javascript_n[4] = {{"name", SYNTAX_BUILTIN},{"navigator", SYNTAX_BUILTIN},{"new", SYNTAX_KEYWORD},{"null", SYNTAX_CONSTANT}};
+static const Keyword syntax_keywords_javascript_n[3] = {{"navigator", SYNTAX_BUILTIN},{"new", SYNTAX_KEYWORD},{"null", SYNTAX_CONSTANT}};
static const Keyword syntax_keywords_javascript_o[4] = {{"of", SYNTAX_KEYWORD},{"opener", SYNTAX_BUILTIN},{"outerHeight", SYNTAX_BUILTIN},{"outerWidth", SYNTAX_BUILTIN}};
-static const Keyword syntax_keywords_javascript_p[6] = {{"pageXOffset", SYNTAX_BUILTIN},{"pageYOffset", SYNTAX_BUILTIN},{"parent", SYNTAX_BUILTIN},{"parseFloat", SYNTAX_BUILTIN},{"parseInt", SYNTAX_BUILTIN},{"personalbar", SYNTAX_BUILTIN}};
+static const Keyword syntax_keywords_javascript_p[5] = {{"pageXOffset", SYNTAX_BUILTIN},{"pageYOffset", SYNTAX_BUILTIN},{"parseFloat", SYNTAX_BUILTIN},{"parseInt", SYNTAX_BUILTIN},{"personalbar", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_javascript_r[1] = {{"return", SYNTAX_KEYWORD}};
-static const Keyword syntax_keywords_javascript_s[15] = {{"scheduler", SYNTAX_BUILTIN},{"screen", SYNTAX_BUILTIN},{"screenLeft", SYNTAX_BUILTIN},{"screenTop", SYNTAX_BUILTIN},{"screenX", SYNTAX_BUILTIN},{"screenY", SYNTAX_BUILTIN},{"scrollX", SYNTAX_BUILTIN},{"scrollY", SYNTAX_BUILTIN},{"scrollbars", SYNTAX_BUILTIN},{"self", SYNTAX_BUILTIN},{"sessionStorage", SYNTAX_BUILTIN},{"speechSynthesis", SYNTAX_BUILTIN},{"statusbar", SYNTAX_BUILTIN},{"super", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD}};
-static const Keyword syntax_keywords_javascript_t[7] = {{"this", SYNTAX_KEYWORD},{"throw", SYNTAX_KEYWORD},{"toolbar", SYNTAX_BUILTIN},{"top", SYNTAX_BUILTIN},{"true", SYNTAX_CONSTANT},{"try", SYNTAX_KEYWORD},{"typeof", SYNTAX_KEYWORD}};
+static const Keyword syntax_keywords_javascript_s[14] = {{"scheduler", SYNTAX_BUILTIN},{"screen", SYNTAX_BUILTIN},{"screenLeft", SYNTAX_BUILTIN},{"screenTop", SYNTAX_BUILTIN},{"screenX", SYNTAX_BUILTIN},{"screenY", SYNTAX_BUILTIN},{"scrollX", SYNTAX_BUILTIN},{"scrollY", SYNTAX_BUILTIN},{"scrollbars", SYNTAX_BUILTIN},{"sessionStorage", SYNTAX_BUILTIN},{"speechSynthesis", SYNTAX_BUILTIN},{"statusbar", SYNTAX_BUILTIN},{"super", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD}};
+static const Keyword syntax_keywords_javascript_t[6] = {{"this", SYNTAX_KEYWORD},{"throw", SYNTAX_KEYWORD},{"toolbar", SYNTAX_BUILTIN},{"true", SYNTAX_CONSTANT},{"try", SYNTAX_KEYWORD},{"typeof", SYNTAX_KEYWORD}};
static const Keyword syntax_keywords_javascript_u[1] = {{"undefined", SYNTAX_CONSTANT}};
static const Keyword syntax_keywords_javascript_v[3] = {{"var", SYNTAX_KEYWORD},{"visualViewport", SYNTAX_BUILTIN},{"void", SYNTAX_KEYWORD}};
static const Keyword syntax_keywords_javascript_w[3] = {{"while", SYNTAX_KEYWORD},{"window", SYNTAX_BUILTIN},{"with", SYNTAX_KEYWORD}};
@@ -212,14 +212,14 @@ static const Keyword syntax_keywords_typescript_f[6] = {{"false", SYNTAX_CONSTAN
static const Keyword syntax_keywords_typescript_g[2] = {{"get", SYNTAX_BUILTIN},{"globalThis", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_typescript_h[1] = {{"history", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_typescript_i[10] = {{"if", SYNTAX_KEYWORD},{"implements", SYNTAX_KEYWORD},{"import", SYNTAX_KEYWORD},{"in", SYNTAX_KEYWORD},{"innerHeight", SYNTAX_BUILTIN},{"innerWidth", SYNTAX_BUILTIN},{"instanceof", SYNTAX_KEYWORD},{"interface", SYNTAX_KEYWORD},{"isFinite", SYNTAX_BUILTIN},{"isNaN", SYNTAX_BUILTIN}};
-static const Keyword syntax_keywords_typescript_l[5] = {{"length", SYNTAX_BUILTIN},{"let", SYNTAX_KEYWORD},{"localStorage", SYNTAX_BUILTIN},{"location", SYNTAX_BUILTIN},{"locationbar", SYNTAX_BUILTIN}};
+static const Keyword syntax_keywords_typescript_l[4] = {{"let", SYNTAX_KEYWORD},{"localStorage", SYNTAX_BUILTIN},{"location", SYNTAX_BUILTIN},{"locationbar", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_typescript_m[2] = {{"menubar", SYNTAX_BUILTIN},{"module", SYNTAX_KEYWORD}};
-static const Keyword syntax_keywords_typescript_n[5] = {{"name", SYNTAX_BUILTIN},{"navigator", SYNTAX_BUILTIN},{"new", SYNTAX_KEYWORD},{"null", SYNTAX_CONSTANT},{"number", SYNTAX_BUILTIN}};
+static const Keyword syntax_keywords_typescript_n[4] = {{"navigator", SYNTAX_BUILTIN},{"new", SYNTAX_KEYWORD},{"null", SYNTAX_CONSTANT},{"number", SYNTAX_BUILTIN}};
static const Keyword syntax_keywords_typescript_o[4] = {{"of", SYNTAX_KEYWORD},{"opener", SYNTAX_BUILTIN},{"outerHeight", SYNTAX_BUILTIN},{"outerWidth", SYNTAX_BUILTIN}};
-static const Keyword syntax_keywords_typescript_p[9] = {{"package", SYNTAX_KEYWORD},{"pageXOffset", SYNTAX_BUILTIN},{"pageYOffset", SYNTAX_BUILTIN},{"parent", SYNTAX_BUILTIN},{"parseFloat", SYNTAX_BUILTIN},{"parseInt", SYNTAX_BUILTIN},{"personalbar", SYNTAX_BUILTIN},{"private", SYNTAX_KEYWORD},{"public", SYNTAX_KEYWORD}};
+static const Keyword syntax_keywords_typescript_p[8] = {{"package", SYNTAX_KEYWORD},{"pageXOffset", SYNTAX_BUILTIN},{"pageYOffset", SYNTAX_BUILTIN},{"parseFloat", SYNTAX_BUILTIN},{"parseInt", SYNTAX_BUILTIN},{"personalbar", SYNTAX_BUILTIN},{"private", SYNTAX_KEYWORD},{"public", SYNTAX_KEYWORD}};
static const Keyword syntax_keywords_typescript_r[1] = {{"return", SYNTAX_KEYWORD}};
-static const Keyword syntax_keywords_typescript_s[18] = {{"scheduler", SYNTAX_BUILTIN},{"screen", SYNTAX_BUILTIN},{"screenLeft", SYNTAX_BUILTIN},{"screenTop", SYNTAX_BUILTIN},{"screenX", SYNTAX_BUILTIN},{"screenY", SYNTAX_BUILTIN},{"scrollX", SYNTAX_BUILTIN},{"scrollY", SYNTAX_BUILTIN},{"scrollbars", SYNTAX_BUILTIN},{"self", SYNTAX_BUILTIN},{"sessionStorage", SYNTAX_BUILTIN},{"set", SYNTAX_BUILTIN},{"speechSynthesis", SYNTAX_BUILTIN},{"static", SYNTAX_KEYWORD},{"statusbar", SYNTAX_BUILTIN},{"string", SYNTAX_BUILTIN},{"super", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD}};
-static const Keyword syntax_keywords_typescript_t[8] = {{"this", SYNTAX_KEYWORD},{"throw", SYNTAX_KEYWORD},{"toolbar", SYNTAX_BUILTIN},{"top", SYNTAX_BUILTIN},{"true", SYNTAX_CONSTANT},{"try", SYNTAX_KEYWORD},{"type", SYNTAX_KEYWORD},{"typeof", SYNTAX_KEYWORD}};
+static const Keyword syntax_keywords_typescript_s[17] = {{"scheduler", SYNTAX_BUILTIN},{"screen", SYNTAX_BUILTIN},{"screenLeft", SYNTAX_BUILTIN},{"screenTop", SYNTAX_BUILTIN},{"screenX", SYNTAX_BUILTIN},{"screenY", SYNTAX_BUILTIN},{"scrollX", SYNTAX_BUILTIN},{"scrollY", SYNTAX_BUILTIN},{"scrollbars", SYNTAX_BUILTIN},{"sessionStorage", SYNTAX_BUILTIN},{"set", SYNTAX_BUILTIN},{"speechSynthesis", SYNTAX_BUILTIN},{"static", SYNTAX_KEYWORD},{"statusbar", SYNTAX_BUILTIN},{"string", SYNTAX_BUILTIN},{"super", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD}};
+static const Keyword syntax_keywords_typescript_t[7] = {{"this", SYNTAX_KEYWORD},{"throw", SYNTAX_KEYWORD},{"toolbar", SYNTAX_BUILTIN},{"true", SYNTAX_CONSTANT},{"try", SYNTAX_KEYWORD},{"type", SYNTAX_KEYWORD},{"typeof", SYNTAX_KEYWORD}};
static const Keyword syntax_keywords_typescript_u[1] = {{"undefined", SYNTAX_CONSTANT}};
static const Keyword syntax_keywords_typescript_v[3] = {{"var", SYNTAX_KEYWORD},{"visualViewport", SYNTAX_BUILTIN},{"void", SYNTAX_KEYWORD}};
static const Keyword syntax_keywords_typescript_w[3] = {{"while", SYNTAX_KEYWORD},{"window", SYNTAX_BUILTIN},{"with", SYNTAX_KEYWORD}};
diff --git a/keywords.py b/keywords.py
index 54eaf9a..4ec4eba 100755
--- a/keywords.py
+++ b/keywords.py
@@ -369,13 +369,15 @@ builtins_javascript = [
'TypeError','Uint16Array','Uint32Array','Uint8Array','Uint8ClampedArray',
'URIError','WeakMap','WeakRef','WeakSet','WebAssembly',
# window properties
+ # length, name, self, parent, and top are intentionally missing
+ # because they are more commonly used in other contexts
'console', 'customElements', 'devicePixelRatio', 'document', 'frameElement',
- 'frames', 'history', 'innerHeight', 'innerWidth', 'length', 'localStorage',
- 'location', 'locationbar', 'menubar', 'name', 'navigator', 'opener',
- 'outerHeight', 'outerWidth', 'pageXOffset', 'pageYOffset', 'parent',
+ 'frames', 'history', 'innerHeight', 'innerWidth', 'localStorage',
+ 'location', 'locationbar', 'menubar', 'navigator', 'opener',
+ 'outerHeight', 'outerWidth', 'pageXOffset', 'pageYOffset',
'personalbar', 'scheduler', 'screen', 'screenLeft', 'screenTop', 'screenX',
- 'screenY', 'scrollbars', 'scrollX', 'scrollY', 'self', 'sessionStorage',
- 'speechSynthesis', 'statusbar', 'toolbar', 'top', 'visualViewport', 'window'
+ 'screenY', 'scrollbars', 'scrollX', 'scrollY', 'sessionStorage',
+ 'speechSynthesis', 'statusbar', 'toolbar', 'visualViewport', 'window'
]
keywords_java = [