forked from dbp/sublime-rust
-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathsyntax_test_modules.rs
98 lines (88 loc) · 2.82 KB
/
syntax_test_modules.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// SYNTAX TEST "Packages/Rust Enhanced/RustEnhanced.sublime-syntax"
extern crate foo;
//<- keyword.other
//^^^^ keyword.other
// ^^^^^ keyword.other
// ^^^ source
// ^ punctuation.terminator
extern crate std as ruststd;
//^^^^ keyword.other
// ^^^^^ keyword.other
// ^^^^ source
// ^^ keyword.operator
// ^^^^^^^ source
// ^ punctuation.terminator
mod bar;
// <- meta.module storage.type.module
//^^^^^^ meta.module
// ^^^ entity.name.module
// ^ punctuation.terminator
pub mod my_mod {
// ^^^^^^^^^^^^ meta.module
// <- storage.modifier
// ^^^ storage.type.module
// ^^^^^^ entity.name.module
// ^ meta.block punctuation.section.block.begin
}
// <- meta.module meta.block punctuation.section.block.end
pub use self::trafile::*;
// <- storage.modifier
// ^^^ keyword.other
// ^^^^ variable.language
// ^^^^^^^^^^^^^^^ meta.path
// ^^ punctuation.accessor
// ^ keyword.operator
// ^ punctuation.terminator
use std::fmt;
// <- keyword.other
// ^^^^^ meta.path
// ^^ punctuation.accessor
// ^^^ - meta.path
// ^ punctuation.terminator
use foo::i32;
// ^^^^^ meta.path
// ^^ punctuation.accessor
// ^^^ - meta.path storage.type
use foo::Bar;
// ^^^^^ meta.path
// ^^ punctuation.accessor
// ^^^ storage.type.source
use foo::{Baz, QUX, quux};
// ^^^^^ meta.path
// ^^ punctuation.accessor.rust
// ^^^^^^^^^^^^^^^^ meta.block
// ^ punctuation.section.block.begin
// ^^^ storage.type.source
// ^^^ constant.other
// ^^^^ meta.block
// ^ punctuation.section.block.end
// ^ punctuation.terminator
use std::{
// <- keyword.other
// ^^^^^ meta.path
// ^ meta.block punctuation.section.block.begin
fs::{self, read_dir},
// ^^^^ meta.block meta.path
// ^ meta.block meta.block punctuation.section.block.begin
// ^^^^ meta.block meta.block variable.language
// ^^^^^^^^ meta.block meta.block
// ^ meta.block meta.block punctuation.section.block.end
path::{Path, PathBuf},
// ^^^^^^ meta.block meta.path
// ^ meta.block meta.block punctuation.section.block.begin
// ^^^^ meta.block meta.block storage.type.source
// ^^^^^^^ meta.block meta.block storage.type.source
// ^ meta.block meta.block punctuation.section.block.end
};
// ^ meta.block punctuation.section.block.end
// ^ punctuation.terminator
extern {
// <- keyword.other
//^^^^ keyword.other
// ^ meta.block punctuation.section.block.begin
fn foo(x: i32, ...);
}
// <- meta.block punctuation.section.block.end
extern "stdcall" { }
// <- keyword.other
// ^^^^^^^^^ string.quoted.double