diff --git a/Cargo.toml b/Cargo.toml index 350e9a5..8f4aaa7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,12 @@ resolver = "2" package.authors = ["DragoČ™ Tiselice "] package.edition = "2021" -package.version = "0.1.0" +package.version = "0.0.0-prealpha0" [workspace.dependencies] -pest = { path = "./pest" } -pest_meta = { path = "./meta" } -pest_generator = { path = "./generator" } +pest3 = { path = "./pest", package = "pest3" } +pest3_meta = { path = "./meta", package = "pest3_meta" } +pest3_generator = { path = "./generator", package = "pest3_generator" } unicode-width = { version = "0.1.11" } -pest2 = { version = "2.7.6", package = "pest" } +pest2 = { version = "2.7.8", package = "pest" } +pest2_derive = { version = "2.7.8", package = "pest_derive" } \ No newline at end of file diff --git a/derive/Cargo.toml b/derive/Cargo.toml index f2ded99..2be70b9 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pest_derive" +name = "pest3_derive" # authors = [] # List authors later :) version.workspace = true @@ -11,8 +11,8 @@ edition.workspace = true proc-macro = true [dependencies] -pest_generator.workspace = true +pest3_generator.workspace = true [dev-dependencies] -pest.workspace = true +pest3.workspace = true anyhow = "1" diff --git a/derive/examples/reader.rs b/derive/examples/reader.rs index 5687617..d4e8b4d 100644 --- a/derive/examples/reader.rs +++ b/derive/examples/reader.rs @@ -1,5 +1,5 @@ -use pest::typed::{PairTree, TypedNode as _}; -use pest_derive::Parser; +use pest3::typed::{PairTree, TypedNode as _}; +use pest3_derive::Parser; use std::io::{stdin, BufRead}; #[derive(Parser)] diff --git a/derive/src/lib.rs b/derive/src/lib.rs index e2ac36e..46d7071 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -13,5 +13,5 @@ use proc_macro::TokenStream; ) )] pub fn derive_typed_parser(input: TokenStream) -> TokenStream { - pest_generator::typed::derive_typed_parser(input.into(), true, true).into() + pest3_generator::typed::derive_typed_parser(input.into(), true, true).into() } diff --git a/derive/tests/grammar.rs b/derive/tests/grammar.rs index 0e95014..33ac595 100644 --- a/derive/tests/grammar.rs +++ b/derive/tests/grammar.rs @@ -11,11 +11,11 @@ //! and modified. //! Overridden the macro [`parses_to`]. -use pest::{ +use pest3::{ token::Pair, typed::{PairTree, TypedNode}, }; -use pest_derive::Parser; +use pest3_derive::Parser; #[derive(Parser)] #[grammar = "tests/grammar.pest"] diff --git a/derive/tests/json.rs b/derive/tests/json.rs index e2c4200..f447924 100644 --- a/derive/tests/json.rs +++ b/derive/tests/json.rs @@ -4,7 +4,7 @@ /// Grammar rules of a sample JSON parser #[allow(missing_docs)] pub mod json { - use pest_derive::Parser; + use pest3_derive::Parser; /// JSON parser. #[derive(Parser)] @@ -14,7 +14,7 @@ pub mod json { #[cfg(test)] mod tests { - use pest::typed::{PairContainer, TypedParser}; + use pest3::typed::{PairContainer, TypedParser}; use crate::{json, json::generics::*}; #[test] diff --git a/derive/tests/sample.rs b/derive/tests/sample.rs index 56ee19c..577f700 100644 --- a/derive/tests/sample.rs +++ b/derive/tests/sample.rs @@ -1,7 +1,7 @@ #![allow(unused_variables)] use anyhow::Result; -use pest::typed::TypedNode as _; -use pest_derive::Parser; +use pest3::typed::TypedNode as _; +use pest3_derive::Parser; #[derive(Parser)] #[grammar = "../meta/tests/pest3sample.pest"] diff --git a/derive/tests/sequence.rs b/derive/tests/sequence.rs index 061dc45..55811c0 100644 --- a/derive/tests/sequence.rs +++ b/derive/tests/sequence.rs @@ -1,5 +1,5 @@ -use pest::typed::TypedNode; -use pest_derive::Parser; +use pest3::typed::TypedNode; +use pest3_derive::Parser; #[derive(Parser)] #[grammar_inline = r#" @@ -22,7 +22,7 @@ macro_rules! test { ($name:ident, $input:literal, $($fields:tt)*) => { mod $name { use super::rules; - use pest::typed::TypedNode; + use pest3::typed::TypedNode; #[test] fn matched() -> anyhow::Result<()> { diff --git a/derive/tests/skip.rs b/derive/tests/skip.rs index 362eb67..566959c 100644 --- a/derive/tests/skip.rs +++ b/derive/tests/skip.rs @@ -1,7 +1,7 @@ #![allow(unused_variables)] use anyhow::Result; -use pest::typed::TypedNode as _; -use pest_derive::Parser; +use pest3::typed::TypedNode as _; +use pest3_derive::Parser; #[derive(Parser)] #[grammar_inline = r#" diff --git a/generator/Cargo.toml b/generator/Cargo.toml index f560bca..dd27848 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pest_generator" +name = "pest3_generator" version.workspace = true authors.workspace = true edition.workspace = true @@ -8,8 +8,8 @@ edition.workspace = true proc-macro2 = "1.0" quote = "1.0" syn = "2.0" -pest_meta.workspace = true -pest.workspace = true +pest3_meta.workspace = true +pest3.workspace = true [dev-dependencies] lazy_static = { version = "1.4.0" } diff --git a/generator/src/common.rs b/generator/src/common.rs index f267318..e0d3e74 100644 --- a/generator/src/common.rs +++ b/generator/src/common.rs @@ -1,6 +1,6 @@ //! Some common codes that most backends will use. -use pest_meta::{doc::DocComment, parser::ParseRule}; +use pest3_meta::{doc::DocComment, parser::ParseRule}; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; use std::path::PathBuf; diff --git a/generator/src/typed/generator.rs b/generator/src/typed/generator.rs index 3b0057b..6c5eee7 100644 --- a/generator/src/typed/generator.rs +++ b/generator/src/typed/generator.rs @@ -10,7 +10,7 @@ use crate::{ types::option_type, types::pest, }; -use pest_meta::{ +use pest3_meta::{ doc::DocComment, error::rename_meta_rule, parser::{self, fmt_sep, ParseExpr, ParseNode, ParseRule, PathArgs, Range, Trivia}, @@ -620,7 +620,7 @@ pub fn derive_typed_parser( mod tests { use super::*; use lazy_static::lazy_static; - use pest_meta::{ + use pest3_meta::{ doc::DocComment, parser::{self, ParseRule}, }; diff --git a/generator/src/typed/module.rs b/generator/src/typed/module.rs index fd56497..94ab570 100644 --- a/generator/src/typed/module.rs +++ b/generator/src/typed/module.rs @@ -2,8 +2,8 @@ use super::{ generator::{ProcessedPathArgs, RuleRef}, output::generics, }; -use pest::unicode::unicode_property_names; -use pest_meta::parser::ParseRule; +use pest3::unicode::unicode_property_names; +use pest3_meta::parser::ParseRule; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; use std::{ @@ -232,6 +232,7 @@ impl<'g> ModuleSystem<'g> { ("stack", Rc::new(ModuleNode::Collection(pest_stack))), ("unicode", Rc::new(pest_unicode)), ]); + // FIXME: make "pest" paths to refer to pest3 crate for the moment let root = ModuleNode::Collection(HashMap::from([( "pest", Rc::new(ModuleNode::Collection(pest)), diff --git a/generator/src/types.rs b/generator/src/types.rs index 0954444..f536770 100644 --- a/generator/src/types.rs +++ b/generator/src/types.rs @@ -3,7 +3,7 @@ use quote::quote; pub fn pest() -> TokenStream { quote! { - ::pest + ::pest3 } } pub fn _str() -> TokenStream { diff --git a/generator/tests/expected.rs b/generator/tests/expected.rs index 880aca4..3f2c1b1 100644 --- a/generator/tests/expected.rs +++ b/generator/tests/expected.rs @@ -39,7 +39,7 @@ pub enum Rule { r#Drop, r#PeekAll, } -impl ::pest::typed::RuleType for Rule { +impl ::pest3::typed::RuleType for Rule { const EOI: Self = Rule::EOI; type OptionalTrivia<'i> = trivia::OptionalTrivia<'i>; type MandatoryTrivia<'i> = trivia::MandatoryTrivia<'i>; @@ -54,67 +54,67 @@ mod wrapper { #[doc = "A wrapper for `\" \"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W0; - impl ::pest::typed::wrapper::String for W0 { + impl ::pest3::typed::wrapper::String for W0 { const CONTENT: &'static ::core::primitive::str = " "; } #[doc = "A wrapper for `\"+\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W1; - impl ::pest::typed::wrapper::String for W1 { + impl ::pest3::typed::wrapper::String for W1 { const CONTENT: &'static ::core::primitive::str = "+"; } #[doc = "A wrapper for `\"(\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W2; - impl ::pest::typed::wrapper::String for W2 { + impl ::pest3::typed::wrapper::String for W2 { const CONTENT: &'static ::core::primitive::str = "("; } #[doc = "A wrapper for `\")\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W3; - impl ::pest::typed::wrapper::String for W3 { + impl ::pest3::typed::wrapper::String for W3 { const CONTENT: &'static ::core::primitive::str = ")"; } #[doc = "A wrapper for `\"r#\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W4; - impl ::pest::typed::wrapper::String for W4 { + impl ::pest3::typed::wrapper::String for W4 { const CONTENT: &'static ::core::primitive::str = "r#"; } #[doc = "A wrapper for `\"1\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W5; - impl ::pest::typed::wrapper::String for W5 { + impl ::pest3::typed::wrapper::String for W5 { const CONTENT: &'static ::core::primitive::str = "1"; } #[doc = "A wrapper for `\".\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W6; - impl ::pest::typed::wrapper::String for W6 { + impl ::pest3::typed::wrapper::String for W6 { const CONTENT: &'static ::core::primitive::str = "."; } #[doc = "A wrapper for `\"a\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W7; - impl ::pest::typed::wrapper::String for W7 { + impl ::pest3::typed::wrapper::String for W7 { const CONTENT: &'static ::core::primitive::str = "a"; } #[doc = "A wrapper for `\"b\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W8; - impl ::pest::typed::wrapper::String for W8 { + impl ::pest3::typed::wrapper::String for W8 { const CONTENT: &'static ::core::primitive::str = "b"; } #[doc = "A wrapper for `\"c\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W9; - impl ::pest::typed::wrapper::String for W9 { + impl ::pest3::typed::wrapper::String for W9 { const CONTENT: &'static ::core::primitive::str = "c"; } #[doc = "A wrapper for `\"?\"`."] #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct W10; - impl ::pest::typed::wrapper::String for W10 { + impl ::pest3::typed::wrapper::String for W10 { const CONTENT: &'static ::core::primitive::str = "?"; } } @@ -126,40 +126,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::RepOnce, 0u8>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Regular<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Regular<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Regular; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Regular<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Regular<'i> { type Inner = super::generics::RepOnce, 0u8>; type Content = super::generics::RepOnce, 0u8>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Regular<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Regular<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Regular<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Regular<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -176,13 +176,13 @@ pub mod rules { 1u8, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Atomic<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Atomic<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Atomic; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Atomic<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Atomic<'i> { type Inner = super::generics::Sequence3< super::generics::RepOnce, 0u8>, 0u8, @@ -201,29 +201,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Atomic<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Atomic<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Atomic<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Atomic<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -238,13 +238,13 @@ pub mod rules { 2u8, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#NonAtomic<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#NonAtomic<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#NonAtomic; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#NonAtomic<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#NonAtomic<'i> { type Inner = super::generics::Sequence2< super::generics::Str, 0u8, @@ -259,29 +259,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#NonAtomic<'i> { + impl<'i> ::pest3::typed::PairContainer for r#NonAtomic<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#NonAtomic<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#NonAtomic<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -291,40 +291,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::Str, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#ExactString<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#ExactString<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#ExactString; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#ExactString<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#ExactString<'i> { type Inner = super::generics::Str; type Content = super::generics::Str; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#ExactString<'i> { + impl<'i> ::pest3::typed::PairContainer for r#ExactString<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#ExactString<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#ExactString<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -334,40 +334,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::CharRange<'0', '9'>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#CharRange<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#CharRange<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#CharRange; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#CharRange<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#CharRange<'i> { type Inner = super::generics::CharRange<'0', '9'>; type Content = super::generics::CharRange<'0', '9'>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#CharRange<'i> { + impl<'i> ::pest3::typed::PairContainer for r#CharRange<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#CharRange<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#CharRange<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -377,40 +377,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#any, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Any<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Any<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Any; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Any<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Any<'i> { type Inner = super::generics::r#any; type Content = super::generics::r#any; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Any<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Any<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Any<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Any<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -427,13 +427,13 @@ pub mod rules { 1u8, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Seq<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Seq<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Seq; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Seq<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Seq<'i> { type Inner = super::generics::Sequence3< super::generics::Str, 0u8, @@ -452,29 +452,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Seq<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Seq<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Seq<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Seq<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -482,7 +482,7 @@ pub mod rules { #[derive(Clone, Debug, Eq, PartialEq)] pub struct r#Choice<'i> { #[doc = r" Matched structure."] - pub content: ::pest::std::Box< + pub content: ::pest3::std::Box< super::generics::Choice9< super::generics::Str, super::generics::Sequence2< @@ -510,13 +510,13 @@ pub mod rules { >, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Choice<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Choice<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Choice; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Choice<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Choice<'i> { type Inner = super::generics::Choice9< super::generics::Str, super::generics::Sequence2< @@ -542,7 +542,7 @@ pub mod rules { super::rules::r#Drop<'i>, super::rules::r#PeekAll<'i>, >; - type Content = ::pest::std::Box< + type Content = ::pest3::std::Box< super::generics::Choice9< super::generics::Str, super::generics::Sequence2< @@ -571,29 +571,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Choice<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Choice<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Choice<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Choice<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -603,40 +603,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::Rep, 0u8>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Rep<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Rep<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Rep; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Rep<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Rep<'i> { type Inner = super::generics::Rep, 0u8>; type Content = super::generics::Rep, 0u8>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Rep<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Rep<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Rep<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Rep<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -646,40 +646,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::RepOnce, 0u8>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#RepAtLeastOnce<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#RepAtLeastOnce<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#RepAtLeastOnce; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#RepAtLeastOnce<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#RepAtLeastOnce<'i> { type Inner = super::generics::RepOnce, 0u8>; type Content = super::generics::RepOnce, 0u8>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#RepAtLeastOnce<'i> { + impl<'i> ::pest3::typed::PairContainer for r#RepAtLeastOnce<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#RepAtLeastOnce<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#RepAtLeastOnce<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -687,42 +687,42 @@ pub mod rules { #[derive(Clone, Debug, Eq, PartialEq)] pub struct r#Opt<'i> { #[doc = r" Matched structure."] - pub content: ::pest::std::Option>, + pub content: ::pest3::std::Option>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Opt<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Opt<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Opt; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Opt<'i> { - type Inner = ::pest::std::Option>; - type Content = ::pest::std::Option>; + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Opt<'i> { + type Inner = ::pest3::std::Option>; + type Content = ::pest3::std::Option>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Opt<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Opt<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Opt<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Opt<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -733,42 +733,42 @@ pub mod rules { pub content: super::generics::RepMinMax, 0u8, 3usize, 3usize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#RepExact<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#RepExact<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#RepExact; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#RepExact<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#RepExact<'i> { type Inner = super::generics::RepMinMax, 0u8, 3usize, 3usize>; type Content = super::generics::RepMinMax, 0u8, 3usize, 3usize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#RepExact<'i> { + impl<'i> ::pest3::typed::PairContainer for r#RepExact<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#RepExact<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#RepExact<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -778,40 +778,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::RepMin, 0u8, 1usize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#RepLeft<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#RepLeft<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#RepLeft; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#RepLeft<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#RepLeft<'i> { type Inner = super::generics::RepMin, 0u8, 1usize>; type Content = super::generics::RepMin, 0u8, 1usize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#RepLeft<'i> { + impl<'i> ::pest3::typed::PairContainer for r#RepLeft<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#RepLeft<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#RepLeft<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -821,40 +821,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::RepMax, 0u8, 2usize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#RepRight<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#RepRight<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#RepRight; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#RepRight<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#RepRight<'i> { type Inner = super::generics::RepMax, 0u8, 2usize>; type Content = super::generics::RepMax, 0u8, 2usize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#RepRight<'i> { + impl<'i> ::pest3::typed::PairContainer for r#RepRight<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#RepRight<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#RepRight<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -864,41 +864,41 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::RepMinMax, 0u8, 1usize, 2usize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#RepLeftRight<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#RepLeftRight<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#RepLeftRight; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#RepLeftRight<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#RepLeftRight<'i> { type Inner = super::generics::RepMinMax, 0u8, 1usize, 2usize>; type Content = super::generics::RepMinMax, 0u8, 1usize, 2usize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#RepLeftRight<'i> { + impl<'i> ::pest3::typed::PairContainer for r#RepLeftRight<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#RepLeftRight<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#RepLeftRight<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -915,13 +915,13 @@ pub mod rules { >, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Pos<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Pos<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Pos; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Pos<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Pos<'i> { type Inner = super::generics::Positive< super::generics::Sequence2< super::generics::r#SOI, @@ -940,29 +940,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Pos<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Pos<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Pos<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Pos<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -974,13 +974,13 @@ pub mod rules { super::generics::Sequence2, 1u8>, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Neg<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Neg<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Neg; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Neg<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Neg<'i> { type Inner = super::generics::Negative< super::generics::Sequence2, 1u8>, >; @@ -989,29 +989,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Neg<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Neg<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Neg<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Neg<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1019,7 +1019,7 @@ pub mod rules { #[derive(Clone, Debug, Eq, PartialEq)] pub struct r#Push<'i> { #[doc = r" Matched structure."] - pub content: ::pest::std::Box< + pub content: ::pest3::std::Box< super::generics::r#push< super::generics::Sequence7< super::generics::Rep, 0u8>, @@ -1040,13 +1040,13 @@ pub mod rules { >, >, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Push<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Push<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Push; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Push<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Push<'i> { type Inner = super::generics::r#push< super::generics::Sequence7< super::generics::Rep, 0u8>, @@ -1065,7 +1065,7 @@ pub mod rules { 1u8, >, >; - type Content = ::pest::std::Box< + type Content = ::pest3::std::Box< super::generics::r#push< super::generics::Sequence7< super::generics::Rep, 0u8>, @@ -1087,29 +1087,29 @@ pub mod rules { >; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Push<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Push<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Push<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Push<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1119,40 +1119,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#pop<'i>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Pop<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Pop<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Pop; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Pop<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Pop<'i> { type Inner = super::generics::r#pop<'i>; type Content = super::generics::r#pop<'i>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Pop<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Pop<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Pop<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Pop<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1162,40 +1162,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#pop_all<'i>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PopAll<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PopAll<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PopAll; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PopAll<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PopAll<'i> { type Inner = super::generics::r#pop_all<'i>; type Content = super::generics::r#pop_all<'i>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PopAll<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PopAll<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PopAll<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PopAll<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1205,40 +1205,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#peek<'i>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Peek<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Peek<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Peek; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Peek<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Peek<'i> { type Inner = super::generics::r#peek<'i>; type Content = super::generics::r#peek<'i>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Peek<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Peek<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Peek<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Peek<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1248,40 +1248,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::PeekSlice1<0isize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PeekUnlimited<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PeekUnlimited<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PeekUnlimited; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PeekUnlimited<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PeekUnlimited<'i> { type Inner = super::generics::PeekSlice1<0isize>; type Content = super::generics::PeekSlice1<0isize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PeekUnlimited<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PeekUnlimited<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PeekUnlimited<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PeekUnlimited<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1291,40 +1291,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::PeekSlice1<1isize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PeekLeft<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PeekLeft<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PeekLeft; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PeekLeft<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PeekLeft<'i> { type Inner = super::generics::PeekSlice1<1isize>; type Content = super::generics::PeekSlice1<1isize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PeekLeft<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PeekLeft<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PeekLeft<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PeekLeft<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1334,40 +1334,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::PeekSlice1<0isize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PeekRight<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PeekRight<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PeekRight; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PeekRight<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PeekRight<'i> { type Inner = super::generics::PeekSlice1<0isize>; type Content = super::generics::PeekSlice1<0isize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PeekRight<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PeekRight<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PeekRight<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PeekRight<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1377,40 +1377,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::PeekSlice2<1isize, 2isize>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PeekLeftRight<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PeekLeftRight<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PeekLeftRight; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PeekLeftRight<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PeekLeftRight<'i> { type Inner = super::generics::PeekSlice2<1isize, 2isize>; type Content = super::generics::PeekSlice2<1isize, 2isize>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PeekLeftRight<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PeekLeftRight<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PeekLeftRight<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PeekLeftRight<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1420,40 +1420,40 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#drop, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#Drop<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#Drop<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#Drop; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#Drop<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#Drop<'i> { type Inner = super::generics::r#drop; type Content = super::generics::r#drop; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#Drop<'i> { + impl<'i> ::pest3::typed::PairContainer for r#Drop<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#Drop<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#Drop<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } @@ -1463,52 +1463,52 @@ pub mod rules { #[doc = r" Matched structure."] pub content: super::generics::r#peek_all<'i>, #[doc = r" Matched span."] - pub span: ::pest::Span<'i>, + pub span: ::pest3::Span<'i>, } - impl<'i> ::pest::typed::wrapper::Rule for r#PeekAll<'i> { + impl<'i> ::pest3::typed::wrapper::Rule for r#PeekAll<'i> { type Rule = super::Rule; const RULE: super::Rule = super::Rule::r#PeekAll; } - impl<'i> ::pest::typed::FullRuleStruct<'i> for r#PeekAll<'i> { + impl<'i> ::pest3::typed::FullRuleStruct<'i> for r#PeekAll<'i> { type Inner = super::generics::r#peek_all<'i>; type Content = super::generics::r#peek_all<'i>; #[inline] fn new( - content: >::Content, - span: ::pest::Span<'i>, + content: >::Content, + span: ::pest3::Span<'i>, ) -> Self { Self { content, span } } } - impl<'i> ::pest::typed::PairContainer for r#PeekAll<'i> { + impl<'i> ::pest3::typed::PairContainer for r#PeekAll<'i> { fn for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { self.content.for_self_or_for_each_child_pair(f) } fn for_self_or_for_each_child_pair( &self, - f: &mut impl ::pest::std::FnMut(::pest::token::Pair), + f: &mut impl ::pest3::std::FnMut(::pest3::token::Pair), ) { - use pest::typed::PairTree; + use pest3::typed::PairTree; f(self.as_pair_tree()) } } - impl<'i> ::pest::typed::PairTree for r#PeekAll<'i> { - fn get_span(&self) -> (::pest::std::usize, ::pest::std::usize) { + impl<'i> ::pest3::typed::PairTree for r#PeekAll<'i> { + fn get_span(&self) -> (::pest3::std::usize, ::pest3::std::usize) { (self.span.start(), self.span.end()) } } } #[doc = "Used generics."] pub mod generics { - pub use pest::choice::Choice9; - pub use pest::sequence::Sequence2; - pub use pest::sequence::Sequence3; - pub use pest::sequence::Sequence4; - pub use pest::sequence::Sequence7; - pub use pest::typed::template::{ + pub use pest3::choice::Choice9; + pub use pest3::sequence::Sequence2; + pub use pest3::sequence::Sequence3; + pub use pest3::sequence::Sequence4; + pub use pest3::sequence::Sequence7; + pub use pest3::typed::template::{ CharRange, Insens, Negative, PeekSlice1, PeekSlice2, Positive, Rep, RepMax, RepMin, RepMinMax, RepOnce, Str, ANY as any, DROP as drop, EOI, EOI as eoi, PEEK as peek, PEEK_ALL as peek_all, POP as pop, POP_ALL as pop_all, PUSH as push, SOI, SOI as soi, diff --git a/generator/tests/generator.rs b/generator/tests/generator.rs index 54070d3..e5f8d66 100644 --- a/generator/tests/generator.rs +++ b/generator/tests/generator.rs @@ -1,4 +1,4 @@ -use pest_generator::typed::derive_typed_parser; +use pest3_generator::typed::derive_typed_parser; use quote::quote; /// Use a script to format generated codes if changed. diff --git a/meta/Cargo.toml b/meta/Cargo.toml index e9f884d..e16dfc9 100644 --- a/meta/Cargo.toml +++ b/meta/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pest_meta" +name = "pest3_meta" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/pest/Cargo.toml b/pest/Cargo.toml index f415788..08cad67 100644 --- a/pest/Cargo.toml +++ b/pest/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pest" +name = "pest3" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/pest/tests/predefined_node.rs b/pest/tests/predefined_node.rs index 83937d0..398c180 100644 --- a/pest/tests/predefined_node.rs +++ b/pest/tests/predefined_node.rs @@ -6,7 +6,7 @@ extern crate alloc; #[cfg(test)] mod tests { - use pest::{ + use pest3::{ choice::Choice2, typed::{ template::*,