summaryrefslogtreecommitdiff
path: root/keywords.py
diff options
context:
space:
mode:
Diffstat (limited to 'keywords.py')
-rwxr-xr-xkeywords.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/keywords.py b/keywords.py
index 951f3b2..c8f7e9c 100755
--- a/keywords.py
+++ b/keywords.py
@@ -216,6 +216,40 @@ builtins_python = ['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseE
'vars', 'zip',
]
+attributes_html = [
+ 'accept','accept-charset','accesskey','action','align','alt','async',
+ 'autocomplete','autofocus','autoplay','bgcolor','border','charset',
+ 'checked','cite','class','color','cols','colspan','content',
+ 'contenteditable','controls','coords','data','datetime',
+ 'default','defer','dir','dirname','disabled','download','draggable',
+ 'enctype','for','form','formaction','headers','height','hidden','high',
+ 'href','hreflang','http-equiv','id','ismap','kind','label','lang','list',
+ 'loop','low','max','maxlength','media','method','min','multiple','muted',
+ 'name','novalidate','onabort','onafterprint','onbeforeprint',
+ 'onbeforeunload','onblur','oncanplay','oncanplaythrough','onchange',
+ 'onclick','oncontextmenu','oncopy','oncuechange','oncut','ondblclick',
+ 'ondrag','ondragend','ondragenter','ondragleave','ondragover','ondragstart',
+ 'ondrop','ondurationchange','onemptied','onended','onerror','onfocus',
+ 'onhashchange','oninput','oninvalid','onkeydown','onkeypress','onkeyup',
+ 'onload','onloadeddata','onloadedmetadata','onloadstart','onmousedown',
+ 'onmousemove','onmouseout','onmouseover','onmouseup','onmousewheel','onoffline',
+ 'ononline','onpagehide','onpageshow','onpaste','onpause','onplay','onplaying',
+ 'onpopstate','onprogress','onratechange','onreset','onresize','onscroll',
+ 'onsearch','onseeked','onseeking','onselect','onstalled','onstorage',
+ 'onsubmit','onsuspend','ontimeupdate','ontoggle','onunload','onvolumechange',
+ 'onwaiting','onwheel','open','optimum','pattern','placeholder','poster',
+ 'preload','readonly','rel','required','reversed','rows','rowspan','sandbox',
+ 'scope','selected','shape','size','sizes','span','spellcheck','src','srcdoc',
+ 'srclang','srcset','start','step','style','tabindex','target',
+ 'title','translate','type','usemap','value','width','wrap'
+]
+
+assert len(attributes_html) == len(set(attributes_html))
+
+builtins_html = []
+for attr in attributes_html:
+ builtins_html.append(attr + '=')
+
file = open('keywords.h', 'w')
file.write('''// keywords for all languages ted supports
// This file was auto-generated by keywords.py
@@ -239,4 +273,5 @@ cpp_things.remove((SYNTAX_BUILTIN, 'wchar_t'))
output_keywords(file, cpp_things, 'cpp')
output_keywords(file, label(keywords_rust, SYNTAX_KEYWORD) + label(builtins_rust, SYNTAX_BUILTIN) + label(constants_rust, SYNTAX_CONSTANT), 'rust')
output_keywords(file, label(keywords_python, SYNTAX_KEYWORD) + label(builtins_python, SYNTAX_BUILTIN), 'python')
+output_keywords(file, label(builtins_html, SYNTAX_BUILTIN), 'html')
file.close()