diff options
Diffstat (limited to 'resp_highlight.py')
-rwxr-xr-x | resp_highlight.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/resp_highlight.py b/resp_highlight.py index 11ae298..a1432bb 100755 --- a/resp_highlight.py +++ b/resp_highlight.py @@ -19,8 +19,8 @@ class RespLexer(RegexLexer): filenames = ['*.resp'] mimetypes = ['text/x-resp', 'application/x-resp'] - keywords = [ 'fn', 'def', 'if', 'match', 'ns', 'type' ] - builtins = [ 'cons', 'car', 'cdr' ] + keywords = [ 'def', 'def-type', 'fn', 'if', 'let', 'match' ] + builtins = [ 'Tup' ] valid_name = r'[.a-zA-Z0-9!$%&*+,/:<=>?@^_~|-]+' @@ -74,12 +74,12 @@ class RespStyleDark(Style): default_style = "#FFF" background_color = "#222" styles = { - Comment: '#79E', - Keyword: '#EE5', + Comment: '#9BF', + Keyword: '#AFA', Name: '#DDD', Text: '#DDD', String: '#F88', - Keyword.Type: '#5E5', + Keyword.Type: '#BCE', Punctuation: '#AAA', Number: '#F88' } @@ -88,14 +88,14 @@ class RespStyleLight(Style): default_style = "#FFF" background_color = "#EEE" styles = { - Comment: '#57C', - Keyword: '#AA0', - Name: '#777', - Text: '#777', - String: '#D66', - Keyword.Type: '#3C3', - Punctuation: '#888', - Number: '#D66' + Comment: '#36A', + Keyword: '#181', + Name: '#000', + Text: '#000', + String: '#944', + Keyword.Type: '#236', + Punctuation: '#111', + Number: '#944' } if len(sys.argv) != 3: @@ -124,7 +124,7 @@ if re.match('.*\.html$', sys.argv[2]): <title>%s</title> <style type="text/css">''' % sys.argv[1] print >>outfile, formatter.get_style_defs('.highlight') - print >>outfile, ''' </style> + print >>outfile, '''.highlight { margin: 0; padding: 1ex; border-width: 0; }</style> </head> <body> ''' |