diff options
author | Domen Kozar <domen@dev.si> | 2014-03-15 11:32:25 +0100 |
---|---|---|
committer | Domen Kozar <domen@dev.si> | 2014-03-15 11:32:25 +0100 |
commit | ab8518e61d744aed0dd9eae1f0ea236f986b844c (patch) | |
tree | 75041bc9f2a476b59d91cf4e92e38010b424cbb1 | |
parent | 87cf3e1a72b8b0c031afbff4f8effd9661bef8a3 (diff) | |
download | pygments-ab8518e61d744aed0dd9eae1f0ea236f986b844c.tar.gz |
Nix: add null constant and improve text highlighting
-rw-r--r-- | pygments/lexers/functional.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index ade26e97..a02abf19 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -2532,7 +2532,7 @@ class NixLexer(RegexLexer): ('(%s)' % '|'.join(re.escape(entry) + '\\b' for entry in builtins), Name.Builtin), - (r'\b(true|false)\b', Name.Constant), + (r'\b(true|false|null)\b', Name.Constant), # operators ('(%s)' % '|'.join(re.escape(entry) for entry in operators), @@ -2559,7 +2559,8 @@ class NixLexer(RegexLexer): (r'[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[a-zA-Z0-9%/?:@&=+$,\\_.!~*\'-]+', Literal), # names of variables - (r'[a-zA-Z_][a-zA-Z0-9_\'-]*', String.Symbol), + (r'[a-zA-Z0-9-_]+\s*=', String.Symbol), + (r'[a-zA-Z_][a-zA-Z0-9_\'-]*', Text), ], 'comment': [ |