Commits

Anonymous committed d0b08fd

[svn] change in the java lexer foo.bar is now yielded as Name, Operator, Name.Attribute.

Comments (0)

Files changed (1)

pygments/lexers/compiled.py

             (r'(class)(\s+)', bygroups(Keyword, Text), 'class'),
             (r'"(\\\\|\\"|[^"])*"', String),
             (r"'\\.'|'[^\\]'|'\\u[0-9a-f]{4}'", String.Char),
+            (r'(\.)([a-zA-Z_][a-zA-Z0-9_]*)', bygroups(Operator, Name.Attribute)),
             (r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Label),
             (r'[a-zA-Z_\$][a-zA-Z0-9_]*', Name),
             (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator),
             (r'\n', Text)
         ],
         'class': [
-            (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop'),
-            (r'', Text, '#pop'), # not really a class definition
+            (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Class, '#pop')
         ]
     }