aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser/ok
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-23 18:30:00 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-23 18:30:00 +0000
commit302508d5bbcc261f8fe403714a7a7e1f5382879b (patch)
tree72b32afb919c5317219c0891ced8c9725d622bbc /crates/ra_syntax/tests/data/parser/ok
parent0b942cbcb071811a811aa35feaa80950c2415075 (diff)
parent3b70acad0106e4ffe5ee68d565c9130b5b271e22 (diff)
Merge #616
616: Lex raw idents correctly r=matklad a=jrobsonchase One question: What's the intent of the text by the `IDENT` node under `NAME`? Should it be the actual token text or the semantic name? Closes #611 Co-authored-by: Josh Robson Chase <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/ok')
-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
4 files changed, 42 insertions, 0 deletions
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)