use prism-tomorrow.css
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
True
|
||||
False
|
||||
None
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["boolean", "True"],
|
||||
["boolean", "False"],
|
||||
["boolean", "None"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for booleans.
|
@ -0,0 +1,56 @@
|
||||
abs all any apply
|
||||
ascii basestring bin bool
|
||||
buffer bytearray bytes callable
|
||||
chr classmethod cmp coerce
|
||||
compile complex delattr
|
||||
dict dir divmod enumerate
|
||||
eval execfile file
|
||||
filter float format frozenset
|
||||
getattr globals hasattr hash
|
||||
help hex id input
|
||||
int intern isinstance issubclass
|
||||
iter len list locals
|
||||
long map max memoryview
|
||||
min next object oct
|
||||
open ord pow property
|
||||
range raw_input reduce reload
|
||||
repr reversed round set
|
||||
setattr slice sorted staticmethod
|
||||
str sum super tuple
|
||||
type unichr unicode vars
|
||||
xrange()
|
||||
zip(
|
||||
__import__
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["builtin", "abs"], ["builtin", "all"], ["builtin", "any"], ["builtin", "apply"],
|
||||
["builtin", "ascii"], ["builtin", "basestring"], ["builtin", "bin"], ["builtin", "bool"],
|
||||
["builtin", "buffer"], ["builtin", "bytearray"], ["builtin", "bytes"], ["builtin", "callable"],
|
||||
["builtin", "chr"], ["builtin", "classmethod"], ["builtin", "cmp"], ["builtin", "coerce"],
|
||||
["builtin", "compile"], ["builtin", "complex"], ["builtin", "delattr"],
|
||||
["builtin", "dict"], ["builtin", "dir"], ["builtin", "divmod"], ["builtin", "enumerate"],
|
||||
["builtin", "eval"], ["builtin", "execfile"], ["builtin", "file"],
|
||||
["builtin", "filter"], ["builtin", "float"], ["builtin", "format"], ["builtin", "frozenset"],
|
||||
["builtin", "getattr"], ["builtin", "globals"], ["builtin", "hasattr"], ["builtin", "hash"],
|
||||
["builtin", "help"], ["builtin", "hex"], ["builtin", "id"], ["builtin", "input"],
|
||||
["builtin", "int"], ["builtin", "intern"], ["builtin", "isinstance"], ["builtin", "issubclass"],
|
||||
["builtin", "iter"], ["builtin", "len"], ["builtin", "list"], ["builtin", "locals"],
|
||||
["builtin", "long"], ["builtin", "map"], ["builtin", "max"], ["builtin", "memoryview"],
|
||||
["builtin", "min"], ["builtin", "next"], ["builtin", "object"], ["builtin", "oct"],
|
||||
["builtin", "open"], ["builtin", "ord"], ["builtin", "pow"], ["builtin", "property"],
|
||||
["builtin", "range"], ["builtin", "raw_input"], ["builtin", "reduce"], ["builtin", "reload"],
|
||||
["builtin", "repr"], ["builtin", "reversed"], ["builtin", "round"], ["builtin", "set"],
|
||||
["builtin", "setattr"], ["builtin", "slice"], ["builtin", "sorted"], ["builtin", "staticmethod"],
|
||||
["builtin", "str"], ["builtin", "sum"], ["builtin", "super"], ["builtin", "tuple"],
|
||||
["builtin", "type"], ["builtin", "unichr"], ["builtin", "unicode"], ["builtin", "vars"],
|
||||
["builtin", "xrange"], ["punctuation", "("], ["punctuation", ")"],
|
||||
["builtin", "zip"], ["punctuation", "("],
|
||||
["builtin", "__import__"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all builtins.
|
@ -0,0 +1,15 @@
|
||||
class Foo
|
||||
class foobar_42
|
||||
class _
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "class"], ["class-name", "Foo"],
|
||||
["keyword", "class"], ["class-name", "foobar_42"],
|
||||
["keyword", "class"], ["class-name", "_"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for class names.
|
@ -0,0 +1,13 @@
|
||||
#
|
||||
# foobar
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "#"],
|
||||
["comment", "# foobar"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comments.
|
@ -0,0 +1,28 @@
|
||||
@some.decorator(foobar)
|
||||
def foo(bar):
|
||||
pass
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["decorator", [
|
||||
"@some",
|
||||
["punctuation", "."],
|
||||
"decorator"]
|
||||
],
|
||||
["punctuation", "("],
|
||||
"foobar",
|
||||
["punctuation", ")"],
|
||||
|
||||
["keyword", "def"],
|
||||
["function", "foo"],
|
||||
["punctuation", "("],
|
||||
"bar",
|
||||
["punctuation", ")"],
|
||||
["punctuation", ":"],
|
||||
["keyword", "pass"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for decorators.
|
@ -0,0 +1,17 @@
|
||||
def Foo(
|
||||
def foo_bar_42(
|
||||
def _(
|
||||
def foo_ ()
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "def"], ["function", "Foo"], ["punctuation", "("],
|
||||
["keyword", "def"], ["function", "foo_bar_42"], ["punctuation", "("],
|
||||
["keyword", "def"], ["function", "_"], ["punctuation", "("],
|
||||
["keyword", "def"], ["function", "foo_"], ["punctuation", "("], ["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for functions.
|
@ -0,0 +1,24 @@
|
||||
print('""#')
|
||||
print('"trigger="#T'+str(3))
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "print"],
|
||||
["punctuation", "("],
|
||||
["string", "'\"\"#'"],
|
||||
["punctuation", ")"],
|
||||
["keyword", "print"],
|
||||
["punctuation", "("],
|
||||
["string", "'\"trigger=\"#T'"],
|
||||
["operator", "+"],
|
||||
["builtin", "str"],
|
||||
["punctuation", "("],
|
||||
["number", "3"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comment-like substrings. See #1355
|
@ -0,0 +1,31 @@
|
||||
as assert async await
|
||||
break class;
|
||||
continue def;
|
||||
del elif else
|
||||
except exec finally
|
||||
for from global if
|
||||
import in is lambda
|
||||
pass print raise return
|
||||
try while with yield
|
||||
nonlocal
|
||||
and not or
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "as"], ["keyword", "assert"], ["keyword", "async"], ["keyword", "await"],
|
||||
["keyword", "break"], ["keyword", "class"], ["punctuation", ";"],
|
||||
["keyword", "continue"], ["keyword", "def"], ["punctuation", ";"],
|
||||
["keyword", "del"], ["keyword", "elif"], ["keyword", "else"],
|
||||
["keyword", "except"], ["keyword", "exec"], ["keyword", "finally"],
|
||||
["keyword", "for"], ["keyword", "from"], ["keyword", "global"], ["keyword", "if"],
|
||||
["keyword", "import"], ["keyword", "in"], ["keyword", "is"], ["keyword", "lambda"],
|
||||
["keyword", "pass"], ["keyword", "print"], ["keyword", "raise"], ["keyword", "return"],
|
||||
["keyword", "try"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"],
|
||||
["keyword", "nonlocal"],
|
||||
["keyword", "and"], ["keyword", "not"], ["keyword", "or"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all keywords.
|
@ -0,0 +1,27 @@
|
||||
0b0001
|
||||
0o754
|
||||
0xBadFace
|
||||
42
|
||||
3.14159
|
||||
2.1E10
|
||||
0.3e-7
|
||||
4.8e+1
|
||||
42j
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "0b0001"],
|
||||
["number", "0o754"],
|
||||
["number", "0xBadFace"],
|
||||
["number", "42"],
|
||||
["number", "3.14159"],
|
||||
["number", "2.1E10"],
|
||||
["number", "0.3e-7"],
|
||||
["number", "4.8e+1"],
|
||||
["number", "42j"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for hexadecimal, octal, binary and decimal numbers.
|
@ -0,0 +1,29 @@
|
||||
+ +=
|
||||
- -=
|
||||
* ** *= **=
|
||||
/ /= // //=
|
||||
% %=
|
||||
< <= <> <<
|
||||
> >= >>
|
||||
= ==
|
||||
!=
|
||||
& | ^ ~
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", "+"], ["operator", "+="],
|
||||
["operator", "-"], ["operator", "-="],
|
||||
["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="],
|
||||
["operator", "/"], ["operator", "/="], ["operator", "//"], ["operator", "//="],
|
||||
["operator", "%"], ["operator", "%="],
|
||||
["operator", "<"], ["operator", "<="], ["operator", "<>"], ["operator", "<<"],
|
||||
["operator", ">"], ["operator", ">="], ["operator", ">>"],
|
||||
["operator", "="], ["operator", "=="],
|
||||
["operator", "!="],
|
||||
["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all operators.
|
@ -0,0 +1,147 @@
|
||||
f'The value is {value}.'
|
||||
|
||||
f"The value is {'4'}."
|
||||
|
||||
f'input={value!s:#06x}'
|
||||
|
||||
f'{{{4*10}}}'
|
||||
|
||||
fr'x={4*10}\n'
|
||||
|
||||
f'''{x
|
||||
+1}'''
|
||||
|
||||
f'mapping is { {a:b for (a, b) in ((1, 2), (3, 4))} }'
|
||||
|
||||
f'{(lambda x: x*2)(3)}'
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string-interpolation", [
|
||||
["string", "f'The value is "],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
"value",
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", ".'"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f\"The value is "],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
["string", "'4'"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", ".\""]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f'input="],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
"value",
|
||||
["conversion-option", "!s"],
|
||||
["punctuation", ":"],
|
||||
["format-spec", "#06x"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "'"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f'{{"],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
["number", "4"],
|
||||
["operator", "*"],
|
||||
["number", "10"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "}}'"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "fr'x="],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
["number", "4"],
|
||||
["operator", "*"],
|
||||
["number", "10"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "\\n'"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f'''"],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
"x\r\n",
|
||||
["operator", "+"],
|
||||
["number", "1"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "'''"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f'mapping is "],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
["punctuation", "{"],
|
||||
"a",
|
||||
["punctuation", ":"],
|
||||
"b ",
|
||||
["keyword", "for"],
|
||||
["punctuation", "("],
|
||||
"a",
|
||||
["punctuation", ","],
|
||||
" b",
|
||||
["punctuation", ")"],
|
||||
["keyword", "in"],
|
||||
["punctuation", "("],
|
||||
["punctuation", "("],
|
||||
["number", "1"],
|
||||
["punctuation", ","],
|
||||
["number", "2"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ","],
|
||||
["punctuation", "("],
|
||||
["number", "3"],
|
||||
["punctuation", ","],
|
||||
["number", "4"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "}"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "'"]
|
||||
]],
|
||||
|
||||
["string-interpolation", [
|
||||
["string", "f'"],
|
||||
["interpolation", [
|
||||
["punctuation", "{"],
|
||||
["punctuation", "("],
|
||||
["keyword", "lambda"],
|
||||
" x",
|
||||
["punctuation", ":"],
|
||||
" x",
|
||||
["operator", "*"],
|
||||
["number", "2"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "("],
|
||||
["number", "3"],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "}"]
|
||||
]],
|
||||
["string", "'"]
|
||||
]]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for string interpolation.
|
@ -0,0 +1,29 @@
|
||||
""
|
||||
"fo\"obar"
|
||||
''
|
||||
'fo\'obar'
|
||||
"fo\" # comment obar"
|
||||
|
||||
r"\n"
|
||||
b'foo'
|
||||
rb"foo\n"
|
||||
u"foo"
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", "\"\""],
|
||||
["string", "\"fo\\\"obar\""],
|
||||
["string", "''"],
|
||||
["string", "'fo\\'obar'"],
|
||||
["string", "\"fo\\\" # comment obar\""],
|
||||
|
||||
["string", "r\"\\n\""],
|
||||
["string", "b'foo'"],
|
||||
["string", "rb\"foo\\n\""],
|
||||
["string", "u\"foo\""]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings.
|
@ -0,0 +1,21 @@
|
||||
"""foobar"""
|
||||
"""fo"o
|
||||
#bar
|
||||
baz"""
|
||||
'''foobar'''
|
||||
'''fo'o
|
||||
#bar
|
||||
baz'''
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["triple-quoted-string", "\"\"\"foobar\"\"\""],
|
||||
["triple-quoted-string", "\"\"\"fo\"o\r\n#bar\r\nbaz\"\"\""],
|
||||
["triple-quoted-string", "'''foobar'''"],
|
||||
["triple-quoted-string", "'''fo'o\r\n#bar\r\nbaz'''"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for triple-quoted strings.
|
Reference in New Issue
Block a user