summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/jvm.py29
1 files changed, 17 insertions, 12 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py
index da74a2d7..8d4a74b3 100644
--- a/pygments/lexers/jvm.py
+++ b/pygments/lexers/jvm.py
@@ -209,23 +209,27 @@ class GosuLexer(RegexLexer):
(r'//.*?\n', Comment.Single),
(r'/\*.*?\*/', Comment.Multiline),
(r'@[a-zA-Z_][a-zA-Z0-9_\.]*', Name.Decorator),
- (r'(in|as|typeof|statictypeof|typeis|typeas|if|else|foreach|'
- r'for|index|while|do|continue|break|return|try|catch|finally|this|throw|'
- r'new|switch|case|default|eval|super|outer|classpath|using)\b',
- Keyword),
- (r'(var|delegate|construct|function|private|internal|protected|public|'
- r'abstract|override|final|static|extends|transient|implements|represents|'
- r'readonly)\b', Keyword.Declaration),
+ (r'(in|as|typeof|statictypeof|typeis|typeas|if|else|foreach|for|'
+ r'index|while|do|continue|break|return|try|catch|finally|this|'
+ r'throw|new|switch|case|default|eval|super|outer|classpath|'
+ r'using)\b', Keyword),
+ (r'(var|delegate|construct|function|private|internal|protected|'
+ r'public|abstract|override|final|static|extends|transient|'
+ r'implements|represents|readonly)\b', Keyword.Declaration),
(r'(property\s+)(get|set|)', Keyword.Declaration),
(r'(boolean|byte|char|double|float|int|long|short|void|block)\b',
Keyword.Type),
(r'(package)(\s+)', bygroups(Keyword.Namespace, Text)),
(r'(true|false|null|NaN|Infinity)\b', Keyword.Constant),
- (r'(class|interface|enhancement|enum)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Keyword.Declaration, Text, Name.Class)),
- (r'(uses)(\s+)([a-zA-Z0-9_.]+\*?)', bygroups(Keyword.Namespace, Text, Name.Namespace)),
+ (r'(class|interface|enhancement|enum)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)',
+ bygroups(Keyword.Declaration, Text, Name.Class)),
+ (r'(uses)(\s+)([a-zA-Z0-9_.]+\*?)',
+ bygroups(Keyword.Namespace, Text, Name.Namespace)),
(r'"', String, 'string'),
- (r'(\??[\.#])([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
- (r'(:)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
+ (r'(\??[\.#])([a-zA-Z_][a-zA-Z0-9_]*)',
+ bygroups(Operator, Name.Attribute)),
+ (r'(:)([a-zA-Z_][a-zA-Z0-9_]*)',
+ bygroups(Operator, Name.Attribute)),
(r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
(r'and|or|not|[\\~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
@@ -234,7 +238,8 @@ class GosuLexer(RegexLexer):
],
'templateText': [
(r'(\\<)|(\\\$)', String),
- (r'(<%@\s+)(extends|params)', bygroups(Operator, Name.Decorator), 'stringTemplate'),
+ (r'(<%@\s+)(extends|params)',
+ bygroups(Operator, Name.Decorator), 'stringTemplate'),
(r'<%!--.*?--%>', Comment.Multiline),
(r'(<%)|(<%=)', Operator, 'stringTemplate'),
(r'\$\{', Operator, 'stringTemplateShorthand'),