From bc99e95d7d954701c36142881302bb70e791bec1 Mon Sep 17 00:00:00 2001 From: David Lattimore Date: Fri, 19 Jun 2020 07:43:19 +1000 Subject: Implement APIs for parsing expressions, types, paths, patterns and items --- .../parser/fragments/path/ok/0000_single_ident.rast | 4 ++++ .../parser/fragments/path/ok/0000_single_ident.rs | 1 + .../test_data/parser/fragments/path/ok/0001_multipart.rast | 14 ++++++++++++++ .../test_data/parser/fragments/path/ok/0001_multipart.rs | 1 + 4 files changed, 20 insertions(+) create mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast create mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs create mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast create mode 100644 crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs (limited to 'crates/ra_syntax/test_data/parser/fragments/path/ok') diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast new file mode 100644 index 000000000..0c5d4360f --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rast @@ -0,0 +1,4 @@ +PATH@0..3 + PATH_SEGMENT@0..3 + NAME_REF@0..3 + IDENT@0..3 "foo" diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs new file mode 100644 index 000000000..257cc5642 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0000_single_ident.rs @@ -0,0 +1 @@ +foo diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast new file mode 100644 index 000000000..4a2b45e6a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rast @@ -0,0 +1,14 @@ +PATH@0..13 + PATH@0..8 + PATH@0..3 + PATH_SEGMENT@0..3 + NAME_REF@0..3 + IDENT@0..3 "foo" + COLON2@3..5 "::" + PATH_SEGMENT@5..8 + NAME_REF@5..8 + IDENT@5..8 "bar" + COLON2@8..10 "::" + PATH_SEGMENT@10..13 + NAME_REF@10..13 + IDENT@10..13 "baz" diff --git a/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs new file mode 100644 index 000000000..81e0b21cd --- /dev/null +++ b/crates/ra_syntax/test_data/parser/fragments/path/ok/0001_multipart.rs @@ -0,0 +1 @@ +foo::bar::baz -- cgit v1.2.3