use prism-tomorrow.css

This commit is contained in:
CyC2018
2018-12-19 14:09:39 +08:00
parent 0f00bcacaf
commit e9e604e6a7
1747 changed files with 100462 additions and 0 deletions

View File

@ -0,0 +1,35 @@
[<Foo>]
[<Bar("bar"); Foo(1, 2)>]
----------------------------------------------------
[
["annotation", [
["punctuation", "[<"],
["class-name", "Foo"],
["punctuation", ">]"]
]],
["annotation", [
["punctuation", "[<"],
["class-name", "Bar"],
["annotation-content", [
["punctuation", "("],
["string", "\"bar\""],
["punctuation", ")"],
["punctuation", ";"]
]],
["class-name", "Foo"],
["annotation-content", [
["punctuation", "("],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ")"]
]],
["punctuation", ">]"]
]]
]
----------------------------------------------------
Checks for annotations.

View File

@ -0,0 +1,86 @@
let func : HttpFunc = handler (Some >> Task.FromResult)
type Base1() =
abstract member F : unit -> unit
default u.F() =
printfn "F Base1"
type Derived1() =
inherit Base1()
override u.F() =
printfn "F Derived1"
let d1 : Derived1 = Derived1()
let base1 = d1 :> Base1
let derived1 = base1 :?> Derived1
type PersonName =
| FirstOnly of string
| LastOnly of string
| FirstLast of string * string
type Shape =
| Rectangle of height : float * width : float
| Circle of radius : float
type MyInterface =
abstract member Add: int -> int -> int
abstract member Pi : float
exception Error1 of string
exception Error2 of string * int
----------------------------------------------------
[
["keyword", "let"], " func ",
["punctuation", ":"], ["class-name", ["HttpFunc"]],
["operator", "="], " handler ", ["punctuation", "("],
"Some ", ["operator", ">>"], " Task", ["punctuation", "."], "FromResult",
["punctuation", ")"],
["keyword", "type"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="],
["keyword", "abstract"], ["keyword", "member"], " F ", ["punctuation", ":"],
["class-name", [
"unit ", ["operator", "->"], " unit"]
],
["keyword", "default"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"],
["operator", "="], "\n printfn ", ["string", "\"F Base1\""],
["keyword", "type"], ["class-name", ["Derived1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="],
["keyword", "inherit"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"],
["keyword", "override"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], ["operator", "="],
"\n printfn ", ["string", "\"F Derived1\""],
["keyword", "let"], " d1 ", ["punctuation", ":"], ["class-name", ["Derived1"]], ["operator", "="],
["function", "Derived1"], ["punctuation", "("], ["punctuation", ")"],
["keyword", "let"], " base1 ", ["operator", "="], " d1 ", ["operator", ":>"], ["class-name", ["Base1"]],
["keyword", "let"], " derived1 ", ["operator", "="], " base1 ", ["operator", ":?>"], ["class-name", ["Derived1"]],
["keyword", "type"], ["class-name", ["PersonName"]], ["operator", "="],
["operator", "|"], " FirstOnly ", ["keyword", "of"], ["class-name", ["string"]],
["operator", "|"], " LastOnly ", ["keyword", "of"], ["class-name", ["string"]],
["operator", "|"], " FirstLast ", ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " string"]],
["keyword", "type"], ["class-name", ["Shape"]], ["operator", "="],
["operator", "|"], " Rectangle ", ["keyword", "of"],
" height ", ["punctuation", ":"], ["class-name", ["float"]], ["operator", "*"],
" width ", ["punctuation", ":"], ["class-name", ["float"]],
["operator", "|"], " Circle ", ["keyword", "of"], " radius ", ["punctuation", ":"], ["class-name", ["float"]],
["keyword", "type"], ["class-name", ["MyInterface"]], ["operator", "="],
["keyword", "abstract"], ["keyword", "member"], " Add", ["punctuation", ":"],
["class-name", ["int ", ["operator", "->"], " int ", ["operator", "->"], " int"]],
["keyword", "abstract"], ["keyword", "member"], " Pi ", ["punctuation", ":"], ["class-name", ["float"]],
["keyword", "exception"], ["class-name", ["Error1"]], ["keyword", "of"], ["class-name", ["string"]],
["keyword", "exception"], ["class-name", ["Error2"]], ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " int"]]
]
----------------------------------------------------
Checks for class-names.

View File

@ -0,0 +1,16 @@
// foobar
(**)
(* foo
bar *)
----------------------------------------------------
[
["comment", "// foobar"],
["comment", "(**)"],
["comment", "(* foo\r\nbar *)"]
]
----------------------------------------------------
Checks for single-line and multi-line comments.

View File

@ -0,0 +1,17 @@
async {}
task {}
seq {}
foo {}
----------------------------------------------------
[
["computation-expression", "async"], ["punctuation", "{"], ["punctuation", "}"],
["computation-expression", "task"], ["punctuation", "{"], ["punctuation", "}"],
["computation-expression", "seq"], ["punctuation", "{"], ["punctuation", "}"],
["computation-expression", "foo"], ["punctuation", "{"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for computation expressions.

View File

@ -0,0 +1,36 @@
let foo' = failWith "foo"
let bar' = failWith "bar"
let map (f: 'a -> 'b) (xs: 'a list): 'b list = failWith "not implemented"
----------------------------------------------------
[
["keyword", "let"], " foo' ", ["operator", "="], " failWith ", ["string", "\"foo\""],
["keyword", "let"], " bar' ", ["operator", "="], " failWith ", ["string", "\"bar\""],
["keyword", "let"],
" map ",
["punctuation", "("],
"f",
["punctuation", ":"],
" 'a ",
["operator", "->"],
" 'b",
["punctuation", ")"],
["punctuation", "("],
"xs",
["punctuation", ":"],
" 'a list",
["punctuation", ")"],
["punctuation", ":"],
" 'b list ",
["operator", "="],
" failWith ",
["string", "\"not implemented\""]
]
----------------------------------------------------
Checks for apostrophes in names. See #1480.

View File

@ -0,0 +1,73 @@
abstract and as assert
base begin
class;
default
delegate do done downcast
downto elif else end
exception;
extern false finally
for fun function global
if in inherit; inline
interface;
internal lazy let
let! match member module
mutable namespace
new;
not
null of; open or override
private public rec return
return! select static struct
then to true try type;
upcast use use! val void
when while with yield
yield! asr land lor lsl
lsr lxor mod sig atomic
break checked component
const constraint constructor
continue eager event external
fixed functor include method
mixin object parallel process
protected pure sealed tailcall
trait;
virtual volatile
----------------------------------------------------
[
["keyword", "abstract"], ["keyword", "and"], ["keyword", "as"], ["keyword", "assert"],
["keyword", "base"], ["keyword", "begin"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "default"],
["keyword", "delegate"], ["keyword", "do"], ["keyword", "done"], ["keyword", "downcast"],
["keyword", "downto"], ["keyword", "elif"], ["keyword", "else"], ["keyword", "end"],
["keyword", "exception"], ["punctuation", ";"],
["keyword", "extern"], ["keyword", "false"], ["keyword", "finally"],
["keyword", "for"], ["keyword", "fun"], ["keyword", "function"], ["keyword", "global"],
["keyword", "if"], ["keyword", "in"], ["keyword", "inherit"], ["punctuation", ";"], ["keyword", "inline"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "internal"], ["keyword", "lazy"], ["keyword", "let"],
["keyword", "let!"], ["keyword", "match"], ["keyword", "member"], ["keyword", "module"],
["keyword", "mutable"], ["keyword", "namespace"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "not"],
["keyword", "null"], ["keyword", "of"], ["punctuation", ";"], ["keyword", "open"], ["keyword", "or"], ["keyword", "override"],
["keyword", "private"], ["keyword", "public"], ["keyword", "rec"], ["keyword", "return"],
["keyword", "return!"], ["keyword", "select"], ["keyword", "static"], ["keyword", "struct"],
["keyword", "then"], ["keyword", "to"], ["keyword", "true"], ["keyword", "try"], ["keyword", "type"], ["punctuation", ";"],
["keyword", "upcast"], ["keyword", "use"], ["keyword", "use!"], ["keyword", "val"], ["keyword", "void"],
["keyword", "when"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"],
["keyword", "yield!"], ["keyword", "asr"], ["keyword", "land"], ["keyword", "lor"], ["keyword", "lsl"],
["keyword", "lsr"], ["keyword", "lxor"], ["keyword", "mod"], ["keyword", "sig"], ["keyword", "atomic"],
["keyword", "break"], ["keyword", "checked"], ["keyword", "component"],
["keyword", "const"], ["keyword", "constraint"], ["keyword", "constructor"],
["keyword", "continue"], ["keyword", "eager"], ["keyword", "event"], ["keyword", "external"],
["keyword", "fixed"], ["keyword", "functor"], ["keyword", "include"], ["keyword", "method"],
["keyword", "mixin"], ["keyword", "object"], ["keyword", "parallel"], ["keyword", "process"],
["keyword", "protected"], ["keyword", "pure"], ["keyword", "sealed"], ["keyword", "tailcall"],
["keyword", "trait"], ["punctuation", ";"],
["keyword", "virtual"], ["keyword", "volatile"]
]
----------------------------------------------------
Checks for all keywords.

View File

@ -0,0 +1,65 @@
0xbabe
0xBABEun
0xflf
0xfLF
0b1001
0b1001y
0b1001uy
42
1.5
2.3E+32
2.3e-32
4.14F
4.14f
0.7833M
0.7833m
86y
86uy
86s
86us
86l
86u
86ul
86L
86UL
9999999999999999999999999999I
----------------------------------------------------
[
["number", "0xbabe"],
["number", "0xBABEun"],
["number", "0xflf"],
["number", "0xfLF"],
["number", "0b1001"],
["number", "0b1001y"],
["number", "0b1001uy"],
["number", "42"],
["number", "1.5"],
["number", "2.3E+32"],
["number", "2.3e-32"],
["number", "4.14F"],
["number", "4.14f"],
["number", "0.7833M"],
["number", "0.7833m"],
["number", "86y"],
["number", "86uy"],
["number", "86s"],
["number", "86us"],
["number", "86l"],
["number", "86u"],
["number", "86ul"],
["number", "86L"],
["number", "86UL"],
["number", "9999999999999999999999999999I"]
]
----------------------------------------------------
Checks for decimal, hexadecimal and binary numbers, with all possible suffixes.

View File

@ -0,0 +1,53 @@
>= <= <> > < = + - * / %
>=? <=? <>? >? <? =? +? -? *? /? %?
?>=? ?<=? ?<>? ?>? ?<? ?=? ?+? ?-? ?*? ?/? ?%?
?>= ?<= ?<> ?> ?< ?= ?+ ?- ?* ?/ ?%
**
<- ->
..
::
:=
:> :? :?>
<< >>
<<< >>> ~~~ ^^^ &&& |||
| ||
<| <|| <|||
|> ||> |||>
~~ ~- ~+
? ^ !
!= ==
& &&
----------------------------------------------------
[
["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", "?=?"], ["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", "<<<"], ["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 operators.

View File

@ -0,0 +1,22 @@
#if foo
#else
#endif
#light
#line
#nowarn
----------------------------------------------------
[
["preprocessor", ["#", ["directive", "if"], " foo"]],
["preprocessor", ["#", ["directive", "else"]]],
["preprocessor", ["#", ["directive", "endif"]]],
["preprocessor", ["#", ["directive", "light"]]],
["preprocessor", ["#", ["directive", "line"]]],
["preprocessor", ["#", ["directive", "nowarn"]]]
]
----------------------------------------------------
Checks for preprocessor directives.

View File

@ -0,0 +1,47 @@
""
"fo\"o"
"foo\
bar"
"foo"B
@""
@"foo"
@"fo""o"
@"foo"B
""""""
"""fo""o"
bar"""
"""foo"""B
'a'
'a'B
'\''
'\\'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "\"foo\\\r\nbar\""],
["string", "\"foo\"B"],
["string", "@\"\""],
["string", "@\"foo\""],
["string", "@\"fo\"\"o\""],
["string", "@\"foo\"B"],
["string", "\"\"\"\"\"\""],
["string", "\"\"\"fo\"\"o\"\r\nbar\"\"\""],
["string", "\"\"\"foo\"\"\"B"],
["string", "'a'"],
["string", "'a'B"],
["string", "'\\''"],
["string", "'\\\\'"]
]
----------------------------------------------------
Checks for normal strings, verbatim strings, triple-quoted strings and character literals.