Beispiel #1
0
 def get_tokens_unprocessed(self, text):
     for index, token, value in Python3Lexer.get_tokens_unprocessed(
             self, text):
         if token is Name and value in self.extra_vars:
             yield index, Name.Namespace, value
         elif token is Name and value in self.extra_callables:
             yield index, Name.Function, value
         elif token is Name and value in self.extra_classes:
             yield index, Name.Class, value
         else:
             yield index, token, value
Beispiel #2
0
 def get_tokens_unprocessed(self, text, stack=('root',)):
     for index, token, value in Python3Lexer.get_tokens_unprocessed(self, text):
         if token in Name and value in self.EXTRA_KEYWORDS:
             yield index, Name.Function, value
         else:
             yield index, token, value
Beispiel #3
0
 def get_tokens_unprocessed(self, text):
     for index, token, value in Python3Lexer.get_tokens_unprocessed(self, text):
         if token is Name and value in self.EXTRA_KEYWORDS:
             yield index, Keyword, value
         else:
             yield index, token, value