diff options
author | pommicket <pommicket@gmail.com> | 2023-05-21 22:52:19 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-05-21 22:52:19 -0400 |
commit | e52c5c62824e378bc9a25fff1f41b0254eb85a8a (patch) | |
tree | c2187ceb4e67d40715bf75747a10bb2b6b9d8e4d /keywords.py | |
parent | 37eb65550f164857ed27d2e07c48c8b80c4d15fc (diff) |
highlight TODOs in comments
Diffstat (limited to 'keywords.py')
-rwxr-xr-x | keywords.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/keywords.py b/keywords.py index 9a74b85..75d02dc 100755 --- a/keywords.py +++ b/keywords.py @@ -8,7 +8,8 @@ import ast types = [ - 'SYNTAX_KEYWORD', 'SYNTAX_CONSTANT', 'SYNTAX_BUILTIN' + 'SYNTAX_KEYWORD', 'SYNTAX_CONSTANT', 'SYNTAX_BUILTIN', + 'SYNTAX_TODO' ] exec('\n'.join(['{} = {}'.format(type, i) for (i, type) in enumerate(types)])) @@ -599,6 +600,9 @@ keywords_css = [ 'xmp', 'svg' ] +keywords_comment = [ + 'TODO', 'FIXME', 'XXX', 'BUG', 'TEMP', 'OPTIMIZE', +] file = open('keywords.h', 'w') @@ -638,4 +642,5 @@ output_keywords(file, label(constants_config, SYNTAX_CONSTANT), 'config') output_keywords(file, label(keywords_glsl, SYNTAX_KEYWORD) + label(constants_glsl, SYNTAX_CONSTANT) + label(builtins_glsl, SYNTAX_BUILTIN), 'glsl') output_keywords(file, label(builtins_css, SYNTAX_BUILTIN) + label(constants_css, SYNTAX_CONSTANT) + label(keywords_css, SYNTAX_KEYWORD), 'css') +output_keywords(file, label(keywords_comment, SYNTAX_TODO), 'comment') file.close() |