Constant tree_sitter_python::HIGHLIGHT_QUERY [−][src]
pub const HIGHLIGHT_QUERY: &'static str = "; Identifier naming conventions\n\n((identifier) @constructor\n (#match? @constructor \"^[A-Z]\"))\n\n((identifier) @constant\n (#match? @constant \"^[A-Z][A-Z_]*$\"))\n\n; Builtin functions\n\n((call\n function: (identifier) @function.builtin)\n (#match?\n @function.builtin\n \"^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$\"))\n\n; Function calls\n\n(decorator) @function\n\n(call\n function: (attribute attribute: (identifier) @function.method))\n(call\n function: (identifier) @function)\n\n; Function definitions\n\n(function_definition\n name: (identifier) @function)\n\n(identifier) @variable\n(attribute attribute: (identifier) @property)\n(type (identifier) @type)\n\n; Literals\n\n[\n (none)\n (true)\n (false)\n] @constant.builtin\n\n[\n (integer)\n (float)\n] @number\n\n(comment) @comment\n(string) @string\n(escape_sequence) @escape\n\n(interpolation\n \"{\" @punctuation.special\n \"}\" @punctuation.special) @embedded\n\n[\n \"-\"\n \"-=\"\n \"!=\"\n \"*\"\n \"**\"\n \"**=\"\n \"*=\"\n \"/\"\n \"//\"\n \"//=\"\n \"/=\"\n \"&\"\n \"%\"\n \"%=\"\n \"^\"\n \"+\"\n \"->\"\n \"+=\"\n \"<\"\n \"<<\"\n \"<=\"\n \"<>\"\n \"=\"\n \":=\"\n \"==\"\n \">\"\n \">=\"\n \">>\"\n \"|\"\n \"~\"\n \"and\"\n \"in\"\n \"is\"\n \"not\"\n \"or\"\n] @operator\n\n[\n \"as\"\n \"assert\"\n \"async\"\n \"await\"\n \"break\"\n \"class\"\n \"continue\"\n \"def\"\n \"del\"\n \"elif\"\n \"else\"\n \"except\"\n \"exec\"\n \"finally\"\n \"for\"\n \"from\"\n \"global\"\n \"if\"\n \"import\"\n \"lambda\"\n \"nonlocal\"\n \"pass\"\n \"print\"\n \"raise\"\n \"return\"\n \"try\"\n \"while\"\n \"with\"\n \"yield\"\n] @keyword\n";
Expand description
The syntax highlighting query for this language.