Commits

blackbird  committed d0b08fd

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

  • Participants
  • Parent commits 57a005d
  • Branches trunk
  • Tags 0.7.1

Comments (0)

Files changed (1)

File 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')
         ]
     }