summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2023-02-17 17:23:50 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-02-17 17:23:50 +0000
commit0f91b48f780b54f15e39f8892d187d24d3b04f4c (patch)
tree2b233959d3883a8dc027030b9cbcfb61ecc43301
parentaabe3fdbf524a61259eef45e4803ef52e9d05134 (diff)
parentc2a5a625301f264140828b3a88240de4362fc995 (diff)
downloadpest_generator-0f91b48f780b54f15e39f8892d187d24d3b04f4c.tar.gz
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pest_generator/+/2441180 Change-Id: Ic5fa5394f7820a54830d890469b47b60ee48fb33 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml6
-rw-r--r--Cargo.toml.orig6
-rw-r--r--METADATA6
-rw-r--r--src/docs.rs6
-rw-r--r--src/lib.rs7
-rw-r--r--tests/test.pest7
7 files changed, 22 insertions, 18 deletions
diff --git a/Android.bp b/Android.bp
index bb1c5bb..78775d7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,7 +43,7 @@ rust_library_host {
name: "libpest_generator",
crate_name: "pest_generator",
cargo_env_compat: true,
- cargo_pkg_version: "2.5.4",
+ cargo_pkg_version: "2.5.5",
srcs: ["src/lib.rs"],
edition: "2021",
features: [
diff --git a/Cargo.toml b/Cargo.toml
index 8289ad8..1872aef 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2021"
rust-version = "1.56"
name = "pest_generator"
-version = "2.5.4"
+version = "2.5.5"
authors = ["DragoČ™ Tiselice <dragostiselice@gmail.com>"]
description = "pest code generator"
homepage = "https://pest.rs/"
@@ -28,11 +28,11 @@ license = "MIT/Apache-2.0"
repository = "https://github.com/pest-parser/pest"
[dependencies.pest]
-version = "2.5.4"
+version = "2.5.5"
default-features = false
[dependencies.pest_meta]
-version = "2.5.4"
+version = "2.5.5"
[dependencies.proc-macro2]
version = "1.0"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index df4b4da..ab98cb2 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
[package]
name = "pest_generator"
description = "pest code generator"
-version = "2.5.4"
+version = "2.5.5"
edition = "2021"
authors = ["DragoČ™ Tiselice <dragostiselice@gmail.com>"]
homepage = "https://pest.rs/"
@@ -18,8 +18,8 @@ default = ["std"]
std = ["pest/std"]
[dependencies]
-pest = { path = "../pest", version = "2.5.4", default-features = false }
-pest_meta = { path = "../meta", version = "2.5.4" }
+pest = { path = "../pest", version = "2.5.5", default-features = false }
+pest_meta = { path = "../meta", version = "2.5.5" }
proc-macro2 = "1.0"
quote = "1.0"
syn = "1.0"
diff --git a/METADATA b/METADATA
index 6295625..83c63eb 100644
--- a/METADATA
+++ b/METADATA
@@ -11,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/pest_generator/pest_generator-2.5.4.crate"
+ value: "https://static.crates.io/crates/pest_generator/pest_generator-2.5.5.crate"
}
- version: "2.5.4"
+ version: "2.5.5"
license_type: NOTICE
last_upgrade_date {
year: 2023
month: 2
- day: 3
+ day: 16
}
}
diff --git a/src/docs.rs b/src/docs.rs
index 8660e53..f1ce188 100644
--- a/src/docs.rs
+++ b/src/docs.rs
@@ -106,16 +106,16 @@ mod tests {
expected.insert("foo".to_owned(), "Matches foo str, e.g.: `foo`".to_owned());
expected.insert(
"bar".to_owned(),
- "Matches bar str,\n Indent 2, e.g: `bar` or `foobar`".to_owned(),
+ "Matches bar str\n\n Indent 2, e.g: `bar` or `foobar`".to_owned(),
);
expected.insert(
"dar".to_owned(),
- "Matches dar\nMatch dar description".to_owned(),
+ "Matches dar\n\nMatch dar description\n".to_owned(),
);
assert_eq!(expected, doc_comment.line_docs);
assert_eq!(
- "A parser for JSON file.\nAnd this is a example for JSON parser.\n\n indent-4-space",
+ "A parser for JSON file.\nAnd this is a example for JSON parser.\n\n indent-4-space\n",
doc_comment.grammar_doc
);
}
diff --git a/src/lib.rs b/src/lib.rs
index f9c118f..f808987 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -236,6 +236,7 @@ mod tests {
parse_derive(ast);
}
+ #[doc = "Matches dar\n\nMatch dar description\n"]
#[test]
fn test_generate_doc() {
let input = quote! {
@@ -247,17 +248,17 @@ mod tests {
let token = super::derive_parser(input, true);
let expected = quote! {
- #[doc = "A parser for JSON file.\nAnd this is a example for JSON parser.\n\n indent-4-space"]
+ #[doc = "A parser for JSON file.\nAnd this is a example for JSON parser.\n\n indent-4-space\n"]
#[allow(dead_code, non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum Rule {
#[doc = "Matches foo str, e.g.: `foo`"]
r#foo,
- #[doc = "Matches bar str,\n Indent 2, e.g: `bar` or `foobar`"]
+ #[doc = "Matches bar str\n\n Indent 2, e.g: `bar` or `foobar`"]
r#bar,
r#bar1,
- #[doc = "Matches dar\nMatch dar description"]
+ #[doc = "Matches dar\n\nMatch dar description\n"]
r#dar
}
};
diff --git a/tests/test.pest b/tests/test.pest
index c86a65f..95d484e 100644
--- a/tests/test.pest
+++ b/tests/test.pest
@@ -2,11 +2,13 @@
//! And this is a example for JSON parser.
//!
//! indent-4-space
+//!
/// Matches foo str, e.g.: `foo`
foo = { "foo" }
-/// Matches bar str,
+/// Matches bar str
+///
/// Indent 2, e.g: `bar` or `foobar`
bar = { "bar" | "foobar" }
@@ -14,7 +16,8 @@ bar = { "bar" | "foobar" }
bar1 = { "bar1" }
/// Matches dar
-
+///
/// Match dar description
+///
dar = { "da" } \ No newline at end of file