use prism-tomorrow.css
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
#[test]
|
||||
#![warn(unstable)]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["attribute", "#[test]"],
|
||||
["attribute", "#![warn(unstable)]"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for attributes.
|
@ -0,0 +1,13 @@
|
||||
'a'
|
||||
'स'
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["char", "'a'"],
|
||||
["char", "'स'"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for chars.
|
@ -0,0 +1,30 @@
|
||||
|x: int, y: int| -> int {}
|
||||
|| {}
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["closure-params", [
|
||||
["punctuation", "|"],
|
||||
"x",
|
||||
["punctuation", ":"],
|
||||
" int",
|
||||
["punctuation", ","],
|
||||
" y",
|
||||
["punctuation", ":"],
|
||||
" int",
|
||||
["punctuation", "|"]
|
||||
]],
|
||||
["punctuation", "->"],
|
||||
" int ", ["punctuation", "{"], ["punctuation", "}"],
|
||||
|
||||
["closure-params", [
|
||||
["punctuation", "|"],
|
||||
["punctuation", "|"]
|
||||
]],
|
||||
["punctuation", "{"], ["punctuation", "}"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for closure params.
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// foobar
|
||||
/**/
|
||||
/* foo
|
||||
bar */
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "//"],
|
||||
["comment", "// foobar"],
|
||||
["comment", "/**/"],
|
||||
["comment", "/* foo\r\nbar */"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for comments.
|
@ -0,0 +1,23 @@
|
||||
foo (
|
||||
foobar(
|
||||
foo_bar_42(
|
||||
|
||||
foo! (
|
||||
foobar![
|
||||
foo_bar_42!(
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["function", "foo"], ["punctuation", "("],
|
||||
["function", "foobar"], ["punctuation", "("],
|
||||
["function", "foo_bar_42"], ["punctuation", "("],
|
||||
|
||||
["function", "foo!"], ["punctuation", "("],
|
||||
["function", "foobar!"], ["punctuation", "["],
|
||||
["function", "foo_bar_42!"], ["punctuation", "("]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for functions and macros.
|
49
docs/_style/prism-master/tests/languages/rust/issue1339.test
Normal file
49
docs/_style/prism-master/tests/languages/rust/issue1339.test
Normal file
@ -0,0 +1,49 @@
|
||||
const ALL_CARDS: &'static [&'static char] = &["2"]
|
||||
fn foo<'a> (first: &'a str, second: &'a str) => () { }
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "const"],
|
||||
" ALL_CARDS",
|
||||
["punctuation", ":"],
|
||||
["operator", "&"],
|
||||
["lifetime-annotation", "'static"],
|
||||
["punctuation", "["],
|
||||
["operator", "&"],
|
||||
["lifetime-annotation", "'static"],
|
||||
" char",
|
||||
["punctuation", "]"],
|
||||
["operator", "="],
|
||||
["operator", "&"],
|
||||
["punctuation", "["],
|
||||
["string", "\"2\""],
|
||||
["punctuation", "]"],
|
||||
["keyword", "fn"],
|
||||
" foo",
|
||||
["operator", "<"],
|
||||
["lifetime-annotation", "'a"],
|
||||
["operator", ">"],
|
||||
["punctuation", "("],
|
||||
"first",
|
||||
["punctuation", ":"],
|
||||
["operator", "&"],
|
||||
["lifetime-annotation", "'a"],
|
||||
" str",
|
||||
["punctuation", ","],
|
||||
" second",
|
||||
["punctuation", ":"],
|
||||
["operator", "&"],
|
||||
["lifetime-annotation", "'a"],
|
||||
" str",
|
||||
["punctuation", ")"],
|
||||
["operator", "=>"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "{"],
|
||||
["punctuation", "}"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for lifetime annotations in real-world examples. See #1339.
|
16
docs/_style/prism-master/tests/languages/rust/issue1353.test
Normal file
16
docs/_style/prism-master/tests/languages/rust/issue1353.test
Normal file
@ -0,0 +1,16 @@
|
||||
(*e 0 b'a')
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["punctuation", "("],
|
||||
["operator", "*"],
|
||||
"e ",
|
||||
["number", "0"],
|
||||
["char", "b'a'"],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Makes sure lifetime annotations do not mess with bytes. See #1353.
|
@ -0,0 +1,39 @@
|
||||
abstract alignof as
|
||||
be box break const
|
||||
continue crate do dyn
|
||||
else enum extern
|
||||
false final fn for
|
||||
if impl in let loop
|
||||
match mod move mut
|
||||
offsetof once override
|
||||
priv pub pure ref
|
||||
return sizeof static
|
||||
self Self struct super
|
||||
true trait type typeof
|
||||
union unsafe unsized use
|
||||
virtual where while
|
||||
yield
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"],
|
||||
["keyword", "be"], ["keyword", "box"], ["keyword", "break"], ["keyword", "const"],
|
||||
["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"], ["keyword", "dyn"],
|
||||
["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"],
|
||||
["keyword", "false"], ["keyword", "final"], ["keyword", "fn"], ["keyword", "for"],
|
||||
["keyword", "if"], ["keyword", "impl"], ["keyword", "in"], ["keyword", "let"], ["keyword", "loop"],
|
||||
["keyword", "match"], ["keyword", "mod"], ["keyword", "move"], ["keyword", "mut"],
|
||||
["keyword", "offsetof"], ["keyword", "once"], ["keyword", "override"],
|
||||
["keyword", "priv"], ["keyword", "pub"], ["keyword", "pure"], ["keyword", "ref"],
|
||||
["keyword", "return"], ["keyword", "sizeof"], ["keyword", "static"],
|
||||
["keyword", "self"], ["keyword", "Self"], ["keyword", "struct"], ["keyword", "super"],
|
||||
["keyword", "true"], ["keyword", "trait"], ["keyword", "type"], ["keyword", "typeof"],
|
||||
["keyword", "union"], ["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"],
|
||||
["keyword", "virtual"], ["keyword", "where"], ["keyword", "while"],
|
||||
["keyword", "yield"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for all keywords.
|
@ -0,0 +1,15 @@
|
||||
'foo
|
||||
'a
|
||||
<'a>
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["lifetime-annotation", "'foo"],
|
||||
["lifetime-annotation", "'a"],
|
||||
["operator", "<"], ["lifetime-annotation", "'a"], ["operator", ">"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for lifetime annotations.
|
@ -0,0 +1,15 @@
|
||||
foo!
|
||||
foo_bar!
|
||||
foo_bar_42!
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["macro-rules", "foo!"],
|
||||
["macro-rules", "foo_bar!"],
|
||||
["macro-rules", "foo_bar_42!"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for macro rules.
|
@ -0,0 +1,47 @@
|
||||
0xBad_Face
|
||||
0o741_123
|
||||
0b0000_1111
|
||||
42_000
|
||||
3.14_15_9
|
||||
3e4
|
||||
3.5E-8
|
||||
4.6e+41
|
||||
|
||||
0xBad_Faceu8
|
||||
0o741_123i8
|
||||
0b0000_1111u16
|
||||
42_000i16
|
||||
3.14_15_9u32
|
||||
3e4i32
|
||||
3.5E-8u64
|
||||
4.6e+41i64
|
||||
4.2f32
|
||||
4.2f64
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["number", "0xBad_Face"],
|
||||
["number", "0o741_123"],
|
||||
["number", "0b0000_1111"],
|
||||
["number", "42_000"],
|
||||
["number", "3.14_15_9"],
|
||||
["number", "3e4"],
|
||||
["number", "3.5E-8"],
|
||||
["number", "4.6e+41"],
|
||||
|
||||
["number", "0xBad_Faceu8"],
|
||||
["number", "0o741_123i8"],
|
||||
["number", "0b0000_1111u16"],
|
||||
["number", "42_000i16"],
|
||||
["number", "3.14_15_9u32"],
|
||||
["number", "3e4i32"],
|
||||
["number", "3.5E-8u64"],
|
||||
["number", "4.6e+41i64"],
|
||||
["number", "4.2f32"],
|
||||
["number", "4.2f64"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for numbers.
|
@ -0,0 +1,35 @@
|
||||
+ +=
|
||||
- -=
|
||||
* *=
|
||||
/ /=
|
||||
% %=
|
||||
! !=
|
||||
^ ^=
|
||||
= == =>
|
||||
& && &=
|
||||
| || |=
|
||||
< << <= <<=
|
||||
> >> >= >>=
|
||||
@
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["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 all operators.
|
@ -0,0 +1,35 @@
|
||||
""
|
||||
"fo\"obar"
|
||||
|
||||
b""
|
||||
b"fo\"obar"
|
||||
|
||||
r#""#
|
||||
r#"fo"obar"#
|
||||
r###"foo#bar"###
|
||||
|
||||
br#""#
|
||||
br#"fo"obar"#
|
||||
br###"foo#bar"###
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["string", "\"\""],
|
||||
["string", "\"fo\\\"obar\""],
|
||||
|
||||
["string", "b\"\""],
|
||||
["string", "b\"fo\\\"obar\""],
|
||||
|
||||
["string", "r#\"\"#"],
|
||||
["string", "r#\"fo\"obar\"#"],
|
||||
["string", "r###\"foo#bar\"###"],
|
||||
|
||||
["string", "br#\"\"#"],
|
||||
["string", "br#\"fo\"obar\"#"],
|
||||
["string", "br###\"foo#bar\"###"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Checks for strings.
|
Reference in New Issue
Block a user