aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/test_data/parser
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2020-08-25 16:20:29 +0100
committerAleksey Kladov <aleksey.kladov@gmail.com>2020-08-25 16:22:23 +0100
commit18b667cfcb31b2c5e421d12a34b34e83165603f4 (patch)
treec9a8da95da29f52b35e7f06171a34ecaeb9b8cfa /crates/syntax/test_data/parser
parent6b8bc132dc6dee538964fffa0720480beb5b25dd (diff)
Complete `pub` in fields
Diffstat (limited to 'crates/syntax/test_data/parser')
-rw-r--r--crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rast31
-rw-r--r--crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rs1
2 files changed, 32 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rast b/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rast
new file mode 100644
index 000000000..ba8e50993
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rast
@@ -0,0 +1,31 @@
1SOURCE_FILE@0..25
2 STRUCT@0..24
3 STRUCT_KW@0..6 "struct"
4 WHITESPACE@6..7 " "
5 NAME@7..8
6 IDENT@7..8 "S"
7 WHITESPACE@8..9 " "
8 RECORD_FIELD_LIST@9..24
9 L_CURLY@9..10 "{"
10 WHITESPACE@10..11 " "
11 RECORD_FIELD@11..12
12 NAME@11..12
13 IDENT@11..12 "f"
14 WHITESPACE@12..13 " "
15 RECORD_FIELD@13..22
16 VISIBILITY@13..16
17 PUB_KW@13..16 "pub"
18 WHITESPACE@16..17 " "
19 NAME@17..18
20 IDENT@17..18 "g"
21 COLON@18..19 ":"
22 WHITESPACE@19..20 " "
23 TUPLE_TYPE@20..22
24 L_PAREN@20..21 "("
25 R_PAREN@21..22 ")"
26 WHITESPACE@22..23 " "
27 R_CURLY@23..24 "}"
28 WHITESPACE@24..25 "\n"
29error 12..12: expected COLON
30error 12..12: expected type
31error 12..12: expected COMMA
diff --git a/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rs b/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rs
new file mode 100644
index 000000000..da32227ad
--- /dev/null
+++ b/crates/syntax/test_data/parser/inline/err/0014_struct_field_recover.rs
@@ -0,0 +1 @@
struct S { f pub g: () }