summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-09-16 09:55:09 +0200
committerGeorg Brandl <georg@python.org>2014-09-16 09:55:09 +0200
commit57a5e307fde4e78e1025c73f158e9f38709fd3df (patch)
treea7664976a7108c9de2641d2c2c3c49e5515a969a /pygments/lexers/compiled.py
parent508e306f64288290c46602f904f8d25d867c0b50 (diff)
downloadpygments-57a5e307fde4e78e1025c73f158e9f38709fd3df.tar.gz
Nit lexer: add changelog entry, attribution, mapfile entry, cat all example files into one
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 1cf5fee7..6556b77e 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -5199,9 +5199,12 @@ class SwiftLexer(ObjectiveCLexer):
token = Operator
yield index, token, value
+
class NitLexer(RegexLexer):
"""
For `nit <http://nitlanguage.org>`_ source.
+
+ .. versionadded:: 2.0
"""
name = 'Nit'
@@ -5219,7 +5222,8 @@ class NitLexer(RegexLexer):
'isset|label|__debug__)(?=( |\n|\t|\r|\())', Keyword),
(r'[A-Z][A-Za-z0-9_]*', Name.Class),
(r'"""(([^\'\\]|\\.)|\\r|\\n)*(({{?)?(""?{{?)*""""*)', String), #Simple long string
- (r'\'\'\'(((\\.|[^\'\\])|\\r|\\n)|\'((\\.|[^\'\\])|\\r|\\n)|\'\'((\\.|[^\'\\])|\\r|\\n))*\'\'\'', String), #Simple long string alt
+ (r'\'\'\'(((\\.|[^\'\\])|\\r|\\n)|\'((\\.|[^\'\\])|\\r|\\n)|'
+ r'\'\'((\\.|[^\'\\])|\\r|\\n))*\'\'\'', String), #Simple long string alt
(r'"""(([^\'\\]|\\.)|\\r|\\n)*((""?)?({{?""?)*{{{{*)', String), #Start long string
(r'}}}(((\\.|[^\'\\])|\\r|\\n))*(""?)?({{?""?)*{{{{*', String), #Mid long string
(r'}}}(((\\.|[^\'\\])|\\r|\\n))*({{?)?(""?{{?)*""""*', String), #End long string