本文整理匯總了Python中pygments.lexers._mql_builtins.constants方法的典型用法代碼示例。如果您正苦於以下問題:Python _mql_builtins.constants方法的具體用法?Python _mql_builtins.constants怎麽用?Python _mql_builtins.constants使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pygments.lexers._mql_builtins
的用法示例。
在下文中一共展示了_mql_builtins.constants方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_tokens_unprocessed
# 需要導入模塊: from pygments.lexers import _mql_builtins [as 別名]
# 或者: from pygments.lexers._mql_builtins import constants [as 別名]
def get_tokens_unprocessed(self, text):
for index, token, value in CppLexer.get_tokens_unprocessed(self, text):
if token is Name:
if value in self.constants:
yield index, Keyword.Constant, value
elif value in self.functions:
yield index, Name.Function, value
elif value in self.storage:
yield index, Keyword.Type, value
else:
yield index, token, value
elif token is Name.Function:
if value in self.structure:
yield index, Name.Other, value
else:
yield index, token, value
elif token is Keyword:
if value in self.storage:
yield index, Keyword.Type, value
else:
yield index, token, value
else:
yield index, token, value