Added vscode settings

This commit is contained in:
Kristofers Solo
2022-04-28 20:54:44 +03:00
parent 245c3ca779
commit 837a479d82
25004 changed files with 2499800 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
This directory contains tests for Atom editor. Spec files prefixed
with `python-` are autogenerated by `make`.

View File

@@ -0,0 +1,25 @@
describe("MagicPython basic integration tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("source.python")
});
});
it("recognises shebang on firstline", function() {
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#!/usr/bin/env python")).not.toBeNull();
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#! /usr/bin/env python")).not.toBeNull();
});
it("parses the grammar", function() {
expect(grammar).toBeDefined();
expect(grammar.scopeName).toBe("source.python");
});
});

View File

@@ -0,0 +1,27 @@
describe("python-console tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("text.python.console")
});
});
it("highlights >>>", function() {
tokens = grammar.tokenizeLines(">>> print")
expect(tokens[0][0].value).toBe(">>>");
expect(tokens[0][0].scopes).toEqual(
['text.python.console', 'punctuation.separator.prompt.python.console']);
expect(tokens[0][1].value).toBe(" ");
expect(tokens[0][1].scopes).toEqual(['text.python.console']);
expect(tokens[0][2].value).toBe("print");
expect(tokens[0][2].scopes).toEqual(
['text.python.console', 'support.function.builtin.python']);
});
});

View File

@@ -0,0 +1,556 @@
// !!! autogenerated; do not edit !!!
describe("Grammar Tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("source.regexp.python")
});
});
it("test/regexp/comments1.re",
function() {
tokens = grammar.tokenizeLines("foo(?#comment)bar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(?#");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[0][2].value).toBe("comment");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/comments2.re",
function() {
tokens = grammar.tokenizeLines("(?x)\n foo (?#\ncomment 1\n ) bar\n baz (?#comment 2)")
expect(tokens[0][0].value).toBe("(?x)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[1][0].value).toBe(" foo ");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][1].value).toBe("(?#");
expect(tokens[1][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[2][0].value).toBe("comment 1");
expect(tokens[2][0].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[3][0].value).toBe(" ");
expect(tokens[3][0].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[3][1].value).toBe(")");
expect(tokens[3][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[3][2].value).toBe(" bar");
expect(tokens[3][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[4][0].value).toBe(" baz ");
expect(tokens[4][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[4][1].value).toBe("(?#");
expect(tokens[4][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[4][2].value).toBe("comment 2");
expect(tokens[4][2].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[4][3].value).toBe(")");
expect(tokens[4][3].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
});
it("test/regexp/comments3.re",
function() {
tokens = grammar.tokenizeLines("foo(?#NOTE:comment)bar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(?#");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.begin.regexp"]);
expect(tokens[0][2].value).toBe("NOTE");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","comment.regexp","keyword.codetag.notation.python"]);
expect(tokens[0][3].value).toBe(":comment");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","comment.regexp"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","comment.regexp","punctuation.comment.end.regexp"]);
expect(tokens[0][5].value).toBe("bar");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/conditional1.re",
function() {
tokens = grammar.tokenizeLines("(<)?(\\w+@\\w+(?:\\.\\w+)+)(?(1)>|$)")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][1].value).toBe("<");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe(")");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][3].value).toBe("?");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][4].value).toBe("(");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][5].value).toBe("\\w");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][6].value).toBe("+");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("@");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("\\w");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("+");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][10].value).toBe("(?:");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][11].value).toBe("\\.");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\w");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][13].value).toBe("+");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][14].value).toBe(")");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][15].value).toBe("+");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][16].value).toBe(")");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[0][17].value).toBe("(");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python","keyword.operator.conditional.regexp","punctuation.parenthesis.conditional.begin.regexp"]);
expect(tokens[0][18].value).toBe("?(1)");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","keyword.operator.conditional.regexp"]);
expect(tokens[0][19].value).toBe(">");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][20].value).toBe("|");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","keyword.operator.disjunction.regexp"]);
expect(tokens[0][21].value).toBe("$");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
expect(tokens[0][22].value).toBe(")");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"]);
});
it("test/regexp/escaping1.re",
function() {
tokens = grammar.tokenizeLines("foo\\\nbar")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("\\");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[1][0].value).toBe("bar");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/escaping2.re",
function() {
tokens = grammar.tokenizeLines("start\\A\\b\\B\\d\\D\\s\\S\\w\\W\\Z\\\\\\1\\01\\1111\\0011\\xfab\\u123fb\\U1234aaaab\\c")
expect(tokens[0][0].value).toBe("start");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("\\A");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][2].value).toBe("\\b");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][3].value).toBe("\\B");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][4].value).toBe("\\d");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][5].value).toBe("\\D");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][6].value).toBe("\\s");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][7].value).toBe("\\S");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][8].value).toBe("\\w");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("\\W");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\Z");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","support.other.escape.special.regexp"]);
expect(tokens[0][11].value).toBe("\\\\");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\1");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.backreference.regexp","entity.name.tag.backreference.regexp"]);
expect(tokens[0][13].value).toBe("\\01");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("\\111");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][15].value).toBe("1");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][16].value).toBe("\\001");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][17].value).toBe("1");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][18].value).toBe("\\xfa");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
expect(tokens[0][19].value).toBe("b");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][20].value).toBe("\\u123f");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","constant.character.unicode.regexp"]);
expect(tokens[0][21].value).toBe("b");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][22].value).toBe("\\U1234aaaa");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","constant.character.unicode.regexp"]);
expect(tokens[0][23].value).toBe("b");
expect(tokens[0][23].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][24].value).toBe("\\c");
expect(tokens[0][24].scopes).toEqual(["source.regexp.python","constant.character.escape.regexp"]);
});
it("test/regexp/escaping3.re",
function() {
tokens = grammar.tokenizeLines("[start\\A\\b\\B\\d\\D\\s\\S\\w\\W\\Z\\\\\\1\\01\\1111\\0011\\xfab\\u123fb\\U1234aaaab\\c]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("s");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("t");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("a");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("r");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("t");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("\\A");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][7].value).toBe("\\b");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][8].value).toBe("\\B");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][9].value).toBe("\\d");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\D");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][11].value).toBe("\\s");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][12].value).toBe("\\S");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][13].value).toBe("\\w");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][14].value).toBe("\\W");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][15].value).toBe("\\Z");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][16].value).toBe("\\\\");
expect(tokens[0][16].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][17].value).toBe("\\1");
expect(tokens[0][17].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][18].value).toBe("\\01");
expect(tokens[0][18].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][19].value).toBe("\\111");
expect(tokens[0][19].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][20].value).toBe("1");
expect(tokens[0][20].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][21].value).toBe("\\001");
expect(tokens[0][21].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][22].value).toBe("1");
expect(tokens[0][22].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][23].value).toBe("\\xfa");
expect(tokens[0][23].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][24].value).toBe("b");
expect(tokens[0][24].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][25].value).toBe("\\u123f");
expect(tokens[0][25].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.unicode.regexp"]);
expect(tokens[0][26].value).toBe("b");
expect(tokens[0][26].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][27].value).toBe("\\U1234aaaa");
expect(tokens[0][27].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.unicode.regexp"]);
expect(tokens[0][28].value).toBe("b");
expect(tokens[0][28].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][29].value).toBe("\\c");
expect(tokens[0][29].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][30].value).toBe("]");
expect(tokens[0][30].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/escaping4.re",
function() {
tokens = grammar.tokenizeLines("[start\\a\\b\\c\\d\\f\\n\\r\\t\\v]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("s");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("t");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("a");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("r");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("t");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("\\a");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][7].value).toBe("\\b");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][8].value).toBe("\\c");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][9].value).toBe("\\d");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","support.other.escape.special.regexp"]);
expect(tokens[0][10].value).toBe("\\f");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][11].value).toBe("\\n");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][12].value).toBe("\\r");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][13].value).toBe("\\t");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("\\v");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][15].value).toBe("]");
expect(tokens[0][15].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/flags1.re",
function() {
tokens = grammar.tokenizeLines("(?aiLmsux)foo")
expect(tokens[0][0].value).toBe("(?aiLmsux)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[0][1].value).toBe("foo");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/group1.re",
function() {
tokens = grammar.tokenizeLines("(?x)\n (?:not) (foo)\n .* (?P<bar>BAR)\n \\1 (?P=bar)")
expect(tokens[0][0].value).toBe("(?x)");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","storage.modifier.flag.regexp"]);
expect(tokens[1][0].value).toBe(" ");
expect(tokens[1][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][1].value).toBe("(?:");
expect(tokens[1][1].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][2].value).toBe("not");
expect(tokens[1][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][3].value).toBe(")");
expect(tokens[1][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][4].value).toBe(" ");
expect(tokens[1][4].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][5].value).toBe("(");
expect(tokens[1][5].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[1][6].value).toBe("foo");
expect(tokens[1][6].scopes).toEqual(["source.regexp.python"]);
expect(tokens[1][7].value).toBe(")");
expect(tokens[1][7].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[2][0].value).toBe(" ");
expect(tokens[2][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[2][1].value).toBe(".");
expect(tokens[2][1].scopes).toEqual(["source.regexp.python","support.other.match.any.regexp"]);
expect(tokens[2][2].value).toBe("*");
expect(tokens[2][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[2][3].value).toBe(" ");
expect(tokens[2][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[2][4].value).toBe("(");
expect(tokens[2][4].scopes).toEqual(["source.regexp.python","meta.named.regexp","punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[2][5].value).toBe("?P<bar>");
expect(tokens[2][5].scopes).toEqual(["source.regexp.python","meta.named.regexp","entity.name.tag.named.group.regexp"]);
expect(tokens[2][6].value).toBe("BAR");
expect(tokens[2][6].scopes).toEqual(["source.regexp.python","meta.named.regexp"]);
expect(tokens[2][7].value).toBe(")");
expect(tokens[2][7].scopes).toEqual(["source.regexp.python","meta.named.regexp","punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"]);
expect(tokens[3][0].value).toBe(" ");
expect(tokens[3][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[3][1].value).toBe("\\1");
expect(tokens[3][1].scopes).toEqual(["source.regexp.python","meta.backreference.regexp","entity.name.tag.backreference.regexp"]);
expect(tokens[3][2].value).toBe(" ");
expect(tokens[3][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[3][3].value).toBe("(");
expect(tokens[3][3].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp"]);
expect(tokens[3][4].value).toBe("?P=bar");
expect(tokens[3][4].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","entity.name.tag.named.backreference.regexp"]);
expect(tokens[3][5].value).toBe(")");
expect(tokens[3][5].scopes).toEqual(["source.regexp.python","meta.backreference.named.regexp","punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp"]);
});
it("test/regexp/lookahead1.re",
function() {
tokens = grammar.tokenizeLines("foo(?=bar)")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.regexp","punctuation.parenthesis.lookahead.begin.regexp"]);
expect(tokens[0][2].value).toBe("?=");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.regexp"]);
expect(tokens[0][3].value).toBe("bar");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"]);
});
it("test/regexp/lookahead2.re",
function() {
tokens = grammar.tokenizeLines("foo(?!bar)")
expect(tokens[0][0].value).toBe("foo");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][1].value).toBe("(");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.negative.regexp","punctuation.parenthesis.lookahead.begin.regexp"]);
expect(tokens[0][2].value).toBe("?!");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.lookahead.negative.regexp"]);
expect(tokens[0][3].value).toBe("bar");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"]);
});
it("test/regexp/lookbehind1.re",
function() {
tokens = grammar.tokenizeLines("(?<=foo)bar")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.regexp","punctuation.parenthesis.lookbehind.begin.regexp"]);
expect(tokens[0][1].value).toBe("?<=");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.regexp"]);
expect(tokens[0][2].value).toBe("foo");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/lookbehind2.re",
function() {
tokens = grammar.tokenizeLines("(?<!foo)bar")
expect(tokens[0][0].value).toBe("(");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.negative.regexp","punctuation.parenthesis.lookbehind.begin.regexp"]);
expect(tokens[0][1].value).toBe("?<!");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","keyword.operator.lookbehind.negative.regexp"]);
expect(tokens[0][2].value).toBe("foo");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][3].value).toBe(")");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"]);
expect(tokens[0][4].value).toBe("bar");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python"]);
});
it("test/regexp/quantifiers1.re",
function() {
tokens = grammar.tokenizeLines("^a+b*c?d*?e+?f??$")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("a");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe("+");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][3].value).toBe("b");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe("*");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][5].value).toBe("c");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][6].value).toBe("?");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("d");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("*?");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][9].value).toBe("e");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][10].value).toBe("+?");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][11].value).toBe("f");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][12].value).toBe("??");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][13].value).toBe("$");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
});
it("test/regexp/quantifiers2.re",
function() {
tokens = grammar.tokenizeLines("^a{10}b{,10}c{10,}d{10,100}$")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("a");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][2].value).toBe("{10}");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][3].value).toBe("b");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][4].value).toBe("{,10}");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][5].value).toBe("c");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][6].value).toBe("{10,}");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][7].value).toBe("d");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python"]);
expect(tokens[0][8].value).toBe("{10,100}");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","keyword.operator.quantifier.regexp"]);
expect(tokens[0][9].value).toBe("$");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","support.other.match.end.regexp"]);
});
it("test/regexp/set1.re",
function() {
tokens = grammar.tokenizeLines("[]]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("]");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("]");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set2.re",
function() {
tokens = grammar.tokenizeLines("[^]]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("^");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","keyword.operator.negation.regexp"]);
expect(tokens[0][2].value).toBe("]");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("]");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set3.re",
function() {
tokens = grammar.tokenizeLines("[][(){}|*+?.\\]\\\\]")
expect(tokens[0][0].value).toBe("[");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][1].value).toBe("]");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][2].value).toBe("[");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][3].value).toBe("(");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe(")");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][5].value).toBe("{");
expect(tokens[0][5].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][6].value).toBe("}");
expect(tokens[0][6].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][7].value).toBe("|");
expect(tokens[0][7].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][8].value).toBe("*");
expect(tokens[0][8].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][9].value).toBe("+");
expect(tokens[0][9].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][10].value).toBe("?");
expect(tokens[0][10].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][11].value).toBe(".");
expect(tokens[0][11].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][12].value).toBe("\\]");
expect(tokens[0][12].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][13].value).toBe("\\\\");
expect(tokens[0][13].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.escape.regexp"]);
expect(tokens[0][14].value).toBe("]");
expect(tokens[0][14].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/set4.re",
function() {
tokens = grammar.tokenizeLines("^[^^]")
expect(tokens[0][0].value).toBe("^");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python","support.other.match.begin.regexp"]);
expect(tokens[0][1].value).toBe("[");
expect(tokens[0][1].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.begin.regexp"]);
expect(tokens[0][2].value).toBe("^");
expect(tokens[0][2].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","keyword.operator.negation.regexp"]);
expect(tokens[0][3].value).toBe("^");
expect(tokens[0][3].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.character.set.regexp"]);
expect(tokens[0][4].value).toBe("]");
expect(tokens[0][4].scopes).toEqual(["source.regexp.python","meta.character.set.regexp","constant.other.set.regexp punctuation.character.set.end.regexp"]);
});
it("test/regexp/trivial.re",
function() {
tokens = grammar.tokenizeLines("trivial")
expect(tokens[0][0].value).toBe("trivial");
expect(tokens[0][0].scopes).toEqual(["source.regexp.python"]);
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
describe("python-traceback tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("text.python.traceback")
});
});
it("highlights a traceback line", function() {
tokens = grammar.tokenizeLines(
' File "t.py", line 1, in <module>\n' +
' a = 1/0')
expect(tokens[0][0].value).toBe(" File ");
expect(tokens[0][0].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][1].value).toBe('"t.py"');
expect(tokens[0][1].scopes).toEqual(
['text.python.traceback', 'string.python.traceback']);
expect(tokens[0][2].value).toBe(", line ");
expect(tokens[0][2].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][3].value).toBe("1");
expect(tokens[0][3].scopes).toEqual(
['text.python.traceback', 'constant.numeric.python.traceback']);
expect(tokens[0][4].value).toBe(", in ");
expect(tokens[0][4].scopes).toEqual(['text.python.traceback']);
expect(tokens[0][5].value).toBe("<module>");
expect(tokens[0][5].scopes).toEqual(
['text.python.traceback', 'entity.name.function.python.traceback']);
expect(tokens[1][1].value).toBe("a");
expect(tokens[1][1].scopes).toEqual(['text.python.traceback']);
expect(tokens[1][3].value).toBe("=");
expect(tokens[1][3].scopes).toEqual(
['text.python.traceback', 'keyword.operator.assignment.python']);
});
});

View File

@@ -0,0 +1,43 @@
AttributeError ConnectionAbortedError
PendingDeprecationWarning
ModuleNotFoundError
SystemExit
NotImplemented True None False Ellipsis
Warning
Exception BaseException
sum oct abs type object print exec
AttributeError : source.python, support.type.exception.python
: source.python
ConnectionAbortedError : source.python, support.type.exception.python
PendingDeprecationWarning : source.python, support.type.exception.python
ModuleNotFoundError : source.python, support.type.exception.python
SystemExit : source.python, support.type.exception.python
NotImplemented : constant.language.python, source.python
: source.python
True : constant.language.python, source.python
: source.python
None : constant.language.python, source.python
: source.python
False : constant.language.python, source.python
: source.python
Ellipsis : constant.language.python, source.python
Warning : source.python, support.type.exception.python
Exception : source.python, support.type.exception.python
: source.python
BaseException : source.python, support.type.exception.python
sum : source.python, support.function.builtin.python
: source.python
oct : source.python, support.function.builtin.python
: source.python
abs : source.python, support.function.builtin.python
: source.python
type : source.python, support.type.python
: source.python
object : source.python, support.type.python
: source.python
print : source.python, support.function.builtin.python
: source.python
exec : source.python, support.function.builtin.python

View File

@@ -0,0 +1,27 @@
Error
file reduce intern raw_input unicode cmp basestring execfile long xrange apply
Error : source.python
file : source.python, variable.legacy.builtin.python
: source.python
reduce : source.python, variable.legacy.builtin.python
: source.python
intern : source.python, variable.legacy.builtin.python
: source.python
raw_input : source.python, variable.legacy.builtin.python
: source.python
unicode : source.python, variable.legacy.builtin.python
: source.python
cmp : source.python, variable.legacy.builtin.python
: source.python
basestring : source.python, variable.legacy.builtin.python
: source.python
execfile : source.python, variable.legacy.builtin.python
: source.python
long : source.python, variable.legacy.builtin.python
: source.python
xrange : source.python, variable.legacy.builtin.python
: source.python
apply : source.python

View File

@@ -0,0 +1,186 @@
__all__ = ['bar', 'baz']
some.__bases__
some.__class__
assert __debug__
__builtins__
__builtins__.len
print(__builtins__)
some.__dict__
some.__doc__
some.__file__
some.__members__
some.__metaclass__
some.__methods__
some.__module__
some.__mro__
some.__name__
some.__slots__
some.__subclasses__
some.__version__
some.__weakref__
some.__qualname__
some.__code__
some.__wrapped__
some.__signature__
some.__defaults__
some.__func__
some.__self__
some.__kwdefaults__
some.__matmul__
some.__imatmul__
some.__rmatmul__
some.__annotations__
some.__init_subclass__
some.__set_name__
some.__fspath__
some.__classcell__
some.__bytes__
some.__spec__
some.__path__
some.__prepare__
some.__package__
some.__traceback__
some.__notspecial__
__all__ : source.python, support.variable.magic.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
[ : punctuation.definition.list.begin.python, source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
bar : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
baz : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
] : punctuation.definition.list.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__bases__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python
assert : keyword.control.flow.python, source.python
: source.python
__debug__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
__builtins__ : source.python, support.variable.magic.python
. : punctuation.separator.period.python, source.python
len : source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
__builtins__ : meta.function-call.arguments.python, meta.function-call.python, source.python, support.variable.magic.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
__dict__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__doc__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__file__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__members__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__metaclass__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__methods__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__module__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__mro__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__name__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__slots__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__subclasses__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__version__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__weakref__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__qualname__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__code__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__wrapped__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__signature__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__defaults__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__func__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__self__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__kwdefaults__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__matmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__imatmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__rmatmul__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__annotations__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__init_subclass__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__set_name__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__fspath__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__classcell__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__bytes__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__spec__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__path__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__prepare__ : source.python, support.function.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__package__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__traceback__ : source.python, support.variable.magic.python
some : source.python
. : punctuation.separator.period.python, source.python
__notspecial__ : source.python

View File

@@ -0,0 +1,27 @@
some.int
some.sum
some.super
some.unicode
some.foo
some.Exception
some : source.python
. : punctuation.separator.period.python, source.python
int : source.python
some : source.python
. : punctuation.separator.period.python, source.python
sum : source.python
some : source.python
. : punctuation.separator.period.python, source.python
super : source.python
some : source.python
. : punctuation.separator.period.python, source.python
unicode : source.python
some : source.python
. : punctuation.separator.period.python, source.python
foo : source.python
some : source.python
. : punctuation.separator.period.python, source.python
Exception : source.python

View File

@@ -0,0 +1,26 @@
some. True
some. \
True
True
some.
True
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
True : keyword.illegal.name.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python
True : constant.language.python, source.python
some : source.python
. : punctuation.separator.period.python, source.python
: source.python
: source.python
True : keyword.illegal.name.python, source.python

View File

@@ -0,0 +1,13 @@
exec()
exec(code_obj)
exec : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
exec : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
code_obj : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,8 @@
breakpoint()
breakpoint : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,39 @@
some_call(A, b, c[1], *args, FOO=lambda:{'q': 42}, **kwargs)
some_call : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
A : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
b : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
c : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, source.python
[ : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.function-call.arguments.python, meta.function-call.python, meta.item-access.python, punctuation.definition.arguments.end.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
args : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
FOO : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
lambda : meta.function-call.arguments.python, meta.function-call.python, meta.lambda-function.python, source.python, storage.type.function.lambda.python
: : meta.function-call.arguments.python, meta.function-call.python, meta.lambda-function.python, punctuation.section.function.lambda.begin.python, source.python
{ : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.begin.python, source.python
' : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
q : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
' : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.dict.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
42 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
} : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.end.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
kwargs : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,32 @@
x = foo(True,
3 * 4,
*a,
**bar)
x : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
True : constant.language.python, meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
3 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.arithmetic.python, meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
4 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,10 @@
foo(from=1)
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
from : keyword.control.flow.python, meta.function-call.arguments.python, meta.function-call.python, source.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,20 @@
foo.class(a)
foo.and()
foo.if
foo : source.python
. : punctuation.separator.period.python, source.python
class : keyword.control.flow.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
and : keyword.control.flow.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
if : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,31 @@
foo.1
foo(bar=baz)(ham=sam)
foo.None and foo.None.baz
foo : source.python
. : punctuation.separator.period.python, source.python
1 : source.python
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
baz : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
ham : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
sam : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
None : keyword.illegal.name.python, source.python
: source.python
and : keyword.operator.logical.python, source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
None : keyword.illegal.name.python, source.python
. : punctuation.separator.period.python, source.python
baz : source.python

View File

@@ -0,0 +1,15 @@
f(*a)
f(**a)
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,29 @@
f( *a , *())
f( **a , **{})
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.begin.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
f : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.function-call.arguments.python, meta.function-call.python, source.python
{ : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.begin.python, source.python
} : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.dict.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,49 @@
foo.__class__ (foo=bar)
foo.__class__(foo=bar)
foo.__add__ (foo=bar)
foo.__add__(foo=bar)
foo.__class__ 1
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python
: source.python
1 : constant.numeric.dec.python, source.python

View File

@@ -0,0 +1,45 @@
foo. __class__(foo=bar)
foo. __class__ (foo=bar)
foo. __add__ (foo=bar)
foo. __add__(foo=bar)
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__class__ : meta.function-call.python, source.python, support.variable.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
foo : source.python
. : punctuation.separator.period.python, source.python
: source.python
__add__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,10 @@
foo(type=1)
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
type : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,94 @@
print "is", 2*2
print("is", 2*2)
print x,
print(x, end=" ")
print
print()
print >>sys.stderr, "er"
print("er", file=sys.stderr)
print (x, y)
print((x, y))
print : source.python, support.function.builtin.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
is : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : punctuation.separator.element.python, source.python
: source.python
2 : constant.numeric.dec.python, source.python
* : keyword.operator.arithmetic.python, source.python
2 : constant.numeric.dec.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
is : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
* : keyword.operator.arithmetic.python, meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
x : source.python
, : punctuation.separator.element.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
end : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
: meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
>> : keyword.operator.bitwise.python, source.python
sys : source.python
. : punctuation.separator.period.python, source.python
stderr : source.python
, : punctuation.separator.element.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
er : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
er : meta.function-call.arguments.python, meta.function-call.python, source.python, string.quoted.single.python
" : meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
file : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
sys : meta.function-call.arguments.python, meta.function-call.python, source.python
. : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.period.python, source.python
stderr : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
: meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
y : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
( : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.begin.python, source.python
x : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.element.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
y : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.arguments.python, meta.function-call.python, punctuation.parenthesis.end.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,14 @@
class Foo -> None: pass
class : source.python, storage.type.class.python
: source.python
Foo : source.python
: source.python
-> : invalid.illegal.annotation.python, source.python
: source.python
None : constant.language.python, source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,30 @@
class Foo(Bar(q=1) (w=2) (e=3)): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
q : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
w : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
2 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
( : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
e : meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
3 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.class.inheritance.python, meta.class.python, meta.function-call.python, punctuation.definition.arguments.end.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,80 @@
class F:
def __init__(self, a, b=1):
self.a = a
self.b = b
print(self)
self()
a.self = 1
a.self.bar = 2
self[123]
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
__init__ : meta.function.python, source.python, support.function.magic.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
b : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
a : source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
: source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
self : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.self.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
self : meta.function-call.python, source.python, variable.language.special.self.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
self : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
self : source.python
. : punctuation.separator.period.python, source.python
bar : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
2 : constant.numeric.dec.python, source.python
: source.python
self : meta.item-access.python, source.python, variable.language.special.self.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,87 @@
class F:
@classmethod
def meth(cls, a, b=1):
cls.a = a
cls.b = b
print(cls)
cls()
cls + 1
a.cls = 1
a.cls.__name__
cls[123]
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.decorator.python, source.python
@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python
classmethod : meta.function.decorator.python, source.python, support.type.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
meth : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
cls : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.cls.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
b : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
= : keyword.operator.python, meta.function.parameters.python, meta.function.python, source.python
1 : constant.numeric.dec.python, meta.function.parameters.python, meta.function.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
cls : source.python, variable.language.special.cls.python
. : punctuation.separator.period.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
a : source.python
: source.python
cls : source.python, variable.language.special.cls.python
. : punctuation.separator.period.python, source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
: source.python
print : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
cls : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.language.special.cls.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
cls : meta.function-call.python, source.python, variable.language.special.cls.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
cls : source.python, variable.language.special.cls.python
: source.python
+ : keyword.operator.arithmetic.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
cls : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
a : source.python
. : punctuation.separator.period.python, source.python
cls : source.python
. : punctuation.separator.period.python, source.python
__name__ : source.python, support.variable.magic.python
: source.python
cls : meta.item-access.python, source.python, variable.language.special.cls.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
123 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,18 @@
class A(*a, **b): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
A : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
* : keyword.operator.unpacking.arguments.python, meta.class.inheritance.python, meta.class.python, source.python
a : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
** : keyword.operator.unpacking.arguments.python, meta.class.inheritance.python, meta.class.python, source.python
b : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,34 @@
class F(f.Exception, f.type, Exception, Exception.a, b=Exception):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
F : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
f : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
Exception : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
f : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
type : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
a : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
b : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python, variable.parameter.class.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,19 @@
class Spam(Foo, from==12):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
from : keyword.control.flow.python, meta.class.inheritance.python, meta.class.python, source.python
== : keyword.operator.comparison.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,26 @@
class Foo(Bar, str, type=12, metaclass=FooMeta): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
str : meta.class.inheritance.python, meta.class.python, source.python, support.type.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
type : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python, variable.parameter.class.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
metaclass : meta.class.inheritance.python, meta.class.python, source.python, support.type.metaclass.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
FooMeta : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,38 @@
@dec
# Bar.name=... is not legal, but the test is for highlighter not breaking badly
class Spam(Foo.Bar, Bar.name={'very': 'odd'}):
pass
@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python
dec : entity.name.function.decorator.python, meta.function.decorator.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
Bar.name=... is not legal, but the test is for highlighter not breaking badly : comment.line.number-sign.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
Bar : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
. : meta.class.inheritance.python, meta.class.python, punctuation.separator.period.python, source.python
name : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
{ : meta.class.inheritance.python, meta.class.python, punctuation.definition.dict.begin.python, source.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
very : meta.class.inheritance.python, meta.class.python, source.python, string.quoted.single.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.class.inheritance.python, meta.class.python, punctuation.separator.dict.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
odd : meta.class.inheritance.python, meta.class.python, source.python, string.quoted.single.python
' : meta.class.inheritance.python, meta.class.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
} : meta.class.inheritance.python, meta.class.python, punctuation.definition.dict.end.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,19 @@
class Spam(Foo, from=12):
pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Spam : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Foo : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
from : keyword.control.flow.python, meta.class.inheritance.python, meta.class.python, source.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
12 : constant.numeric.dec.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,11 @@
class Exception: pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Exception : meta.class.python, source.python, support.type.exception.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,16 @@
class Foo(Exception, MyObj): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
Exception : meta.class.inheritance.python, meta.class.python, source.python, support.type.exception.python
, : meta.class.inheritance.python, meta.class.python, punctuation.separator.inheritance.python, source.python
: meta.class.inheritance.python, meta.class.python, source.python
MyObj : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,15 @@
class Foo(metaclass=FooMeta): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
metaclass : meta.class.inheritance.python, meta.class.python, source.python, support.type.metaclass.python
= : keyword.operator.assignment.python, meta.class.inheritance.python, meta.class.python, source.python
FooMeta : entity.other.inherited-class.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,13 @@
class class:
pass
# doesn't break
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
class : keyword.control.flow.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
doesn't break : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,30 @@
class None: pass
class True(False): pass
class False(object): pass
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
None : keyword.illegal.name.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
True : keyword.illegal.name.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
False : constant.language.python, meta.class.inheritance.python, meta.class.python, source.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
False : keyword.illegal.name.python, meta.class.python, source.python
( : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.begin.python, source.python
object : meta.class.inheritance.python, meta.class.python, source.python, support.type.python
) : meta.class.inheritance.python, meta.class.python, punctuation.definition.inheritance.end.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,16 @@
class Foo:
__slots__ = ()
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
__slots__ : source.python, support.variable.magic.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
) : punctuation.parenthesis.end.python, source.python

View File

@@ -0,0 +1,99 @@
class Foo:
def __init__(self):
super().__init__(foo=1)
super(). __init__(foo=1)
super(). \
__init__(foo=1)
__init__(foo=1)
foo.__init__(bar=1)
__init__(bar=1)
if:
__init__(bar=1)
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
__init__ : meta.function.python, source.python, support.function.magic.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
foo : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
if : keyword.control.flow.python, source.python
: : punctuation.separator.colon.python, source.python
: source.python
__init__ : meta.function-call.python, source.python, support.function.magic.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
bar : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,31 @@
# XXX foo
# FIXME: bug
# NB: XXXx xXXX but XXX!
# ALSO HACK and NOTE and TODO highlight XXX and FIXME.
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
foo : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: comment.line.number-sign.python, source.python
FIXME : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
: bug : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
NB: XXXx xXXX but : comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
! : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
ALSO : comment.line.number-sign.python, source.python
HACK : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
NOTE : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
TODO : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
highlight : comment.line.number-sign.python, source.python
XXX : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
and : comment.line.number-sign.python, source.python
FIXME : comment.line.number-sign.python, keyword.codetag.notation.python, source.python
. : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,45 @@
# type: ignore # test
# type: ignore
# type:ignore
#type:ignore
# type: ignore 1
# type: 1 ignore
# type : ignore
##type: ignore
#.type: ignore
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
test : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python
1 : comment.line.number-sign.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
1 : comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type : ignore : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
#type: ignore : comment.line.number-sign.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
.type: ignore : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,21 @@
a = 1 # type:
a = 1 # type: # 123
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type: : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
1 : constant.numeric.dec.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
type: # 123 : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,6 @@
# abc type: def
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
abc type: def : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,40 @@
x = None # type: List[str, a]
y = None # type: Dict[int, Any] # int
x : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
None : constant.language.python, source.python
: source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
List : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
[ : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
str : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
, : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
a : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python
] : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
y : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
None : constant.language.python, source.python
: source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
Dict : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
[ : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
int : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
, : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
Any : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
] : comment.line.number-sign.python, comment.typehint.punctuation.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
int : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,22 @@
if isinstance(t1, TypeVar): # type: ignore
continue
if : keyword.control.flow.python, source.python
: source.python
isinstance : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
t1 : meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
TypeVar : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: : punctuation.separator.colon.python, source.python
: source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
: source.python
continue : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,19 @@
a=1#type:int
a=1#type:int#int
a : source.python
= : keyword.operator.assignment.python, source.python
1 : constant.numeric.dec.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
int : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
a : source.python
= : keyword.operator.assignment.python, source.python
1 : constant.numeric.dec.python, source.python
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
int : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
int : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,91 @@
class Foo:
'''TEST'''
class Foo:
r'''TEST'''
class Foo:
R'''TEST'''
class Foo:
u'''TEST'''
class Foo:
U'''TEST'''
class Foo:
b'''TEST'''
class Foo:
B'''TEST'''
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,92 @@
class Foo:
"""TEST"""
class Foo:
r"""TEST"""
class Foo:
R"""TEST"""
class Foo:
u"""TEST"""
class Foo:
U"""TEST"""
class Foo:
b"""TEST"""
class Foo:
B"""TEST"""
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,25 @@
''' foo bar XXX baz '''
def foo():
''' foo FIXME baz '''
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
foo bar : source.python, string.quoted.docstring.multi.python
XXX : keyword.codetag.notation.python, source.python, string.quoted.docstring.multi.python
baz : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
foo : source.python, string.quoted.docstring.multi.python
FIXME : keyword.codetag.notation.python, source.python, string.quoted.docstring.multi.python
baz : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,25 @@
' foo bar XXX baz '
def foo():
' foo FIXME baz '
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
foo bar : source.python, string.quoted.docstring.single.python
XXX : keyword.codetag.notation.python, source.python, string.quoted.docstring.single.python
baz : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
foo : source.python, string.quoted.docstring.single.python
FIXME : keyword.codetag.notation.python, source.python, string.quoted.docstring.single.python
baz : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python

View File

@@ -0,0 +1,52 @@
# not a docstring
a = \
r'''
>>> print(42)
a[wer]
'''
b = \
# docstring
r'''
>>> print()
a[wer]
'''
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
not a docstring : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.multi.python
>>> print : source.python, string.regexp.quoted.multi.python
( : punctuation.parenthesis.begin.regexp, source.python, string.regexp.quoted.multi.python, support.other.parenthesis.regexp
42 : source.python, string.regexp.quoted.multi.python
) : punctuation.parenthesis.end.regexp, source.python, string.regexp.quoted.multi.python, support.other.parenthesis.regexp
a : source.python, string.regexp.quoted.multi.python
[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.regexp.quoted.multi.python
w : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
e : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
r : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.regexp.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.multi.python
: source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
docstring : comment.line.number-sign.python, source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
print() : source.python, string.quoted.docstring.raw.multi.python
a[wer] : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,12 @@
'
'
# comment
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
: invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
: invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
comment : comment.line.number-sign.python, source.python

View File

@@ -0,0 +1,44 @@
# not a docstring
a = \
r'>>> print(42)a[wer]'
b = \
# docstring
r'>>> print()a[wer]'
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
not a docstring : comment.line.number-sign.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.single.python
>>> print : source.python, string.regexp.quoted.single.python
( : punctuation.parenthesis.begin.regexp, source.python, string.regexp.quoted.single.python, support.other.parenthesis.regexp
42 : source.python, string.regexp.quoted.single.python
) : punctuation.parenthesis.end.regexp, source.python, string.regexp.quoted.single.python, support.other.parenthesis.regexp
a : source.python, string.regexp.quoted.single.python
[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.regexp.quoted.single.python
w : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.single.python
e : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.single.python
r : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.single.python
] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.regexp.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.single.python
: source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
docstring : comment.line.number-sign.python, source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
>>> print()a[wer] : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python

View File

@@ -0,0 +1,61 @@
# not a docstring
a = \
r'''
>>> print(42)
a[wer]
'''
b = \
# docstring
r'''
>>> print()
a[wer]
'''
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
not a docstring : comment.line.number-sign.python, source.python
: source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
r : source.python, storage.type.string.python, string.regexp.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.regexp.quoted.multi.python
>>> print : source.python, string.regexp.quoted.multi.python
( : punctuation.parenthesis.begin.regexp, source.python, string.regexp.quoted.multi.python, support.other.parenthesis.regexp
42 : source.python, string.regexp.quoted.multi.python
) : punctuation.parenthesis.end.regexp, source.python, string.regexp.quoted.multi.python, support.other.parenthesis.regexp
a : source.python, string.regexp.quoted.multi.python
[ : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.begin.regexp, source.python, string.regexp.quoted.multi.python
w : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
e : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
r : constant.character.set.regexp, meta.character.set.regexp, source.python, string.regexp.quoted.multi.python
] : constant.other.set.regexp, meta.character.set.regexp, punctuation.character.set.end.regexp, source.python, string.regexp.quoted.multi.python
: source.python, string.regexp.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.regexp.quoted.multi.python
: source.python
: source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
docstring : comment.line.number-sign.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
print() : source.python, string.quoted.docstring.raw.multi.python
a[wer] : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,47 @@
'implicit ' "concatenation"
'''implicit
''' 'concatenation'
'''implicit
''' """
concatenation
"""
'implicit' '''
concatenation
'''
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
implicit : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
concatenation : source.python, string.quoted.docstring.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
implicit : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
concatenation : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
implicit : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
concatenation : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
implicit : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
concatenation : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,111 @@
def foo():
'''TE\'''ST'''
def foo():
r'''TE\'''ST'''
def foo():
R'''TE\'''ST'''
def foo():
u'''TEST'''
def foo():
U'''TEST'''
def foo():
b'''TEST'''
def foo():
B'''TEST'''
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TE : source.python, string.quoted.docstring.multi.python
\' : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
''ST : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TE : source.python, string.quoted.docstring.raw.multi.python
\' : source.python, string.quoted.docstring.raw.multi.python
''ST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TE : source.python, string.quoted.docstring.raw.multi.python
\' : source.python, string.quoted.docstring.raw.multi.python
''ST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,111 @@
def foo():
"""TE\"""ST"""
def foo():
r"""TE\"""ST"""
def foo():
R"""TE\"""ST"""
def foo():
u"""TEST"""
def foo():
U"""TEST"""
def foo():
b"""TEST"""
def foo():
B"""TEST"""
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TE : source.python, string.quoted.docstring.multi.python
\" : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
""ST : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TE : source.python, string.quoted.docstring.raw.multi.python
\" : source.python, string.quoted.docstring.raw.multi.python
""ST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TE : source.python, string.quoted.docstring.raw.multi.python
\" : source.python, string.quoted.docstring.raw.multi.python
""ST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,111 @@
def foo():
'TE\'ST'
def foo():
r'TE\'ST'
def foo():
R'TE\'ST'
def foo():
u'TEST'
def foo():
U'TEST'
def foo():
b'TEST'
def foo():
B'TEST'
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TE : source.python, string.quoted.docstring.single.python
\' : constant.character.escape.python, source.python, string.quoted.docstring.single.python
ST : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\' : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\' : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,111 @@
def foo():
"TE\"ST"
def foo():
r"TE\"ST"
def foo():
R"TE\"ST"
def foo():
u"TEST"
def foo():
U"TEST"
def foo():
b"TEST"
def foo():
B"TEST"
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TE : source.python, string.quoted.docstring.single.python
\" : constant.character.escape.python, source.python, string.quoted.docstring.single.python
ST : source.python, string.quoted.docstring.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\" : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\" : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
u : source.python, storage.type.string.python, string.quoted.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
U : source.python, storage.type.string.python, string.quoted.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
: source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
B : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,59 @@
'''Module docstring
{{ %d simple \\ string \
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005
multiline "unicode" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
'''
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
Module docstring : source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
{{ %d simple : source.python, string.quoted.docstring.multi.python
\\ : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
string : source.python, string.quoted.docstring.multi.python
\ : constant.language.python, source.python, string.quoted.docstring.multi.python
foo : source.python, string.quoted.docstring.multi.python
\' : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\" : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\a : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\b : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
\c : source.python, string.quoted.docstring.multi.python
\f : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\n : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\r : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\t : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\v : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\5 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\55 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\555 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\05 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\005 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
multiline "unicode" string : source.python, string.quoted.docstring.multi.python
\ : constant.language.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\xf1 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\u1234 : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
aaaa : source.python, string.quoted.docstring.multi.python
\U1234aaaa : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
\N{BLACK SPADE SUIT} : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,69 @@
r'''Module docstring
{{ %d simple \\ string \
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005
multiline "unicode" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
>>> aaa
'''
R'''Module docstring
{{ %d simple \\ string \
foo \' \" \a \b \c \f \n \r \t \v \5 \55 \555 \05 \005
multiline "unicode" string \
\xf1 \u1234aaaa \U1234aaaa
\N{BLACK SPADE SUIT}
>>> aaa
'''
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
Module docstring : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
{{ %d simple : source.python, string.quoted.docstring.raw.multi.python
\\ : source.python, string.quoted.docstring.raw.multi.python
string : source.python, string.quoted.docstring.raw.multi.python
\ : source.python, string.quoted.docstring.raw.multi.python
foo : source.python, string.quoted.docstring.raw.multi.python
\' : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
\" : source.python, string.quoted.docstring.raw.multi.python
\a \b \c \f \n \r \t \v \5 \55 \555 \05 \005 : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
multiline "unicode" string : source.python, string.quoted.docstring.raw.multi.python
\ : source.python, string.quoted.docstring.raw.multi.python
\xf1 \u1234aaaa \U1234aaaa : source.python, string.quoted.docstring.raw.multi.python
\N{BLACK SPADE SUIT} : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
aaa : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
Module docstring : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
{{ %d simple : source.python, string.quoted.docstring.raw.multi.python
\\ : source.python, string.quoted.docstring.raw.multi.python
string : source.python, string.quoted.docstring.raw.multi.python
\ : source.python, string.quoted.docstring.raw.multi.python
foo : source.python, string.quoted.docstring.raw.multi.python
\' : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
\" : source.python, string.quoted.docstring.raw.multi.python
\a \b \c \f \n \r \t \v \5 \55 \555 \05 \005 : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
multiline "unicode" string : source.python, string.quoted.docstring.raw.multi.python
\ : source.python, string.quoted.docstring.raw.multi.python
\xf1 \u1234aaaa \U1234aaaa : source.python, string.quoted.docstring.raw.multi.python
\N{BLACK SPADE SUIT} : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
aaa : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,15 @@
r'''Module docstring
(?x) # not a regexp
foo[20]{42} # not a comment
'''
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
Module docstring : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
(?x) # not a regexp : source.python, string.quoted.docstring.raw.multi.python
foo[20]{42} # not a comment : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,13 @@
r'''Module docstring
%(language)s has %(number)03d quote types.
'''
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
Module docstring : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
%(language)s has %(number)03d quote types. : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,8 @@
'''{foo}'''
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
{foo} : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,110 @@
'''TEST'''
class Foo:
# comment
R'''TEST'''
def foo(self, a:'''TEST''') -> '''TEST''': #ok
r'''TEST'''
with bar:
pass
def bar(self, a:'''TEST''') -> '''TEST''': pass
'''TEST''' # additional docstring
with bar:
pass
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
comment : comment.line.number-sign.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
: : meta.function.parameters.python, meta.function.python, punctuation.separator.annotation.python, source.python
''' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : meta.function.parameters.python, meta.function.python, source.python, string.quoted.multi.python
''' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.multi.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: meta.function.python, source.python
-> : meta.function.python, punctuation.separator.annotation.result.python, source.python
: meta.function.python, source.python
''' : meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : meta.function.python, source.python, string.quoted.multi.python
''' : meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
ok : comment.line.number-sign.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
with : keyword.control.flow.python, source.python
: source.python
bar : source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
: source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
bar : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
: : meta.function.parameters.python, meta.function.python, punctuation.separator.annotation.python, source.python
''' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : meta.function.parameters.python, meta.function.python, source.python, string.quoted.multi.python
''' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.multi.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: meta.function.python, source.python
-> : meta.function.python, punctuation.separator.annotation.result.python, source.python
: meta.function.python, source.python
''' : meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : meta.function.python, source.python, string.quoted.multi.python
''' : meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.multi.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
additional docstring : comment.line.number-sign.python, source.python
: source.python
with : keyword.control.flow.python, source.python
: source.python
bar : source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,109 @@
'TEST'
class Foo:
# comment
R'TEST'
def foo(self, a:'TEST') -> 'TEST': #ok
r'TEST'
with bar:
pass
def bar(self, a:'TEST') -> 'TEST': pass
'TEST' # additional docstring
with bar:
pass
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TEST : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
class : meta.class.python, source.python, storage.type.class.python
: meta.class.python, source.python
Foo : entity.name.type.class.python, meta.class.python, source.python
: : meta.class.python, punctuation.section.class.begin.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
comment : comment.line.number-sign.python, source.python
: source.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TEST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
: : meta.function.parameters.python, meta.function.python, punctuation.separator.annotation.python, source.python
' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : meta.function.parameters.python, meta.function.python, source.python, string.quoted.single.python
' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: meta.function.python, source.python
-> : meta.function.python, punctuation.separator.annotation.result.python, source.python
: meta.function.python, source.python
' : meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : meta.function.python, source.python, string.quoted.single.python
' : meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
ok : comment.line.number-sign.python, source.python
: source.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TEST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
with : keyword.control.flow.python, source.python
: source.python
bar : source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
: source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
bar : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
self : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python, variable.parameter.function.language.special.self.python
, : meta.function.parameters.python, meta.function.python, punctuation.separator.parameters.python, source.python
: meta.function.parameters.python, meta.function.python, source.python
a : meta.function.parameters.python, meta.function.python, source.python, variable.parameter.function.language.python
: : meta.function.parameters.python, meta.function.python, punctuation.separator.annotation.python, source.python
' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : meta.function.parameters.python, meta.function.python, source.python, string.quoted.single.python
' : meta.function.parameters.python, meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: meta.function.python, source.python
-> : meta.function.python, punctuation.separator.annotation.result.python, source.python
: meta.function.python, source.python
' : meta.function.python, punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : meta.function.python, source.python, string.quoted.single.python
' : meta.function.python, punctuation.definition.string.end.python, source.python, string.quoted.single.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TEST : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
additional docstring : comment.line.number-sign.python, source.python
: source.python
with : keyword.control.flow.python, source.python
: source.python
bar : source.python
: : punctuation.separator.colon.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,39 @@
'''TEST'''
r'''TEST'''
R'''TEST'''
u'''TEST'''
U'''TEST'''
b'''TEST'''
B'''TEST'''
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
U : source.python, storage.type.string.python, string.quoted.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,40 @@
"""TEST"""
r"""TEST"""
R"""TEST"""
u"""TEST"""
U"""TEST"""
b"""TEST"""
B"""TEST"""
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
TEST : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
TEST : source.python, string.quoted.docstring.raw.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python
: source.python
u : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
U : source.python, storage.type.string.python, string.quoted.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.multi.python
TEST : source.python, string.quoted.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.multi.python
b : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python
B : source.python, storage.type.string.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.multi.python
TEST : source.python, string.quoted.binary.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.binary.multi.python

View File

@@ -0,0 +1,45 @@
'TE\'ST'
r'TE\'ST'
R'TE\'ST'
u'TEST'
U'TEST'
b'TEST'
B'TEST'
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TE : source.python, string.quoted.docstring.single.python
\' : constant.character.escape.python, source.python, string.quoted.docstring.single.python
ST : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\' : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\' : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
u : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
U : source.python, storage.type.string.python, string.quoted.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
B : source.python, storage.type.string.python, string.quoted.binary.single.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,45 @@
"TE\"ST"
r"TE\"ST"
R"TE\"ST"
u"TEST"
U"TEST"
b"TEST"
B"TEST"
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
TE : source.python, string.quoted.docstring.single.python
\" : constant.character.escape.python, source.python, string.quoted.docstring.single.python
ST : source.python, string.quoted.docstring.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\" : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
TE : source.python, string.quoted.docstring.raw.single.python
\" : source.python, string.quoted.docstring.raw.single.python
ST : source.python, string.quoted.docstring.raw.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
: source.python
u : source.python, storage.type.string.python, string.quoted.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
U : source.python, storage.type.string.python, string.quoted.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
TEST : source.python, string.quoted.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.single.python
b : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python
B : source.python, storage.type.string.python, string.quoted.binary.single.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.binary.single.python
TEST : source.python, string.quoted.binary.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.binary.single.python

View File

@@ -0,0 +1,38 @@
'''>>> print("""docstring""")'''
async
""">>> print('''docstring''')"""
await
"""\n>>> print('''docstring''')"""
await
""" >>> print('''docstring''')"""
await
""" 1 >>> print('''docstring''')"""
await
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.multi.python
print("""docstring""") : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
async : keyword.control.flow.python, source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.multi.python
print('''docstring''') : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
await : keyword.control.flow.python, source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
\n : constant.character.escape.python, source.python, string.quoted.docstring.multi.python
>>> print('''docstring''') : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
await : keyword.control.flow.python, source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
: source.python, string.quoted.docstring.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.multi.python
print('''docstring''') : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
await : keyword.control.flow.python, source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
1 >>> print('''docstring''') : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
await : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,29 @@
def foo():
'''>>> print("""docstring""")'''
def foo():
""">>> print('''docstring''')"""
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.multi.python
print("""docstring""") : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.multi.python
print('''docstring''') : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,27 @@
def foo():
'>>> print("docstring")'
def foo():
">>> print('docstring')"
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
>>> print("docstring") : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
>>> print('docstring') : source.python, string.quoted.docstring.single.python
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python

View File

@@ -0,0 +1,29 @@
r'''Module docstring
Some text followed by code sample:
>>> for a in foo(2, b=1,
... c=3):
... print(a)
0
1
'''
r : source.python, storage.type.string.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.multi.python
Module docstring : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
Some text followed by code sample: : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
>>> : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
for a in foo(2, b=1, : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
... : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
c=3): : source.python, string.quoted.docstring.raw.multi.python
: source.python, string.quoted.docstring.raw.multi.python
... : keyword.control.flow.python, source.python, string.quoted.docstring.raw.multi.python
print(a) : source.python, string.quoted.docstring.raw.multi.python
0 : source.python, string.quoted.docstring.raw.multi.python
1 : source.python, string.quoted.docstring.raw.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.multi.python

View File

@@ -0,0 +1,13 @@
"""
def foo():
...
>>>
"""
""" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
def foo(): : source.python, string.quoted.docstring.multi.python
... : source.python, string.quoted.docstring.multi.python
>>> : source.python, string.quoted.docstring.multi.python
""" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python

View File

@@ -0,0 +1,9 @@
'''...'''
...
''' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.multi.python
... : source.python, string.quoted.docstring.multi.python
''' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.multi.python
... : constant.other.ellipsis.python, source.python

View File

@@ -0,0 +1,21 @@
#:
@asd
def foo():
pass
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
: : comment.line.number-sign.python, source.python
: meta.function.decorator.python, source.python
@ : entity.name.function.decorator.python, meta.function.decorator.python, punctuation.definition.decorator.python, source.python
asd : entity.name.function.decorator.python, meta.function.decorator.python, source.python
: meta.function.python, source.python
def : meta.function.python, source.python, storage.type.function.python
: meta.function.python, source.python
foo : entity.name.function.python, meta.function.python, source.python
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
: : meta.function.python, punctuation.section.function.begin.python, source.python
: source.python
pass : keyword.control.flow.python, source.python

View File

@@ -0,0 +1,61 @@
QQQQ QQQQ_123 QQQQ123 PROTOCOL_v2 QQQ.bar baz.AA_a _AAA foo._AAA
QQQq QQQq123 self.FOOO() _ _1 __1 _1A __1A _a __a __ ___ ___a ___1 __aA ___Aa
QQQQ : constant.other.caps.python, source.python
: source.python
QQQQ_123 : constant.other.caps.python, source.python
: source.python
QQQQ123 : constant.other.caps.python, source.python
: source.python
PROTOCOL_v2 : constant.other.caps.python, source.python
: source.python
QQQ : constant.other.caps.python, source.python
. : punctuation.separator.period.python, source.python
bar : source.python
: source.python
baz : source.python
. : punctuation.separator.period.python, source.python
AA_a : constant.other.caps.python, source.python
: source.python
_AAA : constant.other.caps.python, source.python
: source.python
foo : source.python
. : punctuation.separator.period.python, source.python
_AAA : constant.other.caps.python, source.python
QQQq : source.python
: source.python
QQQq123 : source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
FOOO : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
_ : source.python
: source.python
_1 : source.python
: source.python
__1 : source.python
: source.python
_1A : source.python
: source.python
__1A : source.python
: source.python
_a : source.python
: source.python
__a : source.python
: source.python
__ : source.python
: source.python
___ : source.python
: source.python
___a : source.python
: source.python
___1 : source.python
: source.python
__aA : source.python
: source.python
___Aa : source.python

View File

@@ -0,0 +1,23 @@
_AA __AB ___AA
_A __A ___A A1 A_1 _A_1 A_foo
_AA : constant.other.caps.python, source.python
: source.python
__AB : constant.other.caps.python, source.python
: source.python
___AA : constant.other.caps.python, source.python
_A : source.python
: source.python
__A : source.python
: source.python
___A : source.python
: source.python
A1 : source.python
: source.python
A_1 : source.python
: source.python
_A_1 : source.python
: source.python
A_foo : source.python

View File

@@ -0,0 +1,27 @@
T61STRING = 20
T61_STRING
T_STRING
_T_S_T_R_I_N_G_
A_CLASS
# not enough upper-case letters in the beginning
_T_s_TRING
A_Class
T61STRING : constant.other.caps.python, source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
20 : constant.numeric.dec.python, source.python
T61_STRING : constant.other.caps.python, source.python
T_STRING : constant.other.caps.python, source.python
_T_S_T_R_I_N_G_ : constant.other.caps.python, source.python
A_CLASS : constant.other.caps.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
not enough upper-case letters in the beginning : comment.line.number-sign.python, source.python
_T_s_TRING : source.python
A_Class : source.python

View File

@@ -0,0 +1,39 @@
~a + b @ c ^ d // e % f & e and not g or h
~ : keyword.operator.bitwise.python, source.python
a : source.python
: source.python
+ : keyword.operator.arithmetic.python, source.python
: source.python
b : source.python
: source.python
@ : keyword.operator.arithmetic.python, source.python
: source.python
c : source.python
: source.python
^ : keyword.operator.bitwise.python, source.python
: source.python
d : source.python
: source.python
// : keyword.operator.arithmetic.python, source.python
: source.python
e : source.python
: source.python
% : keyword.operator.arithmetic.python, source.python
: source.python
f : source.python
: source.python
& : keyword.operator.bitwise.python, source.python
: source.python
e : source.python
: source.python
and : keyword.operator.logical.python, source.python
: source.python
not : keyword.operator.logical.python, source.python
: source.python
g : source.python
: source.python
or : keyword.operator.logical.python, source.python
: source.python
h : source.python

View File

@@ -0,0 +1,36 @@
a = ...
a(..., c=...)
a = ((...), ...)
....__class__
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
... : constant.other.ellipsis.python, source.python
a : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
... : constant.other.ellipsis.python, meta.function-call.arguments.python, meta.function-call.python, source.python
, : meta.function-call.arguments.python, meta.function-call.python, punctuation.separator.arguments.python, source.python
: meta.function-call.arguments.python, meta.function-call.python, source.python
c : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
... : constant.other.ellipsis.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
( : punctuation.parenthesis.begin.python, source.python
... : constant.other.ellipsis.python, source.python
) : punctuation.parenthesis.end.python, source.python
, : punctuation.separator.element.python, source.python
: source.python
... : constant.other.ellipsis.python, source.python
) : punctuation.parenthesis.end.python, source.python
... : constant.other.ellipsis.python, source.python
. : punctuation.separator.period.python, source.python
__class__ : source.python, support.variable.magic.python

View File

@@ -0,0 +1,16 @@
a = self.some_list[1:2]
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
self : source.python, variable.language.special.self.python
. : punctuation.separator.period.python, source.python
some_list : meta.item-access.python, source.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
1 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
: : meta.item-access.arguments.python, meta.item-access.python, punctuation.separator.slice.python, source.python
2 : constant.numeric.dec.python, meta.item-access.arguments.python, meta.item-access.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,17 @@
print []
print {}
print 1
print : meta.item-access.python, source.python, support.function.builtin.python
: meta.item-access.python, source.python
[ : meta.item-access.python, punctuation.definition.arguments.begin.python, source.python
] : meta.item-access.python, punctuation.definition.arguments.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
} : punctuation.definition.dict.end.python, source.python
print : source.python, support.function.builtin.python
: source.python
1 : constant.numeric.dec.python, source.python

View File

@@ -0,0 +1,7 @@
super()
super : meta.function-call.python, source.python, support.type.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,10 @@
a <> b
a : source.python
: source.python
< : keyword.operator.comparison.python, source.python
> : keyword.operator.comparison.python, source.python
: source.python
b : source.python

View File

@@ -0,0 +1,7 @@
foofrom.something
foofrom : source.python
. : punctuation.separator.period.python, source.python
something : source.python

View File

@@ -0,0 +1,10 @@
foo(djsgfjs==123)
foo : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
djsgfjs : meta.function-call.arguments.python, meta.function-call.python, source.python
== : keyword.operator.comparison.python, meta.function-call.arguments.python, meta.function-call.python, source.python
123 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,29 @@
a++
b--
++a
--b
a++c
c--b
a(--a)
a : source.python
++ : invalid.illegal.operator.python, source.python
b : source.python
-- : invalid.illegal.operator.python, source.python
++ : invalid.illegal.operator.python, source.python
a : source.python
-- : invalid.illegal.operator.python, source.python
b : source.python
a : source.python
++ : invalid.illegal.operator.python, source.python
c : source.python
c : source.python
-- : invalid.illegal.operator.python, source.python
b : source.python
a : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
-- : invalid.illegal.operator.python, meta.function-call.arguments.python, meta.function-call.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,11 @@
a.Exception
Exception.a
a : source.python
. : punctuation.separator.period.python, source.python
Exception : source.python
Exception : source.python, support.type.exception.python
. : punctuation.separator.period.python, source.python
a : source.python

View File

@@ -0,0 +1,50 @@
a. #foo
a.
#foo
a. \
#foo
a. 'bar'
a.
'bar'
a. \
'bar'
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
foo : comment.line.number-sign.python, source.python
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
foo : comment.line.number-sign.python, source.python
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
foo : comment.line.number-sign.python, source.python
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
bar : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
bar : source.python, string.quoted.docstring.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
a : source.python
. : punctuation.separator.period.python, source.python
: source.python
\ : punctuation.separator.continuation.line.python, source.python
: source.python
' : punctuation.definition.string.begin.python, source.python, string.quoted.single.python
bar : source.python, string.quoted.single.python
' : punctuation.definition.string.end.python, source.python, string.quoted.single.python

View File

@@ -0,0 +1,21 @@
a @= b
a -= c
a ^= d
a : source.python
: source.python
@= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
a : source.python
: source.python
-= : keyword.operator.assignment.python, source.python
: source.python
c : source.python
a : source.python
: source.python
^= : keyword.operator.assignment.python, source.python
: source.python
d : source.python

View File

@@ -0,0 +1,39 @@
a == b
a != b
a < b
a <= b
a > b
a >= b
a : source.python
: source.python
== : keyword.operator.comparison.python, source.python
: source.python
b : source.python
a : source.python
: source.python
!= : keyword.operator.comparison.python, source.python
: source.python
b : source.python
a : source.python
: source.python
< : keyword.operator.comparison.python, source.python
: source.python
b : source.python
a : source.python
: source.python
<= : keyword.operator.comparison.python, source.python
: source.python
b : source.python
a : source.python
: source.python
> : keyword.operator.comparison.python, source.python
: source.python
b : source.python
a : source.python
: source.python
>= : keyword.operator.comparison.python, source.python
: source.python
b : source.python

View File

@@ -0,0 +1,21 @@
(a, *rest, b) = range(5)
( : punctuation.parenthesis.begin.python, source.python
a : source.python
, : punctuation.separator.element.python, source.python
: source.python
* : keyword.operator.arithmetic.python, source.python
rest : source.python
, : punctuation.separator.element.python, source.python
: source.python
b : source.python
) : punctuation.parenthesis.end.python, source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
range : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
5 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

View File

@@ -0,0 +1,30 @@
arr2 = [i for i in range(7) if i != 3]
arr2 : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
[ : punctuation.definition.list.begin.python, source.python
i : source.python
: source.python
for : keyword.control.flow.python, source.python
: source.python
i : source.python
: source.python
in : keyword.operator.logical.python, source.python
: source.python
range : meta.function-call.python, source.python, support.function.builtin.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
7 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
: source.python
if : keyword.control.flow.python, source.python
: source.python
i : source.python
: source.python
!= : keyword.operator.comparison.python, source.python
: source.python
3 : constant.numeric.dec.python, source.python
] : punctuation.definition.list.end.python, source.python

View File

@@ -0,0 +1,41 @@
a = (from, a)
b = [from, b]
c = {from: {import: a}}
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
from : keyword.control.flow.python, source.python
, : punctuation.separator.element.python, source.python
: source.python
a : source.python
) : punctuation.parenthesis.end.python, source.python
b : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
[ : punctuation.definition.list.begin.python, source.python
from : keyword.control.flow.python, source.python
, : punctuation.separator.element.python, source.python
: source.python
b : source.python
] : punctuation.definition.list.end.python, source.python
c : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
from : keyword.control.flow.python, source.python
: : punctuation.separator.dict.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
import : keyword.control.import.python, source.python
: : punctuation.separator.dict.python, source.python
: source.python
a : source.python
} : punctuation.definition.dict.end.python, source.python
} : punctuation.definition.dict.end.python, source.python

View File

@@ -0,0 +1,48 @@
a = (a, b(a=1), {c: d(b=1), e: [a, b(z=1)]})
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
( : punctuation.parenthesis.begin.python, source.python
a : source.python
, : punctuation.separator.element.python, source.python
: source.python
b : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
a : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
, : punctuation.separator.element.python, source.python
: source.python
{ : punctuation.definition.dict.begin.python, source.python
c : source.python
: : punctuation.separator.dict.python, source.python
: source.python
d : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
b : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
, : punctuation.separator.element.python, source.python
: source.python
e : source.python
: : punctuation.separator.dict.python, source.python
: source.python
[ : punctuation.definition.list.begin.python, source.python
a : source.python
, : punctuation.separator.element.python, source.python
: source.python
b : meta.function-call.generic.python, meta.function-call.python, source.python
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
z : meta.function-call.arguments.python, meta.function-call.python, source.python, variable.parameter.function-call.python
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
1 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python
] : punctuation.definition.list.end.python, source.python
} : punctuation.definition.dict.end.python, source.python
) : punctuation.parenthesis.end.python, source.python

View File

@@ -0,0 +1,19 @@
a.True = b.False = d.None
a : source.python
. : punctuation.separator.period.python, source.python
True : keyword.illegal.name.python, source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
b : source.python
. : punctuation.separator.period.python, source.python
False : keyword.illegal.name.python, source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.python
d : source.python
. : punctuation.separator.period.python, source.python
None : keyword.illegal.name.python, source.python

Some files were not shown because too many files have changed in this diff Show More