aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/data/lexer/0011_keywords.rs2
-rw-r--r--crates/ra_syntax/tests/data/lexer/0011_keywords.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs1
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt16
4 files changed, 20 insertions, 1 deletions
diff --git a/crates/ra_syntax/tests/data/lexer/0011_keywords.rs b/crates/ra_syntax/tests/data/lexer/0011_keywords.rs
index e6bf64d4d..1e91bff4e 100644
--- a/crates/ra_syntax/tests/data/lexer/0011_keywords.rs
+++ b/crates/ra_syntax/tests/data/lexer/0011_keywords.rs
@@ -1,3 +1,3 @@
1fn use struct trait enum impl true false as extern crate 1async fn use struct trait enum impl true false as extern crate
2mod pub self super in where for loop while if match const 2mod pub self super in where for loop while if match const
3static mut type ref let else move return 3static mut type ref let else move return
diff --git a/crates/ra_syntax/tests/data/lexer/0011_keywords.txt b/crates/ra_syntax/tests/data/lexer/0011_keywords.txt
index d6a1abe8a..22c00eefb 100644
--- a/crates/ra_syntax/tests/data/lexer/0011_keywords.txt
+++ b/crates/ra_syntax/tests/data/lexer/0011_keywords.txt
@@ -1,3 +1,5 @@
1ASYNC_KW 5 "async"
2WHITESPACE 1 " "
1FN_KW 2 "fn" 3FN_KW 2 "fn"
2WHITESPACE 1 " " 4WHITESPACE 1 " "
3USE_KW 3 "use" 5USE_KW 3 "use"
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs
new file mode 100644
index 000000000..f4adcb62b
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.rs
@@ -0,0 +1 @@
async fn foo() {}
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt
new file mode 100644
index 000000000..d1a706ecc
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/ok/0124_async_fn.txt
@@ -0,0 +1,16 @@
1SOURCE_FILE@[0; 18)
2 FN_DEF@[0; 17)
3 ASYNC_KW@[0; 5)
4 WHITESPACE@[5; 6)
5 FN_KW@[6; 8)
6 WHITESPACE@[8; 9)
7 NAME@[9; 12)
8 IDENT@[9; 12) "foo"
9 PARAM_LIST@[12; 14)
10 L_PAREN@[12; 13)
11 R_PAREN@[13; 14)
12 WHITESPACE@[14; 15)
13 BLOCK@[15; 17)
14 L_CURLY@[15; 16)
15 R_CURLY@[16; 17)
16 WHITESPACE@[17; 18)