1. Pekka Klärck
  2. pygments-main


Bruce Mitchener  committed 7ffbe4f

[dylan] Check the lowercase of the value against the various builtins.

  • Participants
  • Parent commits 18cdab8
  • Branches default

Comments (0)

Files changed (2)

File pygments/lexers/compiled.py

View file
  • Ignore whitespace
     def get_tokens_unprocessed(self, text):
         for index, token, value in RegexLexer.get_tokens_unprocessed(self, text):
             if token is Name:
-                if value in self.builtins:
+                lowercase_value = value.lower()
+                if lowercase_value in self.builtins:
                     yield index, Name.Builtin, value
-                if value in self.keywords:
+                if lowercase_value in self.keywords:
                     yield index, Keyword, value
-                if value in self.functions:
+                if lowercase_value in self.functions:
                     yield index, Name.Builtin, value
-                if value in self.operators:
+                if lowercase_value in self.operators:
                     yield index, Operator, value
             yield index, token, value

File tests/examplefiles/classes.dylan

View file
  • Ignore whitespace
 end macro;
+let x = "This size call should be seen as a builtin despite the odd case.".siZe;