Commits

Diego Zamboni committed aed8b44

Added parenthesis as valid characters in class expressions.
Added -> as a valid operator so that the promise -> { promisee }
structure is properly recognized.

Comments (0)

Files changed (1)

pygments/lexers/other.py

              bygroups(Keyword.Reserved,Text,Operator,Text)),
             (r'"', String, 'string'),
             (r'(\w+)(\()', bygroups(Name.Function, Punctuation)),
-            (r'([\w.!&|]+)(::)', bygroups(Name.Class, Punctuation)),
+            (r'([\w.!&|\(\)]+)(::)', bygroups(Name.Class, Punctuation)),
             (r'(\w+)(:)', bygroups(Keyword.Declaration,Punctuation)),
             (r'@[\{\(][^\)\}]+[\}\)]', Name.Variable),
             (r'[(){},;]', Punctuation),
             (r'=>', Operator),
+            (r'->', Operator),
             (r'\d+\.\d+', Number.Float),
             (r'\d+', Number.Integer),
             (r'\w+', Name.Function),