1. Diego Zamboni
  2. pygments-main


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.

  • Participants
  • Parent commits 1b3c03b
  • Branches default

Comments (0)

Files changed (1)

File pygments/lexers/other.py

View file
  • Ignore whitespace
             (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),