aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/tests/data')
-rw-r--r--crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs1
-rw-r--r--crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs2
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt15
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs3
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt22
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs1
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt49
8 files changed, 95 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs b/crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs
new file mode 100644
index 000000000..b40a1b6a2
--- /dev/null
+++ b/crates/ra_syntax/tests/data/lexer/0016_raw_ident.rs
@@ -0,0 +1 @@
r#raw_ident
diff --git a/crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt b/crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt
new file mode 100644
index 000000000..484689693
--- /dev/null
+++ b/crates/ra_syntax/tests/data/lexer/0016_raw_ident.txt
@@ -0,0 +1,2 @@
1IDENT 11 "r#raw_ident"
2WHITESPACE 1 "\n"
diff --git a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs b/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs
new file mode 100644
index 000000000..8380d1e79
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.rs
@@ -0,0 +1,2 @@
1fn r#foo() {
2}
diff --git a/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt b/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt
new file mode 100644
index 000000000..dcd055d86
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0039_raw_fn_item.txt
@@ -0,0 +1,15 @@
1SOURCE_FILE@[0; 15)
2 FN_DEF@[0; 14)
3 FN_KW@[0; 2)
4 WHITESPACE@[2; 3)
5 NAME@[3; 8)
6 IDENT@[3; 8) "r#foo"
7 PARAM_LIST@[8; 10)
8 L_PAREN@[8; 9)
9 R_PAREN@[9; 10)
10 WHITESPACE@[10; 11)
11 BLOCK@[11; 14)
12 L_CURLY@[11; 12)
13 WHITESPACE@[12; 13)
14 R_CURLY@[13; 14)
15 WHITESPACE@[14; 15)
diff --git a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs b/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs
new file mode 100644
index 000000000..098a60a72
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.rs
@@ -0,0 +1,3 @@
1struct S {
2 r#foo: u32
3} \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt b/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt
new file mode 100644
index 000000000..361e53152
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0040_raw_struct_item_field.txt
@@ -0,0 +1,22 @@
1SOURCE_FILE@[0; 27)
2 STRUCT_DEF@[0; 27)
3 STRUCT_KW@[0; 6)
4 WHITESPACE@[6; 7)
5 NAME@[7; 8)
6 IDENT@[7; 8) "S"
7 WHITESPACE@[8; 9)
8 NAMED_FIELD_DEF_LIST@[9; 27)
9 L_CURLY@[9; 10)
10 WHITESPACE@[10; 15)
11 NAMED_FIELD_DEF@[15; 25)
12 NAME@[15; 20)
13 IDENT@[15; 20) "r#foo"
14 COLON@[20; 21)
15 WHITESPACE@[21; 22)
16 PATH_TYPE@[22; 25)
17 PATH@[22; 25)
18 PATH_SEGMENT@[22; 25)
19 NAME_REF@[22; 25)
20 IDENT@[22; 25) "u32"
21 WHITESPACE@[25; 26)
22 R_CURLY@[26; 27)
diff --git a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs b/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs
new file mode 100644
index 000000000..d59a6d347
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.rs
@@ -0,0 +1 @@
fn foo() { let r#struct = 92; let r#trait = r#struct * 2; } \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt b/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt
new file mode 100644
index 000000000..f03ed17f5
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/ok/0041_raw_keywords.txt
@@ -0,0 +1,49 @@
1SOURCE_FILE@[0; 59)
2 FN_DEF@[0; 59)
3 FN_KW@[0; 2)
4 WHITESPACE@[2; 3)
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 PARAM_LIST@[6; 8)
8 L_PAREN@[6; 7)
9 R_PAREN@[7; 8)
10 WHITESPACE@[8; 9)
11 BLOCK@[9; 59)
12 L_CURLY@[9; 10)
13 WHITESPACE@[10; 11)
14 LET_STMT@[11; 29)
15 LET_KW@[11; 14)
16 WHITESPACE@[14; 15)
17 BIND_PAT@[15; 23)
18 NAME@[15; 23)
19 IDENT@[15; 23) "r#struct"
20 WHITESPACE@[23; 24)
21 EQ@[24; 25)
22 WHITESPACE@[25; 26)
23 LITERAL@[26; 28)
24 INT_NUMBER@[26; 28) "92"
25 SEMI@[28; 29)
26 WHITESPACE@[29; 30)
27 LET_STMT@[30; 57)
28 LET_KW@[30; 33)
29 WHITESPACE@[33; 34)
30 BIND_PAT@[34; 41)
31 NAME@[34; 41)
32 IDENT@[34; 41) "r#trait"
33 WHITESPACE@[41; 42)
34 EQ@[42; 43)
35 WHITESPACE@[43; 44)
36 BIN_EXPR@[44; 56)
37 PATH_EXPR@[44; 52)
38 PATH@[44; 52)
39 PATH_SEGMENT@[44; 52)
40 NAME_REF@[44; 52)
41 IDENT@[44; 52) "r#struct"
42 WHITESPACE@[52; 53)
43 STAR@[53; 54)
44 WHITESPACE@[54; 55)
45 LITERAL@[55; 56)
46 INT_NUMBER@[55; 56) "2"
47 SEMI@[56; 57)
48 WHITESPACE@[57; 58)
49 R_CURLY@[58; 59)