Glimmer::Highlight::PythonLexer
Inherits Glimmer::Highlight::SimpleRegexLexer < Glimmer::Highlight::Lexer < Reference < Object
PythonLexer provides syntax highlighting for Python code.
Constants
BUILTINS = ["print", "len", "range", "type", "int", "str", "float", "list", "dict", "set", "tuple", "bool", "input", "open", "enumerate", "zip", "map", "filter", "sorted", "reversed", "any", "all", "sum", "min", "max", "abs", "round", "isinstance", "issubclass", "hasattr", "getattr", "setattr", "delattr", "callable", "super", "property", "classmethod", "staticmethod", "repr", "hash", "id", "dir", "vars", "globals", "locals", "help", "iter", "next", "format"] of ::String
KEYWORD_TYPES = ["int", "float", "complex", "str", "bytes", "bytearray", "list", "tuple", "dict", "set", "frozenset", "bool", "object", "type", "Exception", "BaseException", "StopIteration", "StopAsyncIteration", "ArithmeticError", "LookupError", "ValueError", "TypeError", "KeyError", "IndexError", "AttributeError", "ImportError", "OSError", "RuntimeError", "NotImplementedError"] of ::String
KEYWORDS = ["False", "None", "True", "and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "nonlocal", "not", "or", "pass", "raise", "return", "try", "while", "with", "yield"] of ::String
Constructors
new
Source