aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/test_data/parser/fragments
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/test_data/parser/fragments')
-rw-r--r--crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast8
-rw-r--r--crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast12
-rw-r--r--crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast4
-rw-r--r--crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast14
-rw-r--r--crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast10
-rw-r--r--crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast1
-rw-r--r--crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs1
-rw-r--r--crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast22
-rw-r--r--crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs1
26 files changed, 90 insertions, 0 deletions
diff --git a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs
new file mode 100644
index 000000000..ca49acb07
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/expr/err/0000_truncated_add.rs
@@ -0,0 +1 @@
1 +
diff --git a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast
new file mode 100644
index 000000000..fa78a02a6
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rast
@@ -0,0 +1,8 @@
1[email protected]
2 [email protected]
3 [email protected] "1"
4 [email protected] " "
5 [email protected] "+"
6 [email protected] " "
7 [email protected]
8 [email protected] "2"
diff --git a/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs
new file mode 100644
index 000000000..e0ef58402
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/expr/ok/0000_add.rs
@@ -0,0 +1 @@
1 + 2
diff --git a/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast b/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs b/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs
new file mode 100644
index 000000000..dc32389bb
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/item/err/0000_extra_keyword.rs
@@ -0,0 +1 @@
fn fn foo() {}
diff --git a/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast b/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast
new file mode 100644
index 000000000..93c429e12
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rast
@@ -0,0 +1,12 @@
1[email protected]
2 [email protected] "fn"
3 [email protected] " "
4 [email protected]
5 [email protected] "foo"
6 [email protected]
7 [email protected] "("
8 [email protected] ")"
9 [email protected] " "
10 [email protected]
11 [email protected] "{"
12 [email protected] "}"
diff --git a/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs b/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs
new file mode 100644
index 000000000..8f3b7ef11
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/item/ok/0000_fn.rs
@@ -0,0 +1 @@
fn foo() {}
diff --git a/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast b/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs b/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs
new file mode 100644
index 000000000..2046de049
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/err/0000_reserved_word.rs
@@ -0,0 +1 @@
struct
diff --git a/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast b/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs b/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs
new file mode 100644
index 000000000..745e8d376
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/err/0001_expression.rs
@@ -0,0 +1 @@
a + b
diff --git a/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast b/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast
new file mode 100644
index 000000000..0c5d4360f
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast
@@ -0,0 +1,4 @@
1[email protected]
2 [email protected]
3 [email protected]
4 [email protected] "foo"
diff --git a/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs b/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs
new file mode 100644
index 000000000..257cc5642
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs
@@ -0,0 +1 @@
foo
diff --git a/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast b/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast
new file mode 100644
index 000000000..4a2b45e6a
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rast
@@ -0,0 +1,14 @@
1[email protected]
2 [email protected]
3 [email protected]
4 [email protected]
5 [email protected]
6 [email protected] "foo"
7 [email protected] "::"
8 [email protected]
9 [email protected]
10 [email protected] "bar"
11 [email protected] "::"
12 [email protected]
13 [email protected]
14 [email protected] "baz"
diff --git a/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs b/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs
new file mode 100644
index 000000000..81e0b21cd
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/path/ok/0001_multipart.rs
@@ -0,0 +1 @@
foo::bar::baz
diff --git a/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast b/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs b/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs
new file mode 100644
index 000000000..ae26fc455
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/err/0000_reserved_word.rs
@@ -0,0 +1 @@
fn
diff --git a/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast b/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs b/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs
new file mode 100644
index 000000000..61a391d08
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/err/0001_missing_paren.rs
@@ -0,0 +1 @@
Some(x
diff --git a/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast b/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast
new file mode 100644
index 000000000..dcf102339
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rast
@@ -0,0 +1,10 @@
1[email protected]
2 [email protected]
3 [email protected]
4 [email protected]
5 [email protected] "Some"
6 [email protected] "("
7 [email protected]
8 [email protected]
9 [email protected] "x"
10 [email protected] ")"
diff --git a/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs b/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs
new file mode 100644
index 000000000..87114dd78
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/pattern/ok/0000_enum.rs
@@ -0,0 +1 @@
Some(x)
diff --git a/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast b/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast
new file mode 100644
index 000000000..5df7507e2
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rast
@@ -0,0 +1 @@
ERROR
diff --git a/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs b/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs
new file mode 100644
index 000000000..caa4d7c09
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/type/err/0000_missing_close.rs
@@ -0,0 +1 @@
Result<Foo, Bar
diff --git a/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast b/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast
new file mode 100644
index 000000000..38c15b581
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rast
@@ -0,0 +1,22 @@
1[email protected]
2 [email protected]
3 [email protected]
4 [email protected]
5 [email protected] "Result"
6 [email protected]
7 [email protected] "<"
8 [email protected]
9 [email protected]
10 [email protected]
11 [email protected]
12 [email protected]
13 [email protected] "Foo"
14 [email protected] ","
15 [email protected] " "
16 [email protected]
17 [email protected]
18 [email protected]
19 [email protected]
20 [email protected]
21 [email protected] "Bar"
22 [email protected] ">"
diff --git a/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs b/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs
new file mode 100644
index 000000000..b50b3bb3b
--- /dev/null
+++ b/crates/syntax/test_data/parser/fragments/type/ok/0000_result.rs
@@ -0,0 +1 @@
Result<Foo, Bar>