From 137b1ccb715fe795cdf6c528bef6f8df3387f158 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Sun, 27 Jan 2019 15:20:36 +0000 Subject: Add a test for inner attributes on extern blocks --- .../data/parser/ok/0045_extern_inner_attributes.rs | 4 ++++ .../parser/ok/0045_extern_inner_attributes.txt | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.rs create mode 100644 crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.txt (limited to 'crates/ra_syntax/tests') diff --git a/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.rs b/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.rs new file mode 100644 index 000000000..fe67e2df4 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.rs @@ -0,0 +1,4 @@ +extern "C" { + //! This is a doc comment + #![doc("This is also a doc comment")] +} diff --git a/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.txt b/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.txt new file mode 100644 index 000000000..c68e1b271 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/ok/0045_extern_inner_attributes.txt @@ -0,0 +1,26 @@ +SOURCE_FILE@[0; 87) + EXTERN_BLOCK@[0; 86) + ABI@[0; 10) + EXTERN_KW@[0; 6) + WHITESPACE@[6; 7) + STRING@[7; 10) + WHITESPACE@[10; 11) + EXTERN_ITEM_LIST@[11; 86) + L_CURLY@[11; 12) + WHITESPACE@[12; 17) + COMMENT@[17; 42) + WHITESPACE@[42; 47) + ATTR@[47; 84) + POUND@[47; 48) + EXCL@[48; 49) + TOKEN_TREE@[49; 84) + L_BRACK@[49; 50) + IDENT@[50; 53) "doc" + TOKEN_TREE@[53; 83) + L_PAREN@[53; 54) + STRING@[54; 82) + R_PAREN@[82; 83) + R_BRACK@[83; 84) + WHITESPACE@[84; 85) + R_CURLY@[85; 86) + WHITESPACE@[86; 87) -- cgit v1.2.3