diff options
author | Georg Brandl <georg@python.org> | 2014-03-16 09:29:40 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-03-16 09:29:40 +0100 |
commit | 5f970c05b90d16ceb70a7c11c33b5a6e14a02809 (patch) | |
tree | e5758268954d63a7217dd3e339dccc5a196a607a | |
parent | 7d7dc0f5fb180c0302f628ed4a12008868c04dc3 (diff) | |
parent | e9b859547feea53e1c4ad2fe9d3d694ddbee3eea (diff) | |
download | pygments-5f970c05b90d16ceb70a7c11c33b5a6e14a02809.tar.gz |
Merged in jaingaurav2/pygments-main/objc (pull request #299)
Detect Objective-C snippets if there is a NSNumber object
-rw-r--r-- | pygments/lexers/functional.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index ade26e97..55ac1937 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -996,7 +996,7 @@ class HaskellLexer(RegexLexer): ], 'character': [ # Allows multi-chars, incorrectly. - (r"[^\\']", String.Char), + (r"[^\\']'", String.Char, '#pop'), (r"\\", String.Escape, 'escape'), ("'", String.Char, '#pop'), ], @@ -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': [ |