From 0663c24222ebb2da10c26f690ad508e7b1fae8f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 28 Jan 2018 13:01:39 +0300 Subject: Add recovery test --- tests/data/parser/err/0007_stray_curly_in_file.rs | 9 +++++++ tests/data/parser/err/0007_stray_curly_in_file.txt | 28 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tests/data/parser/err/0007_stray_curly_in_file.rs create mode 100644 tests/data/parser/err/0007_stray_curly_in_file.txt (limited to 'tests/data') diff --git a/tests/data/parser/err/0007_stray_curly_in_file.rs b/tests/data/parser/err/0007_stray_curly_in_file.rs new file mode 100644 index 000000000..dc869fb78 --- /dev/null +++ b/tests/data/parser/err/0007_stray_curly_in_file.rs @@ -0,0 +1,9 @@ +} + +struct S; + +} + +fn foo(){} + +} diff --git a/tests/data/parser/err/0007_stray_curly_in_file.txt b/tests/data/parser/err/0007_stray_curly_in_file.txt new file mode 100644 index 000000000..04bf17bc7 --- /dev/null +++ b/tests/data/parser/err/0007_stray_curly_in_file.txt @@ -0,0 +1,28 @@ +FILE@[0; 31) + ERROR@[0; 3) + err: `expected item` + R_CURLY@[0; 1) + WHITESPACE@[1; 3) + STRUCT_ITEM@[3; 14) + STRUCT_KW@[3; 9) + WHITESPACE@[9; 10) + IDENT@[10; 11) + SEMI@[11; 12) + WHITESPACE@[12; 14) + ERROR@[14; 17) + err: `expected item` + R_CURLY@[14; 15) + WHITESPACE@[15; 17) + FN_ITEM@[17; 29) + FN_KW@[17; 19) + WHITESPACE@[19; 20) + IDENT@[20; 23) + L_PAREN@[23; 24) + R_PAREN@[24; 25) + L_CURLY@[25; 26) + R_CURLY@[26; 27) + WHITESPACE@[27; 29) + ERROR@[29; 31) + err: `expected item` + R_CURLY@[29; 30) + WHITESPACE@[30; 31) -- cgit v1.2.3