diff options
author | Georg Brandl <georg@python.org> | 2014-11-06 14:00:28 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-06 14:00:28 +0100 |
commit | c863ac19ce4d591b93be8b36cb69b04422c8dc9f (patch) | |
tree | 98bd701a6fb0da18d92897960eabdd9a139ad7d4 /pygments/lexers/nix.py | |
parent | 90fe03b0f663810f4b6718d89b5e830ec2c67960 (diff) | |
download | pygments-c863ac19ce4d591b93be8b36cb69b04422c8dc9f.tar.gz |
Simplify charclasses in the remaining modules
Diffstat (limited to 'pygments/lexers/nix.py')
-rw-r--r-- | pygments/lexers/nix.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pygments/lexers/nix.py b/pygments/lexers/nix.py index 6d9f0e7d..1bf533dd 100644 --- a/pygments/lexers/nix.py +++ b/pygments/lexers/nix.py @@ -91,10 +91,10 @@ class NixLexer(RegexLexer): ], 'comment': [ - (r'[^/\*]+', Comment.Multiline), + (r'[^/*]+', Comment.Multiline), (r'/\*', Comment.Multiline, '#push'), (r'\*/', Comment.Multiline, '#pop'), - (r'[\*/]', Comment.Multiline), + (r'[*/]', Comment.Multiline), ], 'singlequote': [ (r"'''", String.Escape), @@ -129,10 +129,6 @@ class NixLexer(RegexLexer): rv += 0.4 if re.search(r'mkDerivation\s+(\(|\{|rec)', text): rv += 0.4 - if re.search(r'with\s+[a-zA-Z\.]+;', text): - rv += 0.2 - if re.search(r'inherit\s+[a-zA-Z()\.];', text): - rv += 0.2 if re.search(r'=\s+mkIf\s+', text): rv += 0.4 if re.search(r'\{[a-zA-Z,\s]+\}:', text): |