import "../colours.syncat"; import_statement > dotted_name, import_from_statement > "from" + dotted_name { color: $name; } "__init__", "__new__", "__del__", "__repr__", "__str__", "__cmp__", "__hash__", "__nonzero__", "__unicode__", "__getattribute__", "__getattr__", "__setattr__", "__delattr__", "__get__", "__set__", "__delete__", "__len__", "__getitem__", "__setitem__", "__delitem__", "__getslice__", "__setslice__", "__delslice__", "__contains__", "__add__", "__sub__", "__mul__", "__div__", "__truediv__", "__floordiv__", "__mod__", "__divmod__", "__pow__", "__lshift__", "__rshift__", "__and__", "__or__", "__xor__", "__radd__", "__rsub__", "__rmul__", "__rdiv__", "__rtruediv__", "__rfloordiv__", "__rmod__", "__rdivmod__", "__rpow__", "__rlshift__", "__rrshift__", "__rand__", "__ror__", "__rxor__", "__iadd__", "__isub__", "__imul__", "__idiv__", "__itruediv__", "__ifloordiv__", "__imod__", "__idivmod__", "__ipow__", "__ilshift__", "__irshift__", "__iand__", "__ior__", "__ixor__", "__neg__", "__pos__", "__abs__", "__invert__", "__int__", "__long__", "__float__", "__complex__", "__oct__", "__hex__", "__coerce__", "__lt__", "__le__", "__gt__", "__ge__", "__eq__", "__ne__", "__call__", { color: $meta; } function_definition > identifier, call > identifier, call > attribute > "." ~ identifier { color: $function; } class_definition > identifier { color: $type; } identifier & /^[A-Z0-9_]+$/ { color: $value; } identifier & /^[A-Z].*/ { color: $type; } "+", "-", "*", "/", "%", "**", "//", "==", "!=", "<", ">", "<=", ">=", "and", "or", "not", "is", "&", "|", "^", "~", "<<", ">>", { color: $operator; } "=", "+=", "-=", "*=", "/=", "%=", "//=", "**=", "&=", "|=", "^=", ">>=", "<<=", { color: $builtin; } "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "lambda", "nonlocal", "pass", "raise", "return", "while", "with", "yield", { color: $keyword; } "args", "kwargs", "self", { color: $name; } "False", "True", "None", integer, float { color: $value; } comment { color: $comment; } string > interpolation > "{", string > interpolation > "}", { color: $interpolation; } string > { color: $string; } type identifier { color: $type; }