From b61617f752668d1425133d0bf32d62dd1135c66a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 8 Jan 2018 21:57:19 +0300 Subject: G: special-case C++ semicolon --- tests/data/parser/err/0003_C++_semicolon.rs | 4 ++++ tests/data/parser/err/0003_C++_semicolon.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/data/parser/err/0003_C++_semicolon.rs create mode 100644 tests/data/parser/err/0003_C++_semicolon.txt (limited to 'tests/data/parser/err') diff --git a/tests/data/parser/err/0003_C++_semicolon.rs b/tests/data/parser/err/0003_C++_semicolon.rs new file mode 100644 index 000000000..009312270 --- /dev/null +++ b/tests/data/parser/err/0003_C++_semicolon.rs @@ -0,0 +1,4 @@ +struct S { + a: i32, + b: String, +}; \ No newline at end of file diff --git a/tests/data/parser/err/0003_C++_semicolon.txt b/tests/data/parser/err/0003_C++_semicolon.txt new file mode 100644 index 000000000..9308bb330 --- /dev/null +++ b/tests/data/parser/err/0003_C++_semicolon.txt @@ -0,0 +1,27 @@ +FILE@[0; 40) + STRUCT_ITEM@[0; 39) + STRUCT_KW@[0; 6) + WHITESPACE@[6; 7) + IDENT@[7; 8) + WHITESPACE@[8; 9) + L_CURLY@[9; 10) + STRUCT_FIELD@[10; 21) + WHITESPACE@[10; 15) + IDENT@[15; 16) + COLON@[16; 17) + WHITESPACE@[17; 18) + IDENT@[18; 21) + COMMA@[21; 22) + STRUCT_FIELD@[22; 36) + WHITESPACE@[22; 27) + IDENT@[27; 28) + COLON@[28; 29) + WHITESPACE@[29; 30) + IDENT@[30; 36) + COMMA@[36; 37) + WHITESPACE@[37; 38) + R_CURLY@[38; 39) + ERROR@[39; 40) + err: `expected item, found `;` +consider removing this semicolon` + SEMI@[39; 40) -- cgit v1.2.3