summaryrefslogtreecommitdiff
path: root/pygments/lexers/nix.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-06 14:00:28 +0100
committerGeorg Brandl <georg@python.org>2014-11-06 14:00:28 +0100
commitc863ac19ce4d591b93be8b36cb69b04422c8dc9f (patch)
tree98bd701a6fb0da18d92897960eabdd9a139ad7d4 /pygments/lexers/nix.py
parent90fe03b0f663810f4b6718d89b5e830ec2c67960 (diff)
downloadpygments-c863ac19ce4d591b93be8b36cb69b04422c8dc9f.tar.gz
Simplify charclasses in the remaining modules
Diffstat (limited to 'pygments/lexers/nix.py')
-rw-r--r--pygments/lexers/nix.py8
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):