Commits

Rob Simmons committed 7339666

'struct' and 'sig' are both opening delimiters in the way I'm setting things up, and I was parsing all the keyword delimiters as Operators when they should be Keyword.Reserved

  • Participants
  • Parent commits 8243892

Comments (0)

Files changed (1)

File pygments/lexers/functional.py

         'delimiters': [
             (r'\(|\[|{', Operator, 'main'),
             (r'\)|\]|}', Operator, '#pop'),
-            (r'\b(let|if|local)\b(?!\')', Operator, ('main', 'main')),
-            (r'\b(while)\b(?!\')', Operator, 'main'),
-            (r'\b(do|else|end|in|then)\b(?!\')', Operator, '#pop'),
+            (r'\b(let|if|local)\b(?!\')', Keyword.Reserved, ('main', 'main')),
+            (r'\b(struct|sig|while)\b(?!\')', Keyword.Reserved, 'main'),
+            (r'\b(do|else|end|in|then)\b(?!\')', Keyword.Reserved, '#pop'),
         ],
 
         # Main parser