Commits

Bruce Mitchener committed 7ffbe4f

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

Comments (0)

Files changed (2)

pygments/lexers/compiled.py

     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
                     continue
-                if value in self.keywords:
+                if lowercase_value in self.keywords:
                     yield index, Keyword, value
                     continue
-                if value in self.functions:
+                if lowercase_value in self.functions:
                     yield index, Name.Builtin, value
                     continue
-                if value in self.operators:
+                if lowercase_value in self.operators:
                     yield index, Operator, value
                     continue
             yield index, token, value

tests/examplefiles/classes.dylan

        }
 end macro;
 
+let x = "This size call should be seen as a builtin despite the odd case.".siZe;
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.