diff options
Diffstat (limited to 'tests/data/parser')
-rw-r--r-- | tests/data/parser/ok/0021_extern_fn.rs | 8 | ||||
-rw-r--r-- | tests/data/parser/ok/0021_extern_fn.txt | 47 | ||||
-rw-r--r-- | tests/data/parser/ok/0022_empty_extern_block.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/ok/0022_empty_extern_block.txt | 19 |
4 files changed, 79 insertions, 0 deletions
diff --git a/tests/data/parser/ok/0021_extern_fn.rs b/tests/data/parser/ok/0021_extern_fn.rs new file mode 100644 index 000000000..e929eef74 --- /dev/null +++ b/tests/data/parser/ok/0021_extern_fn.rs | |||
@@ -0,0 +1,8 @@ | |||
1 | extern fn foo() { | ||
2 | } | ||
3 | |||
4 | extern "C" fn bar() { | ||
5 | } | ||
6 | |||
7 | extern r"D" fn baz() { | ||
8 | } | ||
diff --git a/tests/data/parser/ok/0021_extern_fn.txt b/tests/data/parser/ok/0021_extern_fn.txt new file mode 100644 index 000000000..43575bdf3 --- /dev/null +++ b/tests/data/parser/ok/0021_extern_fn.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | FILE@[0; 71) | ||
2 | FN_ITEM@[0; 21) | ||
3 | ABI@[0; 7) | ||
4 | EXTERN_KW@[0; 6) | ||
5 | WHITESPACE@[6; 7) | ||
6 | FN_KW@[7; 9) | ||
7 | WHITESPACE@[9; 10) | ||
8 | IDENT@[10; 13) "foo" | ||
9 | L_PAREN@[13; 14) | ||
10 | R_PAREN@[14; 15) | ||
11 | WHITESPACE@[15; 16) | ||
12 | L_CURLY@[16; 17) | ||
13 | WHITESPACE@[17; 18) | ||
14 | R_CURLY@[18; 19) | ||
15 | WHITESPACE@[19; 21) | ||
16 | FN_ITEM@[21; 46) | ||
17 | ABI@[21; 32) | ||
18 | EXTERN_KW@[21; 27) | ||
19 | WHITESPACE@[27; 28) | ||
20 | STRING@[28; 31) | ||
21 | WHITESPACE@[31; 32) | ||
22 | FN_KW@[32; 34) | ||
23 | WHITESPACE@[34; 35) | ||
24 | IDENT@[35; 38) "bar" | ||
25 | L_PAREN@[38; 39) | ||
26 | R_PAREN@[39; 40) | ||
27 | WHITESPACE@[40; 41) | ||
28 | L_CURLY@[41; 42) | ||
29 | WHITESPACE@[42; 43) | ||
30 | R_CURLY@[43; 44) | ||
31 | WHITESPACE@[44; 46) | ||
32 | FN_ITEM@[46; 71) | ||
33 | ABI@[46; 58) | ||
34 | EXTERN_KW@[46; 52) | ||
35 | WHITESPACE@[52; 53) | ||
36 | RAW_STRING@[53; 57) | ||
37 | WHITESPACE@[57; 58) | ||
38 | FN_KW@[58; 60) | ||
39 | WHITESPACE@[60; 61) | ||
40 | IDENT@[61; 64) "baz" | ||
41 | L_PAREN@[64; 65) | ||
42 | R_PAREN@[65; 66) | ||
43 | WHITESPACE@[66; 67) | ||
44 | L_CURLY@[67; 68) | ||
45 | WHITESPACE@[68; 69) | ||
46 | R_CURLY@[69; 70) | ||
47 | WHITESPACE@[70; 71) | ||
diff --git a/tests/data/parser/ok/0022_empty_extern_block.rs b/tests/data/parser/ok/0022_empty_extern_block.rs new file mode 100644 index 000000000..f5fe0e6ef --- /dev/null +++ b/tests/data/parser/ok/0022_empty_extern_block.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | extern { | ||
2 | } | ||
3 | |||
4 | extern "C" { | ||
5 | } | ||
diff --git a/tests/data/parser/ok/0022_empty_extern_block.txt b/tests/data/parser/ok/0022_empty_extern_block.txt new file mode 100644 index 000000000..789cba364 --- /dev/null +++ b/tests/data/parser/ok/0022_empty_extern_block.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | FILE@[0; 27) | ||
2 | EXTERN_BLOCK@[0; 12) | ||
3 | ABI@[0; 7) | ||
4 | EXTERN_KW@[0; 6) | ||
5 | WHITESPACE@[6; 7) | ||
6 | L_CURLY@[7; 8) | ||
7 | WHITESPACE@[8; 9) | ||
8 | R_CURLY@[9; 10) | ||
9 | WHITESPACE@[10; 12) | ||
10 | EXTERN_BLOCK@[12; 27) | ||
11 | ABI@[12; 23) | ||
12 | EXTERN_KW@[12; 18) | ||
13 | WHITESPACE@[18; 19) | ||
14 | STRING@[19; 22) | ||
15 | WHITESPACE@[22; 23) | ||
16 | L_CURLY@[23; 24) | ||
17 | WHITESPACE@[24; 25) | ||
18 | R_CURLY@[25; 26) | ||
19 | WHITESPACE@[26; 27) | ||