Commits

Andy Li committed 762f25e

Support typedef alias.

Comments (0)

Files changed (1)

pygments/lexers/web.py

             include('whitespace'),
             (r'(=)(\s*)({)', bygroups(Punctuation, Text, Punctuation),
              ('#pop', 'typedefbody')),
+            include('typealias'),
         ],
         'enumdef': [
             (r'enum', Keyword.Declaration, ('enumdefprebody', 'typedecl')),
             (r'(extends)', Keyword.Declaration, 'typedecl'),
             (r'{', Punctuation, ('#pop', 'classdefbody')),
         ],
-
+        
+        'typealias': [
+            include('whitespace'),
+            (r'=', Punctuation),
+            include('generictypedecl'),
+            (r';', Punctuation, '#pop'),
+        ],
         'typedefbody': [
           include('whitespace'),
           include('instancevardef'),
           include('instancefundef'),
+          include('funargdecl'),
           (r'>', Punctuation, 'typedecl'),
           (r',', Punctuation),
           (r'};?', Punctuation, '#pop'),