summaryrefslogtreecommitdiff
path: root/pygments/lexers/jvm.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-15 21:32:31 +0200
committerGeorg Brandl <georg@python.org>2014-10-15 21:32:31 +0200
commit10be9bec8a7969a40d4fa3483b8317e0131b1715 (patch)
tree7047dd543253b4a5f0002c377cce59e3589a2aeb /pygments/lexers/jvm.py
parent6095eb22ab78b1754aeb56d67754cc4cb401e843 (diff)
downloadpygments-10be9bec8a7969a40d4fa3483b8317e0131b1715.tar.gz
all lexers: fix unescaped { and } so that the "regex" module can compile our regexes
Diffstat (limited to 'pygments/lexers/jvm.py')
-rw-r--r--pygments/lexers/jvm.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index 136a0fd7..898cf415 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -289,7 +289,7 @@ class ScalaLexer(RegexLexer):
(u'(%s|%s|`[^`]+`)(\\s*)(\\[)' % (idrest, op),
bygroups(Name.Class, Text, Operator), 'typeparam'),
(r'\s+', Text),
- (r'{', Operator, '#pop'),
+ (r'\{', Operator, '#pop'),
(r'\(', Operator, '#pop'),
(r'//.*?\n', Comment.Single, '#pop'),
(u'%s|%s|`[^`]+`' % (idrest, op), Name.Class, '#pop'),
@@ -530,7 +530,7 @@ class IokeLexer(RegexLexer):
'interpolatableText': [
(r'(\\b|\\e|\\t|\\n|\\f|\\r|\\"|\\\\|\\#|\\\Z|\\u[0-9a-fA-F]{1,4}'
r'|\\[0-3]?[0-7]?[0-7])', String.Escape),
- (r'#{', Punctuation, 'textInterpolationRoot')
+ (r'#\{', Punctuation, 'textInterpolationRoot')
],
'text': [
@@ -546,7 +546,7 @@ class IokeLexer(RegexLexer):
],
'textInterpolationRoot': [
- (r'}', Punctuation, '#pop'),
+ (r'\}', Punctuation, '#pop'),
include('root')
],
@@ -695,7 +695,7 @@ class IokeLexer(RegexLexer):
Operator),
# Punctuation
- (r'(\`\`|\`|\'\'|\'|\.|\,|@@|@|\[|\]|\(|\)|{|})', Punctuation),
+ (r'(\`\`|\`|\'\'|\'|\.|\,|@@|@|\[|\]|\(|\)|\{|\})', Punctuation),
# kinds
(r'[A-Z][\w!:?]*', Name.Class),
@@ -1268,7 +1268,7 @@ class GoloLexer(RegexLexer):
(r'[\'"\\]', String)
],
'stringescape': [
- (r'\\([\\abfnrtv"\']|\n|N{.*?}|u[a-fA-F0-9]{4}|'
+ (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|'
r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape)
],
'triplestring': [